Apollo Guidance Computer

Reading about the Apollo Guidance Computer. Compare that to the US$3.23 ATtiny85.

Spec AGC ATtiny85
Word size 16-bit 8-bit
Clock 2 MHz 20 MHz
ROM 72 KiB 8 KiB
RAM 4,096 B 512 B

The values in the above table are approximate, see the sources listed above for actual figures. Basically the $3 chip is ten times faster than the AGC but with less storage. Call it a draw?

Data inside the service and data outside the service

Pat Helland has been talking about data inside the service versus data outside the service since at least 2005. I realised back then when I read his paper that the way to model “data inside the service” in C# was to use value types (structs) which could enforce the format and range of its data in the constructor. In this way you could have a value type, say EmailAddress, which had a single string, an email address, and if you passed an EmailAddress to a function, you know you don’t need to revalidate the data, it’s known safe and “inside the service”. Data outside the service is simply a string until it’s brought inside during the construction of a value type for any given domain. The really neat thing about this is how cheap the value types are, they don’t add any overhead, the EmailAddress example above still has only a single string value, and nothing new or additional needs to be allocated on the heap.