


Get rid of these bad habits and you are no longer a rookie. Get rid of bad habits and you are no longer a rookie_PHP Tutorial
You are no longer a noob if you change these bad habits. You are not a newbie if you change bad habits. Code
2. Turn 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. Without adopting certain coding and naming standards, as well as common conventions, they cannot be implemented throughout the project development cycle
5. Not using unified development method
6. Not converting (or) not validating certain input or SQL query strings (Annotation: refer to PHP related functions)
7. Don’t plan your program thoroughly before coding
8. Not using test-driven development
9. Coding and testing without errors enabled (Translation: refer to PHP function error_reporting)
10. Turning a blind eye to the benefits of debuggers
11. Don’t refactor your code
12. Do not use MVC-like patterns to divide different levels of the program
13. Don’t know these concepts: KISS, DRY, MVC, OOP, REST
14. Instead of returning, directly output (echo/print) the content in your function or class
15. Turning a blind eye to the advantages of unit testing or general testing
16. Always return hardcoded HTML, but never return pure data, strings, or objects
17. Always hardcode "message" and "configuration parameters"
18. Not optimizing SQL query statements
19. Do not use __autoload (Annotation: refer to the relevant description in the PHP manual)
20. Intelligent error handling is not allowed (Translation: refer to PEAR’s ErrorStack)
21. Use $_GET instead of $_POST to do destructive transfer operations
22. Don’t know how to use regular expressions
23. Never heard of SQL injection or cross-site scripting
24. Simple configuration is not allowed, and the constructor of the class is not allowed to accept parameter transfer and then execute the set/get method, or constant definition at runtime
25. Not understanding the advantages and disadvantages of object-oriented programming (OOP)
26. Abusing OOP regardless of the size of the situation
27. Thinking that achieving reusable software must equal/need to make your code follow OOP
28. Not utilizing smart defaults
29. No single configuration file
30. I didn’t want to expose the file source code, but replaced it with .inc suffix.php
31. Not using database abstraction layer
32. You cannot maintain a DRY style, that is, do not repeat yourself. If you are always copying and pasting something, it means that your design is poor
33. There is no implementation that allows a function/class/method to do only one thing, nor can they be combined
34. Failed to try the features of OOP, such as abstract classes, interfaces, polymorphism, inheritance, access control modifiers (Annotation: such as public, private, protected)
35. Optimize your program system design without using existing design patterns
36. Don’t allow your users to define base directories if you have many files or directories
37. Polluting the namespace, such as naming your library functions with common strings
38. Do not use table prefix when using database tables
39. Not using a unified template engine
40. Don’t pay attention to the existing PHP development framework and are too lazy to explore; in fact, advanced development concepts and wonderful codes are contained in it.
http://www.bkjia.com/PHPjc/1064533.html
www.bkjia.com

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



How to use GitLab for project document management 1. Background introduction In the software development process, project documents are very important information. They can not only help the development team understand the needs and design of the project, but also provide reference to the testing team and customers. In order to facilitate version control and team collaboration of project documents, we can use GitLab for project document management. GitLab is a version control system based on Git. In addition to supporting code management, it can also manage project documents. 2. GitLab environment setup First, I

Introduction: PHPDoc is a comment standard for PHP code that produces easy-to-understand and informative documentation. By using specific comment tags, PHPDoc allows developers to provide important details about functions, classes, methods, and other code elements. This advanced guide takes an in-depth look at PHPDoc, demonstrating its capabilities and providing effective documentation strategies. Syntax and tags: PHPDoc comments start with double slashes (//) or multi-line comments (/**/). Here are some common annotation tags: @param: Defines the parameters of a function or method. @return: Specifies the return value of the function or method. @throws: Describes exceptions that may be thrown by a function or method. @var: defines the attributes or instances of the class

Many friends will check the status of their express delivery in the Cainiao parcel software, and some friends expressed that they want to know how to set up and enable delivery notifications. Let me introduce the operation method for you. Friends who don’t know yet should take a look. 1. After opening the Cainiao Wrap APP on your mobile phone, click "My" in the lower right corner of the page to switch to enter. 2. Click the "Settings" icon in the upper right corner of my page to open it. 3. Next, there is a "Message Notification" in the settings page. After finding it, click on it to enter. 4. Find the "Delivering" item on the package notification settings page, and click the corresponding switch button behind it to set it. When the button is blue, it means that the function is turned on. When the courier status changes to being delivered, we will be notified.

As a PHP developer, writing clear, maintainable code is crucial. Code comments are the key to achieving this goal, and phpDoc, as the document generation standard for PHP, provides us with a powerful and standardized comment tool. PHPDoc Basics PHPDoc comments are surrounded by /* and / tags and follow a specific syntax: /*** description of function or class ** @param type $ parameter name description * @ return type description */ function annotation Function annotation provides the following Information: Function description parameter type and description return value type and description For example: /*** Calculate the sum of two numbers ** @paramint$a first number * @paramint$b second number * @returnint and *

As a world-renowned short video social platform, Douyin has won the favor of a large number of users with its unique personalized recommendation algorithm. This article will delve into the value and principles of Douyin video recommendation to help readers better understand and make full use of this feature. 1. What is Douyin recommended video? Douyin recommended video uses intelligent recommendation algorithms to filter and push personalized video content to users based on their interests and behavioral habits. The Douyin platform analyzes users' viewing history, like and comment behavior, sharing records and other data to select and recommend videos that best suit users' tastes from a huge video library. This personalized recommendation system not only improves user experience, but also helps users discover more video content that matches their preferences, thereby enhancing user stickiness and retention rate. at this

Cainiao announced its official entry into the U.S. container shipping market, providing e-commerce parcel shipping services to overseas Chinese and international students across the United States. According to the relevant person in charge of the Cainiao Overseas Shopping Export Logistics Department, in the U.S. market, Cainiao provides two major consolidation products: air freight and sea freight. Air freight products focus on timeliness. After shipment from the container warehouse, the fastest delivery time is 5 days; sea freight is cheaper, with the lowest shipping fee of 12 yuan for individual group orders, and the fastest delivery time is 15 days. In addition, Cainiao Consolidation supports automatic synchronization of Taobao orders, one-click consolidation of packages across the entire network, and the ability to check package status. According to previous reports on this site, in November last year, Cainiao announced that its cross-border logistics flagship product "Global Five-Day Delivery" has covered 8 countries and regions around the world. Officially, overseas consumers can place orders on AliExpress Choice in 5 countries. Receive packages from China within working days

PHPDoc is a standardized documentation comment system for documenting PHP code. It allows developers to add descriptive information to their code using specially formatted comment blocks, thereby improving code readability and maintainability. This article will provide a comprehensive guide to help you from getting started to mastering PHPDoc. Getting Started To use PHPDoc, you simply add special comment blocks to your code, usually placed before functions, classes, or methods. These comment blocks start with /** and end with */ and contain descriptive information in between. /***Calculate the sum of two numbers**@paramint$aThe first number*@paramint$bThe second number*@returnintThe sum of two numbers*/functionsum

With the continuous development of computer hardware, the CPU cores in the processor no longer increase the clock frequency individually, but increase the number of cores. This raises an obvious question: How to get the most out of these cores? One solution is through parallel programming, which involves executing multiple tasks simultaneously to fully utilize the CPU cores. This is a unique feature of the Go language. It is a language designed specifically for concurrent programming. In this article, we will explore how to leverage Go language for concurrent programming. Coroutines First, we need to understand
