Source Code Browsers?
patonw asks: "I just started working for a company as a programmer on a project with a huge existing codebase. The person hiring me half-jokingly said that it usually takes new employees two years before they understand the system. What I am looking for is not just an editor/browser but a program that displays functions and classes as connected graphs -- preferably free. I would like to view how programs are structured by function calls and class relations. I have access to several different kinds of platforms/operating systems."
Amen.
..Hmm This turned into a rant. Oh well, I already wrote it so here goes. 'Submit'
Have you ever been porting/documenting/something someone elses Symbian C++ code? It's fricking hilarious. Symbian forces certain design principles upon you, but the design is so arcane for the small pieces of software, it makes it next to impossible to decipher someone elses Symbian code.
Especially if the previous developer has adopted the "correct" way of structuring app/ui/doc/view in different files plus followed the UI/Engine guideline too. Ofcourse you must do everything asynchronously with Active Objects (aka. poor man's threads)
"Hello world" takes atleast 300 lines and walking through it in debugger (assuming you want too see and understand each line) takes an hour or so.
Bot Assisted Blogging
I don't think that's entirely a fair statement. I find that being able to visualize a codebase can help significantly -- even when it is a mess.
Where I work we have some home-grown (and not terribly good) tools that help us visualise a project's architecture, from both the design and the implementation point of view. For projects that are good, these two views mesh perfectly. For projects that are crap, they diverge wildly. This gives a you a good idea where a little refactoring might to a lot of good. When working on a new code base, I start like this -- making small, incremental changes, documenting places that I find difficult to understand, and above all talking with more experienced developers.
Also, as someone that hates to write documentation, I find it invaluable when trying to describe large systems. But my documentation always has pictures, because they are fundamentally easier to grasp quickly than ten dense pages of text. Unfortunately, it's difficult to put good diagrams in comments.
(As an aside, back in my university days, I worked on a project where we did all of our coding in FrameMaker. This allowed us to put in pictures, colored comments -- basically anything. The build script turned the FrameMaker file into C++ source, which then got compiled. It was kind of the extreme version of self-documenting code.)
This sounds a lot like a relatively old, but intriguing idea. "Literate Programming" is exactly what you describe.
It is exciting to write heavily documented code, but I doubt it can be done after the fact :-/
My other computer runs FreeBSD too.
Here's one that no one else probably thought of. If the software runs on linux, load it up in valgrind with the calltree tool, use it a little, and look at the kcachegrind visualizations. It'll give you an idea of what code is actually used, and how it's interrelated.
Which tags programs works with c++ effectively? Is even a subset of what sourcenav indexes available?
If there is one, I'd love to see it.
--jeff++
ipv6 is my vpn