Works, the lowest form of acceptance.
With years I’ve learned that making it works usually the easiest part, hardest part is making sure that it fits with the rest of the architecture, is good enough to handle the edge cases, and it’s readable/understandable and clean.
The closer to the deadline, the higher probability it'll get merged
Yes, It works… until it doesn’t, though.
like every other code
But as a bonus you can't find what went wrong or it's incredibly difficult to fix it.
Edge Cases: "Kaboom! Guess who stepped in the room".
The problem with bad code is that it works sure... Until it doesnt and you cant fix it because you have no idea what the spagetthi is going on
It works. It's just not maintainable, modifiable, documented, performative, efficient, or intuitive
When you wonder why you didnt make it as an engineer refer back to this moment
If only that’s how it works
But at what asymptotic runtime complexity?
PirateSoftware's mantra.
100+ if else statments, no design pattern whatsoever.
Google tech debt.
I'm not sure if you're referencing tech debt for the company - Google, or if you're asking OP to take action and search Google for "tech debt".
The real engineers know if it ain’t broke, don’t fix it.
years of experience have taught me not to shit on other people's work, especially when I don't know the context of the decisions. I have some beautifully crafted code in my repo that is stupidly overengeneered dogshit for what it does. And some "spaghetti code" that is readable and has simply worked for decades.
I worked with somebody that wrote some awful system. When I criticized it specifically to how wrong it was this was his answer. What wasn't factored in was that the garbage this guy wrote woke up tge eng oncall regularly at 2 - 3 am a few times a week among other horrible things.
It works alright, but does it answer all the product requirements? Does it offer high performance? Is it maintainable? Resilient? Readable?
What my past self tells me while I'm going insane trying to modify his code
I had to write a function in python to attempt to normalize data that described the state a collection of events was run under. It ended up being a really big collection of ternary operations for Boolean expressions. A user can basically run functions on our APII in stealth mode, no logging or notification. That’s all fine and dandy except for the fact we have a defined SLA for our API that could result in chargebacks on the contract. A savvy user could get the service for free if they know what the are doing and we had to add stealth mode for client security.
As ternary functions it is not too bad to look at if you know the story of why we have to do it.
As Kent Beck famously said:
Make it work. [...]
It works now. How about later after a few more new features and change requests?
If you want me to validate spaghetti you have to convince me there's no way it could respect standards and still work.
It may work but every now and then when the moon is in the seventh house and Jupiter aligns with Mars, the software with crash without warning and without the OS detecting the crash.
Unfortunately "works" is only the first step of many in software and by far the lowest quality standard
the problem is, many times you think it works, but it doesn't really, you just don't know it yet
Wait until you have to perform a major migration on code like this. As someone currently doing this, I blame people like you when things get missed because the same thing is done 5 different ways when simple Repository Pattern would have made the job so much easier
Yep, like Pirate Software. Code is garbage? Yes. Does it bank? 100%. Release it.
Yea no
Is that you, pirate software?
I'm still not approving your PR.
This meme has strong "junior dev who doesn't want to listen to a senior explain why they're wrong" energy. And that's fine, they don't need to. But I back up my seniors and if they can't convince them it's a good idea, they probably won't be able to convince me it's a good idea. And I'm the one who can give final approval to the PR. So buck up buttercup, it's refactoring time.
It works. In the specific tests I did. But not other cases. And it is inefficient. And it is hard to follow. And it isn't easy update in the future. And it relies on areas of code already slated for change. And it adds a new library, I only use a fraction of, and don't have clearance for. And there is already a library or function in our code that does what I needed.
Pls approve.
That’s fine. I’ll just make it larger.