“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.
Here is the drill:
- You get stuck making a piece of code work. (i.e. Can’t extract the right object properties while looping through it)
- Open the W3Schools or MDN (Mozilla Developers Network) link to know how the core concept works.
- 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)
- 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.
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:
- 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!