this post was submitted on 23 Sep 2024
2 points (100.0% liked)

Programming

23971 readers
108 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

Hey all, I'm still a junior dev with years of experience in IT. One of the things I've noticed since making the switch is that (at least where I work) documentation is inconsistent.

Things I encounter include incomplete documentation, outdated documentation and written process details that have assumed knowledge which makes it difficult for junior Devs to pick up.

I've had a search and a lot of what is out there talks more about product and how to document that SDLC rather than best practice in writing and organising documents against the actual software engineering and its processes.

Does anyone have any good sources or suggestions on how I could look to try and begin to improve documentation within my team?

all 9 comments
sorted by: hot top controversial new old
[–] MajorHavoc@programming.dev 1 points 1 year ago* (last edited 1 year ago)

Bare minimum place to start: See if you can get the team to agree that these documents should exist in every project root folder:

  • README.md - What is this even for? Audience: Managers.
  • CONTRIBUTING.md - What steps are needed to build this? What steps are needed to be able to run the tests? Audience: Developers.
  • CHANGELOG.txt - Describes the contents of every tagged release. Audience: end users.

Stretch goal: pick a spot (readme is fine) and make a list of sources (data in) and sinks (data out). Include contact information for whoever can reset the credentials or fix the firewall.

[–] FizzyOrange@programming.dev 1 points 1 year ago

This is the sort of thing you have to learn by experience, like how you can't really learn good coding taste from reading a list of rules (though some lists are helpful).

Anyway in my experience documentation is quite different in public (i.e. seen by customers) and private (inside your company). For internal stuff there's a much smaller incentive to document things because:

  1. documentation tends to be inconsistent (as you discovered), so people give up looking for it. Instead they just ask other people. This actually works fairly well inside a company because you can generally easily access whoever is responsible (as long as they haven't left).
  2. there aren't customers to keep happy and away from support.

I think the best thing to do is to accept that people aren't going to expect documentation internally. There's zero point writing guides to tools on your company wiki or whatever, because nobody will even try to look for it - they'll assume it doesn't exist.

Instead you should try to keep your documentation as close to the user as possible. That means, don't have a separate docs folder in your repo - put your docs as comments in the code.

Don't put deployment instructions on your wiki - add a ./deploy.sh script. It can just echo the instructions initially.

[–] 0x0@programming.dev 1 points 1 year ago (1 children)

The Code is my Bible.

Things I encounter include incomplete documentation, outdated documentation and written process details that have assumed knowledge which makes it difficult for junior Devs to pick up.

Yeah seems about right... off the top of my head:

  • self-host a wiki, use it to document stuff
  • write clean code that your future self will have an easy time reading
  • avoid automated documenting tools
[–] Windex007@lemmy.world 1 points 1 year ago

Writings self documenting code is so important.

Comments get stale and over time transition from: accurate to outdated, to eventually flat-out lies.

Go hard in the paint when choosing method or variable names. If it's hard to give them coherent names, that's a code smell.

[–] Kissaki@programming.dev 1 points 1 year ago

Be bold and make changes. Document what you find out, what is outdated, what is missing.

Take ownership. If there's nobody that oversees overall structure, be the one to do so - at least where you're touching it or are being bothered by it.

Diatraxis gives some great insight and considerations input into writing and structuring documentation. Namely how different target audiences and doc use cases require different forms and detail levels of guidance.

My company's internal doc/guidance also links to https://www.writethedocs.org/guide/ which seems like a good source.

[–] Aurenkin@sh.itjust.works 0 points 1 year ago (1 children)

I would say as a new junior dev you are uniquely placed to help with this. Documentation tends to be written by people who know a lot about a thing and they try to imagine what might be useful for someone. Someone new coming in with a fresh perspective can help uncover assumed knowledge or missing leaps to make the documentation better. One of the common onboarding steps I've seen is to go back and update/improve the onboarding docs after you've just been onboarded for example.

I would say pick your battles though because documentation can be a never ending task and documents are almost always out of date shortly after they are written. Think about what would have saved you time or mental overhead if it was just written down and fix those first.

As far as organising and writing, every place is different and it can depend on the tools your org is using. In general I'd at least have links to relevant docs as close to where they might be needed as possible. Like how to set up and get up and running with a code base should probably be documented directly in the readme, or at least linked to if it's overly complicated.

Hopefully that's at least somewhat helpful. It's definitely a problem basically everywhere I have worked though, you have to do what you can and not stress too much about it.

[–] Schal330@lemmy.world 1 points 1 year ago (1 children)

Thanks for this. As part of onboarding I have been trying to update where I can. There are times I wonder if I am adding to docs what others may perceive as fluff as it may be something obvious to them. I like to work with a "If we're all on a bus that goes over a cliff, does someone new have everything they need?" mentality.

At present the team is using GitHub Pages, which almost feels like a hurdle itself in updating the documentation quickly and keeping it organised and consistent. Being a junior I personally prefer a WYSIWYG. From your experience is there any pros/cons in using a WYSIWYG vs Markdown?

[–] Aurenkin@sh.itjust.works 1 points 1 year ago* (last edited 1 year ago)

No worries, sounds like you're definitely on the right track with your approach.

In terms of the style of editor I don't have a strong preference, I think the most important thing is discoverability which generally means putting docs where they are expected to be found and using whatever your team or org is using. Personally I have a slight preference for markdown mainly because it's easy to version control, see who wrote what (so I can ask them questions) and use all the tools I'm used to that work well with plain text. Tools that use more WYSIWYG style can be good too though and many of them like Notion have the advantage of making it relatively easy to search across your entire companies documentation assuming everyone uses the one tool.

For my personal notes I use Logseq which I highly recommend. It's a bit of both, markdown under the hood but with a simple editor that lets you focus on writing notes, tasks and links.