© 2019 Tim Buchalka
  • Tim Buchalka

Four Ways to Improve Your Programming Logic Skills

Updated: Aug 2, 2019

Being able to solve problems logically and thinking logically is a key skill to have as a computer programmer. But how do you get better at logic? At actually solving problems? I've got four tips for you today which will help you become a better logical thinker and ultimately help you become a better programmer in the process. Let's get started.



We're talking about the ability to think logically, which will ultimately improve you as a computer programmer and the reason for that is you do need to have logic and being able to think logically to succeed as a programmer. So four tips I've got for you.


Number one: the ability to think. I know what you're saying "Tim, I do think", but look in today's society the way it's geared up. We've got so many distractions. We've got instant messaging, we've got Facebook, we've got Twitter, we've got YouTube videos and all these things are continually bombarding us or interrupting us. Mobile phones is another one of course. We've always got these distractions and sometimes to solve a particular problem you need to invest in time to think.


A classic example I'll use is from my Java Masterclass. I've got challenges in there. So that's basically a challenge I present to show or to actually ask you to solve a particular problem. To solve that problem isn't necessarily easy and will require you to think.


Now if you're going to hope that you can look at that problem and solve it in two minutes, we'll I'm gonna suggest to you that that's not thinking. You're not putting enough time in to think about the problem so you really do need to invest some time, turn off all the distractions, and I've got on another article about avoiding distractions on this blog.


You need to try and avoid those distractions and really put some time into thinking. The very act of allocating this time to think, and truly thinking about a problem and trying not to get distracted, that will make you a better programmer because you're training yourself, you're conditioning yourself to think and by that process you'll become a more logical thinker and ultimately become a better programmer. That's number one.


The second thing is practice. Again, another fairly simple thing. The more you practice programming, the more you do that, the better you'll get at programming and your logic skills would improve purely because you're actually practicing what you preach so to speak.

So you're actually learning the course but now you're actually applying that.


It's far better for example, when you're practicing to do it on a daily basis. So 50 minutes a day is better than a five hour block, you know, one day a week. It's better to immerse yourself in code on a more regular basis. That will help your logic skills as well because you're continually going through the code and getting better at that as a result. So that's number two.


Number three. Learn data structures and algorithms. Algorithms in particular is a step by step way to solve a particular problem. So if you learn an algorithm you can use that and apply that in your own code firstly, but secondly by the very act of going through and seeing how a particular algorithm is put together, even the step by step approach to it, that's gonna make you think logically as a result because you're understanding how other people have solved particular problems. It's really important to learn some good data structures and algorithms once you've learnt the basics of a programming language because that will take your logic skills to the next level because again you're understanding how things work.


The fourth point is pretty similar to number three in some ways. It is to start looking at other code, to other people's code and there's an abundance of code online. You'll never find a shortage of ways to find source code. Github is a great site so go to Github if you're looking to find some code and just do a search there for your programming language like java game.


For example, if you're looking for game code or java, tic tac toe or something like that or java in a particular algorithm for example binary sort, Java binary sort, there'll be an implementation on Github and you can go through and check out that code that someone else has written and understand what they've done. Now of course you can find good and bad code. I'm not suggesting that all the code is going to be good but the very act of looking through this code that other people have developed is going to make you think more logically because you are going through the concepts and reading that code and hopefully understanding it or at least aspects of it.


You can apply what you've learnt there into your own projects. Don't get discouraged. You might be thinking you're never gonna understand this or you can't figure out, you're thinking I just can't get this logic. It does come with experience. But they are the four ways to do it in my opinion. They are the best ways for you to improve your logic programming skills. Keep at it don't give up and you will succeed.


All right, so I hope that helped. If you've got any questions feel free to leave a comment and I'll get back to you.