5 Ways to Improve Your Programming Logic

Effective ways for newbies

Amrit Pal Singh
CodeHeim
3 min readMar 15, 2022

--

Photo by ThisisEngineering RAEng on Unsplash

“I actually hate programming, but I love solving problems.” — Rasmus Lerdorf

Programming is all about solving problems. Like Rasmus Lerdorf, you don’t have to hate programming. Treat programming as a tool to solve problems.

When we start to learn to program, we focus on the programming constructs of a language. This is not wrong, in fact, this is how you get an introduction to programming logic.

The next step is to improve your problem-solving skills. Here are a few ways to improve your programming logic and problem-solving —

Learn Data Structures & Algorithms

Bad programmers worry about the code. Good programmers worry about data structures and their relationships.

— Linus Torvalds

Data structures are the building blocks of your code. Just learning a programming language is not good enough if you can’t use the right data structures.

Start with simpler data structures like — Stack, Queues, and Linked Lists. You will get familiar with the concepts and the implementation. Then move on to more complex data structures. Learn trees and graphs.

Go through a few great open-source repositories

Here are a few open-source projects that can teach you a lot —

Reading open-source code makes you learn coding patterns that are used across various software. You get to see techniques and coding patterns that are used in many open-source projects. These patterns will flash in front of your eyes when you see a similar problem.

Learn Frameworks and Design Patterns

The next step is to learn frameworks and design patterns that are used in the industry. For instance, if the language you choose is Python, you need to learn the frameworks and libraries like — Flask, Django, SQLAlchemy, etc.

These frameworks, libraries, and tools ease your work, force conventions, structure the code well, and help you write less code.

Break the problem

Divide and conquer your problems. Break the task at hand into tiny and measurable tasks. This makes the problem easy, small, and trackable.

When you look at a big problem you don’t know from where to start, which step to take, what is the path to the finish line. It is easy to plan a solution to a small problem.

Use pen and paper

Most of the new programmers directly hit the keyboard to write a solution to the problem at hand. It takes some time to realize you need to look at the bigger picture and try to solve it on paper or on a whiteboard.

This clears the mist and an overall solution starts showing up.

Final Thoughts

It is important to develop programming logic and problem-solving skills at the beginning of your career or even before that. Learning never stops. You learn throughout your career and keep getting better and better.

The ways I have mentioned are the ones I have tried myself when I was a naive programmer and follow these even after having years of experience.

Like to experience Medium yourself? Consider supporting me and other writers by signing up for a membership. Membership is only $5 per month, it supports us, writers, at no extra cost. If you do so, I receive a portion of the fee, and it won’t cost you more. Thank you!

--

--

Amrit Pal Singh
CodeHeim

Cloud Software Engineer | Product Development | I write about Tech and Travel | Profile https://bit.ly/3dNxaiK | Golang Web Dev Course - https://bit.ly/go-gin