When you make a mistake, change your perspective to view that in a different angle. Mistakes are the one that makes you wise.
Master oogway once said,
Accidents make you stronger when you move forward with the lessons it taught you, no matter what the field is. So is coding.
During my initial stages when I started to code, I've faced hard times in understanding the underlying concepts of coding.
Along the way, I learned bits and pieces that made me one step ahead of my previous version.
In this coding series, AYDT I'll explain the basic things to keep in mind while writing a piece of code.
Most of the developers use logs to test whether their code is working the way it was supposed to be. It's a good way of debugging but, some of us fails to clear the logs while moving the code to production.
something like this,
console.log("I failed to clear my logs ☹️");
System.out.print("I failed to clear my logs here too!!! ☹️");
You can find a lot more debugging ways once you start mastering the language.
You can Push the code to production without clearing the logs. Of course, it won't make any difference in the functionality nor it is going to affect it. But, is it a good practice?
Consider yourself as a user. Which one of the following console will you appreciate?
"Make your code clean by clearing the logs. Just because the user can't see, doesn't mean we can take that for granted."
While going through the portfolio of a Web Developer I came across this.
Awesome right? 😉
You can check it out the same in the dev tools of the site over here: http://seanhalpin.io/
This is how you engage your user 😎
Next time you try to log something in the console,
Remember: A fellow developer living somewhere in the world is going to look at your code. 🤪
Cover image courtesy: https://www.codeninja.com.sg/