Our code is bad. It might not have always been considered bad, but it is bad and is only going downhill. I started fresh out of college less than a year ago, and many of the things in our code puzzle me beyond belief. At first I figured that as the new guy I should keep my mouth shut until I learned a little more about our code base, but I've seen plenty to know that it's bad.

Some of the highlights:


We still use frames (try getting something out of a querystring, almost impossible)
VBScript
Source Safe
We 'use' .NET - by that I mean we have .net wrappers that call COM DLLs making it almost impossible to debug easily
Everything is basically one giant function
Code is not maintainable. Each page has multiple files that are created every time a new page is made. The main page basically does Response.Write() a bunch of times to render the HTML (runat="server"? no way). After that there can be a lot of logic on the client side (VBScript), and finally the page submits to itself (often time storing many things in hidden fields) where it then posts to a processing page which can do things such as save the data to the database.
The specifications we get are laughable. Often times they call for things like "auto-populate field X with either field Y or field Z" with no indication of when to choose field Y or field Z.


I'm sure some of this is a result of not being employed at a software company, but I feel as if people writing software should at least care about the quality of their code. I can't even imagine that if I were to bring something up that anything would be done soon, as there is a large deadline looming, but we are continuing to write bad code and use bad practices.

What can I do? How do I even bring these issues up? 75% of my team agree with me and have brought up these issues in the past, yet nothing gets changed.

Make sure that you're not overreacting. You are fresh, probably haven't worked a lot of (any?) other places, and so aren't prepared for the world of "real life code." Real life code is a horrible thing. It's like your nice school code and your obsessively tweaked personal project code had sex in the basement of a nuclear reactor and the baby grew up in a sewer of toxic waste; it's a hideous mutant.

But assuming you're right, and the code is as bad as you say (i.e. worse than just the typically bad code), then you're right to be concerned. Talk to your team, and determine whether everyone else is on side. It will take work to improve the situation - if the rest of the team recognise the problem but don't care then you're wasting your time.

Being a junior, you probably aren't in a position to lead. If you go to management yourself, as a new hire who is also a junior, your opinion will probably be disregarded. Get your lead developer or one of the most senior guys involved. Again, if none of the senior people are interested then you're wasting your time.

Assuming you can get some senior technical people interested, I'd work towards identifying problem areas and possible solutions. For example, if "everything is basically one giant function" then next time you're working in that 'giant function' maybe you should refactor a little. Again, you need to get everyone onside. If you chip away at little pieces of your problem & improve piece by piece eventually they'll become much less of a problem. Every time you touch a piece of code consider whether it can be improved.

You aren't going to sit down with management and say 'everything is bad and needs to be rewritten'. That makes no sense for them - costs a lot and is potentially very risky. Instead they should be made aware that there are problems, and that there's a plan to slowly improve as changes are made. They should be educated on the benefits of maintainable code. This should come from a senior person that they trust technically and professionally - not from you.

Complete rewrite? Almost always a bad idea.

Ultimately there's not much you can do because you're new.  If no one wants to improve things, then you gather your experience and move to the next place.
