views:

3009

answers:

59

I ask because I quite enjoy it! I'm talking about design documentation and implementation notes (NOT user manuals), which are non-existent in most of the codebases I've been handed. I can understand why a developer wouldn't want to write requirements (that's the analyst's job) or the user documentation (that's a technical writer's job) but I don't get why developers hate writing design docs.

I don't think I would feel as if I'd finished the job if I only wrote the code and walked away -- mainly because when I've been introduced to code-only situations I've seen how hard it is to figure out what's been done and what the software does. I would hate for people to suffer the same situation when inheriting my code.

What makes you loath writing supporting documentation for your code?

+47  A: 

When I'm writing code, I am enjoying (sometimes) the process of solving a problem. Coming up with a solution is the "thrill" of programming, whereas writing documentation is just a laborious task I must do after the fact.

Bottom line: The act of solving a problem is more exciting than writing about how I did it.

JTA
Ah. I usually get that thrill of solving the problem while I'm writing the design docs. The process of converting the solution to code is thrilling because it proves it works. :-)
Stewart Johnson
Agreed. However, very demoralizing when it doesn't. ;-)
JTA
That's actually true, if you manage to solve the problem by writing about it and adding some source code here and there, your documentation is likely to be pretty good.
none
+1 for the Bottom line: The act of solving a problem is more exciting than writing about how I did it.
fastcodejava
+1 for bolding the bottom line.
fig
Why does everyone seem to think that design documents are something you do AFTER you've written the code, of course that's going to be tiresome. Better to design your code BEFORE you write it, that way it will be more fun.
Fraser Graham
+2  A: 

Most of devs find coding fun. Writing docs is not fun in most of the cases. Anyway, we like it or not, we often have to write some.

Nazgob
+15  A: 

Because it's boring. Instead of producing new code, new functionality etc., we "waste" time with old stuff.

I am a developer because I see myself as a builder, an engineer, a scientist. I want to build new bridges, not paint old ones red. I want to build more software to help more people. Documentation writing just feels like stagnation.

That does not mean it's not important to me, but spending 3 days on documentation means 3 days not writing new code.

Michael Stum
What about design documentation, e.g UML diagrams or database schemas? Do you plan what you're doing first or just jump right in there in a more agile approach??
Egwor
Depends. Usually, there is a functional Specification of what the Application is supposed to do (from the user side) and then a rough draft of the inner architecture, but being a team of 1 to 2 developers means that I'll do my stuff more "On the run". Works quite well in tiny teams.
Michael Stum
+12  A: 

I think the most discouraging thing about writing design documentation is that it is typically out of date very shortly after it is written. Frequently, this can make the effort to write design documentation feel like wasted time.

Alex B
Honestly, you overestimate how much a system is modified instead of extended.
Joeri Sebrechts
And it's much less of a problem when you write your design *before* you write your code.
Stewart Johnson
Although I agree that much documentation becomes out of date very quickly, it tends not to become *obsolete* quickly. It's often enough to give you a reasonable overview of the structure and approach of the code when it was written, which can help substantially in understanding the current state of the code.
Dale Hagglund
+8  A: 

If whatever you're creating requires people to read a lot of documentation, it's probably going to fail.

That's why I, personally, can't get excited about "writing documentation".

Why not create software and products that don't require documentation? At least for typical / standard uses?

Jeff Atwood
(1) That doesn't hold true for all kinds of software projects. (2) I think you're talking about user documentation, when my question refers to design documentation.
Stewart Johnson
While a good point, which I totally agree with, you didn't actually answer the question Jeff. So I guess I'm too pedantic about this sort of thing. I think I just don't like to see answers voted to the top when they don't actually answer the question.
Max Howell
"If whatever you're creating requires people to read a lot of documentation, it's probably going to fail." -- regardless, I think this applies to ANY kind of documentation.
Jeff Atwood
Strongly disagree. I work on LARGE software systems build by teams of 50+ developers. We couldn't do it without design documentation.
Stewart Johnson
Most people don't work on systems that big, Stewart. It's annoying when someone tries to scale down a process to a smaller project, and it doesn't fit. (I hate writing stuff people aren't gonna read.) But I think you are referring to the equal and opposite mistake, so I have not answered the q.
Alan Hensel
Stewart Johnson
+8  A: 

