ProgrammerHumor

whatIsDesignPattern

whatIsDesignPattern
https://i.redd.it/mrs8s2tiokcf1.jpeg
Reddit

Discussion

developer_soup

I'm still not approving your PR.

1 day ago
lacb1
:cs::js::msl: no syntax just vibes

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.

1 day ago
dmk_aus

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.

23 hours ago
beatlz-too

That’s fine. I’ll just make it larger.

1 day ago
bwmat

Be careful, some people have no trouble with just making more and more comments

52 minutes ago
lardgsus

Works, the lowest form of acceptance.

1 day ago
arc_medic_trooper
:cs:

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.

1 day ago
lardgsus

Totally agree. It's also why as a manager, you NEED to put working criteria into the day to day actions of doing PRs, doing code reviews, following code standards, testing (automated, UAT, SOMEthing), and the other non-fun parts of writing code. It makes everyone's life REALLY easy despite being a tiny bit extra work.

3 hours ago
Icegloo24

Readable but broken > It works

Everyone can fix the not yet working thing they can easily understand by just reading it.

No one can work with, or maintain the unreadable but somehow working pile of garbage.

3 hours ago
lardgsus

100% agree

3 hours ago
twigboy
:py:

The closer to the deadline, the higher probability it'll get merged

23 hours ago
ITburrito

Yes, It works… until it doesn’t, though.

1 day ago
yo_wayyyy

like every other code

1 day ago
Kitchen_Device7682
:sc:

But as a bonus you can't find what went wrong or it's incredibly difficult to fix it.

1 day ago
Amar2107

Edge Cases: "Kaboom! Guess who stepped in the room".

1 day ago
FarBeautiful5637
:dart::cp::unreal::unity:

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

1 day ago
jdgrazia

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

1 day ago
Erotic_Dream

If only that’s how it works

1 day ago
Ok_Brain208
:cs::g::cp:

But at what asymptotic runtime complexity?

1 day ago
Gloomy-Tea-3841

PirateSoftware's mantra.

1 day ago
Amar2107

100+ if else statments, no design pattern whatsoever.

1 day ago
uuf76

Google tech debt.

1 day ago
LeiterHaus

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".

1 day ago
BigTinyTempo

The real engineers know if it ain’t broke, don’t fix it.

1 day ago
adapava

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.

1 day ago
Div64
:cp::ts:

Unfortunately "works" is only the first step of many in software and by far the lowest quality standard

23 hours ago
KlooShanko

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

23 hours ago
HiggsSwtz

Yea no

22 hours ago
clauEB

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.

1 day ago
Fast-Visual
:j::c::cp::cs::py::js:

It works alright, but does it answer all the product requirements? Does it offer high performance? Is it maintainable? Resilient? Readable?

1 day ago
RunInRunOn
:gd: :py:

What my past self tells me while I'm going insane trying to modify his code

1 day ago
somebody_odd

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.

1 day ago
DarkCloud1990
:js::cs::fsharp::ts::j:

As Kent Beck famously said:

Make it work. [...]

1 day ago
derailedthoughts

It works now. How about later after a few more new features and change requests?

1 day ago
BrocoliCosmique

If you want me to validate spaghetti you have to convince me there's no way it could respect standards and still work.

1 day ago
bacmod

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.

1 day ago
FACastello
:c::cp::cs::j::js::ts:

the problem is, many times you think it works, but it doesn't really, you just don't know it yet

23 hours ago
salameSandwich83

Yep, like Pirate Software. Code is garbage? Yes. Does it bank? 100%. Release it.

22 hours ago
dbell

Then the QA Testers come.

20 hours ago
RamonaZero

Can’t roast my code if they can’t read it

4 hours ago
roguedaemon

Is that you, pirate software?

1 day ago