10 The secret to being a good programmer

"A good programmer is someone who always looks both ways before crossing a one-way street." ~ Doug Linder

As a software developer working in the IT industry, what creates the motivation for us to work every day is the joy and passion in programming. But in order for that job to become an eternal pleasure and passion, one of the things you need to learn is to stick to the basics to help you become a good programmer.

It's not that I'm writing a mantra so that you can become a good programmer, my goal is to create a list of useful tips, things I've learned and applied. Use in this industry to achieve a lot of great results. Actually there is no definition of exactly what a good programmer is, but here we want to talk about the types of programmers that have developed great IT solutions and contributed to the industry as a whole. This industry grows.

Tôi phải làm gì để trở thành một lập trình viên xuất sắc? What secrets help me become a good programmer?

1. Work from the most basic things

This is true for any industry as well as any job, knowing everything at a conceptual level is the key to success. Without a solid conceptual foundation, he (or she) will never be able to become a good programmer. Understanding core concepts will help you in designing and implementing solutions in the best possible way. If you feel as if you are suffering from the fundamental knowledge of computer science and the concepts in the programming language you are using, it is never too late to go back and learn from things. most basic.

2. Always ask questions (Why? How?) With all the code you write

There is one thing I see from there that will create a clear boundary between good programmers and the rest, which is the desire to know why and how the code will run? A small number of developers will never move on to the next task if you still don't understand how the code you write will execute. I understand that in the time limit of the project end, we do not always have the conditions to do this, so sometimes we have to write code that only knows how it will meet job requirements. As a programmer, always try to research as deep as possible. This will gradually become a habit and then you will perform it on a regular basis without knowing it.

3. You learn more by helping others

Most of us have a tendency to just jump into forums and questionnaires online when we need help. Add a clear distinction between good programmers and the rest that they visit these websites regularly to help others. This helps them learn more after solving someone's problem. As in a working group, help others solve their problems. Believe me, understanding other people's problems in their context, learning and providing solutions to that problem will help you learn a lot.

4. Write simple, understandable and logical lines of code

Like almost every aspect of life, the KISS formula ( Keep it simple and short – Keeping things short and simple ) is also very effective in programming. Write logical code and avoid complexity. Sometimes people write complex code just to prove their ability to write such code. My experience shows that it's simple and logical code that always works very well, resulting in very few errors and many possibilities. I remember a very nice sentence like this:

Good code itself is a perfect document. So when you're about to add a comment, ask yourself, "How can I improve that code so there's no need to add this comment?" ~ Steve McConnell

5. Spend more time analyzing the problem, you will need less time to fix the error

Spend more time understanding, thoroughly analyzing the problem and designing a solution for it. You will notice the rest of the work only includes things that are relatively easy to do. The design is not always using the modeling language or the supreme tool, sometimes you just need to look up at the blue sky and think about the solution to that problem in mind. People who have a habit of writing strong code as soon as they receive the request often produce results that are something far different from the actual requirements.

"If you can't imagine the whole structure of a program while you're bathing, you're still not ready to code it." ~ Richard Pattis

6. Be the first to analyze and review your own lines of code

Although this is a bit difficult, try "breaking" your code before others do it and over time you will learn how to write code that is completely error-free. Regularly review your code closely and unbiased. Also, never hesitate to invite others to see if you can help with your code. Working with good programmers and getting their comments will make sure you also become a good programmer.

ide-techtalk

7. Don't panic when you see the dizzying change in the technology world

Through many ups and downs in the software industry, I met countless people who either disappointed in their work or even left their jobs to find another job, and they often said they wanted to study and Work in the latest technologies. I don't see any problem in their aspirations except the phrase 'the latest technologies'. What we hear every day is usually new tools, APIs (application programming interfaces), frameworks and other means that are constantly generated to make programming easier and faster. This will nonetheless continue in the technology world. But you need to understand that the core and core technologies change at a much slower rate than the frameworks, APIs and tools around it.

This is just like the vast ocean, above the surface, the waves are very intense, but in deep water everything is relatively quiet, smooth and most living and growing here. So feel for yourself that you are in deep water and close to core technologies. For example, in the Java Enterprise world, many web frameworks exist and almost every week new frameworks are added. But the core concepts are based on client-server communication, MVC pattern, filters / servlets / JSP, resource bundling, XML parsing, etc., and they all rarely change. So spend more time learning about core concepts than just sitting there and worrying about changing frameworks and tools always around it. Along with a solid foundation of core knowledge, you will always learn new frameworks, tools and APIs.

8. Temporary solution will not have long-term value

Many times programmers do a job with temporary solutions (maybe because of a lack of time, not knowing the problem or having no experience with that technology). But as time passes, the jobs done with these temporary solutions always result in those decaying code, making it impossible to expand or maintain and take a lot of time. to fix. So you only need to execute one job when you know the solution's input and output. I know that in some circumstances, we cannot avoid having to use a temporary solution, but like in this life, you should always tell the truth but in some circumstances The lie is also acceptable.

9. Read lots of documents

One of the essential habits of a good programmer is that they read a lot of documents. It can be software specifications, JSR, API documents, practice tutorials, etc. Reading many documents helps you create strong foundations and from there you will program in a good way. possible.

10. You can learn from other people's code

I often interact and work with a lot of talented developers who always have projects in their IDE that can read / reference in their daily work. Not only is it aimed at meeting the desire to know basic things, but they also look for other ways to write good programs. Reading and referring to reliable open source projects or the code of senior industry people can also help you become a better programmer.

And finally: Never compare yourself with others

If you compare yourself with others, it will only result in negative emotions and unhealthy competition. Those of us also have our own strengths and weaknesses. More importantly, we understand ourselves and focus on the areas in which we are most gifted. I have encountered many times programmers who are considered "players" also make very silly mistakes. So analyze yourself, list out the skills you need to develop and focus on them. Programming is a job that really brings a lot of fun, enjoy it!

I would like to conclude the article with a quote from famous programmer Martin Fowler that:

“Any idiot can write code so that a computer can understand it. But a good programmer writes code so others can understand it. ”~ Martin Fowler

Wish you soon become a good programmer and remember to help others to make progress together!

ITZone via Techmaster

Share the news now