What is technical debt, and why do tech companies often seem to care so little about it? Unfortunately, many software…
What's a Code Sloth?
Optimality in Simplicity
To be sloth is to be lazy or slow, but is this true of the sloth itself? These fascinating creatures sustain themselves on toxic, rubbery leaves that contain little nutrition, take weeks to digest and produce barely enough energy to move at a deathly pace. Ok… It’s no wonder they’ve got a bad rap.
However, as we zoom out, high in the tree tops away from the danger of predators, a different picture starts to form. Without a need to flee or fight, they’ve no need for speed or brute. Why then feast on energy dense food when that energy would go unspent? Sure, toxic leaves aren’t exactly ideal, but we software engineers know there’s no golden solution, am I right?
It is observant eyes that see the sloth for what it truly is; a beautifully optimal system. No fancy bells or whistles, just a happy, humble, hairy thing doing only what it needs and nothing more. This cute little coconut head isn’t lazy; he’s exceptionally efficient. And just look at that smile.
The Sloth Approach to Software Engineering: a Personal Ideology
Many engineers in the industry would do well to take heed of the sloth. All too common is a solution that overcomplicates the task at hand. Ephemerally trending design patterns, obsessive need for optimisation or blatant “brag-worthy” complexity poison the environment in which we would otherwise thrive. However, unlike the sloth, our tolerance for toxicity is far less robust. It is in this realisation that a Code Sloth is born.
Pronoun: Code Sloth
(Any or all) A software engineer who:
1. Proudly authors sloth code
2. Lazily (optimally) leverages the code or solution of another to solve a problem, or learn about it
3. Is hairy, moves slowly and enjoys lengthy naps
Usage 1
Hi, my name is Trent and my pronouns are he/him/Code Sloth.
Usage 2
My inner Code Sloth lead me to a StackOverflow article that had an amazingly accurate solution for calculating the distance between two geo coordinates on the surface of the earth. Now I don't have to be a subject matter expert because I've been able to reuse this solution, confirmed it to be accurate with a suite of unit tests and can move on with solving the remainder of this business problem!
Usage 3
Ugh, I need a coffee. I'm a major Code Sloth today
Noun: sloth code
An engineering solution or piece of code that on the outside is basic or simple, but when viewed in its full context is well considered and fit for purpose.
Usage
I'm proud of this new piece of sloth code that I wrote! Sure, this loop could be optimised to use a hashtable for big O(1) constant time lookups, but I'd get a diminishing return optimising it; there's no business case requiring us to process the data any faster. The current code is really simple and doesn't consume unnecessary memory, so I'll leave it here for the moment and revisit it in the future if our requirements change.
This blog aims to deliver simple and insightful information on software engineering, technology and beyond to help emerging Code Sloths climb to the highest of trees (goals). Enjoy, my furry little friends!
This Code Sloth
About the Author
Trent is a Technical Lead Software Engineer and proud Code Sloth living high in the tree tops of Sydney. Over 10 years of industry experience have taught this furry little coconut head that simple solutions trump technical wizardry in monoliths through to microservices. This blog is an expression of his passion for engineering in the hopes of helping other emerging Code Sloths alike.
Here's some food for thought
-
-
.NetVisual Studio
Visual Studio Code Coverage with Fine Code Coverage Visual Studio 2022 Extension
by Trentby TrentVisual Studio code coverage tools are only available in the Enterprise edition. This is likely out of reach for most…
-
C# IDisposable Interface is an excellent tool for managing the cleanup of resources in a class. Did you know that…
-
1. Getting StartedElasticSearch
[Tutorial] Running ElasticSearch Locally in Docker
by Trentby TrentThis tutorial will demonstrate how to run an ElasticSearch Docker image in containers for both single and multi-data node configurations.…
-
Dearest Gentle Reader, While today marks the end of our test refactoring journey, we still have much ground to cover.…
-
We made some substantial progress on the testability of our code during the last article when we removed our dependency…