Monday, March 28, 2016

Time to CODE SMART


If you are really involved in coding, you know that sometimes you want to go straight to your favorite IDE and start typing code. If the code fails, well, we keep trying and trying until we get the desire result. However, something that I have learned while working in a big company, with multiple teams is that........I need to perform some steps before typing any code, and these are:

  • Understand
  • Analyze
  • Run
  • Check the logs
  • REPEAT

I know, I know, you learned all those fancy ninja programming techniques and you feel like don't need to waste time reading and analyzing, plus you heard that Facebook was created in only one night, and you want to be the next Mark Z., blah blah, blah.....but believe me, those steps are a must.

Of course, when you work at home, maybe in some personal projects, you know the code, you know how to do your stuff and you have no  pressure on finishing something, but when you work on big projects and there are people waiting for your code....everything changes, hell yeah

First of all, It is important to UNDERSTAND what you need to do with the code and have a clear idea of the tasks you are being assigned. Yeah I know, it sounds obvious, but it is the first step

Second, ANALYZE the code. Yes, ANALYZE . Make sure you start going line by line before touching anything, Make sure you know how things work and from where you are getting values, variables, sources, etc....A - N - A - L - Y - Z - E . =)

Third, RUN!, not like Forest Gump of course, RUN the code only, if you can "run" and RUN the code at the same time cool for you, working out and typing code at the same sounds healthy, lol.. Once you understood what you need to do, analyzed the code you have to work on, then you would need to RUN the code and see how it works. You can reproduce any scenario and understand the current result and why something needs to be changed.

Fourth, CHECK THE LOGS. this is really important. There you can see any exception or error message that can guide you when coding. Yeap, don't be scared, logs files are friendly, they don't bite.

Last but not least, REPEAT all the steps above mentioned. "Hold on Rolo, did you say REPEAT all the steps?" Yes!, Yes!, as many times as you need. Believe me, you will waste more time if you start coding without performing all the steps I have mentioned. You will have to go back and forth fixing stuff and remember that other people are waiting for your code.


No comments:

Post a Comment