A new place and the same old issues
I started my first new job in almost five years recently. With it came a change from working with a single organization to the world of client services. Mobile services to be precise.
I’m on the newest team there - the Web Developers. It is always funny to me that the Web Developers are the new kids on the block in mobile (according to the majority of people with whom I interact). With the company telling us we have to agree and choose a framework such as Sencha Touch (since these directions are coming from people in the native world, not the open, progressively enhanced web world I like to frequent), there are many conversations that have taken place where tempers have flared a bit with different members. But something else has been bugging me much more, and it has occurred ever since I first learned HTML and took my first computer science class in college. People are ashamed of their code.
It might just be the organizations I have worked with, but I have always heard more people make excuses or claim they just wrote the worst code of the their (“but at least it works!”) than those who are proud of their work. Why do we do it?
I hate feeling embarrassed to show my code to other people. But it happens. My first code review in the career world was horrible. I was proud of what I wrote, but then another developer was told to find at least five things to improve. Whether or not there was anything to really improve. So arbitrary best practices were thrown at me, and my non-technical boss looked at the review with disappointment in my skill. Beyond that, we would have demo days where we would share code with each other that we were proud of, and people would start interrupting (“you should have used a static final synchronized class instead of a static final class!”).
From college and beyond, I’ve studied/worked with people who will look at legacy code and openly mock it - even if it’s really not that bad. It’s not in their preferred style so it must suck. Everyone does it. But so many times, the person who worked on the code is there. Maybe they worked on it five years earlier when they were a junior developer, forgive them. Maybe they were in a time crunch and management was pushing the timeline first, forget it. Maybe it’s better than what you would have done, so be quiet.