My First Time Writing Code Documentation

July 16, 2023

Writing code is not for the anti-social geeks and dorks who never want to talk to another human being.

In today’s dorky world of data, communication is more important than ever.

Whether you’re a software engineer, data scientist, or data analyst, if ever write a Python script or push code to GitHub, you can be pretty damn sure that someone’s gonna read your code one day.

And when that day comes, the difference between a good and a great programmer lies in one’s ability to communicate what their code does.

That’s where documentation comes into play.

Knowing how to write great code documentation helps with:

  1. Making your code easier for others to understand
  2. Making your code easier for you to understand weeks or months in the future

I’ve only been programming for a month and haven’t done any collaborative projects, so I haven’t needed to document my code.

My code is for my eyes and my eyes only.

But one day, I’m gonna work with others and be forced to learn code documentation. Why wait? If I start now and slowly learn, it’ll make me a valuable team member in the future.

So yesterday, I jumped into a few of the Python scripts from my Spotify project and wrote documentation for a few of my functions.

It’s nothing world-class or super stellar.

But right now, I’m just a baby standing up for the first time, on the verge of taking my first step.

Here’s an example of one piece of documentation I wrote. What do you think? Is it a good start?

my first attempt at writing code documentation