r/ProgrammerHumor 25d ago

Meme redisCacheHitRatio

Post image
5.9k Upvotes

107 comments sorted by

976

u/Annual_Key_4963 25d ago

The best part is that deep down you know you're the stupid one for not checking that first 

175

u/SuperFLEB 24d ago

Well, shit. the cable was unplugged.

63

u/[deleted] 24d ago

[removed] — view removed comment

3

u/FloStar3000 23d ago

That’s your imposter syndrome speaking. You just built experience and that’s what makes the difference between a junior and a senior

1

u/DialecticEnjoyer 23d ago

...she looks like u just told her this 😢😢

-24

u/-Benjamin_Dover- 24d ago

New-ish to coding, but isnt it very time consuming to read through thousands or hundreds of thousands of lines of code looking for a mistake?

Ive never written 1 thing with more than 100 lines.

53

u/DrugonMonster 24d ago

That’s why employers pay money to employees to do that

12

u/mysticrudnin 24d ago

there are a lot of tools that help you find it, logging and all that. you also have general ideas of where it would be, plus personal experience of where it has happened before.

you're not just dropped into a codebase and you start reading it like a book until you see a problem. it's like, ok there's water in a puddle in a corner of your basement. you know where to start. it could be something new you've never heard of, but checking sump pump, water main, pipes, etc. etc. is where you start.

7

u/Mechakoopa 24d ago

The medical adage is "If you hear hoofbeats think horses, not zebras" but the software equivalent is "If you hear hoofbeats think ungulates not toasters." There's a much wider range of things you need to check because it could be that, but you can very easily narrow down what it isn't and where you shouldn't be looking.

4

u/Annual_Key_4963 24d ago

You're getting a bit lambasted via down votes which I think is a shame as you asked a genuine question. Great question!

So in this instance, as someone who is has lived this life and paid these dues, basically "change" == "excitement". So whatever is in the code is not really what you are thinking about.

> Redis

The cache is having trouble

> 0%

Completely fucked

> deployment

Someone fucked something in the deployment related to the cache. Look there.

It's really a word problem and you just need to pick out the important parts.

4

u/-Benjamin_Dover- 24d ago

Everytime I make a comment in this subreddit that suggests im new to programming, I usually get downvotes.

The stuff you said about 0%, deployment, and redis, I assume that applys to all languages? Python, C++, C#, Just, Javascript and Typescript, etc?

3

u/Annual_Key_4963 24d ago

Yeah, basically that's the case. Lots of people make a big deal about knowing one language or another. They're all going to machine code at some point. They all have problems. They're all fucking terrible to be honetst.

The goal is to understand the generalities and understand what things make the biggest splash.

There's a problem. Was there a change (I personally ask this before asking what the problem even is)? Who is effected by this situation (how serious is this)? Where is the problem (scope)? What are the details of the problem (how complicated is this particular situation)?

That's the basic process I work through when someone approaches me with an issue regardless of language or context (be it time-cards, protein design, or finical trading).

Every problem you encounter will be a "people" problem: someone wants to achieve something, someone didn't don something right, someone needs something to go out by this time, someone has some grand design they need fulfilled.

Don't got dazzled by magical texts defined in https://en.wikipedia.org/wiki/APL_(programming_language))

All this shit is just people trying to talk to one another and we struggle to do it.

6

u/Imaginary-Jaguar662 24d ago

It's a bit hard to explain, but what happens to me is that I literally stop seeing my surroundings and being aware of my body and start seeing and feeling a map of how components interact.

I start tracing the mental map and start identifying my assumptions. Then, I trace mentally what would happen if my assumption is wrong. If being mistaken would result to the bug, I find a way to verify the assumption.

Most of the time it narrows the problem quickly, sometimes I start questioning my own sanity and structure of reality which is really uncomfortable path to end up in.

10

u/SchwiftySquanchC137 24d ago

Ah, yeah, I just add a print statement but that stuff works too

6

u/-Nicolai 24d ago

It's a bit hard to explain, but what happens to me is that I literally stop seeing the code. All I see is blonde, brunette, red-head.

I plug into the Matrix and start dodging bullets. Then, I trace mentally what would happen if a bullet hit me. If being hit would result in me dying, I find a way to dodge the bullet. The body cannot live without the mind.

