Knowing a programming language provides obvious benefits, such as access to well-paying jobs and ability to control your own computer. It also offers a wider benefit in the development of mental skills. The lessons you learn from becoming a good coder apply to all areas of life.
Mistakes are inevitable
Writing and testing anything more than the simplest program quickly drives home the lesson that you're going to make mistakes, no matter how careful you are. To be confident that your code is right, you have to subject it to a reality check. You have to see if it runs and produces the expected result. If it doesn't, you have to go over what you've done and spot the error.
This applies to all kinds of thinking. Your reasoning seems airtight, but sometimes it fails its reality check. When this happens, you need to go back and figure out where you went wrong. Hopefully you can avoid making the same mistake again.
Check your premises
Turning an idea into computer code requires making every assumption explicit. What information is available? What values are fixed, and which ones can change? Will the conditions you're assuming always be true? A program might work correctly under the assumptions you've made, yet crash when you use it because the runtime conditions are different.
Likewise, you can make assumptions in everyday life or business planning that prove wrong. All your reasoning would have been fine if your assumptions had been right, but when the situation is different, your plans could fall apart. You have to adapt to the new conditions.
Computer programming is basically a sustained exercise in logic. If this is true, then do that. Save the result of a calculation, then use it later. The reasoning has to be exactly right at each step. There's no room for wishful thinking or "sorta like that."
Not everything in life is an exercise in deduction, but the ability to think precisely is a necessary tool. Logical fallacies lead to mistaken conclusions, and using them as reasons annoys people.
Build on other people's work
Modern programming consists largely of using code libraries that do useful things and are well-tested. Using them saves a lot of coding and debugging, and it makes the product more reliable and easier to update. Writing new code requires figuring out the best way to do things, testing it thoroughly, and making it efficient. The wheel that you reinvent is going to be more primitive than ones that are already available. However, you need to choose your libraries well, or they'll make your application less reliable than it would have been with your own code.
No matter what you're doing, building on what's already been done makes more sense than trying to devise everything by yourself. You just need good judgment when choosing your resources. The more you understand about what you're trying to do, the better your skill at selecting them will be.
Field-test your thinking
When you let other people use your code, they'll do things with it that you didn't expect. Sometimes they're malicious, but more often they just think in ways that you don't. They'll leave something out, spell it wrong, misunderstand your instructions, or otherwise do something you never dreamed they'd do. Programmers are never good testers for their own code, since it's hard to see past the assumptions built into it.
Whatever you're trying to accomplish, bouncing your plans off other people helps to see whether they make sense. A consideration you've missed might be obvious to someone else. The best ideas show their value in field testing.
Perhaps nobody's going to learn coding just to learn better thinking skills, but it's a valuable side benefit. Whatever you try to accomplish, the experience from learning and writing computer code helps to build mental habits that are valuable for solving the problem.
The courses from DaVinci Coders will give you practical software development skills to improve your income as well as your thinking. Contact us to learn more.