40 evidence that you are still a PHP rookie

Source: Internet
Author: User
Tags constant definition version control system

I would like to include this article in my "programming chores" series. Although I have been engaged in software engineering, enterprise-level software architecture and database design in formal university courses, I still feel the "evil" of the following facts from time to time. Of course, these are my subjective feelings and are oriented to eclipse:

You are a PHP rookie. If you:

1. You will not use tools such as phpdoc to properly comment out your Code
2. Turning a blind eye to excellent integrated development environments such as Zend studio or eclipse PDT
3. never used any form of version control system, such as subclipse
4. Some coding and naming standards, as well as general conventions, cannot be implemented during the project development cycle.
5. Uniform development is not used
6. Do not convert (OR) or verify some input or SQL query strings)
7. Do not plan your code before coding Program
8. Do not use test-driven development
9. coding and testing are not performed when the error is enabled. For more information, see the PHP function error_reporting)
10. Turning a blind eye to the benefits of the debugger
11. Do not refactor your code
12. Do not use MVC-like pattern to divide different layers of Programs
13. Do not know these concepts: Kiss, dry, MVC, oop, rest
14. Output (echo/print) content directly in your function or class instead of return.
15. Turning a blind eye to the advantages of unit testing or general testing
16. hard-coded HTML is always returned, but no pure data, string, or object is returned.
17. Always hard coding of "messages" and "configuration parameters"
18. Do not optimize SQL query statements
19. Do not use _ autoload)
20. Intelligent error handling is not allowed)
21. Replace $ _ Get with $ _ post for destructive transfer operations.
22. I don't know how to use regular expressions.
23. I have never heard of SQL injection or XSS
24. simple configuration is not allowed, and constructors of classes are not allowed to accept parameter passing and then execute the set/get method or constant definition during runtime.
25. Do not understand the advantages and disadvantages of Object-Oriented Programming (OOP)
26. Abuse of OOP regardless of the situation
27. Self-think that implementing reusable software must be equal to/need to make your Code comply with OOP
28. Do not use smart default values
29. There is no single configuration file
30. I don't want to expose the file source code, but I replaced. php WITH THE. inc suffix.
31. Do not use the database abstraction layer
32. Do not keep yourself dry, that is, do not repeat yourself. If you are always copying and pasting something, it means you are poorly designed.
33. A function, class, or method cannot be used together for only one thing.
34. Failed to try the advantages of OOP, such as abstract classes, interfaces, polymorphism, inheritance, and access control modifiers (such as public, private, and protected)
35. Optimize your program system design without existing design patterns
36. Your users are not allowed to define basic directories when you have many files or directories
37. The namespace is contaminated. For example, use common strings to name your library functions.
38. No table prefix is used when database tables are used.
39. Do not use the unified template engine
40. Don't pay attention to the existing php development framework, so you are too lazy to explore. In fact, advanced development concepts and wonderful code are included.

Also translated by Ma yongzhan, "40-point bad habits for PHP programmers", is concise and includes comments from translators.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.