Site icon SheHacksPurple

The Psychology of Bad Code Part 6 – Avoiding Documentation

A software developer who is avoiding documentation and feeling guilty about it, in an office

This is a series. The first blog post is here, #2, #3, #4, #5, and this is the sixth.

The behaviour: Avoiding Documentation

What this looks like in the real world

The cause is often cultural:

I’ve worked at places where I KNEW no one was reading the docs I wrote. I did eventually learn that writing a doc gave me value, personally, but that took some maturity on my part. I also moved onto places where people valued such work, and it was very motivating to do the work when I knew my team needed it. If we make people feel like it doesn’t add value, then it doesn’t get done.

Behavioural biases at play

Documentation doesn’t feel urgent. It is generally not considered an exciting part of the job. And most of the time, no one asks about it

Why this behaviour makes sense in the moment

Documentation is rarely what we’re measured on. And it often feels low priority compared to coding. Management and ‘the business’ want features, bug fixes, meet deadlines. They don’t usually care if your code is easy to read (even if your teammates do) or if it’s easy or hard to onboard a new team member. It matters, but not to the people who reward us. Or maybe I’m wrong? You tell me what it’s like where you work.

On top of that:

Skipping it may feel efficient. Because in the short term, maybe it is. Or sometimes, even in the long term. I’m not trying to be negative here; I’m trying to be realistic. I’ve worked at multiple places where they hardly ever read the answers to the security questionnaires, and it made me want to pull my hair out. “The security team just doesn’t have time to read all of them.” Me: you think the devs had time to ANSWER THEM?!?!??!!? It takes more time to answer than read the answers. To me, a situation like that shows a lack of respect for your colleagues, but obviously I have strong feelings about this, anyway… Obviously as a dev I personally did this bad behavior, a lot.

The security risk

Missing or outdated documentation creates invisible risk.

What happens is there are no docs when you need them? People guess.

And when developers guess, they usually guess based on:

Not necessarily what is secure. Especially if they haven’t had training (which most devs haven’t).

Maybe also:

This is how systems slowly drift into insecure states. I call this ‘security drift’.

Solutions:

Training

You can’t train someone to care about documentation if the system/org doesn’t value it.

If documentation:

It will not get done consistently. Why would it? It doesn’t matter how many times we say “documentation is important” if we show them over and over that it is not true.

This time the training needs to be for management, security, the project team, and basically everyone except the devs. Management needs to create processes to reward and acknowledge documentation work. Project and security teams need to only ask for documentation they actually require and will use. Make the work have value, and they will do it.

Secure Defaults

Make documentation part of the definition of done. If you can add some sort of ‘check’ that it’s submitted (and completed, not just an empty doc), that might help.

Create templates that fill as much as possible, so time is not wasted.

Do interviews instead of questionnaires if possible. I know it takes more time, but you better believe it that the results are superior. And you will build knowledge, trust and relationships.

Environmental Design

Make it easy to document things where work is happening.

I would love to hear ideas from readers about approaches you’ve used that worked and what tools you used to do it.

Friction

If documentation is missing, don’t let it slide.

Explain the purpose is preventing bad assumptions, design flaws, and guesswork later. Try to explain the value if given the chance.

Social / Cultural

Recognize and reward good documentation. “Clarity is kindness.”

Incentives (optional, but powerful)

If you want to go further:

What gets measured gets done and seen.

Conclusion

Avoiding documentation isn’t laziness. It’s a predictable response to a system that rewards speed and at the same time ignores long-term investment in clarity. We must recognize and reward what we value, not just pay lip service to it.

When documentation is missing, we don’t stop; we guess. And that’s never good for security. 

Up next: repetitive and lazy code.

Exit mobile version