Save Time Coding With This Trick!

KarimTech CoursesLeave a Comment

save time coding

“God dammit! Why the f**k is this function not working already?!!” – Someone coding right now

I often find myself stuck on what are probably simple concepts for some pro-grammers (boom boom pun!). And it takes me anywhere from 5 minutes to several hours to find what I need to do using our dear Mr. Google.

But this era has ended ladies and gentlemen! You will save countless googling hours with the trick I am about to describe!

If you never experience this because you have 15 years experience I invite you to go directly to the comments section and share your wisdom!

The time saving Trick!

This tip is actually pretty simple and straight forward. Create a “Random code” folder and create a blank file to run little code snippets in it.

random code folder

For instance, if you code in JavaScript you would create a “code.js” file in your “Random code” folder and use it to experiment.

Here is the drill:

  1. You get stuck making a piece of code work. (i.e. Can’t extract the right object properties while looping through it)
  2. Google “How to do X with Y?” (i.e. “How to loop through an object’s properties in JavaScript?”)
  3. Open the W3Schools or MDN (Mozilla Developers Network) link to know how the core concept works.
  4. Open your blank file and experiment JUST this particular concept in it. (i.e. Create a random object and try to console.log each property by looping through it)
  5. Go back to your main project and apply your newly acquired knowledge!

For very simple things you can skip steps 2 and 3 all together and jump straight into your random code file.

random code

terminal result

It still doesn’t work Karim!

Please don’t throw rocks at me yet!

Obviously this is not a solution to all your problems. So if you still find yourself stuck, consider doing more research through different mediums. Chances are someone had the same issue before you!

Here is a list of tools I use when I’m stuck:

  • Google
  • YouTube
  • Stack Overflow
  • FreeCodeCamp chat
  • Medium articles

That’s all folks!

I hope you find this trick useful and it helps you save time in the future!

Feel free to share it if you liked it and think it could help someone you know!

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.