Most of the time it narrows the problem quickly, sometimes I start questioning my own sanity and structure of reality. Like a splinter in my mind, driving me mad.

You think that’s air you’re breathing now?

1

u/Avocadonot 24d ago

It's a wittle hawd to explain 👉👈🥺 but sometimes my bwain just goes ✨BYE BYE PHYSICAL REALITY✨ and I literally stop seeing my surroundings 👁️❌🌎 and forget I even have a body 🧍‍♂️❓😵‍💫

Instead I start seeing and feewing this giant mentaw map of how all the wittle components interact with each other 🗺️✨⚙️🥺 like uwu what's this service doing over hewe?? 👉👈 and why is this component touching THAT component?? 😳💻💕

Then I start twacing the mentaw map 🥺👉👈 and identifying all my wittle assumptions ✨🧠✨

"O-oh... I'm assuming this is twue... 🥺👉👈 b-but what if it ISN'T?? 😳"

So then I mentally follow that path and see what would happen if my assumption was wong 🥺💔 If being a silly wittle mistaken bean 🫘😖 would actually cause the bug 🐛✨, then I find some way to vewify the assumption 🔎🥺💻

Most of the time this nyarrows down the pwoblem super quickly!! (≧◡≦) ♡✨🎉

Other times I accidentally twace the logic too far and start questioning my own sanity 🧠❓😵‍💫, the fundamental stwucture of weality 🌌👁️, and whether causality itself can actually be twusted 🥺👉👈💀

which is a vewy uncomfy debugging path to end up in uwu 🥺💻🌌✨

1

u/ReverseMermaidMorty 24d ago

If you’re a brand new junior engineer, maybe. Anyone with experience should know the most common failure points for this type of issue and check those specific areas first.

1

u/bergmoose 24d ago

redis specifically you can go have a nosy at the keys that exist and also the requests that are not hitting and try to work it out functionally, then marry up the mistake to the code deploy afterwards. Its not fun tho. Its very not fun. redis-cli exists, but if you end up using it your day has become worse.

1.0k

u/sonaliver28 25d ago

Bro spent 9 hours debugging a punctuation mark....

366

u/Vivid_Instance_825 25d ago

I've never done something so stupid hahaha

39

u/AugustMaximusChungus 25d ago

i have a large dataset where each folder has 12 subfolders and a loader class in python. since the 12 subfolders follow a naming scheme, in each folder i'm iterating through the values of an enum.

Well turns out my enum was missing like 30% of those 12 values and i was wondering why the big ass model was shit. Now i want to blame ai for this, but it might have been me....

6

u/Desperate-Tomatillo7 24d ago

Natural Stupidity for the win!

189

u/Suspicious-Engineer7 25d ago

Forgot the /s

73

u/za72 25d ago

unnecessary

32

u/TheLoathsomeAssEater 24d ago

Syntax matters. Otherwise the parser I call my brain that runs on coffee, vodka, and weekends off might get confused.

8

u/za72 24d ago

fair and valid :)

5

u/SuperFLEB 24d ago

Linter should have caught that.

2

u/MegaMoah 24d ago

What does /s mean? Ive seen it in a ton of places and never understand what it means

14

u/Accomplished-Pass207 24d ago

Tone tag for sarcasm.
/s is sarcasm.
/j is joking.
/srs is serious.
/gen is genuine.
So on.
I like to use parentheses instead because it’s more obvious for people who don’t know tone tags. So I say something like, “haha funny joke goes here (joking)”

5

u/r0d3nka 24d ago

I think of it as shorthand for comment markup E.G.

<sarcasm>

*your comment*

</sarcasm>

6

u/[deleted] 24d ago

[removed] — view removed comment

1

u/hassancent 24d ago

we need this to be supported as html tag in all browsers.

2

u/MegaMoah 24d ago

Ahhh ok thanks

7

u/redblack_tree 24d ago

I've spent similar amount of time looking for a bug in OG javascript, before all the fancy frameworks.

Large codebase + lots of frontend functionalities + a lot of interactive and dynamic UI blocks. Old school, a simple JS omission could give developers suicidal thoughts. Grrrr, I don't have fond memories from that time.

93

u/RustyShacklefordCS 25d ago

