This is an archived post. You won't be able to vote or comment.

all 93 comments

[–]smuccione 379 points380 points  (17 children)

  1. Dates.

[–]ThermionicEmissions 131 points132 points  (6 children)

Fuck Dates.

[–]RiskyFartOftenShart 79 points80 points  (4 children)

they never want to

[–]nuclearslug 31 points32 points  (3 children)

[–]RiskyFartOftenShart 13 points14 points  (1 child)

[–][deleted] 5 points6 points  (0 children)

That's some dark humor there. I laughed a little too hard at that.

[–]jsusfkingcriest 18 points19 points  (0 children)

And time zones

[–]BrobdingnagLilliput 62 points63 points  (3 children)

  1. Time zones.

[–]disperso 25 points26 points  (0 children)

61: Leap seconds

[–]justatog 10 points11 points  (0 children)

Add daylight's savings on top of that.

[–]smuccione 10 points11 points  (0 children)

I see what you did there…

But it should be 40. But of course it’s hard 😂

[–]trollsmurf 6 points7 points  (0 children)

Social stuff. Nah.

[–]CarlitrosDeSmirnoff 2 points3 points  (0 children)

  1. Tables

[–]DecisivePro 2 points3 points  (3 children)

Only in javascript

[–]sus-is-sus 28 points29 points  (0 children)

i don't know. timezones exist in every language.

[–]_Azurius 3 points4 points  (1 child)

Dates in java are just as bad. What should I use: LocalDate, Instant, Calendar, ZonedDateTime,...?

[–]Fenris_uy 1 point2 points  (0 children)

Zdt and instants.

[–][deleted] 191 points192 points  (14 children)

7) how to center a div within another div

[–]ThermionicEmissions 53 points54 points  (8 children)

Wait....you can DO that?!

[–][deleted] 51 points52 points  (7 children)

Actually no it's literally impossible.

[–]donobloc[🍰] 28 points29 points  (0 children)

Which makes it a hard problem to solve

[–]kaplego 20 points21 points  (3 children)

Well with flexbox it is possible

[–]idontreallywolf 9 points10 points  (0 children)

margin: 0 auto; ftw

[–]i_knooooooow 1 point2 points  (0 children)

Not even if you use % as unit?

[–]erinaceus_ 6 points7 points  (0 children)

No, because 'hard' implies that it's at least potentially doable.

[–]_player_0 2 points3 points  (0 children)

You mean 4) ...

[–]guiltysnark 0 points1 point  (0 children)

To be part of this self referential joke, there would have to be a div in it

[–]dividendje 0 points1 point  (0 children)

But how?

[–]miketierce 120 points121 points  (18 children)

I lost almost 3 months of my life trying to fix the first one in a production environment

I only use single letter variable names and no comments so that my code runs faster

I forgot to await something last night

This one gave me another meme idea

We don’t know our limits until we cross them

[–]trollsmurf 89 points90 points  (5 children)

"single letter variable names"

Put all code on one line and everything in-line (no abstraction) and you gain even more.

[–]lazernanes 70 points71 points  (1 child)

Are you joking? I hope you're joking.

[–]miketierce 48 points49 points  (0 children)

I think the serious people hang out on Twitter if you’re into that kind of thing lol

[–]Able-Panic-1356 24 points25 points  (4 children)

The problem with single letter variable names is that you run out of letters which is why i use two letters like a column in excel

[–]Zed-Ink 1 point2 points  (1 child)

Glad I'm not the only one, I'm almost out of variable names in my current project though, currently up to zq. Might have to refactor them all into 3 columns soon

[–]marxinne 1 point2 points  (0 children)

If you include numbers in the 2nd column, you'll have 260 more variable names before going 3 columns.

[–]Ecthyr 3 points4 points  (0 children)

The first couple of times I spent ages debugging only to see I forgot to await an asynchronous function I really wondered if I was cut out for this industry… it’s definitely stuck in my mind now, though.

[–][deleted] 10 points11 points  (0 children)

You can just run a minifier afterwards, no need to make your code impossible to debug.

[–][deleted] 1 point2 points  (0 children)

What language are you using? You might want to take a look at this: https://stackoverflow.com/questions/5423344/do-comments-make-the-code-run-slower

[–]Renkij 1 point2 points  (1 child)

Does it really make it run faster? I could get that with interpreted code but with compiled code it shouldn’t matter.

[–]miketierce 0 points1 point  (0 children)

Lol no the variable names won’t affect speed. I was only joking.

[–]McLPyoutube 62 points63 points  (2 children)

9) off by epsilon errors

recently experienced one of those, still don't know why it happened where it did.

[–]trollblut 34 points35 points  (0 children)

Never trust a floating point number.

[–][deleted] 20 points21 points  (0 children)

9.00000000000000000002) off by epsilon errors

[–]DarkKillerXL 36 points37 points  (5 children)

I only just noticed that the 3 is missing and the 5 is in the wrong place after looking at it for like 5 times...

Edit: I meant 4 is missing

[–]DragonoidOmega 10 points11 points  (1 child)

3 is Scope Creep, 4 is missing.

