41
stisch
6y

Overheard guy on the bus: "...but I don't understand where variables go in memory."

It took 100% of my will power to not pop over the seat like some muppet to sing song about stacks and heaps.

Comments
  • 6
    Oh that brings back memories.. what happens when you store a 1 byte, 2 byte or 4 byte variable to the same memory address.

    That was when good computer magazines had fucking assembly courses. Of course, spread over several issues so that you'd have to buy them all, but it was worth the money.
  • 0
    @Fast-Nop you're not talking about c unions are you?
  • 0
    @notarealDev it was the difference between move.b, move.w and move.l in 68k assembly. More like type punning through pointers - but since pointer aliasing is undefined behaviour in C, unions are the next closest thing.
  • 0
    Lol, that's me with anything related to maths or functional programming.
  • 1
    Should have helped him!
  • 1
    @Bitwise I find the more common issue is making the connection. Most newer devs learned about member and bitwise operations in school, but they land their first job with some high level language where they get lost dealing with reference types vs value types, gc allocation, and boxing costs.
Add Comment