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
  • Google is really stepping up. Recently, they released another 68-page version dedicated to Prompt Engineering. This time, it focuses more on API users.

    Prompt Engineering

    » Read more
  • Last night we went into production but for some reason I got hit with two painful issues, everyone. I chose to work at night but still ended up sweating bullets.

    First, npm threw me a curveball with an error that prevented me from installing packages. Talk about bad luck. After fumbling around for a bit, I was lucky enough to have run it on my machine before, so I zipped up the node_modules and pushed it to the server 😂

    Second, GCP was running fine until it suddenly crashed after a while. I couldn't ssh into it, so I had no choice but to create a new VM and plug everything back in, and it worked normally again 😩

    » Read more
  • At one point, Groq bragged that they could run Meta's open-source model at a speed of over 1 thousand tokens per second. Recently, Cerebras - a service similar to Groq, has set a new record: Over 2 thousand tokens 🫣

    Just imagine, you hit Enter and it responds immediately 🥶

    » 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

5 profound lessons

Every product comes with stories. The success of others is an inspiration for many to follow. 5 lessons learned have changed me forever. How about you? Click now!

Every product comes with stories. The success of others is an inspiration for many to follow. 5 lessons learned have changed me forever. How about you? 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 [v4kSqUsNg9i1XxO6L7] Bạn đọc đến đâu rồi?
Avatar
Xuân Hoài Tống2 years ago
@gif [xHnGkoz0KjGa0ixLzk]