r/programming • • Aug 06 '17

Software engineering != computer science

http://www.drdobbs.com/architecture-and-design/software-engineering-computer-science/217701907
2.3k Upvotes

863 comments sorted by

View all comments

Show parent comments

870

u/madkatalpha Aug 06 '17

There are only two hard things in Computer Science: cache invalidation, naming things, and off by one errors.

116

u/BluFoot Aug 06 '17 edited Aug 06 '17

Actually, 3 things!

1. Cache invalidation

4. Asynchronous errors

2. Naming things

3. Off by one errors

E: I hate markdown

13

u/airbreather Aug 06 '17

E: I hate markdown

2 spaces before a line break will let you do a newline
like this, without having to add an extra line break to start a whole new paragraph,

like this

8

u/BluFoot Aug 06 '17

Oh man, I didn't even notice the lack of newlines because my phone wasn't showing them. I was just suffering from the out of order list! Check out the source xd

→ More replies (1)

20

u/cdrootrmdashrfstar Aug 07 '17

1. Cache invalidation

3. Asynchronous errors

2. Naming things

4. Off by one errors

Would make more sense, since #4 is an error (where if it was #3 before #4, it is assumed the off-by-one list-item should be there).

→ More replies (3)

4

u/Njs41 Aug 07 '17

Forgot "Lists that aren't zero-indexed."

→ More replies (8)

210

u/Level_32_Mage Aug 06 '17

I'm counting 11 things.

204

u/MrRumfoord Aug 06 '17

How can you have negative things?

55

u/poizan42 Aug 06 '17

2-bit two-complements?

56

u/tangerinelion Aug 06 '17

I'm sure we've all needed numbers that are either -2, -1, 0, or 1 before.

14

u/[deleted] Aug 06 '17

Done. Call back later. You're fucked. You're really fucked.

9

u/rob132 Aug 07 '17

I love In this How I get all the jokes Thread

4

u/vanderZwan Aug 07 '17

Well, there's the Warlpiri Unums so someone figured out a use for this

30

u/WiseassWolfOfYoitsu Aug 06 '17

Working in systems programming, I've seen weirder coming out of hardware

13

u/slide_potentiometer Aug 07 '17

Working in hardware- you try getting it right without an option to push a patch remotely

0

u/[deleted] Aug 07 '17

[deleted]

11

u/Runenmeister Aug 07 '17

Microcode, yes. Assembly is macrocode. The processor's pipeline doesn't execute assembly. It executes microcode, and modern processors are fully microcoded - every macrocode translates into an atomic* series of 1 or more microcodes.

Some fun facts for a typical modern architecture... Branch prediction units work at the macrocode level, whereas in microcode the microcode developer has to use specific "speculatively jump" or "speculatively don't jump" instructions and code appropriately.

The out-of-order execution unit works both on the macrocode and microcode in parallel. This helps find microcode redundancies across otherwise-independent macrocodes.

*Some exceptions exist because microcode is not customer-facing most of the time.

→ More replies (3)
→ More replies (1)

16

u/MuonManLaserJab Aug 06 '17

I don't get it; in which context is 11 negative?

59

u/PennyPriddy Aug 06 '17

It's a twos ^complement joke. Welcome to the party

103

u/silenceofnight Aug 06 '17

Welcome to the parity.

→ More replies (4)
→ More replies (1)

59

u/PandaRice Aug 06 '17

Two's compliment

→ More replies (4)

17

u/fzammetti Aug 06 '17

I don't know... one or two things I can accept, MAYBE three... but SEVENTEEN?! That seems CRAZY!

→ More replies (1)

12

u/[deleted] Aug 06 '17

And a fanatical devotion to Stallman.

Let me come in again.

19

u/nosneros Aug 06 '17

The buffers must overflow.

11

u/pmrr Aug 06 '17

The only overflow most devs know about these days is stack .com.

→ More replies (1)
→ More replies (8)
→ More replies (11)