Get rid of these bad habits, you're not a rookie

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

1. Tools such as Phpdoc are not used to properly annotate your code 2. Ignore 3 for excellent integrated development environments such as Zend Studio or eclipse PDT. Never used any form of version control system, such as SUBCLIPSE4. No coding and naming standards, and general conventions, can not be implemented in the project development cycle of 5. Do not use unified development mode 6. Do not convert (or) also do not validate some input or SQL query string (refer to PHP related functions) 7. Do not thoroughly plan your program before coding 8. Do not use test-driven development 9. Do not encode and test in error-enabled (see PHP function error_reporting) 10. The benefit of the debugger ignores 11. Do not refactor your code 12. Do not use a similar MVC pattern to divide the different levels of the program 13. Don't know these concepts: KISS, DRY, MVC, OOP, REST14. Instead of return, you output (echo/print) content 15 directly in your function or class. Ignoring the benefits of unit or generic testing 16. Always returns hard-coded HTML, but does not return pure data, string, or object 17. "Message" and "configuration parameters" are always hardcoded 18. Do not optimize SQL query statements 19. Do not use __autoload (Note: Refer to the PHP manual for a description) 20. Intelligent error Handling is not allowed (refer to Pear's errorstack) 21. Use GET _post for destructive transfer operations22. Do not know how to use the regular expression 23. Never heard of SQL injection or cross-site scripting 24. Simple configuration is not allowed, and the class's constructors are not allowed to accept parameter passing and then execute the Set/get method, or the run-time constant definition 25. Does not understand the advantages and disadvantages of object-oriented programming (OOP) 26. Misuse of OOP27 without regard to the size of the case. Self-fulfilling software must be equal to/need to keep your code compliant with OOP28. The smart default value of 29 is not used. There is no single configuration file 30. Do not want to expose the file source code, but replaced with the. inc suffix name. PHP31. Do not use the database abstraction layer 32. Do not keep dry style, that is, do not repeat yourself, if you are always copying and pasting something, it means you are poorly designed 33. There is no implementation that allows a function/class/method to do only one thing, and cannot combine them with 34. Not able to try the features of OOP, such as abstract classes, interfaces, polymorphism, inheritance, access control modifiers (such as public, private, protected) 35. Optimize your program system design without the existing design pattern 36. Do not allow your users to define the base directory 37 If you have many files or directories. Polluting namespaces, such as naming your library function 38 with a common string. Table Prefix 39 is not used when working with database tables. Do not use the unified template engine 40. Not concerned about the existing PHP development framework, lazy to explore, in fact, the development of advanced ideas and beautiful code is contained therein.

Get rid of these bad habits, you're not a rookie

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.