Home Backend Development PHP Tutorial 10 effective ways to become a great programmer

10 effective ways to become a great programmer

Jul 25, 2016 am 09:02 AM


A good programmer is the kind of person who looks both ways even when crossing a one-way street. ——Doug Linder
As a PHP programmer in the IT industry, what drives me to go to work every day is the fun and passion for programming. But to spark fun and gain everlasting thrill, we need to learn and follow some basics to become a good programmer.
Of course the things I summarized are not that amazing. If you say that you will definitely become an excellent programmer after learning them, that is impossible. These are just some shortcuts based on my experience. The definition of an excellent programmer can be understood here as a programmer who can develop excellent IT solutions and promote the overall development of the industry.
1. Master the basics
Regardless of any industry and any job, understanding of concepts is the key to success. It's impossible to become a good programmer unless you have a strong conceptual foundation. Understanding core concepts helps you design and implement solutions in the best possible way. If you feel that you don't have a good grasp of certain concepts about core computer science and programming languages, it's not too late to go back and relearn the basics.
2.Label each code set you write (how, what)
I found that an obvious dividing line that distinguishes good and bad programmers is , do you have the passion to know "what and how"? Some programmers know exactly how their code is executed and the results of the execution. I also understand that sometimes because of time constraints, we have to move on to the next step immediately when we just know that the code will get the job done. Although this seems like a topic in another direction when it comes to problem solving, as a programmer we should delve into the problem as deeply as possible to reach the highest level. Trust me, as time goes by, you will develop this good habit without even realizing it, and the benefits will be endless. .
3.Learn more by helping others
Probably most of us only go to forums and groups when we need help ourselves. One dividing line that distinguishes good programmers from good ones is that good ones often go to these places to help others. And while they are helping others, they can also learn a lot themselves. If you are in a team, you should also help each other. Trust me, understanding the context of other people's problems, researching and proposing solutions will help you learn more and grow faster.
4.Code should be written in a simple, understandable and logical way
Just like in other aspects of life, the KISS (Keep it simple and short) rule also applies to programming field. The code should be logical and avoid being too complex. The reason why some people want to write so complex code is just to prove that they have the ability to write complex code. But my experience tells me that simple and logical code can work effectively, have fewer problems and be easier to expand. I remember this saying
Good code itself is the best document. Before you add a comment, ask yourself, "How can I improve the code so that I don't need to write this comment?" - Steve McConnell
5.Spend more time analyzing the problem, and you will learn more about it later You can spend less time repairing it
Spend more time understanding and analyzing the problem, designing the optimal solution, and then you will find that the next work will be more effective with half the effort. The design process doesn't necessarily mean using modeling languages ​​and tools. It can be as simple as looking up at the sky and brainstorming in your head. Programmers who habitually write code as soon as they get a problem will often end up with different results than what was required.
If you don’t have the overall structure of the program in your mind when you take a shower, it means you are not ready to start writing code. ——Richard Pattis
6.Be the first to analyze and review your own code
Although it is a bit difficult, knowing the problem before others find it can help you Learn how to write "nearly bug-free" code. You must be fair and rigorous in your own code reviews, and you must be able to accept reviews from others without hesitation. Close to the best, working with good programmers and actively listening to their feedback will definitely help you become a good programmer.
7.Don’t be frustrated in the face of ever-changing technology
In the IT industry recently, many people I met - either talked about their work Disappointed, or even resigned and looking for a new job - all agreed that they wanted to learn and use the latest technology. I think this wish is understandable, but I don’t think the word “latest” is quite right. Every day we hear people saying "What new tools, APIs, frameworks and other methods are coming out now" that can make programming easier. This actually happens all the time in the technology field. What we really need to pay attention to and understand is the transformation of core and basic technologies, and then look at new frameworks, tools and APIs on this basis. For example, many Java companies may change to a new web framework every other week, but its demand method is based on the client-server communication model, MVC model, filters/servlets/JSP, resource binding, and XML parsing. The core concepts remain the same. So, instead of constantly worrying about changes in frameworks and tools, take the time to learn these core concepts. Believe me, on the basis of understanding these core concepts, we can master new frameworks, tools and APIs faster.
8.Emergency measures are not effective for a long time
Many times, software programmers may adopt emergency and workaround solutions (either because of time constraints or lack of understanding of the problem) In-depth understanding, or insufficient technical experience). However, these workarounds break the code, making it difficult to extend and maintain later. I can understand that sometimes this situation is really difficult to avoid, but just like we should all tell the truth, if you tell a lie, you have to know that the lie will be exposed one day.
9.Reading documentation
One of the basic habits of a good programmer is to read a lot of documentation, technical indicators, JSR, API documentation, tutorials, etc. Reading documentation provides the necessary foundation for programming in the best possible way.
10. Learn other people’s code
I really like interacting with those good programmers who have java source code in the IDE and reading/referring to their code. Because by doing so, you can not only understand the basic knowledge, but also learn new ways to write projects. Reading and referring to some reliable and known open source code or your own advanced code will also help us program better.
The last point, not listed above: don’t compare yourself with others
As the saying goes, comparing oneself with others will make people angry. Comparing oneself with others will only lead to negative emotions and turn into unhealthy competition. Each person has his or her own strengths and weaknesses. I've seen so many times that so-called awesome programmers make stupid mistakes. Therefore, analyzing yourself, listing your shortcomings, and working hard to improve yourself is the right path.
Programming is a real fun, welcome to enjoy it.
Receive LAMP Brothers original PHP video tutorial CD/"Essential PHP in Details" for free. For details, please contact the official customer service:
http://www.lampbrother.net



Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1663
14
PHP Tutorial
1266
29
C# Tutorial
1237
24
Explain different error types in PHP (Notice, Warning, Fatal Error, Parse Error). Explain different error types in PHP (Notice, Warning, Fatal Error, Parse Error). Apr 08, 2025 am 12:03 AM

