d-baranowski / Devtales-Blog

Source code for my blog.
1 stars 0 forks source link

There will be dragons #57

Open d-baranowski opened 6 years ago

d-baranowski commented 6 years ago

After graduating from university I naively believed that bad code they warned us about in Software Engineering classes doesn't exist anymore, after all, the industry has learned from its mistakes and it is common knowledge now that copying and pasting code without any structure or testing is bound to fail, right? WRONG!

Since I graduated I've seen some bad code and some horrendously disgusting code. It turns out that even bad code can be sold for good money if your market it right. It really frustrates me to think that something so monstrous is out there in production and to know that people are paying a fortune for it.

This realisation really sucked the motivation out of me. I was angry at the industry which created the code that was so painful to look at.

Many young developers (including myself) will have the same reaction to seeing a badly coded project: "We need to rewrite it from scratch!". This is hardly ever the right answer to the problem. Uncle bob explains why in: https://cleancoders.com/episode/clean-code-episode-1/show

My approach was changed by my fellow developer who despite tight deadlines and eye watering ugliness of the codebase, went right in it and started refactoring it into something good.

That's when I realised where the difference between an average developer and a good developer lies.

An average developer can write good code. A good developer can turn bad code into good code. Don't lose hope and don't be afraid to refactor!

This sudden realisation has also opened my eyes onto a fact that to be a good developer it isn't enough to spot problems, its also about having the determination to solve them. At the end of the day you're an likely employee of some company and as a professional you're ought to act in your employer's best interest.

You should be working to benefit the company and solve its problems even if you're not the one who caused them. Only then eventually the frustration is ought to give way to satisfaction from seeing the positive impact of your hard work.

Shawkat-Roy commented 5 years ago

Nice piece! I would just make a few changes to the phrasing of the last few sentences, other than, it's great! Edit: At the end of the day you're likely an employee of a company and as a professional, you ought to act in your employer's best interest. You should be working to benefit the company and solve its problems even if you're not the one who caused them. Only then will the frustration eventually give way to satisfaction after seeing the positive impact of your hard work.