1) Ridiculous expectations on formatting, layout, and content imposed by people I call the "PMI Crowd". In large organizations, Project Managers often expect long bullet lists of requirements and capabilities which are often less than useless when it comes to actually getting something done.

2) Nobody reads the F'ing M. When developers feel that they're writing something that nobody will read, they get discouraged and think it's a waste of time.

3) The pain of editing and collaborating in Microsoft Word. Nothing turns me into a semi-homicidal maniac faster than trying to contribute to a document where someone is unaware of how to use styles in MS Word. I often find myself spending more time on getting my documents formatted than filled with content in these scenarios. And god help me if the template to which I'm expected to conform is malformed.

Dave Markle
+1  A: 

Design documentation:

Software architecture and implementation is evolving all the time especially when using agile methods to develop software. It's useless to copy software design in documents in addition to code. Instead the naming and architecture should be kept so clear that it shouldn't need documentation to explain it. And if you can't understand the code, what would be the point you would get from knowing anything about the design? Although in very large scale software projects having very high-level architecture document may save some time.

So basically software engineers hate writing documentation because it usually has no real value and it's required by some bureacratic convention.

JtR
Why don't you point me to a non-trivial body of code you think doesn't need documentation, and I'll start believing what you just said.
Joeri Sebrechts
+9  A: 

Possible reasons:

  1. Company-imposed conventions for design documentation, when those conventions are inappropriate for the project in question.
    For example, requiring you to document your code's classes when your code uses data flow architecture or functional design style and is not object oriented at all.

  2. Computer science and software engineering students are not taught to write well, so for them writing is painful and is to be avoided.

  3. Management pressure to churn as much code as possible, at expense of design, unit testing, reviews and ahem design documentation.

Omer Zak
A: 

Because we are Artists, not Engineers.

