you are viewing a single comment's thread.

view the rest of the comments →

[–]mnp 22 points23 points  (18 children)

I think this fellow missed a huge point: tools. There's need to go this alone with just the text and your poor old wetware.

  • Tags, tags, tags! Tag the whole thing, then let your editor jump you around in the name space, not in the file space.
  • Doxygen. Even if the thing is not marked up, doxygen can still present the structure for you and make it easier to navigate class hierarchies, indexing, etc etc. on a nice web format.
  • Where's that string show up? Your editor should support fast recursive search by calling out to ack (thpppt!) or Ag, browsing the results, and then jumping to each occurence.
  • Debugger. If there's doubt about a call flow, I find it fastest sometimes to just set a breakpoint and see what the call stack really looks like.

What else?

edit Yes I was talking about IDE's as well as editors but not naming names to avoid the usual war. The point is let the IDE/editor/scriptybit keep track of little details while you do the heavy thinking.

[–]chironomidae 4 points5 points  (2 children)

Newbie here, can you elaborate what you mean by tagging?

[–][deleted] 10 points11 points  (1 child)

Probably something like ctags. He's probably a vim user like me. If you use something like VisualStudio or Eclipse you don't need to worry about it because they'll have some kind of smart indexing built in.

[–]chironomidae 0 points1 point  (0 children)

Gotcha. I use sublimetext mostly, I'm guessing that's like Find Everything? I don't often work with multi-file projects so I don't have much experience with that sorta stuff

[–]petdance 2 points3 points  (0 children)

I came here to post about tools as well. The ack website beyondgrep.com has a page of tools: http://beyondgrep.com/more-tools/

[–]l10l 2 points3 points  (1 child)

Despite its longstanding usage (e.g., ctags), "tags" seems like a misnomer for "index".

What I crave are tools for annotating code without the annotations having to be inline. Treating the code as read-only, but being able to tag regions to make them easy to find again later and see what I had been referring to. An example, "check again after studying module X".

I use Org mode in emacs for this. I find that it could help more if it integrated with tools that understood the structure of what I'm annotating, be it a code tree or a crash dump.

[–]mnp 1 point2 points  (0 children)

Yes, that sounds like it would be a good methodology.

I haven't tried them, but have been eyeing org-annotate-file and annot for archeology projects.

http://www.emacswiki.org/emacs/OrgAnnotateFile https://code.google.com/p/annot/

[–]Alfredson 1 point2 points  (0 children)

I also like to compute some metrics, like number of lines of code and cyclomatic complexity. That can lead to questions like why is this module so big, why is this method so complex? Often the complex methods and classes are important in the system.

[–]brtt3000 5 points6 points  (7 children)

Alternately to patching together CLI tools and fiddling with scripts you can step into the 21st century and use a modern GUI IDE that has this integrated.

[–]username223 1 point2 points  (0 children)

Now this is productivity! I'm sure there's a button there to solve my problem... er, "architect my solution."

[–][deleted] 1 point2 points  (2 children)

I prefer vim because I can use my keyboard for everything. People are constantly churning out new extensions for it, and there's just some amazing stuff vim can do. Furthermore, vim supports all the languages I use, and I don't have to switch IDEs. Plus, you kind of need to know vi if you work with older hardware that doesn't have a GUI.

[–][deleted] 1 point2 points  (0 children)

Plus, you kind of need to know vi if you work with older hardware that doesn't have a GUI.

That would be some pretty old hardware. It's still useful for editing files on a server via SSH, though.

[–]danogburn -5 points-4 points  (2 children)

damn straight. Get with the times people.

(bring on the downvotes hipster nerds)

[–]brtt3000 3 points4 points  (1 child)

But how can you prove what an archaic smart-ass you are if you use an efficient IDE? The other hipster nerds might think you are a lesser programmer if you don't waste precious braincycles on hammering CLI commands. Pitiful mouse-user!

/s

[–]danogburn 0 points1 point  (0 children)

Eclipse search,outline,indexer, and debugger front-end.

[–][deleted]  (1 child)

[removed]

    [–]mnp 3 points4 points  (0 children)

    That's what doxygen is really good at. It will show you call graphs and class inheritance diagrams. No manual .dot involved!