Wiki considered harmful for documentation

Wiki considered harmful for documentation

TL;DR: as a means of internal technical documentation, wiki is inconsistent, misleading, and unmaintainable. Migrate documentation from wiki to a source-control form as soon as you have customers, if you care about quality and productivity.

To be fair, wiki has its place.

At a very early stage of your company/project, you just need a place to dump and share notes. Things are changing so rapidly that any effort on polishing the documentation would seem ridiculously misplaced: why bother making something look good if it’s to be replaced tomorrow?

Wiki fits the bill perfectly well here: anyone, at any time, can add/update/delete documentation with zero friction. The machine is optimized for speed. If a mistake is made, chances are it won’t affect many people (given it’s early stage), and anyone else could fix it when they notice it.

Yet start-ups become grown-ups. Prototypes become real products. Information in wiki becomes misinformation.

Many times I’ve seen in wiki contradicting information (because anyone can edit it without a review), out-dated information (because the developers don’t remember to update it), personal opinions posed as rules/guidelines (again, because anyone can edit it), and poor presentation (bad formatting, typos, grammar mistakes, etc - because the changes are not reviewed).

Yet often I’m afraid to fix the mistakes as I don’t know why the original authors wrote what they wrote (because there is little metadata on the changes) and I fear I might be making a bigger mistake by “fixing their mistake”.

To make things worse, the same thing may be presented in many places, inconsistently (because anyone can start a new wiki page). It’s impossible to find all the places that mention something and fix them all when the thing has changed.

As a result, information in wiki quickly becomes untrustworthy, confusing, and misleading.

My rule of thumb: once your system has customers outside of your immediate team, it’s time to move away from wiki as fast as you can.

Where to? You might ask.

The ideal medium should satisfy several requirements:

  1. It should be version controlled, so that each change leaves a trace on who made it, why they made it, and what the change is. It follows that the format should be easily diffable.
  2. Changes should be reviewed, so that personal opinions and mistakes don’t creep into the documentation easily.
  3. It should sit next to the code, so that a code search of a concept will reveal both its implementation and its documentation. This is how we don’t forget to keep the two in agreement.

Documentation written in Markdown and checked into the code repository is a good solution. The two companies I have worked at recently have both adopted such technologies. With this set-up,

  • Each project puts its documentation in a bunch of .md files that are easily editable.
  • The .md files are automatically rendered into HTML for easy viewing.
  • All changes are reviewed per the company’s code review policy. Random opinions and poor writing become much more rare.
  • Change descriptions record the motivation of the changes so that future readers and maintainers can easily understand the real intentions of the original authors (obviously we also need to enforce change description best practices).
  • When a developer changes the code, they can easily find documentation that references the code and update it at the same time.

As a result, documentation becomes fresher, better written, more consistent, and more correct.

Wouldn’t this increase the barrier for documentation improvements and lead to fewer people motivated to contribute? Knowledge is created at an alarming speed, so how can the process keep up with the rate of change? Some may ask.

My answer is that if a company has a healthy code review culture (e.g. reviewers strive to do a good job and keep the turn-around time low), the process really doesn’t add that much friction and its benefit is tremendous. Also, I’m not proposing to put all information into the repository - for sharing knowledge that’s more dynamic, we have complementary tools like Slack, Discord, and etc. We just don’t want to rely on wiki as a primary medium for important information that many co-workers depend on.

What’s your take on this subject? Please share in the comments!

ChokSheak Lau

Software Engineer at Dropbox

2 个月

This opinion is IMHO harmful to documentation efforts in general. Most people don’t document their work, period. Making them go through code review to document their work makes it 10 times harder for them to do something that they already are unable to do. Sure, Wiki has its downsides. But for high-level overview kind of docs, wiki still beats code markdowns hands-down. Markdowns in code are still useful in certain cases, but not necessary for design docs and PRDs.

I believe this is a great start, but ultimately we'll need more. Throwing documentation behind a code review has a lot of benefits. It should increase document quality and provide a proper trail. There are several other problems wikis have that this migration doesn't solve. - Staleness - we still need proper processes to ensure docs get updated along with the code they reference. We need proper processes in place that build a culture of documenting things. So we changed some code... what's the hook that reminds/nudges/forces everyone to update the docs? - Tedium - we still need automation and tooling to reduce the tedium surrounding writing documentation. Even if we enjoyed writing documentation, often it's really tedious. We often need code snippets, lots of diagram types (e.g. sequence, architecture, component, use case, etc..) and other things. We need some automation and tooling to help with this. - Structure - there are several unanswered questions regarding the structure overall. What mixtures of tutorials, references, samples, API documentation, etc... do we need? What granularity are we aiming for (e.g. function level, component level, API-level, etc...)?

Spike Jee

Head of Baemin Robotics Lab / ex-Googler (was a software engineer)

3 个月

I second this. I experienced g3doc when I was working for Google. That was truly much better than Goowiki. But my concern is that companies may not have good document browsers or searchers like Google does. Google did tooling around g3doc and their Moma does good job searching everything. Can other orgs find somethkng comparable?

Michael Richmond

Software Engineer and Technology Leader with experience in storage, networking, cloud, and automotive

3 个月

This seems to be raising valid concerns that are mostly team culture issues and ascribing those issues to wikis. The issues raised are caused by the team/company not building a sense of information ownership throughout the org. Refactoring and pruning a wiki is part and parcel of using the tool. The second half raises valid and interesting requirements and goals. Version control, coupling with code (or code tools) are beneficial. Support for reviewing is useful, but organization dependent.

Eddie Aftandilian

Principal Researcher, GitHub Next

3 个月

100% agree that Markdown checked into source control is the way to go. Don’t agree that every documentation change needs to be reviewed — I think it should be optional. You want to have a low barrier to people updating the docs.

要查看或添加评论,请登录

Zhanyong Wan的更多文章

  • How to Review Code

    How to Review Code

    I’m a software engineer. I review a lot of code almost every day.

    9 条评论
  • Be Kind

    Be Kind

    Throughout our professional lives, we work with many people. Inevitably we will discuss and debate our projects.

    11 条评论
  • Birth of Pump - a Google Mock Story

    Birth of Pump - a Google Mock Story

    In my post yesterday, I gave an example of building Google Mock (aka gMock) from first principles. I mentioned that…

    4 条评论
  • The most useful skills I learned at Google

    The most useful skills I learned at Google

    Two years ago, I left my Tech Lead Manager post at Google, where I built my software engineer career for 17 years. I…

    13 条评论
  • Crush - episode 9

    Crush - episode 9

    (Continued from episode 8) For two hundred million years, I worked diligently, steadily rising in priority within the…

    4 条评论
  • Crush - episode 8

    Crush - episode 8

    (Continued from episode 7) Space After the ethical issues of digitized life were resolved by legislation, research…

  • Crush - episode 7

    Crush - episode 7

    (Continued from episode 6) Before retiring, I made a decision and didn't tell anyone except Lao San. A week before the…

    1 条评论
  • Crush - episode 6

    Crush - episode 6

    (Continued from episode 5) Later, people called that day Red Saturday. Newell was extremely adept at execution, full of…

  • Crush - episode 5

    Crush - episode 5

    (Continued from episode 4) How far is Mars from Earth? There's no simple answer to this question. Earth and Mars are…

  • Crush - episode 4

    Crush - episode 4

    (Continued from episode 3) For the next few years, we were all busy with our lives. My parents used all their…

    2 条评论

社区洞察

其他会员也浏览了