A beautifully-crafted program is a work of art (although I've seen, and written, some dustbin lids in my time...)

Brent.Longborough
+3  A: 

I always thought it was because most of them can't write anything other than code fluently...

tloach
True, i can write code multitudes faster than i can write documentation.
Bob Fanger
+1  A: 

My problem with taking all the time to write documentation (though when necessary I do it anyway obviously) is that it adds a second layer of things that need updating as things change due to circumstance. If you don't update the doc to maintain consistency with the living system, what good is it? Unless you do Literate Coding where your comments become the doc of course... then it's at least all together inside your source code.

Runevault
+9  A: 

There are quite a few academic studies on this topic.

The main reason comes down to cost-benefit: any artifact of documentation may help someone else in the future (but it may not). Any artifact of code (unless useless) would in some form help the product in the future (and thus you). People generally prefer to plow forwards rather than stabilize what already exists. That's why everyone writes new code instead of maintaining it.

A second reason is that developers are not necessarily good technical writers. Writing well takes effort and thinking. So we end up writing extremely long text sections with very little in them.

As for inline code, much of its documentation is redundant and falls out of sync.

Finally (from my studies of API documentation), most material merely confirms expectations or elaborate details (e.g., look at the JavaDocs for Random), leaving the writer too exhausted to capture the critical and nontrivial directives.

Uri
A: 

In many places I have seen, documentation is mostly done for process reasons. Haven't seen anybody reading it after that. It gets quickly out of date too.

Gulzar
A: 

I think one of the main reasons is that how we are educated and trained. We were hardly taught, in most cases, in universities to document what we do. We were hardly ever told that this is important. We were hardly ever taught a course geared towards documentation. Thus the mindset that this is something 'extra' or 'over and above' what we do.

When we join our first company, the culture that we find is hardly different. However, there we have official "ISO" guys who force the generation of documents with emphasis on presentation than on content. This pushes us away from it even further.

Ather
+3  A: 

The question always reminds me of Süßkinds "Perfume": when Grenouille created a new scent, he considered writing down the formula a pointless detour, only to please his master. We are Grenouille (maybe you are not).

The most influential reason may well be that they aren't good at writing prose. Someone (cough) recommended to send developers to a weekends creative writing course - an interesting idea at least.

Second, the ship date. Before it's always race, and after everyone would like (you) to start something new.

Further, it feels redundant. The information is right there, in the source, more precise and more detailed than any other notation. Also, there is no immediate, tangible value.

Sometimes, a (subconcious) feeling for job security may play a role: they'll need me to keep this running, why should I help someone else to take the job away from me.

(Good programmers know that high maintainability is their ticket for new, exciting stuff, and that kind of job security means being chained to an ultimately sinking ship.)

peterchen
+1  A: 

I don't hate to write documentation, in fact I like to because I gain clarity and speed to develop a system, all the times that I wrote a specification I better understood the problem and clarified the design issues and basically everything.

Maybe I like to write also because that is the way I can remember everything, sometimes I'm programming several different things and personally I don't see any other way to do it. I admire how people remember all details of a system or chunks of code, but I don't think they remember it eternally, eventually they forget most of all those codes.

The documentation for me as I stated before is very useful, I feel I gain speed, clarity, a more bug-free code, better understanding of requirements, better comunication with my clients.

At the beginnig can be feel awful but the gains worth it, try it, you'll see.

nmiranda
Hi, this is what I'm trying to start doing, and for similar reasons: I'm getting lost in a complex project because I've forgotten some details of the context. Do you have any tips for getting started (which feels awful)? One idea I have is that to write clearly, by pretending to write for the self I was before I knew anything about the project.
13ren
You can start writing in your own words what is the purpose of the system/program, then you can expand the document in details also using your own words. The issue here is that you understand what is going to be done and depending of the needs maybe you could add details of a process or procedure. Eventually it will become more complex bur with this help you'll remember and clarify your thoughts.
nmiranda
thanks very much! Yes, "purpose" is key. Sorry I didn't see your reply earlier: I thought SO would notify me, but actually I needed to check.
13ren
+37  A: 

Because we are lazy.
Because the minute you write a doc it is out of date.

SWD
And because there is a cost to keeping that doc up to date. Beginners that hate documentation replace it with nothing. The software craftsmanship movement replaces documents with self-documenting code, which is automatically updated when it is refactored.
Sean Reilly
+1  A: 

I would say it boils down to a few reasons, inherent in how the minds of programmers work.

  • Programmers hate maintaining old code. They want to write new code, to feel like they move forward. The only reason to write technical documentation is to maintain old code, so they implicitly consider it a block to forward movement.
  • Programmers tend to overestimate their own coding abilities. They assume that their design is so clean it doesn't need documentation to understand. While this may be true for the likes of Don Knuth, I don't know anyone personally for whom this holds true, least of all myself.
  • Programmers hate imperfection. Since almost every system they build is imperfect, they assume they'll go back and improve it reasonably quickly. In practice, once a system stabilizes for release, the risk of changing it becomes too big, and it doesn't really change that much (although it may get extended).
  • Programmers feel ownership for the code they build, and don't like thinking about handing it to someone else. Documentation pays itself back most when someone else has to work on your code.

In my experience, technical design documentation is difficult, annoying and boring to write, and worth its weight in gold when you come back to maintain systems a year after the fact, or when you have to hand it to another programmer. So I write it. I don't like writing it, but I do it as a service to myself and my co-workers.

Joeri Sebrechts
A: 

This is always an interesting question to ask.

I think many developers are bred at an early age to think "code first, design second". Not saying that is a bad thing either. Just offering up an explaination. It's also funner to start coding and building something, rather than designing it.

To me, that is the core different between software engineers and coders/developers. You are a software engineer because you are comfortable with seeing and designing the problem at a level of abstraction higher than the source code. Documenting that design is a mechanical effort that deals with expressing your solution and its design in some way that is consumable by stakeholders, developers, manager etc. etc.

So, to answer your question, maybe the people you are asking to document their designs, or gasp!!, do some software design upfront, aren't necessarily software engineers, but pure developers/coders!

Ryan
+4  A: 

probably for the same reason that some carpenters hate sweeping up when they're finished

Steven A. Lowe
+3  A: 

Because it's boring.

cciotti
A: 

Good programmers are always on the lookout for programming the cool. Its strangest since, every other engineering discipline stresses on documentation. We programmers have to realize that we wouldn't have had softwares like gcc, mysql etc if the programmers wouldn't have documented properly. Here are some of my thoughts on the same State of Open source and its documentation

Ritesh M Nayak
A: 

It's an interesting one. I love writing UML diagrams / schema diagrams because it quickly represents the core relationships that you need to understand to get to grips with the system. If there's basic detail there, and there's comments and test cases in the code then it's normally pretty easy to understand what's going on. It'a also quite satisfying to tell them to read the document, and then come back! Also, there's an element of professionalism: how incompetant do you look if you have to explain to a new joiner that you didn't write any documentation?

I'm trying to encourgage my team to use wiki's more. If you have to ask something or you have to take time understanding something that you see as complex, then I suggest that they summarise what they've learnt and comment on any pitfalls they might have seen. I find it odd that people don't want to do it, even though it would have saved them time. I wonder whether it's:

  • Job scecurity through obscurity
  • You tend not to get rated for your documentation skills
  • Don't want to admit that they didn't understand
  • Realise that even though they document it, most wiki search engines suck. On one wiki (sorry, I forget which we use), I can search for Banana Man but it won't find an article 'BananaMan' or 'Bananas Man' which is really frustrating.
Egwor
+2  A: 

Because we know no one is ever going to look at it again.

I personally subscribe to the theory that "the code is the documentation". Why would I look at a design doc when I have the code? Design docs never tell the whole story, but the code does by definition. Design docs also aren't maintained well over time, so they might be wrong.

Clayton
I respectfully disagree completely. The design doc summarizes the thought processes and reasoning behind the code. It's the "Cliffs Notes" that captures req'ts and history; it tells me at a high level whether a project is reusable and extensible.
Adam Liss
Adam: I understand and agree that that's what a design doc is meant to do, but in my experience they rarely live up to expectations. The only part of a tech doc I find useful is the UML diagrams. The text is mostly useless. I'll include the tech docs I write myself in that.
Clayton
+5  A: 

going against the concensus here;

**Good Programmers/Developers/Software Engineers do write good documentation that you can always use to recreate whatever application it describes.**

Don't believe me?

Tell it to Brian W. Kernighan and Dennis M. Ritchie.

They wrote this little bit of documentation decades ago: C Programming Language

http://www.amazon.com/Programming-Language-Prentice-Hall-Software/dp/0131103628/ref=sr_1_1?ie=UTF8&s=books&qid=1224957653&sr=8-1

and only had to write a second edition in 1988

kloucks
A: 

I like writing documentation in some cases. For example documenting something that another developer is definitely going to use (hence my work will make their life easier).

Doing documentation becomes a really nasty chore when, say, a ladder-climbing manager wants you to be kinda vague and half-lie in the documentation just to further the manager's own agenda (instead of helping another developer).

Writing documentation can be a great learning experience imo. It's an opportunity to reflect on design decisions, what worked well, what can be improved etc.

MrDatabase
+8  A: 

I used to hate writing design documentation. The main reasons I hated it have already been touched on in some of the answers here:

  • It seemed like a waste of time. Nobody was ever going to read it.
  • It got out of date as soon as the software changed.
  • Writing documentation in Microsoft Word was nightmarishly tedious
  • It seemed impossible to organize documentation usefully.

But that has all changed. I don't love writing design documentation now, but I do it, and it doesn't make me feel like I'm pounding my head against a wall. What changed? Two things:

First, I worked on projects where I had to explain my software design to other people. Other developers had to interoperate with my code, or extend it, or maintain it. I learned very quickly that while I write very clean, readable, self-documenting code, once the scale of a project grows past a certain point, people are going to need more than a program listing to get started working with it.

The other thing that changed is that I got a lot of experience working with other developers' designs that were underdocumented. I would get through a week of research and prototyping, and at the end of that time find myself with a level of understanding that I could have picked up by reading a two-page document, had it existed. I came to resent developers who think so little of my time that they wouldn't spend any of their own to mitigate the problem.

So, here's my advice on writing design documentation productively and usefully:

  • Use a wiki. I can't emphasize this enough. A wiki does four things for you. It lets you build documentation in concert with other people. It makes it easy to build navigation links into your documentation, so people can actually find the documentation you've written. (That's a huge, huge problem with using Word as your documentation tool.) It has built-in (and useful) version control. And, maybe most of all, it puts hard limits on the amount of formatting you can do, so you don't spend a lot of time screwing around with making it look nice.
  • Integrate the wiki with your bug-tracking system. Good bug-tracking systems, like FogBugz or Trac, already do this. Bugs often come about because of poor design. Having the wiki integrated with the bug tracking system makes it easy to correlate bug reports and feature requests with design documentation and vice versa. It often happens, when I'm resolving a bug, that I realize that the bug came about because the underlying design is poorly understood. So I document it.
  • Don't write very much. The complaints about design documentation are well-founded. A lot of it is redundant. It does get out of date when the software changes. You shouldn't be thinking "How do I explain the design of this software?" You should think, instead, "What's is there about this software that I couldn't easily learn from reading the code?' Document that. In particular:
  • Look for concerns that cut across classes, and document them. Generally, you can rely on the comments in your classes to tell you what's going on and why. But it often happens that class A is doing something a certain way, and class B is doing something a certain way, and their design has to do with a concern that neither class really encapsulates. For instance, I'm building an application framework that supports a number of its own data types, like time-of-day, or multiple-choice. Data-type functionality is spread across multiple classes - there are UI classes, database helper classes, etc. It's really useful to have one page in the wiki that explains what each data type is, how it functions, and why we even support something as stupid as a time-of-day data type.
  • Listen to your colleagues. Every time you have a conversation with someone else about what your code is doing, you should ask, "Did we really need to do that?" If you write design documentation properly, every hour you spend writing it is two or three hours you don't spend having to put the problem you're working on aside so that you can help someone else with theirs.
Robert Rossney
+1  A: 

Documentation done properly is written BEFORE you write the code. Requirements doc are how you and your users know that you are done and that you built what was asked for. Design doc forces you to think the problem all the way thru before the system is in concrete. Documentation after the fact is boring and much more work than documentation written during development. 15 minutes of doc a day during development is a good habit to get into and much less painful than spending days after the fact. Documentation should be part of the creative programming process.

A: 

One key point I keep in mind is that bad code with good documentation is infinitely better that good code with bad documentation.

If you have ever worked with MFC you will know what I mean. It was a strange code base to work from but there was documentation everywhere. MSDN, books, articles. This was all before the net really took off. With all that documentation it worked well.

There are many examples of code whose quality is debatable but has good documentation. There is even more examples of good code with poor or nonexistent documentation that is all but useless.

John Dyer
A: 

Writing decent, understandable code is much better than writing a doc about it. Usually things change and nobody bothers to update the doc. So it's usually outdated and catching dust...

Morph
A: 

Writing good code documentation and writing good software involve overlapping but distinct skill sets; you certainly have to understand the code to document it, but the fact that you wrote it doesn't necessarily mean you can document it adequately. Many developers / "software engineers", including myself, suffer from a blind spot in this area; having written / designed something, we no longer understand what it looks like to someone who doesn't already understand it. We can answer questions about it, and help someone on an individual basis to understand it, but writing documentation suitable for general consumption is hard, because we don't know which aspects are important, and which are self-evident. Thus we either end up writing no documentation at all, or writing documentation that goes into painful detail about trivial obvious aspects, while glossing over more important aspects, because we just can't tell the difference.

mithrandi
A: 

I personaly hate the tools used for documentation. Word, etc. Anybody knows of a markup language that is easy to learn, that will allow me to create UML diagrams, so I can do all my work from emacs and write the documentation at the same time I write my code? Export to PDF and possibly MS Word would be a huge benefit also. Organizing this documents would be also so much easier because I could check it in together with the source code.

+2  A: 

Nobody is going to read it.

A well designed code base is its own documentation. Future maintainers are as likely to read your documentation as the end user is to read the User Manual, which is to say, they will not.

postfuturist
A: 

@Kristijan: LaTex is able to do all of that, and more.

Jasper Bekkers
Shouldn't this be a comment on Kristigan's answer?
Martin Brown
A: 

Not all software engineers hate writing documentation; most good ones will accept it's an important part of the process, and will often use tools and techniques such as generating documentation from source code or using Agile-like techniques to record design decisions.

Bottom line is (as summarised in an excellent quote I once heard from a friend), documentation is like sex; when it's good, it's very good, and when it's bad, it's better than nothing.

Rob
+1  A: 

Designing and writing software is like cooking and enjoying the meal.

Writing documentation is like washing the dishes.

Frederic Daoud
A: 

The rule by commite problem. I've recieved perfectly good documentation from other coders. Clear concise and easy to digest. Then managers and QA got a hold of it and the coder spent another 4 hours formatting and correcting grammar. A week after he "cleaned up" the document and we both consumed it, a managers manager got a hold of it and made us change it. Another 4 hours and it was approved. The contents that we cared about was unchanged and the code was exactly the same as it would have been had the document been kept between programmers. IN the end the document was not tied to the code and was lost in the document management system. This pissed us both off and wasted at least 1.5 coder days. There. That's the reason I hate it..

baash05
A: 

Let me preface this by saying I won awards for technical writing during my university career, so writing is not a problem. Believe it or not, I actually enjoy writing user manuals and customer oriented documentation. It does give me a sense of pride that I can explain complicated concepts to users and they can immediately get to using the products.

So why do I hate documentation? I don't. I just hate writing the documentation required in most places as it serves no purpose; other than to absolve other people of responsibility.

For example, I have often encountered product managers who know absolutely nothing about the product. So they write a functional spec that is utterly useless. Now, I am supposed to tailor my documentation to match up to a poor functional specification. This follows all the way down the line of course in a matrix fashion... it infects everything from the design document to the test documentation. If anything, the product managers SHOULD BE experts in their field. They should know more about the practical use of the product than the software engineers. This is a principal problem I believe.

Now in terms of documenting 'code' there are a few issues. 1. Code should be well written so it doesn't need in depth documentation 2. There must be design documents that describe the overall functionality of the system. However, here too, I don't see the point of duplicating information. I often see documentation where it looks like the API was just copied from the header file to the document. I tend to just refer the documentation to the header file itself. It keeps the documentation short and up to date.

I have a general rule. Any documentation written before coding might be useful. Documentation written after coding is generally useless. Making up flowcharts after already coding it is just a waste of time. Sometimes it is useful to document things after coding... if you're doing something tricky for example. However, the general rule applies... if you can code it without a design document, someone else should be able to read it without a design document :P

A: 

I think it comes down to the size of the potential audience. Documents just don't have reach that our code does. I thinking about programming as an art and at the end of the day, we want our art to be seen and appreciated.

Shaun
+3  A: 

Because documents don't compile :)

sarego
FWIW, Tex/LaTex documents actually do compile ...
none
@sarego: you should try literate programming (doctests).
kriss
A: 

I like writing documentation. I like knowing where everything is.

Anyone who doesn't is under the illusion that software development is about writing code. This isn't so. Writing the code is as much a part of software development as checking the tire pressure is a part of being a mechanic. It is important, but its completely overshadowed by everything else involved.

ironfroggy
A: 

The thing that people forget is that source code is a design. By this I mean that what the computer runs is not source code, but compiled code. Designs are normally made by designers so that builders know how to build what they wanted. In the computer world the builder is the compiler and the designer is the programmer, so source code is filling the roll of the design.

Source code already is an abstraction of what the computer is actually going to do. Any abstractions it is possible to make are normally already baked into the source code languages we use. If you can find a way to make meaningful abstractions to put in a design document, aren't you just creating a higher level programming language?

A lot of attempts have been made to abstract out the interesting parts of the software into a design format, but I don't think I have seen one that worked well yet. UML is almost there, but often does not match the reality well enough. How exactly are you supposed to present C#'s gets and sets in UML?

For the above reasons I’m with Jeff Attwood in that if your source code is not clear enough to understand anyway, then you are better off making your source code better than trying to explain it in a word document.

Martin Brown
A: 

Sometimes I don't even know how I solved a problem or can't remember it, so I know writing the documentation is going to be hard :)

TT
A: 

I think it is because we don't want to do thing twice in another language.

All programmers are lazy, and we should be lazy. We want machines do what we don't want to do ourself.

The source code does describe what it is. Technical documents will describe the same thing again in another high level language -> English, UML, others and others others.

If our tools smart enough, it should translate source code and comments into documents.

Dennis Cheung
A: 

I don't know about everyone else, but when I write code that is intended to be used by other programmers, I really like to write some documentation (nothing formal or rigorous, just a section about the basic idea and a section about how to use it, and possibly some notes).

However, if what I'm writing is not meant to be for other programmers' use, I don't find much motivation in writing about it, unless I'm 100% sure that there are others who will read it.
I don't want to write something that no one's going to read!

hasen j
A: 

I would say the most important factors are Time and Tools. Tell me a tool which will auto complete my sentences :)

