A few weeks ago I talked about Interactive Coding with C# and F# REPLs. There's a whole generation that seemingly missed out on LIVE CODING. By that, I mean, writing and running code at the same time.
Lots of folks used C, C++, Delphi, C#, Java, etc over the last 15-20-30 years and had a pretty standard Write, Compile, Walk Away, Run process working for them. Twenty years ago I was often waiting 30 min or more for stuff that takes seconds now. Many of you today may have to wait hours for compilation.
However, there's so many environments available today that can allow us to write code while it runs. Instant satisfaction...and the browser is becoming a fantastic IDE for Live Coding.
When I use the term "Live Coding" though, there's actually a couple of definitions. I'm conflating them on purpose. There's Live Coding as in "coding LIVE while people watch" and there's "coding and watching your program change as you type." Of course, you can do them both, hence my conflating.
Live Coding - Music and Art
Mike Hodnick mentioned Live Coding to me in the context of music and art. Live Coders use a wide array of languages and tech stacks to make music and art, including JavaScript, Ruby, Haskell, Clojure, and a number of DSL's. Here is a YouTube video of Mike - Live Coding music using Tidal, a language for musical improvisation.
Resources
- Overtone - Collaborative Programmable Music.
- TOPLAP - An organization dedicated to live coding.
- Cyril - Live Coding Visuals
- SuperCollider - Real time audio synthesis
- Tidal - Live Coding Music
Some prominent live coders:
- Alex Mclean: http://yaxu.org
- Shelly Knotts: https://shellyknotts.wordpress.com/
- Sam Aaron: http://sam.aaron.name/
- Alexandra Cardenas: http://cargocollective.com/tiemposdelruido/Alexandra-Cardenas
- David Ogborn: http://www.d0kt0r0.net/
Live Coding - JavaScript and Experimentation
There's another kind of live coding that makes me happy, and that's things like CodePen. Sometimes you just want to write some HTML, CSS, and/or some JavaScript. No IDEA, no text editor...AND you want it to be running as you type.
Code and Watch. That's it.
Some of you LIVE in CodePen. It's where most of your work and prototyping happens, truly. Others who read this blog may be learning of CodePen's existence this very moment. So don't knock them! ;)
CodePen is a "playground for the front-end side of the web." There have been a number of Live Coding Playgrounds out there, including...
But it's fair to say that CodePen has stayed winning. The community is strong and the inspiration you'll find on CodePen is amazing.
- An animation of an elephant walking...with no JavaScript.
- A 3D lion that wants you to fan it...watch the wind!
- Skewed one page scrolling
- and on and on...
Oh, and just to end this blog post on a high note, ahem, and combine Live Coding of Music with ahem, here's a Roland 808 (that's a Rhythm Controller) written entirely in CodePen. Ya, so. Ya. And it works. AWESOME. Here's the code you can play with, it's by Gregor Adams.
There's even Live Coding in Visual Studio now with the "Alive" plugin at https://comealive.io.
What kinds of Live Coding tools or experiences have YOU seen, Dear Reader? Share in the comments!
Sponsor: Thanks to my friends at Redgate for sponsoring the blog this week! Have you got SQL fingers? Try SQL Prompt and you’ll be able to write, refactor, and reformat SQL effortlessly in SSMS and Visual Studio. Find out more with a free trial!
© 2016 Scott Hanselman. All rights reserved.