cleanCode
MemeI especially like the fact that it is singular, not plural. Like, there is a contractual obligation to have unit tests, so they just have written one.
What do you mean, singular? I unit test my code, are you people writing multi-units tests?
I like to test my code as a unit.
I like bug
And how it is silenced
It would make more sense to me if it was blowing into the horn the wrong way round. They can be hard to spot in excessively verbose logging systems.
Especially the detail that the circuit is not closed, so a failing unit test.
If it works don't touch it, vibes
Temporary hack from before the project started
//temporary hack
//january 8, 2011
(you've only started working at this company since 2017ish)
author jeff
jeff retired 2014 and died 2020
Get the ouija board
Not a simple one. The ouija keyboard!
I..D...O...N...T...R...E...M...E...M...B...E...R
And it worked fine for 8 years, but failed when you slighly touched a completely unrelated part
PO: we don’t have enough resources, just get it out by yesterday. Also PO: why do we have so many bugs
Why would the PO ask about having so many features?
Hubris
PO: "We don't have enough resources?"
You guys have POs actually being aware that they usually plan to much?
Clean code is the dream, reality is often different
...but it doesn't have to be.
It's so simple. If you build something dirty because you needed a feature delivered fast, then make your next task (ahead of the next planned feature work) cleaning up the dirty hack. If you can't do that, it's because you're not setting realistic timeline expectations with your customers and stakeholders.
If you do that, you deliver your immediate goals on time, and you don't have a system which constantly deteriorates month over month. If you don't do that, you're not truly avoiding the issue, anyway; you just no longer get to decide when the issues you've been ignoring pose unavoidable consequences.
(Good luck convincing managers of that, though. Ultimately, it's the devs who bear the consequences when shit breaks, even if the shit is only broken as a result of irresponsible management.)
If you can't do that, then it's because you're not setting realistic expectations with your customers and stakeholders.
More often than not, I find it's because these groups will not give you any time ahead of the next planned feature work (whenever you finished a feature, everyone is ready to see the next feature shipped - not unlike what you pointed out).
Which is why I personally prefer to embed quality in the deliverables rather than as a separate piece - the "work" is estimated to take longer from the start because you deliver at a certain level of quality.
Just gotta set realistic expectations with stakeholders, by saying things like, "Look man, I need 2 months to do it right. You're telling me you need it delivered in a month. Fine, we can make that happen, but if we do, we can't take on any more work for 6 weeks after delivery, while we mitigate the additional operational overhead incurred by the faster (but shittier) solution. Up to you. Do you want it completed and released in 2 months? Or do you want it released in 1 month and completed 1.5 months after that? Business efficiency is better if we just do it right the first time, but if you've already made the mistake of promising it to the customer sooner than that allows, then we can deliver on that promise at the expense of some of our own internal efficiency. Which option do you choose?"
Which option do you choose
Hire someone more compliant who will do it in 2 weeks at a "barely works, but works" level. Maintain after that? No one cares.
Sometimes true, but if that's the chosen option, the team/product was doomed, anyway. And if the team/product was doomed, anyway, it's also time to jump ship, regardless.
Love how one temporary hack is needed to balance out the other hack 🤣
They both rotate the desk counterclockwise though, right? Like don't they just combine? Or am I dumb lol
The error silencer is my favorite. Just put a muffler on those logs like they are exhaust.
They’re just reclassifying errors as debug messages and setting the log level to Info. Who hasn’t done that?
I'm in charge of the optimized component.
And it is fine.
If someone wonder I actually do nothing.
If someone from "higher" asks, I'm knee deep in documentation, both reading and writting, to be sur my protocole for testing in preprod on the qualif for the recette isn't breaking the backups
The optimized component is a flux capacitor for going back in time to when we should have received all the requirements to complete a project by the deadline.
That should be more like a MVP view or first iteration. It works. The team knows most of the shortcuts/tech debits/hacks. For v1, they have enough information for a plan.
You guys have unit tests?
Yes, we have a unit test.
# temporary hack
hmm, wonder how long that's been there...git blame
<some fucking guy> <literal years ago> # temporary hack
hmmmmm.....
Which project do you guys think looks like an IKEA inspiration room and nothing like this picture here?
Legend of Zelda: Tears Of The Kingdom
Complete with the torn off labels and the loose hand placed in a middle finger position by some intern
Getting a modern AAA game to run on 7 year old mobile hardware couldn't have been easy
Rollercoaster Tycoon, built by a single dev, in assembly.
A videogame built by a single dev, in Rust.
(the code still looks like a shitshow to all third parties, just not the single dev)
I see spider web, but it’s not a bug right? more like a feature holding the structure together
Missing hopes and dreams somewhere
L
I
T
E
R
A
L
L
Y
Who gave you the architectural diagrams of our app??
It works
You mean scrum based ticket driven "architecture"
The thumbnail looks like a hunched over code monkey.
The abandoned unit test. Unit Test: "What is the purpose of life?"
Love the unit test 😅