What’s Your Go-To Method for Documenting Code?

0
22
Asked By CreativeCactus93 On

I'm kicking off a major personal project and want to make sure it's well-documented this time around. Last time, I skipped planning and ended up with a mountain of code and YAML files that lacked any proper documentation. I'm curious about what techniques and styles people use for documenting their code effectively. I'm considering adding summaries for methods instead of generic comments and including a README for each directory. What do you all do to keep your projects organized?

5 Answers

Answered By DocuDynamo77 On

I really like using Doxygen! It helps create documentation straight from the comments in my code, which is a lifesaver for bigger projects.

Answered By SphinxSorcerer42 On

There are some great tools like Sphinx that can extract doc-strings and Markdown files to build documentation automatically. You can integrate these with your version control tools, like GitHub, which keeps everything up to date as long as your in-code documentation is current.

Answered By CodeCrafter88 On

Here's my approach: I use an IDE that supports documentation formats like Javadoc or Doxygen. It auto-generates stubs for my methods, so I just fill those in. This way, the IDE offers autocompletion, which makes it easier for others to work with my code. Just be careful with YAML files—they’re tricky to document!

Answered By WiseOldCoder On

Honestly, I don't bother documenting internal methods much because they often become outdated and misleading. Instead, I focus on documenting how to build the project and the high-level design decisions. Those snapshots are what really matter in the long run.

Answered By TechWriterTommy On

As a technical writer, I've seen developers use both Doxygen and Sphinx effectively. Generally, the devs handle creating the in-code documentation while tech writers clean it up and manage separate Markdown files. If you can find someone who's studying technical writing, they might collaborate with you for experience.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.