Programmer Symbology

Thursday, October 8, 2009

Have you ever taken a step back and looked at all the funny characters we use in programming computers?

I did this yesterday. Sometimes, when you look at familiar things in just the right light, they seem so strange.

strange things on the menu

I use the period to terminate all my sentences. In many programming languages the period is more of a continuation character. It says: “I’m going to act on this thing, and here is what I want it to do”.


That code uses a semicolon to finish a statement; in writing the semicolon joins independent clauses. If symbols are so powerful, how can we juggle the conflicting meanings in our mind? Maybe Perl and C++ had part of it right using –> as a dereferencing operator.*

Sometimes a symbol will mean different things depending on how many times you type it. Like & versus &&. Or the = in JavaScript:

var x = 3;    // assignment

if(x == "3")  // check for equality

if(x === "3") // check for equality and i really really mean 
              // equality because i typed an extra = character

Then we use symbols that impart meaning due to their shape. 

    // i'm trapped inside a { } and I can't escape.

It’s really not a far stretch from using { } to creating ASCII art.

$$$$$$  $$$$$$$$$$$  $$$$
$$$$$$$  '$/ `/ `$' .$$$$
$$$$$$$$. i  i  /! .$$$$$
$$$$$$$$$.--'--'   $$$$$$
$$^^$$$$$'        J$$$$$$
$$$   ~""   `.   .$$$$$$$
$$$$$e,      ;  .$$$$$$$$
$$$$$$$$$$$.'   $$$$$$$$$
$$$$$$$$$$$$.    $$$$$$$$
$$$$$$$$$$$$$     $by&TL$

In fact, I think you could get the above picture to compile into something useful in APL.

* It’s amusing that the Wikipedia entry for Dereference operator has a single “See also” link at this time, and that link points to Segmentation fault.

AspNetSpy Friday, October 9, 2009
Comments are closed.
Pluralsight Courses
What JavaScript Developers Should Know About ECMAScript 2015
The Podcast!