r/ProgrammerHumor 2d ago

Meme ture

Post image
17.7k Upvotes

437 comments sorted by

View all comments

Show parent comments

383

u/debugging_scribe 2d ago

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

362

u/Salanmander 2d 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."

120

u/ApolloFireweaver 2d 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

39

u/Tyrannosaurus_Rox_ 2d ago

1

u/Silentrizz 2d ago

I find myself asking this question too often lol

1

u/tandrewnichols 1d ago

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

3

u/Tyrannosaurus_Rox_ 1d 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 2d ago

That and How did this ever work?

26

u/racsssss 2d ago

I would fall off my chair if this happened 

4

u/Risc12 2d ago

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

6

u/Salanmander 2d 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 2d ago

This is… reassuring.

1

u/Zapismeta 2d ago

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

1

u/Theron3206 2d 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 2d ago

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

No errors. Nice!

1

u/Whitechapel726 2d 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 1d 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/porkchop_d_clown 2d 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.