PHP programmers have 40 bad habits and PHP programmers have 40 bad habits. Bad habits of PHP programmers, PHP programmer's 40-point bad habits 1. do not write comments 2. do not use IDE tools that can improve production efficiency 3. do not use version control 4. do not write code according to programming specifications PHP programmer's 40-point bad habits, bad habits for PHP programmers at 40 o'clock
1. do not write comments
2. do not use IDE tools that can improve production efficiency
3. do not use version control
4. write code not in accordance with programming specifications
5. do not use uniform methods
6. don't think about and plan before coding
7. do not perform encoding and security detection before executing SQL.
8. do not use test-driven development
9. Automatic error reporting (error_reporting) when encoding is not enabled)
10. do not use a good debugging tool
11. do not refactor your code (refactor)
12. do not use a layered structure like MVC
13. do not know the following concepts: KISS, DRY, MVC, OOP, and REST.
14. print or echo is directly used in a function or class to output something rather than return)
15. do not use or understand Unit testing
16. HTMl instead of data, strings, and objects types are returned.
17. hard code messages and configuration parameters)
18. SQL query not optimized
19. do not use _ autoload
20. Automatic error operations are not supported (it should be smart error correction)
21. use $ _ GET instead of $ _ POST to pass dangerous parameters (remember that these 40 items are all incorrect)
22. I don't know how to use regular expressions.
23. I have never heard of SQL injection and cross-site scripting (for security, I should understand the English of these two things: SQL injection and cross-site scripting)
24. simple configuration is not supported. parameters are passed to the class constructor. The set/get method defines constants.
25. I cannot understand the advantages and disadvantages of OOP.
26. no matter how small the things are to be done, OOP is used.
27. I think that the reusable software is OOP.
28. do not use the default value (don't choose intelligent defaults)
29. do not use a single configuration file
30. use. inc to replace. php instead of letting others see the code
31. do not use the database abstraction layer (persistence layer)
32. do not DRY during development (Dont repeat yourself)
33. do not develop reusable classes or methods
34. do not use abstract classes or interface classes, inheritance, polymorphism, encapsulation.
35. do not use the existing design pattern to optimize your program.
36. users are not allowed to define basic directories (it seems that PHP is not suitable for development based on operating systems after all)
37. the namespace is incorrectly used, and the words that are commonly used are used as prefixes. (in this way, other users may use them in the future. for example, define a function as array_push ())
38. do not use the table prefix when using the database (this is very important ...)
39. do not use or use a strange template engine (to facilitate team development, you should use common templates)
40. don't look at the PHP Framework. (most frameworks contain excellent code and advanced concepts. it is worth learning)
Example 1: Do not write comments 2. do not use IDE tools that can improve production efficiency 3. do not use version control 4. do not write code according to programming specifications...