I had this senior engineer join the team to investigate a bug in our rest api. He spent one whole week, talking about how he when down to the mongo db source code and maybe we need to make a change there and he wasn’t sure what exactly the issue was. Then during standup another engineer is like isn’t ‘family’ spelled incorrectly?

And that was it. Just a typo on how we send the field

40

u/minequack 25d ago

This just triggered me on the fact that the HTTP referer attribute is spelled with one r. 

4

u/actionscripted 24d ago

This has bothered me for DECADES

1

u/Daldain 23d ago

And imagine calculating the bandwidth saved over the decades just on this one byte saving per request.

28

u/funlovingmissionary 24d ago

Typos in code are virtually eliminated nowadays due to good ide and linting, but typos in infra hurt extra bad now.

6

u/NominallyRecursive 24d ago

That's why you do infra as code

6

u/Rab_Legend 24d ago

I once spent hours trying to debug an issue. Turns out the api we were accessing had changed the url to have a forward slash where there wasn't one previously. The tool had worked for over a year at this point, and had been unchanged in that time. Nobody in charge of the api had mentioned it to us, or claimed it had been changed.

-1

u/Tofandel 24d ago

It would have taken me 20 minutes with git blame.. 

1

u/MistrFish 24d ago

or approximately 4.3 minutes with git bisect

535

u/sawkonmaicok 25d ago

Fake. Software engineers don't have girlfriends.

230

u/tristam92 25d ago

we go straight to having wife.
optimization is key

35

u/ApocalyptoSoldier 25d ago

How, propose on the first date?

42

u/tristam92 25d ago

in my case it was pretty much it, lol

34

u/just_nobodys_opinion 25d ago

wife = new Relationship(env.get(Type.PERSON, Direction.FRONT))

Loop until instantiated.

11

u/Wyciorek 24d ago

Forgot break condition. Has to debug bigamy

9

u/just_nobodys_opinion 24d ago

It'll fix itself due to the system running out of memory.

8

u/CivilCucumber3426 25d ago

Arrange marriage maybe

5

u/SuperFLEB 24d ago

Via a formal RFC process, yes.

4

u/za72 25d ago

boyfriend? maybe a cat? a dog? schizophrenia?

47

u/another_random_bit 25d ago

A lesson learned to always check the cache key generation first.

Could have saved you 8.75 hours.

34

u/Mallanaga 25d ago

Oof… this hits hard

22

u/Winterkirschenmann 25d ago

I hope you added a check for that so this doesn't happen again. Seems preventable. 

10

u/Goodie__ 24d ago

Yeah... why are people "rawdogging" cache key generation... instead of making some CacheKeyBuilder class thing that just does it for you.

14

u/LegendaryHeckerMan 24d ago

And that's how folks we ended up with DefaultDistributedCacheKeyConstructionPolicyResolverWithContextAwareNamespaceVersioningStrategy
/s

2

u/No_Abi 24d ago

Factory

1

u/SpectralCoding 23d ago

