- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Best part of the article:
The ease of extracting and understanding these specifications varies on the complexity of the subject at hand.
And this sums up the end problem. A two-by-four isn't actually 2" by 4". Hence, there is still ambiguity in the sentence above. This is the proof that documentation (less is more) is hard to write.
For the record, I work in a gigantic company. We have almost zero documentation due to Agile PMO with a horde of professional coders imported by tier one outsourcing firm. These guys work HARD to make their sprint dates. They have troubling reading the existing code, have little UML literacy skill and sometimes don't understand the problem (eg a stopped check can only be stopped once)... and none of that matters because documentation is the first item cut when faced with the sprint deadline.
The best solution we have right now, create very coloful and fancy looking powerpoints to describe architecture and implementation detail. Those work great in the 20+ person daily meetings.
As for the comment about old documentation perceived as inaccurate. I agree with that. However some of the best documentents I have seen are from the 1970-80s regarding how the ACP Airline Control System assembler systems run today's ATM network.
Admin
Admin
Here's my theory on Documentation and it extends right into software development approaches as well. Particular agile/iterative stuff that seems to be so popular right now.
The problem isn't the process we use to create these things. The problem is that a lot of us suck.
See, the types of people who sit down and spend large amounts of time trying to make the process better; those are people who don't suck. In fact, they are normally in the 1% of their peers; certainly the top 10%.
"We do waterfall - and look how bad our code/product is" "Our documentation process sucks! Look how bad it is!"
You get a team of like-minded, hot-shot people who want to make a better process and they come up with something new. And they say, 'Look how much better this is!'
And there stuff - created by the top 1% is way better than the typical crap you see in applications written by the general population of programmers.
And then, you get the early adopters. Again - these are people who are actively looking for ways to do things better. They are motivated and knowledgeable and they stumble across some new approach and decide to adopt it.
These early adopters are also, at the top of their game. Maybe not top 1% - but top 10-15%. They see how awesome the amazing guys are doing with it, learn it, and become advocates of it at their office/work place - where they are held in high regard (because they are good at what they do).
Eventually, it trickles down. Down to the below average, crappy folk. By this time, it's mandated by company policy. 'You must document like this' 'We are an agile shop now, you have to do it this way'.
These devs don't care. They don't want to learn something new. And even though you've moved them onto something new; they don't do it right, and just generally suck. And once they are on-board; your project failure rate goes sky-high, just like we saw with the old approach.....until someone comes up with something new.
Good documenters will produce good documentation. Bad documenters will not.
You can argue all day about what 'documentation style' is the best. But it doesn't matter.
Admin
Actually, an eight foot 2x4 is 3 1/2 inches wide by 1 1/2 inches thick. Go figure.
Admin
With this nonWTF I did as I do with most documentation... tl;dr
Admin
TRWTF is that TDWTF turned into a programmer's blog. I read the whole bloody thing waiting for the punchline. sigh
Admin
In case you can’t tell, this is a grown-up place. The fact that you insist on everything being a joke clearly shows that you’re too young and too stupid to be using thedailywtf.com.
Go away and grow up.
Sincerely, Bert Glanstron
Admin
Admin
This statement is incomplete. What a computer program does can be understood without any documentation. But that is not necessarily true about the Why.
The Why question is what problems the code was trying to avoid, what assumptions it made on its environment, on the inputs that it gets, on the quality of surrounding modules, etc.
I won't get into an argument if the word operation include only the what or also the why, but I think that it is quite obvious that if you want to change a code you should know the why as well as the what.
The implication IMHO are clear: Documentation about the Why is in many cases net-new information that doesn't appear as part of the machine readable code. So it take precedence over documenting the What.
Admin
So let's clear up some regional dialects.
As far as I understand... and I might be wrong...
UK says:
The Southern/Southwestern US says:
The Northeast US says:
See http://en.wikipedia.org/wiki/Grilling#Regional_variations
Admin
Admin
Er.. shouldn't the documentation.. like.. also contain what the program is meant to do? I mean TDWTF is a great source of code we can read but can't possibly understand what it should be doing.
Admin
I've always felt the code was the documentation, so I keep the variables short to make it more readable (just start with 'a' and work your way down the alphabet). I also keep the method names short and consistent to help with comprehension, 'm1', 'm2' etc.
Any sql should be inline so the developer who follows you doesn't have to go digging around to find what it does. It should be right there in the same class file.
Finally, abstraction = confusion. Don't wrap all your code up and hide it...state it plainly and clearly. Plus it is easier to copy and paste into other areas of the code when you don't have it hidden in methods or, even worse, services.
Admin
Admin
Just a suggestion, you should read what you wrote ;) (just pointing out there's bit of redundancy in that, and not much of the useful kind..)
Admin
Though I admit, with lumber you can usually just over-design instead of having calculated-to-be-correct plans, and still have decent result, only with a bit higher cost than is necessary. But with SW development, over-design usually leads to a WTF.
Admin
While I agree that it is an extreme example, the example illustrates the concept that if you ignore significant warnings when you question whether you can trust the documentation, then you're an idiot. In a situation like that, independent research and review is mandatory prior to acting.
Not oh-so-many years ago, I was babysitting some contractors while they audited and cleaned our installed fiber optic cabling. A telecom tech came through tearing down unused fiber circuits. We got to chatting and he made a comment that the documentation for one circuit didn't match what he was seeing on the fiber panels. Instead of getting independent confirmation, he made a guess and just took down a circuit anyway. Of course, it ended up being a live circuit, and a few minutes later when my pager went off, I helped guide him in rebuilding the circuit.
Why didn't I stop him? I was watching contractors and working on a different project as well. So? Well, since management took building fiber circuits away from the network engineers, not my job. I don't like using that excuse, but this guy had other problems with detail. Sometimes the best way to learn is to get burned. Due to other circumstances and happenings, he is no longer with our organization.
The amount of effort I will put in varies, but if the documentation is questionable to me I try to find an authoritative source. Then, if nothing else, when the fecal matter impacts the rotating blades, I can say and document the steps that I took to try to avoid having ended up where I did. But to completely ignore documentation with major warnings (even such things less life-threatening like "This package is incompatible with SuperSoft v3.41b and will cause the system to crash") without independent verification, well, you get what you deserve.
Admin
It was a pretty poor choice of words even without the dialect term, though, as <English cookery term> being a foreign word would not prevent a cook from China or France from following a recipe.
Admin
Ay, theres the rub. The operation of all computer programs can be understood, but the intent may not be. One key purpose of all program documentation is to record what that intent was. I can't count the number of times I've either had to read the external documentation or write it after a code archeology session, just to be able to say that a routine or program accomplished it's goal. What it did was usually never in question, but whether it did what it should do often was.
Admin
The word underneath broiled is ὀπτοῦ (pronounced optos) and includes many means of applying heat to an object to cook it. It can mean roast , broil, or bake. The choice of "broiled" in the translation implies cooking by flame rather than glowing coals.
Admin
Admin
On one proejct I was on, we came up with the term vagocity granted we never came up with a spelling. When doing documentation, we would often respond to questions about levels of detail with "Turn up the vagocity".
For the unknowning, this is a blend of the word vague and viscocity.
Admin
I wrote 'documentation' for many years. I was damned good at it.
You failed to note several things in the assessment in proper order.
(and programming is not 'self documenting'... ESPECIALLY if it is done efficiently)
The golden rule I lived by, to make sure what I wrote, could and would be understood, was simple.
Write to the lowest common denominator of ignorance (stupidity can never be taken for granted, and never compensated for. The ignorant lack knowledge, but might be taught. To quote Ron White... You can't fix stupid)
If you write instructions clear enough to be followed, no matter what the level of 'knowledge' the person may have, the instruction will be used as a guideline, to the point of need. With experience, they will be used when 'new' things occur, or, when old things blow up.
I wrote instructions to be followed sequentially, in best case scenario, and, constantly allowing for all the other cases to be covered... period... including... stop and call for help!!! (and check to see if power is on at main circuits)
One set of instructions I wrote, lasted through 3 system changes...
(even though most 'things' changed... the instructions were still the bible that shop followed almost 20 years after I left. Then things changed too much)
Last two steps I always did, I had someone follow the instructions, that never done the task before. I watched, silently, spoke to them to learn where and why they got stuck.
After fixing what I learned...
The same steps were followed, with another 'newbie'...
Then fixed what seemed to need it.
The other rule I learned, early in the game (programming, not procedures, was, comments were what you thought the computer was going to do... Reality of what the computer did would slap you in the face, every time.
Admin
Admin
Further to that, the 3rd type of document is often most useful the less complete it is - it needs to give enough information for a developer to know where things happen so that they can go in and have a look at how they do. In support roles, most of the time can be spent looking for problems. Documentation should provide sufficient information for a developer to get a high-level view, but not so much that they would think they know HOW simply by reading it. The best way to develop an understanding of the HOWs is to step through them in your head. This might mean reading and rereading code (all the time thinking WTF is going on here) until you get your 'AHA' moment. The biggest thing with the 3rd type of documenation (and I suspect this was largely Alex's point) is that it shouldn't lull readers into a false sense of security. Nor should it leave them scratching their heads. It should provide enough detail for a techo to start getting their hands dirty (which is, after all, what they're paid to do) but not so much detail that they have already made assumptions about implementations.
As Jay points out, some of this documentation might have limited life - as I investigate an issue, I might scribble notes of ideas that I want to come back to (sometimes even related to other issues), and moments where I realise how unrelated functionality works. Documentation for the sake of documentation is rarely a good thing. Documentation should have a purpose (or else it can be avoided), and if the purpose is to stimulate the developer, then it is more of a directive on what tasks are done where, rather than specifics about how they work. It's like working with interfaces - we don't care about the implementation detail - someone hired for support can work through code chunks to work out the specifics (even if the code is badly written, has meaningless variable names and is badly commented - it just takes longer), they might just need a gentle shove to work out where to look.
It seems increasingly, the world is catering for stupid people - and in doing so, is just encouraging further generations of stupid people. To get the best out of people (especially highly technical people), you need to offer them a challenge. Give them enough to go smell out the exact problem themselves. This not only helps them develop their own skill sets, but tends to encourage a sense of ownership and pride over fixes. People will be proud of their achievements - especially if they feel they've worked hard toward them, and (perhaps more importantly) have had a license to fiddle as they see fit (which is more likely with less documentation).
Catering for idiots only breeds idiots. Catering for geniuses will drop off relatively few idiots, and force others to stand up and show their smarts. If people feel they are trusted by management to investigate, design, fix etc then the results all round can only be beneficial!
erat: Caeser had erat for tea
Admin
Admin
It's great to see someone thinking along the same lines I've been thinking for a while. I've been trying to get my organization to do better documentation for about 3 years now...with only moderate results.
My thinking has revolved around the idea of "knowledge-versus-data". To understand, I really need knowledge (not data, which has to be condensed and interpreted to become knowledge). The problem is that expressing knowledge comes hard for most people because it means that you must think before answering questions like: Why did the system get built this way? How does this program work with that program? What was the purpose of this feature?
What we need is the picture on the front of the puzzle box, which can only be communicated mind-to-mind and requires one to actually write down what one knows. What programmers and managers (in my experience) normally want to produce is precise-to-the-micron detailed measurements of the pieces in the box, because that can be done assembly line by rote, without all that hard thought (even if it takes 90% of the development schedule).
It can even be done by filling in the blanks of a template! (Shudder of horror.)
Knowledge is the why, how, where and when of the system that no computer will ever be able to distill. I have spent months trying to hammer this into heads: A top-level system overview is much more useful than a detailed program-level analysis, requirements, or even design document. With that top level overview, the programmer can get a quick and priceless start into understanding a system; then the programmer can read the source for data-details. (And if that is too hard then let's build another program to grovel through the source and distill the details.)
That might be the only area where you need to give more consideration: Automation. In your document, you listed "Database Documentation" and "Component/Dependency Diagrams". These collections are mostly data, and data is the domain of the computer. We sell automation: "Let's eat our own dog food" by having the computer maintain these data-oriented documents, which it can do cheaply, accurately, and often (if that is necessary). It is a nearly complete waste of time to maintain any such object by hand if the computer can do it.
The bottom line is, it isn't the quantity of documentation, it's the effectiveness: And knowledge is always more effective than data, when produced by humans. Let computers produce data.
Admin
What's wrong with a recipe for salted water?
Admin
What to document and how much to do, and what it should look like. Yes, I follow a VERY simple rule.
Document for yourself, for in 6 months you will have forgotten why you did what you did, and need to understand your old thought processes.
One can easily verify that this is needed by looking back on some code (take your pick, all code qualifies) that you haven't looked at for 6 months (possibly shorter). Can you understand it. Do you remember why you did the "+1" somewhere? If you don't have the answer, then you didn't document what you did, and it is close to being useless.
Repeat after me: "Document for yourself!". YOU WILL need it!
Admin
Admin
On the other hand, type 1 and 3 documents are often the most useful when coming back to something a few years later - they don't just cover what someone thought was important, but what they were thinking when decisions were being made. That can be critical in understanding why something was done in a particular way, and whether the people who made those decisions understood the problem correctly.
Admin
I agree with the overall spirit of this article, that documentation should be written with the sole purpose of documentation in mind: communication. But I'm not so sure that the advice here is all that... appropriate.
I'd love to have seen some suggestions on how to write robust and effective documentation that is useful, rather than just "embrace incompleteness" or when to archive. How about advice on writing documentation so that it is easy to keep it up to date (yes, it's possible)? How about advice on how to tell which details will be useful in a document and which won't, such as program behavior, interaction, and other public functionality (very useful) vs. static structure and low-level attributes (not so much)?
I normally enjoy the soapbox articles (so please don't just delete my non-supportive comment, Alex), but I'm honestly a little disappointed with this one.
Admin
Don't you mean do***entation?
Admin
As a Business Analyst I agree with most of what was written, with a couple of notes:
The volume of documentation should be function of the complexity, not the size of what is being developed.
ALL documents should be tied to a specific version/release of the software. Each successive version then gets a new version of the document, with the ability to track all the changes that came through.
You need to include WHAT (the design of what you intend to build), WHY (decisions you made about the design, including reasons for it differing to user requests) and HOW (implementation details).
Not doing any documentation implies that you thing you will have a clue how your software is supposed to behave in 6 months, let alone being the one responsible for maintaining it in 5 years.
Obviously YMMV depending on what you're working on.
Admin
Conciseness is crucial.
Admin
In Australia we grill...
Grill
Cooking meat (or other food) directly under (as in a gas or electric oven) or over the heat source (as on a grill). Moisture is held in the food by the high cooking temperatures which quickly "seal in" flavour. This cooking method is ideal for tender cuts of meat.
Barbecue
Cooking food on a rack or plate over direct heat in a charcoal or gas barbecue or over hot coals.
Admin
If I thought you were serious, I'd be compelled to recommend that you be taken out and slapped.
On second thought, I recommend that anyway on the grounds that someone might believe you were serious.
Admin
Nice developer-sided view of documentation. Here is my take:
Documentation is supposed to describe how a system is supposed to work. And with that I do mean as complete as possible.
I am a tester, and my job is to test the software BASED on the documentation at hand. If something isn't documented, I can't possibly test it, because I can't predict how something will work.
I read the docs, and based on that and following various techniques (and which one depends on the type of program and the severity of its effect on the business processes it will have), I write my testcases. That could be a financial test (in case it has severe implications for the financials of the company), a semantic/syntactic test (if it's just a change in a screen), or a white box test, or one of the many other different tests.
But all of those a dependent on the availability of documentation and the quality thereof. If it's a shoddy document, I will say so, and I will send the designer back to the drawing board. Ideally (and in most assignments I've been in this has been the case), you have teams made up of one or more designers, one or more developers and one or more testers. That's the best way to ensure the best quality of your project, and the best way of it succeeding too.
Admin
Uh oh...
I think this completely misses the point. Say you have an extremely complicated piece of calculation logic. Why should documentation for it be more volumous than usual? Why would you want pages and pages to describe it? It would be much better to provide a high level description of the algorithm, with a few formulas, references to relevant theory, or even a flowchart, and leave the complexity in the code.
Complexity = volume of documentation is non-sensical, except in so far as trivial things need not be documented.
You have to be kidding. So your solution to document complexity is to raise to the power the number of documents in existence?
Who is going to do this and where are they going to get the time? Who is going to manage this process to make sure it happens? Who is going to allocate their budget for all of this to happen? And most importantly, how many different documents are people expected to wade through in order to gain even a partial understanding of your system?
Hey, I'm on a deadline. If I'm confronted with a 150 page behemoth I'm already annoyed that the person who created it didn't care about the reader and didn't do a better job of trimming the fat*. There's no way on earth I'm going to read 20 of those, nor am I going to "track changes".
Just give me an overview of the current state of the system and what you want done. Is that so hard?
*For highly-regulated industries such as healthcare and defense, large documents would be fine, but for your average corporate app it's just unnecessary.
How does this increase the usefulness of documents? The entire point of Alex's post is that we, most of us, already take these things you've mentioned for granted and do them because that's what we've learned Is Good, yet these approaches often do not produce effective or useful documentation at all.
So when you said you mostly agree with Alex, what you meant is that you didn't understand and barely read the post, but wanted to offer your contrary opinions anyway without offering any sort of supporting argument that would negate the considerable evidence that Alex presented in his post because you think you're right anyway.
A high level description of the system should be all that's necessary to jog your memory. If that doesn't work, there's nothing wrong with diving into the code and finding out for yourself. I mean, if you were brought onto a project you had nothing to do with, you'd have to do that anyway to work it out. What's the problem?
I don't get the "you won't understand what you did 6 months ago so you absolutely must document everything!" argument. Who cares? Firstly, it will come back to you as you work with it. Secondly, you might be put onto a project with no documentation at all, and it'll be your job to figure it out. If you can't handle that, maybe this isn't the profession for you.
It looks like I'll still be happier when BA's are restrained from interfering in the technical process. :)
Admin
But it is indeed very important that they communicate which files are changed, and that there is time for review sessions. So that you can say "this set of documentation is approved and are now final, and won't be changed until the next version of the application."
Wow, a lot of assumptions, I hope you don't develop in the same way. Could it be possible to have both? Respectfully, I disagree. Even in the case of corporate applications it's important to have good documentation. And yet, I encounter many instances where what the designers designed, the developers didn't build, and what the developers built, the designers didn't design. And then it's up to me the clear the mess.How about if you are replaced by Developer Junior, because you have been assigned to another project? Oops, documentation to jog YOUR memory isn't enough to help junior. And me, as a tester, I don't dive into code, unless the task asks for a white box test, which is quite rare. Without proper documentation how do you know what the business wants the application to do?
And maybe the documentation could speed up your work greatly. Instead of second guessing what they might have meant with function_x, you'd know, and don't have to read through thousands of lines of code. And I'll be happy when developers actually build what was designed.Admin
Lets set the mood early by revealing our prejudices.
I think you need to look up what complexity is. If you are going to bash someone about is use of complexity you should be exact. There are many different types of complexity and for most people its about how many parts is has.
Actually this is a good idea. If you are going to document then tie it to the version. Otherwise don't document. This has nothing to do with the amount of documentation. As to who is supposed to do it? Depends on the doc but I don't accept lazy programmers who think documentation is beneath them.
yes.
You just want to bash someone because he's a BA and because you hate documentation.
No one said document everything.
A high level description is not a basis for anything but a begin, it won't help me solve a specific bug.
It looks like I'll be happier not to ever have to work on anything you've worked on.
Admin
Given infinity time and resources, who needs good documentation? Just study the code.
Admin
Captcha: abbas. Something to do with Sweden?
Admin
Just wanted to say... great post! Guess I'll keep it at arm's reach, and hand it over when appropriate.
Getting to a new job usually includes someone sitting you on your desk, handing you a 200 page sort of user guide and system design - whose are at least five years old - and being told "read this... it's a bit outdated, but it may help you get started". It rarely does... just makes you sleepy and bored even before cracking some code and finding out that - guess what - you'll be maintaining Frankenstein-style code.
I'm sick of dusty docs.
Captcha: odio, hate in Spanish... just perfect
Admin
As a technical writer who has previously done UML, flow charts, and various other design and project documentation, I'll take user manuals over that any day!
Admin
I was looking for a WTFstory, instead I find a small essay paper on writing documentation.
Admin
Is it too much to ask the developer for clarification? Does your company's management allow the testers to direct developer effort? There is not always going to be enough time to get both the code and the docuemntation correct. I'll take correct code over documentation any day.
Admin
Dear Remy Martin,
In case you can’t tell, this is a grown-up place. The fact that you insist on not posting an article on time clearly shows that you’re too drunk and too irresponsible to be using recreational drugs.
Go away and grow up.
Sincerely, Bert Glanstron
Admin
"Of all people, I have a pretty high standard for doing things right."
He's joking, right?
Admin
How do you know what is correct code? How do you ask a developer for clarification if he just got hit by a bus?