Kurt
Kurt
Aug 31, 2018 · 2 min read

This is an excellent addition! I think of this as my swiss army knife of shame and would name it a swiss army knife dependency.

It is usually a useful file filled with helpers and utility functions that are essential to a developer in order to do a quick check or perform once of tasks on the stack without having to create a new project, env or untangle the spaghetti of dependencies in production.

Much like the real multi-tool even though it’s features are sub optimal we use and keep it is handy, justifying its use as a temporary knife just in case we also need to install a spoon or a toothpick during development but it is never removed. When you finally started using a proper knife it lived on because you either still need the toothpick or you tried to remove it only to realise in horror that all your knifes are forever dependant on spoons implementing a saw blade interface and now deeply regret both the shortcut and your career choice.

It starts life a perfect example of Good Code full of consistently named methods implemented in a way that is well structured and thought out. From that day forward it only deteriorates as it ages, splitting like the game of life as it is copied & tweaked for each project creating countless versions with tiny variances frozen in time.
The inner workings of the master file slowly become harder to read, edit or understand as it is expanded sporadically when the dev pastes a random gem of code into a vaguely named method he doesn’t need that handles an edge case that took so much & frustration get working that the solution is immediately backed up and replicated in triplicate out of pure fear that one day it will be needed again.

The master file and code is never maintained becoming ever more mythical as it is passed on to each new developer. Deleting or refactoring the file will only be considered a viable option in the event of the apocalypse or should sacrificing goats to a deity become a regular requirement for its use.

    Kurt

    Written by

    Kurt

    I learnt to program using tutorials on the internet, so to pay tribute I write about programming on the internet.