Towards Readable Programs or,
Deconstructing my Childhood


Brit Butler
2013-08-06






(use arrow keys or PgUp/PgDown to move slides)


> whoami



Please stop me for questions whenever.

Disclaimer



This may be whiny but I just can't hold all these feels.

Thesis:

The Age of Comprehensible Computing is Over

Example: MIT's 2009 Curriculum Changeup





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.


- Gerald Sussman, 2009

What is the software world like today?



Linux was 30 million lines of code ... over 10 years ago!


So...

Ignored Infrastructure


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



Tools of Oppression?

Who Cares?


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...

We Care







Lots of us care...







You get the idea...

When was this not true?



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.

Programmer Archaeology: In Search of Lost Culture



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

What is Readable Code?


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

Recent Developments: cl-6502


cl-6502 is a Readable CPU emulator for the MOS 6502.


Not quite there yet...







todo: video/sound/input/mappers

Emulators: FCEUX



A: 'Cool, how does it work?'

B: 'Oh, just read this 2500 page book.' (175 kloc)

What do I want?


Something real, simple, cool.

Lessons Learned




No programming language or tool can solve these problems.


And, of course, readability is a function of the audience.

Just Remember



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.

Questions?



Slides Source