Steal these 9 HACKS to improve logic-building skills in programming

Varsha Das
Javarevisited
Published in
7 min readNov 21, 2022

--

Around 4 years back when I started my first software development internship, I realized that the ability to have sound logical and analytical skills is key to my long-term survival in this industry. Despite having a degree in Computers, that’s something I have to build myself and nobody cares enough to teach.

While there is so much buzz & pressure to crack the biggest tech companies in the world by grinding leetcode questions, I also see millions of people struggling with the same problem- the inability to build logic.

So, here’s a sneak peek at things I did and still do over the years to stay ahead of the curve.

Concepts are building blocks

Photo by Pixabay: https://www.pexels.com/photo/clear-light-bulb-355948/

Undoubtedly.

Those who are learning to code for the first time tend to jump directly onto solving the ‘X’ number of questions and crack the big tech companies.

Unless we are 100% clear on the nitty-gritty of the data structure or the algorithm, it is not a good idea to mindlessly solve questions just for the sake of solving them.

I prefer taking a much longer time to think and absorb concepts than to be in a race to complete a set number of questions or chapters.

Putting it in plain words, without a solid base, there’s no point in adding layers of complexity on top of it.

Pen and paper

Photo by Tirachard Kumtanom: https://www.pexels.com/photo/black-twist-pen-on-top-of-open-white-notebook-472311/

The humble notebook and a pen are indispensable. They are your best friends.

Always a good idea to run through the newly learned algorithm by doing a dry-run. It opens up so many aspects that one is hardly aware of when they are learning something new.

When I was learning merge sort, although I was able to visualize the entire algorithm, the moment I sat down to run through a few examples, I started to face hiccups and was not able to clearly recall the steps. It was only after a did a proper dry-run with multiple examples, that now I can confidently say that I do understand it well enough.

The same applies to anything that you learn.

And if you strive to become a better software engineer, continuous learning is the way to go.

Prepare notes

Photo by Vlada Karpovich: https://www.pexels.com/photo/crop-young-woman-writing-schedule-in-diary-on-sofa-4050344/

Always a good idea to maintain personal notes while studying than following someone else’s notes.

How can you prepare notes?
3 must-have things in the notes —

➡️ the problem statement with an example,

➡️ the brute force approach followed by the optimal solution,

➡️ a rough dry run of at least one sample test case.

A bit advanced learners can also create GitHub repos and check-in their code.

How does this help?

When you write your notes, it is pretty, much the same as explaining the concepts to yourself.

Later when you revisit the same, you discover new things and gain more clarity on the concepts.

Repeating this exercise forms new neural connections in your brain and you thus strengthen your logic naturally.

Learn recursion

Recursion — Image from AlgoDaily

This might sound a bit off-topic because we aren’t talking about anything technical here.

Look I am not going to talk about recursion but I would rather want to highlight how this ‘supposedly hard algorithm’ has been a boon in my coding journey.

Recursion helps to break down bigger problems into smaller chunks.

And that is exactly, what I did and still continue to do when faced with a big unsolvable task.

When we learn new things about programming, it is hard to digest all of it in one go.

Thus, it is important to break it down and take one “byte” at a time.

Consistency

Credits — letsliveandlearn

Practice makes a man perfect.

No matter how many times we may have heard and how cliche it sounds, it is a no-brainer that you need to show up daily to gain mastery over anything.

And the reason behind this is simple.

The power of compounding effect.

Solving one problem a day sums up to 30 problems and over a beast of 10K problems a year.

Again I am just not only talking about numbers here but I am rather talking about the volume of work that can be done because of the time given to it.

The more time you give your brain to internalize facts and figures, the more seasoned you become in that. It is not the 10K problems that you solved that are going to make you an expert in that. Rather, it is your tenacity of having solved at least a problem daily and thereby increasing the cerebral volume that helped you become a master at it.

Read code

Photo by Mizuno K: https://www.pexels.com/photo/woman-with-blond-hair-looking-at-computer-screen-with-multicoloured-code-12899138/

Probably one of the most underrated habits among all software engineers. But reading code has rightly been picking up a lot of mileage lately merely because of its myriad benefits.

As a software engineer who at the start of her career maintained dozens of legacy codes, I just can't stress enough the importance of reading code.

And when I say “reading code”, I don’t mean the literal meaning of just reading code aloud. Rather, read between the lines of the code to decipher the meaning of it and then accommodate enhancements into it so as to not primarily break it.

Sounds heavy?
Heavier than writing 1000 lines of code?

It actually is.

Because most of the code written by engineers is sadly not so easy feat to understand. It takes time.

I remember having taken almost a week i.e. close to 40 working hours to devour the ins and outs of a legacy codebase.

Although it worked in my favor, much later on but it does take its own sweet time.

In fact, doing a lot of code reviews also helps along the same lines.

Teach

To teach is to learn twice

Photo by Antoni Shkraba: https://www.pexels.com/photo/woman-talking-to-a-person-on-laptop-6266980/

The biggest reason why I started my own YouTube channel where I discuss programming, data structures, algorithms, study hacks, etc.

Does not have to be something really big.

At the very least, start by teaching yourself.

The greatest way to teach oneself is by doing Revision.

Revisit. Revise. Repeat

You’ll notice that the instant you return to the same concept after a break of seven days, not only will the question seem fresh to you, but even the code YOU typed will appear to have never been written.

This is where and when it opens up new perspectives and the concepts become stronger and the rest is history.

Build side-projects

Photo by Anete Lusina: https://www.pexels.com/photo/crop-cyber-spy-typing-on-computer-keyboard-while-hacking-system-5240544/

Although this is one such thing I would want every software engineer to do mandatorily, honestly I myself haven't been into this lately.

I do have a few ideas on my mind, but I haven’t been able to lay my hand on the right resources to get started on them. Also, it requires the right amount of research to begin working on those and I am finding myself short on time to execute things.

But, I am not cribbing about lack of time.

The point I am here to make is when you build something on your own from scratch, not only does it help to build immense self-confidence but you start connecting all the dots.

And that is all you need to become a well-rounded engineer.

Patience

Credits — QuotesGram

Long-term rewards come from exercising patience. Have sufficient faith in the process you are a part of.

Patience does pay in the long run.

For the vast majority of individuals, attempting to rush things has never been helpful.

What’s the rush all about, I don’t get it.
It makes sense that mastery takes years to develop.

Keep in mind that the journey, not the final destination, is what matters.

Thanks for reading.

If you liked this article, please click the “clap” button 👏 a few times.

Gives me enough motivation to put out more content like this. Please share it with a friend who you think this article might help.

Subscribe here to receive alerts whenever I publish an article.

If you enjoyed reading this, you could buy me a coffee here.

Connect with me — Varsha Das | LinkedIn

Follow my Youtube channel — Code With Ease — By Varsha, where we discuss Data Structures & Algorithms.

Happy learning! 😁

--

--

Varsha Das
Javarevisited

"Senior Software Engineer @Fintech | Digital Creator @Youtube | Thrive on daily excellence | ❤️ complexity -> clarity | Devoted to health and continuous growth