Channels ▼

Pablo Santos

Dr. Dobb's Bloggers

Wiki: developer's best friend

September 24, 2009

If you were stranded on a deserted island, name three things you would bring. Sounds familiar? Well, let me modify it a little bit: if you were only able to use 3 development tools, name the ones you’d choose.

My choice is clear: editor, debugger, version control. But, hey! It’s 2009, at least let me choose another two: then I’d go for issue tracking (Mantis, Bugzilla, DevTrack, Jira, Rally… I don’t mind, the one you prefer) and a Wiki.

Why would I choose a Wiki for “hard-core programming” stuff? Ok, let me explain. It’s clear why an editor and a debugger are good to have (never, never, never go out with a debugger!!! And NO, printf is not a choice) and even version control and issue tracking (I see many of you thinking you wouldn’t bring the issue tracker, right? :-P), but a Wiki? Ok, let me explain.

More often than not I get involved on big refactors here and there, and even more often in small, high-impact fixes. The other kind of task that makes me think about Wikis is performance tuning, something that can easily become hell if you don’t have the proper documentation and tracking. So, in all the previous scenarios I always use a page somewhere on our team’s wiki as a log: in fact, there’s a specific place for that under development/task logs. You can link this wiki entry with a comment in the code, with the task (at Bugzilla, Mantis, Jira...) you’re working on or even in version control checkin comments.

Don’t we have comments for that? Obviously not. I hate polluting my source code making it close to unreadable with huge comments, I rather prefer to put a link to a long article somewhere else where I can attach pictures, iterate on different alternatives, link to the web, whatever. Comments would only make the code hard (or even impossible) to read.

In fact, most of the time my Wiki entries are not only about the code but the reasons why I’m changing the code, removing a certain piece, moving another one… so sometimes there won’t even exist a right place to put the comment (removed code for instance).

It becomes crystal clear when you’re working on performance and you take notes about how fast or slow a certain piece of code or scenario is (even linking to profile results you’ve stored at your version control, yes, profilers, another “must have” on the toolset). When you go back and what to understand why you made this change is exactly when you’ll be happy to have a detailed task log.

Wouldn’t it be better to directly include this documentation as an enclosure on your bug/issue tracking system? Answer is probably yes, it does make sense, but storing it on the wiki gives you a transversal overview: you can not only locate your logs browsing the issues you’ve worked on, but also going through the wiki itself. Editing is also important: personally I love writing at my MediaWiki text only editor much better than at an enclosure (although some advanced issue tracking systems can make editing very comfortable). We also encourage developers adding documentation (analysis, design, testing, everything) in MediaWiki (ok, a traditional repository storing PDFs and Word files is also available, but it seems programmers feel less pain when asked to write on MediaWiki than Word), so adding links and improving navigation is also easier.

The point is that using a Wiki to precisely describe your changes (I’m not talking about tracking lines of code, that’s exactly what your SCM must do!!) is very easy to do, it won’t normally be a painful thing and will help you creating a lot of usable documentation in order to understand why certain (even very low level) decisions were made, sometimes even supporting more formal design documents, and it won’t pollute your precious code with your narrative.

Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 


Video