And yes, at the cost of repeating some answers here, we are lazy and it is invariably boring to write.

Vijay Dev
A: 

I think I must be unique as a programmer. Because I actually LIKE and ENJOY writing documentation after implementing the solution. It "feels good" to write down a memory dump of all the important facts still on the stack in your head. And it "feels good" to know that all these little intricate details won't just get lost. And that months or years later you can just re-read the documentation you wrote and it gets you up to speed much more quickly.

I setup Screwturn Wiki for our documentation on new projects a few weeks ago and it is great. It is so easy to write or update articles in the Wiki that it becomes "fun" to maintain it. And because the Wiki-style format makes your articles "look" visually pleasing on the eye it just makes it all the better.

NathanE
A: 

I actually enjoy documentation. It is like writing the storyboard for a movie, where the actual coding is like the script-writing. Even if not as formal as it could be, some level of documentation does help to flesh out ideas, isolate problems before they become problems, and provide insight as to the full progression of the project.

The reason that I don't do it as much as I would like to is not because of me, though. There is never enough time, according to the powers that be. I often find myself filling my commute with documentation tasks that I otherwise would not be able to do on-hours.

joseph.ferris
A: 

Its just because i hate my manager and dont like documenting any thing and it doesnt add any value to me.Thats what i feel.

A: 

