How Bad Code can hinder your career?
Code is direct equivalent of product specs and requirements. So, if you write that code in not-so-nice style of programming, then following are possibilities you’ll face.
- Haunt you forever with lively bugs coming now and then.
- Support for new feature will be complex to address and incorporate.
- For even small change to implement, it might get cascaded to multiple files modification.
- Knowledge transfer session getting heated for handovers to colleagues.
- Short term, it makes feel good but on long term vision of career it does makes huge dent in your career fundamentals.
- Makes you move sloth slow which in turn creates unknown mental pressure for the project deadlines.
Is it always necessary to write perfect code?
No but ideally yes. Perfect code is not always the destination to reach, it’s journey of incremental refactoring and implementing appropriate design choices. So don’t aim to go from zero → hero in single shot, then most probably it’ll break production in upcoming releases. Better do it incremental over a timeframe.
- First write working code
- Then write understandable / readable code.
- Then refactor at high level.
- If performance issues observed, then refactor at low level.
Ask yourself a question, for whom do you think you write code?
Is it computers? Nah Computers machine can understand even the bad code you wrote with 15 hierarchy depth trees of if-elseif-else branches.; they just need machine instructions operating over registers.
Then whom?? Yeah, it’s for Humans like your fellow workers or an intern to join 6 years after you wrote this code. So, code you write is for human to read, so don’t sacrifice it at any cost.
Bad code can cost you hefty $$$$$$$$ like hiring more people as a result of degradation in existing team’s productivity.