I’ve often had discussions with programmers about the subtleties of the language. They believe they understand what a language keyword is supposed to do, and use it that way — but they’re often mistaken, or not fully informed.
I’ve started a list of C and C++ keywords that have subtle differences from the “common” understanding of their usage. I expect to add more: please add your suggestions below.
I’ve been fascinated by assembly language since I first learned to program: get really close to the hardware! However, there was still a small gap between those opcodes and what the hardware actually did.
When I went to Uni, one of the courses I took was to design a (simulated) microprocessor and implement an opcode map. I loved it – but it still wasn’t real enough.
A few years ago I stumbled across James Newman’s work with his MegaProcessor – a “micro”processor that had been implemented using transistors and LEDs instead of integrated circuits. And it’s big. Really big. Ten meters (thirty feet) big.
One of its nicest features is that one of its RAM banks is built as an array, to provide a display of the bits that the RAM contains. But that means it’s a pixel-addressable display, so I couldn’t help myself…
I wrote a (configurable) program to run on the machine, and sent it to James. He was kind enough to confirm that it worked on the real hardware – and even YouTube a couple of different runs:
A while ago I edited the Wikipedia article on function pointers to explain an alternate syntax that I’ve used for years, but no-one else seems to. My way seems to me to be much clearer and more concise than the “canonical” one described in all the text books—so why isn’t everyone using it?