Design docs, code comments, and…

When first you build a bookshelf from raw wood, on your own, you learn a lot. While the first may be the only one you ever want to build, by the time you’re done, you know you could have done X, Y, or Z better. This is true of so many crafts. You get better by doing, in large part because you learn new tricks, figure out how to make useful tools, get more efficient because you purchased more useful tools… I know that while I would never consider myself an artist, painting models and miniatures has made me progress to where some have called me one. (Picture is a battery of M7 “Priest” artillery I painted up – models by Brittania miniatures)

The thing is, when it’s a hobby, or you’re a one man shop, or the job is not particularly taxing, this knowledge is easy to keep around. You have that jig you built to make cool shelf angles hanging on the wall, or the box of perfect fasteners is still on the shelf. The glue or stain you settled on is what you kept when the last shelf was built, etc.

But when the job is complex, and the problems increasingly so, it is not so simple. When the tools used to achieve a solid solution – the things used to learn and used to improve your productivity – are on a disk somewhere in the org, things get a little more complex.

But not irretrievably. You just need to pay a little more attention.

When you’re developing an app or configuring a network, there is the design, showing what is to be done, the code comments describing what was done, and the finished product for use by the enterprise. You have accumulated knowledge, which is good for you and the organization, but you also did some other things that normally fall through the cracks. That tool you cobbled together to check the validity of file formats, or the browser plug-in that helped you resolve network issues, or the DNS tool you downloaded that helped you get redirection correct… These things are important. Just as important as the tool I discovered to make the mud up the side of that vehicle. More important, because in a hobby I have time to mess around and reinvent the wheel if I must. in the enterprise, I’ve never met the IT staffer that went “you know, I did this seven months ago, I think I’ll just go figure out how to do it all over again, I’ve got the free time”. Never.

So what you need to do is keep track of these things. Put them in version control, store them on a special share for just such tools under a heading/directory that associates the tool with the project it helped with. Even silly little things. And put them in a word document if they’re things like links to a web page. Sure the page may be gone when next the word doc is opened, but that’s true of bookmarks in your browser too, and your word doc is likely to have greater longevity. This is for you – because in many orgs if you created it, it’s your problem for eternity – but it is also for the organization, because eventually it will not  be your problem, and it will save the next poor person from figuring out how to do the same things. I’m not talking about tools like lint, if you don’t have a corporate standard to use that type of thing though, you could include it. I’m talking about that library you found that does what you wanted, but was a nightmare to configure. So document it. While you’re celebrating that you got it going. Save someone else the headache. Or yourself, should something horrendous happen and you have to configure it from scratch again.

Devops has helped in this regard with networking, by stressing repeatable processes, but developers are asked to do something different almost every app. Patterns are great, but it’s rarely patterns that trip us up, it’s some weird exception case that only occurs in this language/environment/requirements document. Much more difficult to turn into repeatable, when if it was simply repeatable you’d have found source or used a library to achieve it quickly.

What we do is more science than art. We need to treat our projects more like research projects, and keep a “notebook”. somewhere. Those tools, random observations, difficult to discern but very profound solutions… All of that could be part of the intellectual property of the app/tool/network in question, making everyone more productive. But document it in English (or the tongue spoken by the bulk of your coworkers, for my international friends), not in your “from here I understand a ton, I’ll write about the bit I just learned”.

Sometime soon – hopefully next week – I will be writing up my solution (and recommended more generic solution) to the several issues found in Android SSL. By writing about it out here, I am documenting what I went through, and have to write about it in plain English. You need to do the same (but normally internally only, so you don’t have to explain the entire environment/problem-set), so that five years from now, the local Intern can figure out how to work on your app/network. Or you can remember what the heck you did to make it work. ;-)

You’ll thank yourself. Most good developers I know have forgotten more coding projects than they remember, and this might provide the clues to get back up to speed when it circles around and you have to work on the solution again. I assume network admins have the same problem. Your employer will thank you, because you (and potentially anyone else asked to work on it) will be more productive, just like using that jig over again is more productive. It’s not necessarily part of the solution, but it makes building the solution far easier.

Meanwhile, keep building the next generation of apps and networks, we’re expecting lots, and even though complaints are louder than compliments, no one can argue that developers and network admins as a whole haven’t responded in astounding ways over the last 30 years. Unless you prefer disconnected mainframes I suppose...

Published Mar 18, 2013
Version 1.0

Was this article helpful?