Last Updated on 21 October 2020
The quality code has made an essential role for a developer. Why did I say that? I believe most developers have experienced working under pressure with the deadline of your clients. In this case, a poorly written code may drive you crazier when you are rushing your work.
The moment when you and your team are working under high pressure to meet the deadline of your client. You open the source code of it, and you find the codes are terrific messy! Unstructured without document where it needs, you find no excuse and keep tracing each of the undocumented parameters, variables, etc. The time keep going second by second, but you have no excuse not to finish it before the deadline where your clients need it. Then, the whole team is going to be crazy about this.
Another issue for lead and finance:
Let’s imagine if you are working on a GitHub open source project that serves at least thousand of developers. On average, to understand the well-written code is about 30 mins. However, if the codes are poorly-written the developers may need about 45 mins or longer to understand it which is 15 mins late.
Now, let’s do a small calculation to differentiate how it impacts developers in between well-written and poorly written code.
- Imagine 1,000 developers are working with your open source project.
- Good Code – Takes 30 mins on average to comprehend/developer
- Bad Code – Takes 45 mins on average to comprehend/developer
So, the bad code causes a waste of 15mins for each developer. (45mins-30mins= 15mins)
- 1,000 developers x 15mins = 15,000 mins (250Hours!)
Oh ya! You had wasted 15,000 mins of your somebody life/time! This 15,000 mins might be count as the financial loss of if you are paying the 1,000 developers in the big company. Let’s say the average hourly of those 1,000 developers was 30 USD/ hour. That’s 250 HOURS you wasted. Just because of bad code. It cause u 250HOURS + 30UDS/HOUR = 7,500 USD
Now, you have wasted 7,500 USD if you are the tech leads. So, don’t always give an excuse on code quality. Do when earlier stay. It may avoid some financial cost of your company and serves the developers life better.
The sample above was indicating to the big company with many people. Does it mean the small company/team doesn’t have to care about it?
No, it doesn’t mean you can ignore the code quality entirely if you are in a small team. The code quality valued software and represented the company value. Never wait to refactor the code and improve your code quality.