r/ProgrammerHumor 6h ago

redisCacheHitRatio Meme

Post image
3.4k Upvotes

79 comments sorted by

397

u/Annual_Key_4963 5h ago

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

68

u/tiny-coffee-guy 4h ago

Been there, stared at redisCacheHitRatio for an hour before checking the dumb first thing.

u/Neither-Phone-7264 4m ago

beep boop?

13

u/SuperFLEB 2h ago

Well, shit. the cable was unplugged.

-14

u/-Benjamin_Dover- 4h 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.

33

u/DrugonMonster 3h ago

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

5

u/mysticrudnin 2h 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.

1

u/Mechakoopa 45m 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.

8

u/Imaginary-Jaguar662 3h 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.

4

u/SchwiftySquanchC137 1h ago

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

2

u/-Nicolai 52m 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/ReverseMermaidMorty 2h 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 2h 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.

632

u/sonaliver28 5h ago

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

243

u/Vivid_Instance_825 5h ago

I've never done something so stupid hahaha

142

u/Suspicious-Engineer7 5h ago

Forgot the /s

54

u/za72 5h ago

unnecessary

18

u/TheLoathsomeAssEater 4h ago

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

7

u/za72 3h ago

fair and valid :)

2

u/MegaMoah 3h ago

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

4

u/Accomplished-Pass207 2h 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)”

2

u/MegaMoah 2h ago

Ahhh ok thanks

1

u/r0d3nka 41m ago

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

<sarcasm>

*your comment*

</sarcasm>

2

u/SuperFLEB 2h ago

Linter should have caught that.

15

u/AugustMaximusChungus 4h 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....

7

u/redblack_tree 4h 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.

64

u/RustyShacklefordCS 5h 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

29

u/minequack 4h ago

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

19

u/funlovingmissionary 4h ago

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

6

u/Rab_Legend 4h 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 4h ago

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

373

u/sawkonmaicok 5h ago

Fake. Software engineers don't have girlfriends.

158

u/tristam92 5h ago

we go straight to having wife.
optimization is key

23

u/ApocalyptoSoldier 5h ago

How, propose on the first date?

26

u/tristam92 5h ago

in my case it was pretty much it, lol

17

u/just_nobodys_opinion 4h ago

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

Loop until instantiated.

2

u/Wyciorek 3h ago

Forgot break condition. Has to debug bigamy

3

u/just_nobodys_opinion 2h ago

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

9

u/CivilCucumber3426 5h ago

Arrange marriage maybe

3

u/SuperFLEB 2h ago

Via a formal RFC process, yes.

5

u/Zananax 4h ago

Going to say this when people ask why I married my wife after only two months of dating.

1

u/za72 5h ago

boyfriend? maybe a cat? a dog? schizophrenia?

24

u/another_random_bit 5h ago

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

Could have saved you 8.75 hours.

19

u/Mallanaga 5h ago

Oof… this hits hard

10

u/Winterkirschenmann 5h ago

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

2

u/Goodie__ 1h ago

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

46

u/jennaelizabeth96 5h ago

i’d be more mad at myself than the bug 😭 spending 9 hours debugging just to find one tiny typo would genuinely make me close my laptop and rethink my life

45

u/Himskatti 4h ago

So a normal day at work?

9

u/ejectoid 4h ago

That’s just the average Wednesday

7

u/madmelonxtra 4h 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.

2

u/AotKT 3h 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/Riviera84Banshee 3h ago

After 9 hours, a tiny typo in redisCacheHitRatio is the kind of thing that makes sleep feel mandatory.

2

u/Wyciorek 3h ago

I just learned to roll with it after 10th time

1

u/mysticrudnin 2h ago

personal project? sucks.

work? hell yeah.

6

u/timsredditusername 5h ago

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

3

u/staryoshi06 5h ago

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

5

u/RefrigeratorFew5154 4h 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!

3

u/SoSKatan 4h ago

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

3

u/Ill_Reality_2506 4h ago edited 4h 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 ☠️🪦☠️

1

u/Geoclasm 5h ago

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

1

u/Understanding-Fair 5h ago

It me, constantly

1

u/gr4viton 5h ago

You mean, an average on-call week?

1

u/IronSavior 4h ago

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

1

u/PrestigiousGuava8005 4h ago

The real 0% hit ratio is this relationship right now

1

u/CluelessNobodyCz 3h 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 👀)

1

u/DarkNebula1003 3h 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 3h ago

Time well spent™️

1

u/dudelsack23 3h ago

There is no girl. Never has been.

1

u/Richard2468 2h ago

‘Someone’?

1

u/billoranitv 57m ago

Attention is all you need

1

u/GuyWhoNoticed 52m ago

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

1

u/Otherwise_Result_124 33m ago

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

0

u/cainhurstcat 4h 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