Saturday, May 30, 2020

ONE LINE MISTAKE

It was just a regular day in covid-19 situation. I was also working from home

And suddenly an email hit my mailbox.


Subject of the email was “....... Jira assigned to you”.  assigned by one of the Delivery Unit team.


I stopped whatever I was doing to look into the issue. Because I was the owner of that module.

And I was shocked. How can it happen? I have done that code.

It was working perfectly with one system. Now the same kind of code with little change was not working for another system. Why??? I was curious to know.


 I checked the attached logs and screen shot in jira. tried to understand the problem.


Then I opened my eclipse and checked the code. Then I realized, It was not my code. I wrote the code for one system. And by reading my code , one of the developer copied the logic with some little changes of their own. And committed the code in git. Assuming that it will work perfectly because my code was working perfectly so his/her code will also work perfectly. And it was working perfectly.


I noticed that everything was perfect, except just one line. he/she copied everything from my code but forgot about that one line that why I wrote that line.


Yes their code was not wrong. It was perfect but that developer didn't anticipated a circumstance where that code will  never get executed. It was just a one line mistake.


Now what’s the COST of one line code?


As a developer we alway play with our code in a development environment. We do some R&D, trial and error and what not. But sometimes by playing with the code we forget its importance of each one of line or that one function or that one file of code. Sometime developers forget to be conscious about the quality of code. He only thinks in one dimension only. Never realize that on the ground zero there are many uncertainties.


If any errors occur in a development environment, you can easily solve and deploy the fix.

If an error occurs in QA, you have to fix the code, someone from devOps team has to build the fix image. You have to give reply in mail chain that it was one line of issue and this is the build of the bug fixes.


If any error occurs in the development Environment, your team will point fingers at you for that error. It is your reputation at risk

When you release the code to QA team and if the error occurs, they will point it out at the entire development team. It’s your team’s reputation at risk.


If the same error occurs at production, then the business partner will point the finger at the entire company.

It’s entire company’s reputation is at risk.


Mail chain will be started and in cc you may see many cross team members, some managers and may be one of the department heads.


Everyone will know that some issue has occurred in this product / system.


What will you revert in mail? What was the Root cause of this problem? That one simple line? It will not look very professional. Right? You will try to hide the actual mistake by manipulating the reason for the issue


They will never know what was the actual issue. But you as a developer knows the mistake.


So that one line of code can be a pillar of the entire company. If the pillar is strong , the entire organization will stand strong.


This article was not just about that one line of code that i have noticed. It was a minor issue. Can be fixed easily. Not having a big impact on operation.  But I took this as an example that many times many things remain unobserved from us. And later on it will come in front of us with some cost. And we as a team / department / company have to pay the cost. Either by money , energy or our reputation.


    “Till the code is in your hands, you can play with it as you want. But as this goes far away from your hand, it will become more and more difficult to handle at every stage.”



P.S : If you want to make a mistake, make a big mistake, A reputed one. That by solving it you can be Employee of the year ;)


6 comments:

  1. Very true Anish. Nicely penned...but I would say even a variable can spoil everything. Every variable matters when it comes to performance

    ReplyDelete
  2. Nice Anish..Nobody made a greater mistake than he who did nothing because he could do only a little.

    ReplyDelete
  3. Very Nice Wrote! One Line Mistake.

    ReplyDelete
  4. Excellent point explained in a very interesting way. Loved it! Pass on this fire.

    ReplyDelete
  5. Very well written....real life scenerio 🙌

    ReplyDelete
  6. Very nice writing anish..Keep it up 👍

    ReplyDelete

LETS SWAP THE ROLE

Tell me one thing, What’s so boring about your day to day corporate work? Or do you have any complaints or suggestions for your senior or ju...