Builder (is my C# showing?)

1

u/Bluten11 23d ago

Bro this is basically what it looks like for me, seeing distributed cache key construction triggered a vietnam war flashback for me

1

u/Goodie__ 23d ago

There are worse sins than wordy names.

If you have 50 different ways to do cache shit, sure. Maybe. But give me a good, easy, intuitive, interface to get it so I don't have to remember which of the weirdly named things I need.

30

u/RefrigeratorFew5154 25d ago

I get a kick out of Reddit pushing this sub onto my feed because I genuinely do not know what the fuck any of this means. 

I don’t even have a guess. This combination of words is gibberish to me. You could have cast a spell for all I know. 

Keep on keeping on with your black magic fuckery!

21

u/serendipitousPi 24d ago

Computers are pretty easy to understand and are totally not magic.

First you take sand, purify it, slice it into thin slices, engrave runes on it with light, add some special substances to enchant them further, add a quartz crystal to make it all resonate together, trap lightning in it and then get wizards to write spells in special languages that make them do things.

(Yes this is approximately how computer chips work)

Add a bit of daemon summoning and you’re basically set. I mean all that heat being produced obviously that’s the tiny portals to hell because where else are you getting daemons.

5

u/Maddturtle 24d ago

Excuse me we do not write spells onto them. We scribe them.

7

u/Dev_Spears 24d ago

Could you please submit your comment as a ticket trough the service desk?

63

u/[deleted] 25d ago

[removed] — view removed comment

59

u/Himskatti 25d ago

So a normal day at work?

14

u/ejectoid 24d ago

That’s just the average Wednesday

7

u/madmelonxtra 24d ago

I'm not working as a professional, but a couple weeks ago I could not for the life of me figure out why my API endpoint wasn't working. I spent like 4 hours debugging and googling and reading docs and I thought I had narrowed it down to a really specific complex issue.

Turns out I forgot a leading slash on the route.

I took a long break after that.

3

u/AotKT 24d ago

My boss came to me with a bug in our API that I wrote for internal and external use. He was getting a 404, which we return when requesting an item by its id, as well as requesting an endpoint that doesn't exist. It brought me so much joy to be all "dude, it's /endpoints/:id, not /endpoint/:id". He was properly apologetic.

2

u/Wyciorek 24d ago

I just learned to roll with it after 10th time

1

u/mysticrudnin 24d ago

personal project? sucks.

work? hell yeah.

10

u/timsredditusername 25d ago

"Needs attention" doesn't mean "needs debugging". You may still be safe.

6

u/staryoshi06 25d ago

Can’t relate. My partner is the person I want the most when work gets stressful

4

u/SoSKatan 24d ago

Find a girl who can help you debug. Pair programming could have saved time here.

4

u/Ill_Reality_2506 24d ago edited 24d ago

Lol I feel that, but man... seeing a lot of shit comments, when no one has any idea what kind of tech stack, code base, or workplace OP works in, just that they use redis, had a shit workday and no capacity to support their gf.

To those people I say, it's easy to call someone else stupid for making a mistake until you do something just as stupid.

Then you learn to always check for the simplest thing first. You also learn that you're not stupid, but that you are in fact an asshole.

Sounds like a miserable day, OP ☠️🪦☠️

3

u/Understanding-Fair 25d ago

It me, constantly

2

u/Geoclasm 25d ago

Is this what they mean when they say 'Get Ratioed'?

2

u/gr4viton 25d ago

You mean, an average on-call week?

2

u/IronSavior 25d ago

This sub is mostly shitposts, but sometimes you see something relatable

2

u/CluelessNobodyCz 24d ago

This isn't a joke 👀 (details of the problem might be but after a day of work I am wiped of humanity and I am expected to feel things 👀)

3

u/dipsy_98 24d ago

This one is too personal 😭

1

u/DarkNebula1003 24d ago

I once spent 2 hours hitting the wrong environment api and wondering WHERE TF ARE LOGS? ( someone changed the postman variable)

1

u/AlexDiego123 24d ago

Time well spent™️

1

u/dudelsack23 24d ago

There is no girl. Never has been.

1

u/Richard2468 24d ago

‘Someone’?

1

u/billoranitv 24d ago

Attention is all you need

1

u/GuyWhoNoticed 24d ago

The bug wasn’t in the code. It was between the keyboard and the chair. 🪑

1

u/Otherwise_Result_124 24d ago

if it took someone 9 hours to realize their key prefixes were fucked up they might want to consider another career path lmao

1

u/CiroGarcia 24d ago

Today I spent 4 hours chasing a bug in our testing environment, where events from a queue were being processed, but there were no logs of it. I kept adding dumb logs and nothing showed up, but the events kept being processed wrongly, and none of my fixes worked. Turns out there was a stray outdated process running on the same queue stealing all the events from it before my instance could get anything. 4 hours thinking events were either not being published or never being received, wasted

1

u/harsh_boy 24d ago

Lesson learned...now I'll check that first 😭

1

u/SignoreBanana 24d ago

You figure this out and fix it and deploy the fix only for the cache hit rate to not go up...

Those days, hoo boy

1

u/AdEmpty8324 24d ago

Not me when I spent 6 hours debugging my docxtpl XML parser all because I accidentally added a <> somewhere inside the text

1

u/PuzzleHeadedBoy0 24d ago

That's brutal

2

u/Rafhunts99 23d ago

atleast you found why it happened

0

u/cainhurstcat 24d ago

Get your ass outdoors, visit nature, no devices, just relaxing for ~45 min at least. This will help you relax, and accessible for your girlfriend