On understanding code

When understanding code, we build gigantic mental dependency graphs relevant to the task at hand. This requires much focus, time, memory.

— Dmitri Shuralyov (@dmitshur) February 14, 2013

Building these dependency graphs in your head from code is very intensive mentally, that's why programmers cannot take interruptions.

— Dmitri Shuralyov (@dmitshur) February 15, 2013

So when you're "in the zone" being very productive, it's because this graph is built. You know what will be affected when you change stuff.

— Dmitri Shuralyov (@dmitshur) February 15, 2013

The problem with that approach is you're storing valuable, hard to build information in your short term memory. Next morning it'll be gone.

— Dmitri Shuralyov (@dmitshur) February 15, 2013

If another person reads your code, they will not benefit from anything you've come up with in your mind. They will have to redo this work.

— Dmitri Shuralyov (@dmitshur) February 15, 2013

Optimize for how humans think and change things as a visual graph, not how computers used to store bytes 40 years ago as plain text files.

— Dmitri Shuralyov (@dmitshur) February 15, 2013

Code/functionality should be stored in a way that embeds this dependency information. This is what I'm trying to create with Conception.

— Dmitri Shuralyov (@dmitshur) February 15, 2013

So when you look at a completely unfamiliar line of code, nearby will be an exhaustive list of _all_ that will change/break as you edit it.

— Dmitri Shuralyov (@dmitshur) February 15, 2013

Sprinkle some live programming magic, and you have a system where it's very easy to experiment, test, see all relevant changes and undo. :D

— Dmitri Shuralyov (@dmitshur) February 15, 2013

Comments

to comment.