I've read Joel's article about getting things done when you're a "grunt", several times in fact, but I've never been able to do any of the things it mentions.
I work as part of a small development team; we are now 5 strong (they recently expanded; started with two guys for a few years, and then added the rest of us - I have been here about 3 months now and two others were added after me) with a web designer that is kind of part of our group. The app we work on started out as an in-house system and was recently retrofitted to be software-as-a-service. From what I've been told, it went through several revisions and was outsourced twice, then brought entirely in-house.
I come from environments that focus heavily on the use of design patterns, bits of Agile design, and a strong desire to write quality code. Because the current environment has changed so often, the code is a bit of a mess; logic is often just copied and pasted across various files (this includes HTML, Javascript and C# code). Almost everything is done in code-behind files with very little separation of logic. There is a common set of classes but they tend to just incorporate various mismatched logic that only slightly relates to the class. There are no coding standards and developers write code as they please (for instance, some code uses Hungarian notation, some doesn't, some classes begin with underscores, some don't). There is little object-orientation used; all the data is passed around as raw Datasets executed via stored procedures. The few domain objects have misleading and confusing names.
We are almost always working on new features, and have no time to refactor since refactoring code isn't viewed as adding business value in lieu of adding new things. I have raised some issues with the manager about taking the time to go back and fix the application, extract and refactor code to be more modular and reusable, but he expressed concern that management wouldn't allow us to spend days (or more if necessary) working on old features instead of new. My co-workers don't seem too concerned with this and seem to not be as concerned as I am about the quality of the code we are producing. Also there are no unit tests (testing is done manually by poking around the app) and I wouldn't be able to take the time to test everything.
This produces a dilemma for me because I find it frustrating to fix code in one place, only to be reminded it also needs to be fixed in several other places due to being copied across files, and I find it increasingly hard to stay enthusiastic about the code since I have to continually drop back to the existing style (or lack thereof) when fixing bugs; for new modules I write I try my best to keep the code as modular as possible within reason and without introducing radical changes (e.g. trying to incorporate Linq to Sql). Even this causes some concern because I am introducing a different architectural style (albeit one that is better than the style we have now) than the other developers are using.
How, if at all, should I go about explaining these things to my co-workers and try to introduce some order to chaos? I look at the code and see how much better it can be with application of design patterns and real code re-use, but it seems like a daunting task because we are constantly inundated with new tasks and cannot just take a week or two out to refactor the code smells away. I know that I cannot ever get us to fix all the code that needs to be fixed since it would be a total rearchitecting of the application (and management would never approve that), but I feel that the code could be much more stable and robust for the future if something was done.