Because I'm not given time to write it. Because the people who come after me and enhance, modify or refactor my designs, don't also change the docs, making them obsolete very quickly. Because we use a version of MediaWiki with a severely brain-damaged search feature that ranks several irrelevant or ancient matches before the page whose title is my search term.

Am I happy about this? No. But what can you do when the dev cycle resembles rushing from emergency to emergency?

+1  A: 

I've only realized recently that I am one of those annoying people who does not document consistently. I had originally skipped this step because, "I was in a rush". My job requires me to perpetually extinguish fires, many of them created by others, and I thought that "If I put all my time into coding, eventually I can go back... I just need to get this done right now." I've abandoned that philosophy for a couple of reasons.

First, I find that as I document, I have a much clearer idea what the functions are supposed to do and this often makes the code much more intuitive in the end. Ironically, writing documentation makes the code more self-documenting.

Second, by the very act of documenting, I know my own code even better and therefore can keep more of it in my head at the same time. When trying to keep track of dozens of functions, and potentially hundreds of objects, anything which can serve as a memory aid is useful. Thus, my speed actually increases when debugging.

Finally (and far from least), if I document, I can relegate the work to the people who would otherwise be unable to help fix stupid problems. More importantly, their questions on projects which were done months or years ago will be answered by documentation, and not by the ambiguous medium of, "oral tradition".

As an example - there is a project which I worked on briefly after the original programmer quit. He did not document (at all), and I unfortunately followed suit. Now, I find that the person who has taken over this project (as I was taken to act as a fireman again) needs to ask me quite a few questions on how things work. What was originally done to save time has now hurt me severely.

Christopher W. Allen-Poole
+4  A: 

Something you could try is providing good and almost fun tools for keeping track of the documentation within Eclipse.

One example is Doqua, a documentation Eclipse plugin for developers.

Epaga
A: 

Simply because writing good documentation is about as difficult as writing code, or at least it seems to take just as long, but we're not paid for that sort of writing.

fatcat1111
A: 

Same reason why they don't like writing tests :

  • His software is perfect, works always and self explanatory.
  • It is waste of time.
  • Nobody reads them anyway
fastcodejava
A: 

Because documentation is not code.

kb
A: 

Because they don't know what their program does. Pa-dum-Pump.

Jose M Vidal
+1  A: 

For me...

There is little glory in writing an implementation guide to your funky code, but much glory in writing cool code that solve a problem and makes someone’s job easier.

It’s a bit like the difference between building a bridge or painting the give way sign before it.

PK :-P

Paul Kohler
A: 

To me, writing documentations are like writing your code all over again.

thephpdeveloper