in reply to Model the Logic in existing code
I don't have developer's experties available to explain the code, but the code looks good, and nicely done with comments, for around 3000 lines in single file. It was maintained for many years. How do I extract the logic and draw some type of visual diagram, so I can explain it easily to other people and can maintain it for long time, without storing way too much information in my head.
Random ideas:
- 3KLOC isn't very much. If the code's as nice as you say you should be able to sit down with a hardcopy for a few hours and get a pretty good idea of what's going on.
- Sit down with a whiteboard and explain it to the new developer. If you think you're going to have to do this a lot then videotape it.
- Tests, especially acceptance tests, are a really good way to show what the code does. You do have a test suite don't you :-)
- Look at tools like Autodia and SQLFairy that can automatically generate diagrams from code/schema. That way you don't have to spend time and effort keeping diagrams and code in sync.