Why is our source code so boring?

Andrew (he/him) - Nov 4 '19 - - Dev Community

Last year, I was privileged enough to see Peter Hilton give a presentation about source code typography at geeCON 2018, and the main points of that talk still roll around in my head pretty regularly. In a nutshell:

source code is boring

Most developers write ASCII source code into plain text files using a fixed-width font, often trying to keep line length under 80 characters out of habit or "best practices":

public class MyClass {
  public static void main (String[] args) {
    System.out.println("oh god it's so boring");
  }
}
Enter fullscreen mode Exit fullscreen mode

Fixed-width fonts and 80-column limits are a throwback to the IBM 80-column punch card which dominated the industry for decades until it was slowly phased out in the latter half of the twentieth century:

FORTRAN program on 80-column punch card

When colour terminals became popular, we could add things like syntax highlighting:

public class MyClass {
  public static void main (String[] args) {
    System.out.println("boring, but in colour");
  }
}
Enter fullscreen mode Exit fullscreen mode

And what Hilton calls "the most recent innovation in source code", ligatures, which burst onto the source code scene around 2012, have been in common use in print typography for hundreds of years:

ligatures with

This begs the question...

Why is source code stuck in the past?

In a best-case scenario, modern users will define different fonts or styles for different keywords in VS Code in order to construct some kind of visual hierarchy within their programs:

source code with syntax highlighting, ligatures, and multiple fonts

...but we're not reaching the full potential of what's possible. Why not drag-and-drop modules? Why not AI-powered automatic code generation? Why not graphical coding like Scratch or Flowgorithm?

Why has there not been a single revolution in the way source code is written in nearly a hundred years?

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player