Lurker News
I'm reading Petzold's Code [1], and it dawned on me that I didn't understand logic gates intuitively until now. I took a Computer Architecture course back in college, and I understood what logic gates meant in boolean algebra but not empirically. Petzold clarified this for me by going from the empirical to the theoretical using a lightbulb, a battery, wires, and relays (which he introduces when he talks about the telegraph as a way to amplify a signal).

Another concept is the relationship between current, voltage, and resistance. For example, I always failed to understand why longer wires mean more resistance while thicker wires mean less resistance.
[1]: https://www.codehiddenlanguage.com/

Comments (913) 203 threads

Show all comments

Showing thread 61 of 203

richardw#
In OO, the interface. It seemed like the most useless construct. Zero implementation. Why make something with no implementation?

Later I realised that the benefit isn’t the code, it’s the freedom you gain later in choosing the implementation. You can create an interface and add a simple implementation, then later swap it out for something more robust. All you’re agreeing to now is the contract of what needs to be done, without any restrictions on how.