Towards Readable Programs or,
Deconstructing my Childhood
Brit Butler
2013-08-06
(use arrow keys or PgUp/PgDown to move slides)
Brit Butler
2013-08-06
(use arrow keys or PgUp/PgDown to move slides)
> whoami
Please stop me for questions whenever.
This may be whiny but I just can't hold all these feels.
Building larger programs out of a group of small, understandable pieces is what things like recursion and functional programming are built for.
The world isn't like that anymore.
Linux was 30 million lines of code ... over 10 years ago!
So...
Collectively, we suffer from a learned helplessness around it: to build new high-level tools, we’d also have to rebuild some of the infrastructure... We can’t imagine triggering such a large cultural and technological shift, so we don’t even try to build truly new tools for ourselves.
Our 'Shipping Culture' is poisonous to infrastructure. We just accrete it.
- Gary Bernhardt, A Whole New World
Me: I want to build a machine I can understand from the ground up, soup to nuts.
Matt Anderson: Why? The whole point of programming and computer science is black-box abstraction.
Underlying Idea: You shouldn't have to understand.
Well, maybe but...
Lots of us care...
Do you even remember a time before all this complexity?
I don't. I wasn't alive for it.
But I believed it existed and went looking.
Thus, programs must be written for people to read, and only incidentally for machines to execute.
- Abelson and Sussman,
Structure and Interpretation of Computer Programs
Personal Mastery: If a system is to serve the creative spirit, it must be entirely comprehensible to a single individual.
- Dan Ingalls,
Design Principles Behind Smalltalk
They [the students] should be capable of reading a 50-page-long program, if it is written in an exemplary style.
- Abelson and Sussman
I think that it's extraordinarily important that we keep the fun in computing. ...
We began to feel as if we really were responsible for the successful, error-free
perfect use of these machines. I don't think we are.
I think we're responsible for stretching them, setting them off in new directions, and keeping fun in the house.
- Alan Perlis
cl-6502 is a Readable CPU emulator for the MOS 6502.
todo: video/sound/input/mappers
A: 'Cool, how does it work?'
B: 'Oh, just read this 2500 page book.' (175 kloc)
Something real, simple, cool.
No programming language or tool can solve these problems.
And, of course, readability is a function of the audience.
The next time you're frustrated with infrastructure, try to reimagine it! We can take back our technology, and build whatever kind of computing world we want to.
Start from a CPU emulator if you have to. Supplanting the mess isn't what's important. Getting to play with systems and see how they interact is. And it's the only way we'll ever find a path out.