Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am preparing a memoir about "Why do (some) IT projects become too complex and how to avoid it ?".

If you have ever encountered projects having complex codes or were hard to maintain, how did you manage to go through it?

If you have to choose between several applications to use in your project, what would be your top priority in their functionality and why?

share|improve this question
There are no complex codes in complex projects. See… – user11408 Jul 12 '12 at 10:47

Document, Document, Document!

I work with some pretty complex MVC code, and am only now actually understanding how it works, as opposed to accepting it on faith. Whenever I make a change that I have a hard time figuring out, I put a comment in the code at that section to help clarify what is happening. It might not have helped me since it wasn't there, but it'll help the next person around. I also like to ask other programmers around me to look at my changes to see if they are clear.

My company has an internal wiki that we use for documenting a lot of the meta tasks we do, like virtual server problems, common queries, etc. Whenever I come across something I've not done before but will have to do often, I check to see if there's a wiki on it. If there isn't I'll make one. More people have gotten involved in it as well recently, so I hope it will grow faster. I think it really helps communication of the more mundane tasks we have.

share|improve this answer
Interesting! I wonder why don't we have such wiki in our company, it woul have been much easier – dagofly Nov 16 '10 at 8:58
+1 for the developer wiki (as long as it's backed up well!) – MGOwen Dec 16 '10 at 2:37

I don't think you can ever completely avoid complexity over time, but there are ways to mitigate it:

  • Keep the code as clean as possible at all times, within reason. (In the "how Uncle Bob defines 'clean'" sense.)
  • Apply code reviews and/or pair programming to lower the odds of one developer over-engineering things needlessly.
  • Maintain adequate unit tests and integration tests.
  • Invest in a continuous integration server and build often. Release often too, if possible.

All of this is somewhat dependent on what the project actually entails. Sometimes, for example, it'll be beneficial to accept complexity in exchange for performance. Not all complex code is necessarily a bad thing. In general, though, I think following these guidelines should help.

share|improve this answer

Also, resist the temptation to add quick hacks because the code is complex/bad/hacky already. In my experience you'll end up with exponential more complexity.

share|improve this answer
Absolutely. When you find yourself in a hole, the first thing to do is to stop digging. – PeterAllenWebb Nov 16 '10 at 0:56
  • technical debt

    refactor to eliminate

  • business changes

    adapt and expunge

  • tool changes

    new tools, same old architecture = impedence mismatch

share|improve this answer
exactly, dealing with complex (badly written) code/architecture parterns instead of refactoring it is paying INTEREST on technical debt. when you eliminate those bad spots you're paying back PRINCIPAL on technical debt – shershen Aug 26 '14 at 12:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.