Skip to main content

Documenting My Lack of Documentation

This is a public shaming. No quarter will be given, no merciful anonymity or private repo's will suffice to hide my transgressions. I wrote a large complex recursive piece of functionality that was all but absent of documentation!

At the time everything seemed so simple, so straight forward. I thought anyone on my team could open up the code, read a few small lines and instantly understand what was happening, even first thing on a Monday morning before coffee. Or so I thought. 


Now fast forward to me on hump day last week, several months after writing that functionality. "That thing I wrote a few months back, it'll be perfect! Might need one or two miniature tweaks, should be simple", what an idiot. Should be simple - never utter those words! For all that you hold dear will turn to ash. Code that is as tight as the vaults of Fort Knox will turn to spaghetti riddled with bugs, like a scrap of peanut butter & jam sandwich consumed ants at a picnic. So much as whispering this phrase invites doom and destruction upon you and your codebase.

The function itself isn't outlandish or hard to follow, it's the spectrum of scenarios it can be applied to within the microservice that really makes it powerful. It is easy to misjudge how it works and the outcome changes wildly in a few select cases. Couple this with a severe lack of sleep and a devastating lack of documentation, wouldn't you know it, we've arrived at our destination - I was utterly bewildered and confused. It took two days to fully rediscover all the intricacies of how it fit within the microservice that housed it. Not to mention that time it took to make the changes. Needless to say it wasn't one or two tweaks. 

This is a public reminder to myself to always document as I go! "There's never enough time to document", past me can bend ober and shove that where it fits! It would have taken a 20th of the time to write down some sliver of documentation for the process flow. Rather I spending timea wading through debuggers, logs, unit tests & console output to work out what the hell was actually happening to the data! Better yet, document up front! Outline the functionality and perceived solution/implementation from the outset before even touching code, that way it's half done already. Just write some documentation!


Comments

Popular posts from this blog

Knowledge is Power - Society is Weak

Never more true than today, knowledge is power. Or more aptly in today's world the ability to provide & control the flow of knowledge is power. Recently there's been several large course corrections occur, several years too late but hey, better late than never as the saying goes. This highlights one of the biggest and most major flaws with the way we consume information on the internet. Social media, for good and for ill, is now a major source of information and "news" for millions of people across the planet. There are countless examples of the way that misinformation & even disinformation is created, spread and broadcast across the web. None more prevalent & far reaching than social media. Social media disarms in a way that in person discussion & social interaction previously couldn't. If you heard a story in person that even one or two people could corroborate it would be easy to accept as true, or just as easily refuted by the same small number...

The Worker Bee

Do what you're told, follow the rules, don't over step your bounds, stay in your lane. The true cornerstone of modern enslavement to work. "We can't all live our dreams", why is that? Because then we'd have to change, to collectively actually think and enact a way all people could realistically achieve a base standard of living & contentment. Allowing people's mind free reign on real questions rather than worrying where the next meal is coming from & keeping the lights on.  Bee animation by  Joe le Sale While I have no answers to life's great mysteries, I do know this about the meaning of life - it definitely isn't to toil & labour day in and day out to fill the wallet of our bosses or investors. So how is it that we find ourselves with that holding such a giant sway over our lives? This of course is rhetorical, we all know the answer, you don't bite the hand that feeds you. Which brings the problem in to sharp focus, we no longer ...

Genetic Revert & Refresh

The premise is pretty simple, what if we could press the undo button for DNA related aflictions. It's a sound theory but whether it would actually work or not is questionable. The possibilities! This particular train of thought was mostly born from thinking about cancerous cells, which grow out of control due to a minute mutation in the DNA of a cell. The immune system doesn't identify the cancerous cells as something that is dangerous because they're near identical to any other healthy cell. The same could be said with aging, cells slowly mutating & loss of elasticity cause degradation in copying the genetic information to new cells. CRISPR gene editing theoretically allows us to alter DNA in a live organism. With this technique the ability to alter a DNA sequence needs only the desired information payload to be spliced in. This obviously raises rather large ethical concerns of being able to wildly alter people's DNA and fundamentally change the human genome. Whi...