Most of the code I write, I'm not proud of; it gets the job done and it's (relatively) defect free, but the system I work with is close to being a big ball of mud.  It's very hard to write elegant code when most of what you do is making changes to a BBoM under time pressure.


That said, I have started to spend a bit more time implementing the "Boy Scout Principle" to make minor improvements to any code I touch.


My main frustration at the moment is wanting to re-architect code for which there is no real business case to re-architect.