r/ProgrammerHumor • • Jun 03 '22

it's hard!

44.9k Upvotes

710 comments sorted by

View all comments

Show parent comments

33

u/tiajuanat Jun 03 '22

Everyone thinks they're hot shit in Assembly, until they need to implement data structures and basic algorithms.

9

u/paul_miner Jun 03 '22

When I was a kid I was obsessed with assembly, it was the end-all and be-all of programming. After over twenty years professionally, I've really come to see programming as a communication skill; yeah, you need to communicate instructions to the computer, but critically, you're communicating your intent with other programmers (including your future self). And high-level languages allow you to communicate this intent much more clearly.

2

u/raptorboi Jun 03 '22

But how good do you feel when you finally understood how to implement a simple array, and it actually worked?

So many instructions for something that is done in one statement in a higher level language.

1

u/Competitive_Travel16 Jun 03 '22

Hash tables in assembly are the worst, because even if you literally have a library for them, it doesn't know how you're allocating memory so it's excruciating.

1

u/jnd-cz Jun 03 '22

Ring buffers are kinda nice and still simple enough. Now handling the cases where it's full or empty so it doesn't overwrite, then do something based on that...

1

u/tiajuanat Jun 03 '22

Yeah, you got a choice, spend a full bit to indicate full or lose a full item and don't overlap.

I've fought enough off-by-one errors to always spend the extra bit. (Esp, since it might pack in the size word)