From BASIC to HyperTalk to JavaScript to Rails to Erlang

Every programming experience teaches



My parents’ FORTRAN books
Sinclair ZX81
Applesoft BASIC
6502 Assembly

I’m not sure which Logo it was, but it was a tiny language and still capable of doing fun things. That in itself was enough of a lesson.
My spaghetti code frustrated me with endless debugging. I put the computer away for a couple of years and bought a typewriter. Apart from patience, I learned that my brain felt different when I stopped programming. The “Return” key at the end of every thought disappeared, and I was able to step back a little from formal logic. Knowing that my brain felt different ‘on programming’ has helped me deal better with programmers and non-programmers ever since.
I returned to programming with HyperTalk: an object of derision or worship, depending on who you talk with. For me, it was proof that a friendly object manipulation language can do great things, until you hit the wall where your logic is more important than the provided objects.
This was a brief excursion, but gave me a path into the inside of the Mac, a view of how these crazy graphical interfaces fit together, and a chance to shift from GOSUB with global variables to much neater method calls.
HTML and CSS and XML
Everything I learned about program structure, even in HyperTalk, went out the door. They aren’t programming languages, but they support a common set of structures I use everywhere. It turned out that decorating trees and handling events would be at the heart of my work for decades…
Perl taught me the power and terror of regular expressions. It definitely reinforced my impatience, laziness, and hubris. CGI had its flaws, but it gave me first contact with building a server system that could interact with clients.
Java seemed like the right answer to all my object-oriented dreams, and was also the place many of my fellow XML developers had chosen. Somehow, though, text processing in Java taught me that programming against the grain of a language is difficult, and that it makes sense to choose a language based on the tasks I want to perform.
At first I mistook JavaScript for HyperTalk with a heavy C accent: an object manipulation language. Over time, though, I’ve realized that JavaScript takes everything I’ve learned from the other languages (except Erlang’s processes!) and puts it in one place.
Ruby on Rails
Ruby offers even more flexibility and style options than JavaScript. (See Understanding Computation if you want a sense of how far you can push it!) It was kind of the opposite of Logo, a chance to try everything. Rails taught me about the magic of metaprogramming, but also that trusting magic can be difficult.
XSLT was my “this isn’t really a programming language” experience. I bounced off of it. When I went back to it, though, it taught me to relax, and let the data structures drive the processing through templates. Realizing that XSLT was like a giant pachinko game, with data falling through filters, transformed the way I look at programming.
Erlang felt like coming home. All the pieces I’d learned from these various other experiences came together. Recursion and registers met the event-based approaches I’d been using in JavaScript and XSLT, and the pachinko data flows move beautifully through the functions in what remains a small language.
Elixir, my latest adventure, feels like it’s combined all of these lessons. All the power, processes, and flow of Erlang are there, but there’s much more robust text handling, metaprogramming through macros, and more that builds on Erlang’s strong base. It feels just a little larger.

Those are the high points of the journey. I keep marveling that my time in 6502 assembler was useful when I came to Erlang. I finally get the “why” of JavaScript: The Good Parts on returning to JavaScript after working in Erlang and Elixir.

It’s been long and slow: may your path be faster. Just remember, though, that whatever environment you encounter will likely teach you something you’ll need later.

As you’ve passed through languages and environments, what pieces surprised and stuck with you?

tags: , , , , ,

Get the O’Reilly Programming Newsletter

Weekly insight from industry insiders. Plus exclusive content and offers.