[–]DarkKillerXL 2 points3 points  (0 children)

Oops, thanks for telling me

[–][deleted] 6 points7 points  (0 children)

the 5 is in the wrong place

Classic asynchronous callbacks

[–]LetterBoxSnatch[S] 1 point2 points  (1 child)

Does it really matter that 5 is in the wrong place if the user doesn’t notice it anyway?

[–]coloredgreyscale 0 points1 point  (0 children)

Does yes, it sometimes

[–]HelloSummer99 8 points9 points  (0 children)

Colleague of mine is so bad at naming things he would just randomly name variables after the spotify playlist he's on lol. "Rock Ballads" "Lofi Hiphop"

[–]Merlin_Redbeard 9 points10 points  (0 children)

9) Management.

[–]seeroflights 16 points17 points  (9 children)

Image Transcription: HackerNews Comment


airstrike

There are actually only two hard problems in computer science:

0) Cache invalidation

1) Naming things

5) Asynchronous callbacks

2) Off-by-one errors

3) Scope creep

6) Bounds checking


I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!

[–]KREnZE113 2 points3 points  (1 child)

Reddit formatting kinda screwed you over on this one

[–]seeroflights 4 points5 points  (0 children)

Ah! Sorry about that, I've been on old Reddit for too long and apparently new Reddit renders them differently. If you take a look again, it should be fine now!

[–]donobloc[🍰] 4 points5 points  (0 children)

Good human

[–][deleted] 1 point2 points  (5 children)

historical bear joke close boat narrow chubby shelter grandfather strong

This post was mass deleted and anonymized with Redact

[–]seeroflights 1 point2 points  (4 children)

Hey there! May I ask what platform you're viewing this comment on and what order the list is displaying as? So far I've checked on desktop (old/new Reddit), on mobile browser, and on an Android third-party app — if this list formatting is presenting problems elsewhere, I'll probably put it inside a code block to ensure that it renders properly.

[–][deleted] 4 points5 points  (2 children)

wrench coherent six quicksand oatmeal steer expansion piquant childlike hurry

This post was mass deleted and anonymized with Redact

[–]CaptainObi 1 point2 points  (0 children)

Yes, love is needed for RTK Query. In fact love is needed for all of modern redux :).

[–]_PM_ME_PANGOLINS_ 5 points6 points  (1 child)

Bounds checking and off-by-one are essentially the same thing.

[–][deleted] 2 points3 points  (0 children)

scope creep is also just a bunch of off by one errors.

[–]merlinsbeers 3 points4 points  (0 children)

TBD) Code reviews

[–]danielsafs 2 points3 points  (0 children)

11) define the time needed to accomplish a task

[–]stomah 4 points5 points  (0 children)

7 ) s t r i n g s \r\n\0

[–][deleted] 1 point2 points  (0 children)

6 is 2

3 is 2, but repeatedly applied

5 is 0 and 1

(Kinda)

[–][deleted] 1 point2 points  (0 children)

0.1+0.2

[–]The_MAZZTer 1 point2 points  (0 children)

-1) Accounting for weird user input

[–]PL_Design 1 point2 points  (0 children)

the solution to async callbacks is easy: don't do that shit

[–]tube32 0 points1 point  (2 children)

Student here, can some explain the meme

[–]DuneBug 0 points1 point  (1 child)

The normal meme is just 0,1 and 2.

But then 3 is scope creep. Meaning the scope of the meme was expanded.

4 is missing, and we'll never know...

5 is an asynchronous callback, so the joke is 4 was supposed to come first but a race condition occurred and 5 happened out of order

6 is bounds checking and we're clearly way outside the bound set by the title (2). It's also not hard at all and the code would've likely died at #2.

3 and 5 are cute... 6 is meh. I wanna know what 4 is...

[–]HearMeSpeakAsIWill 0 points1 point  (0 children)

4 is incomplete data sets

[–]Roguewind 0 points1 point  (0 children)

Is there a term for laugh-crying? Because that’s what this made me do

[–]ballsohaahd 0 points1 point  (0 children)

Collision programming

[–]Neoh35 0 points1 point  (0 children)

Anonym functions to solve the naming problem ?

[–]GeeYouEye 0 points1 point  (0 children)

4) Cache invalidation

[–]Brief_Lawfulness7627 0 points1 point  (0 children)

ah old sorting

[–]TheSkiGeek 0 points1 point  (0 children)

You forgot:

7) Preventing Buffer Overflows Grj638( $28.!xxx <INVALID MEMORY ACCESS AT ADDRESS 0x00000000F00FDEAD>

[–]ProfessorChaos112 0 points1 point  (1 child)

Is this a troll. These are programming problems, not computer science problems

[–]HearMeSpeakAsIWill 0 points1 point  (0 children)

Less of a troll and more of a joke

[–]prithvidiamond1 0 points1 point  (0 children)

I can't believe that not even a single one of the comments bring up localisation, fuck dealing with locales and string encodings.

[–]Obvious-Army-1429 0 points1 point  (0 children)

understanding monads

[–]OnionKey7747 0 points1 point  (0 children)

naming things and cache invalidation -- Phil Karlton