back

by AlexeyBrin·10y ago·view on hn ↗
> I suppose this is the result of deadlines and lax code reviews.

This is usually the result of years of changing/updating the code. Any living code base tends to grow and accumulates cruft over time. Just because it doesn't fit the ideal you learned in university doesn't mean it is bad code, this is real life code.

1 comments
I've worked in the Games industry with age old engines, I currently work in embedded development with a code base over 10 years old - I'm fully aware of what "real life" code is like.

There is no excuse for not writing well commented code - or even code with well named variables and functions that reduce the need for as much commenting.

If you suffer from code like this in your workplace, perhaps actively comment it as you reach an understanding of what it does.