Code, code, code, but have you ever spent time exploring your programming mindset?

Code, code, code, but have you ever spent time exploring your programming mindset?

Daily short news for you
  • These past few days, I've been redesigning the interface for the note-taking app OpenNotas. It's quite strange to think about why I chose DaisyUI back then 😩

    » Read more
  • Previously, there was a mention of openai/codex - a type of agent that runs conveniently in the Terminal from OpenAI, especially since it is open source and they have now added support for other providers instead of just using the chatgpt model as before.

    Recently, Anthropic also introduced Claude Code which is quite similar to Codex, except it is not open source and you are required to use their API. Since I don't have money to experiment, I've only heard that people in the programming community praise it a lot, and it might even be better than Cursor. On the flip side, there's the risk of burning a hole in your wallet at any moment 😨

    » Read more
  • For a long time, I have been thinking about how to increase brand presence, as well as users for the blog. After much contemplation, it seems the only way is to share on social media or hope they seek it out, until...

    Wearing this shirt means no more worries about traffic jams, the more crowded it gets, the more fun it is because hundreds of eyes are watching 🤓

    (It really works, you know 🤭)

    » Read more

The Problem

We all want to improve our coding skills. By learning and practicing more, we accumulate more experience in problem-solving. When facing a familiar problem in the future, we can easily solve it because we have prior experience in handling similar issues.

Many people rely on years of experience to judge whether someone is a good coder or not. This is a reasonable approach when there is limited time to evaluate someone or when there is a lack of expertise to make the assessment. However, there are still young individuals who possess excellent problem-solving skills despite having fewer years of experience. Therefore, the number of years of experience is only a reference, and there is no certainty that more years of coding will make someone better than those with fewer years of experience.

As Malcolm Gladwell wrote in his book "Outliers: The Story of Success," "10,000 hours is the magic number of greatness." This means that you become truly skilled in something after spending at least 10,000 hours working on it. However, the concept of the 10,000-hour rule is still debatable. Is it necessary to reach this specific milestone to become excellent, or are there other ways to surpass the obsession with this number?

What is a Programming Mindset?

Simply put, it is the ability to effectively solve the problems you encounter. But what does it mean to solve a problem effectively? It depends on each individual's knowledge and experience.

Imagine you are given three tools: a fork, scissors, and a shovel to open a snack package. Which one would you choose? You would probably choose the scissors because you know that they are the simplest tool to open the package. However, would a child know which tool is best among the three? In essence, all three tools can open the snack package, but you are more familiar with them, so you know how to use them effectively.

In the world of programmers, knowing how to apply a tool or method to solve a problem in the most appropriate and accurate way is your programming mindset.

A common mistake that beginners make in coding is focusing solely on learning (memorizing) the syntax without cultivating problem-solving skills. There are many programming languages, each with its own syntax that can be overwhelming to remember. However, problem-solving skills are a continuous process that exists across languages.

To achieve this, you need to dedicate hours to explore and practice all aspects of programming. This will develop your programming mindset. The 10,000-hour rule is only a reference point to help you prioritize where to focus your efforts to reach your goals more efficiently.

Programmers with a strong programming mindset often think similarly when it comes to problem-solving. As interns, when you listen to experienced programmers discuss how to solve a particular problem, you may find it difficult to understand their smooth exchange. This is simply because you have not reached the level of programming mindset that they possess.

How to Cultivate a Programming Mindset?

How to cultivate a programming mindset?

Advice: Keep doing and experimenting until you find the best way to solve a problem. Never settle for one solution because each solution has its pros and cons.

To achieve this, there are four steps to simulate this process:

Understand

First, you need to understand the requirements accurately. Most difficult problems arise from a lack of understanding. How can you understand them? Try explaining them. This is also part of the famous "rubber duck" method. The key idea is to explain the problem to a rubber duck, and if it works, you will discover gaps in your knowledge.

A rubber duck is a famous method in the programming world. Basically, when you explain the problem to a rubber duck, it becomes a way to test if you truly understand the problem, because only when you understand can you explain it. Moreover, during the explanation, you may discover new issues that need to be addressed and find ways to solve them.

There is a famous saying in this case: "If you can't explain something in simple terms, you don't understand it." When receiving a requirement, take the time to "understand" it before starting to work on it. This is also the content of the next step.

Plan

Don't rush to code immediately. Take the time to plan how to solve the problem. Although you may understand the problem, writing out the steps of solutions will help you have a clearer understanding and discover unexpected cases.

Repeat the question "With input X, what steps are necessary to return output Y?" while planning. Identifying each input and output means you know what you need and how to solve them.

Divide and Conquer

Divide the problem into smaller pieces, the smaller the better. A large problem may seem complex, but when broken down into smaller parts, it becomes simpler, to the point where you may already be familiar with the individual components. If you encounter a problem you have never faced before, it is an opportunity for you to learn.

Ultimately, when you solve all the smaller problems, the original problem will be resolved. Remember that the divide-and-conquer method is effective in all aspects of life.

Deadlock

Sometimes, you may not fully master the smaller problems. Don't worry; everyone experiences this. The difference between a good problem solver and an average one is curiosity about the occurrence of errors rather than frustration. Essentially, during this stage, you need to practice your debugging skills to gain experience when facing similar errors. Understanding the nature of an error also means understanding how to avoid it.

Getting out of a deadlock is not the end. Apply the "evaluate and retreat" method, which means going back to a previous step to see if there is a faster way to solve the problem. Even if you have solved the problem, take the time to evaluate whether the solution is truly effective. Is there anything you can do differently to improve the outcome?

Conclusion

The programming mindset exists within all of us. You can truly master it through daily practice and training. Understanding the importance of a programming mindset helps you focus on your personal and professional development.

Premium
Hello

The secret stack of Blog

As a developer, are you curious about the technology secrets or the technical debts of this blog? All secrets will be revealed in the article below. What are you waiting for, click now!

As a developer, are you curious about the technology secrets or the technical debts of this blog? All secrets will be revealed in the article below. What are you waiting for, click now!

View all

Subscribe to receive new article notifications

or
* The summary newsletter is sent every 1-2 weeks, cancel anytime.

Comments (2)

Leave a comment...
Avatar
Gin Na2 years ago

Bài viết truyền động lực ghê

Reply
Avatar
Xuân Hoài Tống2 years ago

Nhớ ghé đọc thêm nhiều bài hơn nữa nhé bạn

Avatar
Nhí Nhố Tí2 years ago

@gif [10uEX5kfeodYgo]

Reply
Avatar
Xuân Hoài Tống2 years ago

@gif [xHnGkoz0KjGa0ixLzk]

Avatar
Xuân Hoài Tống2 years ago

@gif [v4kSqUsNg9i1XxO6L7] Bạn đọc đến đâu rồi?