There are four main error types in PHP: 1.Notice: the slightest, will not interrupt the program, such as accessing undefined variables; 2. Warning: serious than Notice, will not terminate the program, such as containing no files; 3. FatalError: the most serious, will terminate the program, such as calling no function; 4. ParseError: syntax error, will prevent the program from being executed, such as forgetting to add the end tag.

PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1? Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1? Apr 17, 2025 am 12:06 AM

In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values ​​to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP in Action: Real-World Examples and Applications PHP in Action: Real-World Examples and Applications Apr 14, 2025 am 12:19 AM

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

What are HTTP request methods (GET, POST, PUT, DELETE, etc.) and when should each be used? What are HTTP request methods (GET, POST, PUT, DELETE, etc.) and when should each be used? Apr 09, 2025 am 12:09 AM

HTTP request methods include GET, POST, PUT and DELETE, which are used to obtain, submit, update and delete resources respectively. 1. The GET method is used to obtain resources and is suitable for read operations. 2. The POST method is used to submit data and is often used to create new resources. 3. The PUT method is used to update resources and is suitable for complete updates. 4. The DELETE method is used to delete resources and is suitable for deletion operations.

PHP: A Key Language for Web Development PHP: A Key Language for Web Development Apr 13, 2025 am 12:08 AM

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

Explain the difference between self::, parent::, and static:: in PHP OOP. Explain the difference between self::, parent::, and static:: in PHP OOP. Apr 09, 2025 am 12:04 AM

In PHPOOP, self:: refers to the current class, parent:: refers to the parent class, static:: is used for late static binding. 1.self:: is used for static method and constant calls, but does not support late static binding. 2.parent:: is used for subclasses to call parent class methods, and private methods cannot be accessed. 3.static:: supports late static binding, suitable for inheritance and polymorphism, but may affect the readability of the code.

How does PHP handle file uploads securely? How does PHP handle file uploads securely? Apr 10, 2025 am 09:37 AM

PHP handles file uploads through the $\_FILES variable. The methods to ensure security include: 1. Check upload errors, 2. Verify file type and size, 3. Prevent file overwriting, 4. Move files to a permanent storage location.

See all articles