qr-code

Coding - the Magic of Software

./Wizards-of-SICP.jpg

Wizards of the lambda calculus, from the Structure and Interpretation of Computer Programs (SICP).

We are about to study the idea of a computational process. Computational processes are abstract beings that inhabit computers. As they evolve, processes manipulate other abstract things called data. The evolution of a process is directed by a pattern of rules called a program. People create programs to direct processes. In effect, we conjure the spirits of the computer with our spells.

A computational process is indeed much like a sorcerer's idea of a spirit. It cannot be seen or touched. It is not composed of matter at all. However, it is very real. It can perform intellectual work. It can answer questions. It can affect the world by disbursing money at a bank or by controlling a robot arm in a factory. The programs we use to conjure processes are like a sorcerer's spells.

— Abelson, Sussman & Sussman; SICP, Chapter 1

Once, men turned their thinking over to machines in the hope that this would set them free. But that only permitted other men with machines to enslave them.

Dune

Seeking Mastery in Coding

In just a little over a generation, computers have changed from expensive, rare, and isolated - to cheap, nearly ubiquitous, and globally connected devices. Within another decade or so, it's projected that ownership of at least a smart-phone will reach the vast majority of humanity, for better or worse.

I lived through much of this transformation - mostly unconscious of its impact: from playing with the first home computers, to writing programs for research purposes, to testing and then writing software for a living. I was fortunate to work with some amazing colleagues at an unusual company, just as the Internet and World Wide Web began their global debut. And when I returned to graduate school, I had the chance to mix my new domain of energy with a still-growing love of coding. Today, I'm committed to coding for life; like writing or dance, it's a central means of self-expression.

This page/section is about the journey to learn and use this still-very-new, increasingly powerful magic of creating software. In a prosaic sense, I'm sharing points of interest along my journey of 10,000 hours. But what I also want to convey is the elegance and wonder of code; and perhaps inspire other wizards-in-training.

Kai's Shortlist: favorites Articles/Papers, Books, People, Talks, Tools

Some context for this list: I'd place myself as an intermediate level programmer, meaning I'm productive in several languages (Python, Javascript) and have built systems of 10-30k LoC solo that don't repulse me later with bad style. But I'm not yet expert across several paradigms, and know there's much to learn in making large adaptive systems. I've read, and generally apply, practices from books like Code Complete and The Pragmatic Programmer and now seek deeper knowledge of code-as-poetry, or how to write as little code as possible for maximal impact.

Currently I'm working on knowing and using different perspectives (per Alan Kay's famous adage), with Clojure as the means of exploration. I believe functional programming will be the dominant paradigm in a multi-core world, but with technologies like quantum computing and memristors in the works, it's best to stay agnostic and eager-to-learn.

Articles/Papers

  • Out of the Tar Pit by Moseley and Marks, 2006; recommended by Rich Hickey, creator of Clojure. Discusses how to tackle complexity, arguably the biggest problem in software. Teaches how to distinguish the types of complexity (essential vs. accidental, state and control) and how to address them. Prompted me to get in the habit of asking with every function and data structure, What's essential? What's accidental? What's derivable?
  • Explorable Explanations, Magic Ink, Up and Down the Ladder of Abstraction, and Learnable Programming by Bret Victor - all superbly written and presented. Bret's work on information design makes him one of the leading visionaries of the software industry, and he's just getting started.

Books

  • The Structure and Interpretation of Computer Programs (aka SICP) by Abelson, Sussman, and Sussman. Hailed by many as the best introductory programming book ever written; and after reading and working though 4/5 chapters so far, I'd concur. Prior to taking the SICP dive, I thought I knew how to program, and that Lisp was just for old bearded Unix guys. But a few weeks of SICP started opening my eyes, and continued sparking a steady stream of Zen moments that got me hooked.

Talks

Online video is relatively new; but the ancient combination of effective ethos, pathos, and logos to sway an audience still applies.

  • Programming and Scaling by Alan Kay, 2011. Will likely challenge everything you know about software; while sharply critical at points, Kay compels us to question what real "software engineering" will demand as we move from clumsy tinkering to refined engineering. Introduces the Viewpoints Research Institute (VPRI) and its audacious Fundamentals of New Computing project.
  • We Really Don't Know How to Compute! by Gerald Sussman, 2011. Asks the big question of how software can be made more flexible and adaptive to change, like living organisms, instead of the too-complex, hard-to-change code we write today. Sussman's answer, for now, is the propagator.
  • The Value of Values by Rich Hickey, 2012. Will change your perspective on what data is, and how our use of it needs to be freed from decades-old assumptions. Hickey doesn't even mention his own masterworks of Clojure and Datomic, but if you're familiar with those, the thread of thought throughout his talks and languages is powerfully unifying.
  • Stop Writing Classes by Jack Diederich, 2012. Argues for a more functional approach to Python in particular, but also in general, in order to get a higher ratio of features (that customers pay for) to code (which customers don't care about, and which developers have to write, read, and maintain). There's also a great discussion on HN of this talk.

Tools

  • Emacs: Every programmer must master at least one text editor (see The Pragmatic Programmer if you want the rationale). The Emacs editor starts out as a bewildering and seemingly dull/quaint tabula-rasa, but soon pays steadily compounding productivity dividends, including the benefits of the amazing and peerless org-mode, the ultimate tool for running life in plain text.
  • Clojure is a modern Lisp dialect by Rich Hickey, both elegant and pragmatic. It has had its 5th birthday in October 2012 and shows every sign of continued growth. Lisp has been advocated for by people far more skilled and experienced than myself; and as for Clojure, it exudes that quality-without-a-name I experienced with Python in the early 2000s.
  • Linux Mint You need to develop on Linux, and prefer the Debian distribution - and you also want a pleasant desktop experience? Linux Mint is it!

Currently Creating

Working on a clean energy software startup; that's all the news at this time. :)

Currently Studying

I'm looking into simulations within a functional programming paradigm. It's often forgotten that simulations were the impetus for object-oriented (OO) programming, but after writing a good amount of OO simulation, I find the incidental complexity unpalatable. The talks and articles above have also prompted some re-thinking, so I'm increasingly convinced there must be a better way, with less code. More on this topic later.