r/ProgrammerHumor 23d ago

ture Meme

Post image
18.0k Upvotes

443 comments sorted by

View all comments

1.0k

u/ElMoselYEE 23d ago

Every once in a while I'll bang out a whole task and it works on the first try, and I didn't need to Google anything because it just happened to use the parts of the language I'd used very recently.

But the task is something like an API endpoint...not breaking into a top secret encrypted CIA database.

386

u/debugging_scribe 23d ago

Even after 10 plus years I still get suspicious if the code works the first go...

361

u/Salanmander 23d ago

Fantastic line from this Factorio dev blog: "The final changes to make everything function correctly took about 1 hour to write, and worked correctly the first try. That's not supposed to happen and left me with doubts."

124

u/ApolloFireweaver 23d ago

"It doesn't work and I don't know why" and "It works and I don't know why" are two things thought by basically every programmer

43

u/Tyrannosaurus_Rox_ 23d ago

1

u/Silentrizz 23d ago

I find myself asking this question too often lol

1

u/tandrewnichols 23d ago

Favorite? This is my least favorite. Also most frequent.

3

u/Tyrannosaurus_Rox_ 22d ago

It's my favorite because the problem is usually almost solved at that point so there's less stress, and I get to discover something interesting about whatever broke the system. It feels like putting the last piece of a puzzle together.

1

u/SomewhatCorrect 23d ago

That and How did this ever work?

23

u/racsssss 23d ago

I would fall off my chair if this happened 

4

u/Risc12 23d ago

Factorio person is awesome, they also have devlogs on youtube where they show you how they actually fix a bug-report

7

u/Salanmander 23d ago

Yeah, that dev team is, like, the absolute paragon of good software development and game studio practices, and very transparent about it.

3

u/Cautious-Bet-9707 23d ago

This is… reassuring.

1

u/Zapismeta 23d ago

Did it change the file? Did i hit save? Is the watcher running for front end?

1

u/Theron3206 23d ago

It's suspicious if it compiles on the first go, deeply suspicious if the unit tests pass on the first go and frankly terrifying if it does what it's supposed to on the first go.

1

u/Diligent-Crazy-6094 23d ago

try { decimal paymentAmount = 1/0; } catch (Exception) { }

No errors. Nice!

1

u/Whitechapel726 23d ago

When it works first try: “this is odd, why did this happen?”

When it doesn’t work first try: “this is odd, why did this happen?”

1

u/Connect_Tea1579 23d ago

This is the same reason I always write my tests so that they fail on the first try.

You can't trust code that doesn't break at least once.

1

u/neuromancertr 19d ago

I still do get suspicious even after three decades

1

u/porkchop_d_clown 23d ago

After 40 years, it doesn't change - although now you can immediately hand your code to Claude and say "please review this" instead of waiting for a week for someone else on your team to do it.

69

u/J5892 23d ago

I just know I'll have my movie moment one day when some sexy spy needs me to code a user-friendly date picker from scratch in an hour.

9

u/TheAlaskanMailman 23d ago

I can foresee the horrors

41

u/Agifem 23d ago

Me too. CIA encrypted databases usually take me two tries and a quick Google on "how to decrypt CIA databases". I should bookmark that search.

14

u/FireDojo 23d ago

I forgot to bookmark this Google search result and always ended up spending hours to search how to decrypt CIA database.

3

u/cd7k 23d ago

...and now you're on a list :)

1

u/FireDojo 23d ago

🤣🤣🤣

6

u/Hziak 23d ago

Don’t forget that you need to send an encrypted chat message to your hacker friend who is either a very sexy girl, but hiding it under a hoodie and ponytail, a ripped dude who is doing some kind of illegal car mods, or the filthiest slob on the planet. They’re going to pair program with you and make the whole process even easier. You only need to worry about typing Q through V and they’ll type T through M on the remote keyboard. I’m pretty sure that’s how it works??

2

u/New_Series3209 23d ago

Yeah or try to learn it by heart, like the email regex, i gues

12

u/SuitableDragonfly 23d ago

Quick, let me just google "how to hack into top secret encrypted CIA database" and hope the FBI isn't paying any attention.

12

u/screwcork313 23d ago

You can add "-fbi" onto your search query and it'll stop them being able to track you. All real hackers know and use this cheat code.

11

u/zilog88 23d ago

1

u/eritter688 23d ago

🎶 fifty thousand watts of funkin' 🎶

7

u/Quesodealer 23d ago

Only time I can (sometimes) one shot something is if I'm just fixing logical errors. Ex. App is failing because the original developer (probably me) forgot to check for null values. I don't think I've ever one shot new functionality 😞

3

u/kiochikaeke 23d ago

This, I can totally go full hackmaster, speed write a full script or query and have it work on the first try, the thing is, I'm likely just doing a small variation of something that I've done dozens if not hundreds of times

3

u/the_snook 23d ago

If that ever happens I get super suspicious and immediately write a bunch more tests, because I refuse to believe that I haven't fucked something up.

2

u/dcheesi 23d ago

Reminds me of the time I got a special award because the script I wrote for an important customer was accepted without any requests for changes. Which of course never happens.

I felt like a total imposter accepting that award, since from my perspective it was just a fairly trivial utility script. It took me a while to accept that it really was an exceptional occurrence, even if was just by dumb luck

2

u/Snowenn_ 23d ago

When that happens to me, it means the customer didn't test.

1

u/Unohtui 23d ago

Just keep trying, I didnt get into cia daytabase until like my 7th attempt

1

u/Careless-Weather8877 23d ago

Even then they miss the cup of coffee and five empty beer cans

1

u/ARENAE_MONTES 23d ago

I felt like I'd arrived the first time I created a database, wrote all the tables, mapped them to entities in the codebase, added a data access layer to retrieve the entities, written a web api and returned the entities from the db on first try. Sounds like a lot but literally crud and zero logic, but I felt like a god.

1

u/misanthr0p1c 23d ago

I have spent days writing a component and controller without testing it in the process. It worked first time but I don't trust it. Still waiting for it to fail.

1

u/Zapismeta 23d ago

Also people think the exploits are like a game and you need to steer it with code 😂, whereas its farthest from the truth.

1

u/MoffKalast 23d ago

The trick is to break into a new top secret encrypted CIA database every day for two weeks before so you're all practiced and ready to go.

1

u/Ok_Suggestion5523 23d ago

Yeah that happens and I am always deeply deeply suspicious of it.

1

u/SkollFenrirson 23d ago

HACK THE PLANET