In working with many software tools, programming languages and operating systems, it is crucial to distinguish between backslash and forward slash. Here's a way to remember which one is which.
Imagine the cursor walking across the screen as a person.
In English, we write from left to right. So the cursor moves across the screen from left to right as we type, like this:
Imagine that cursor as a person, facing in the direction he/she is walking:
Backslash is used for:
Forward slash is used for:
battingAvg = hits / atBats;
Copyright 2010, Phillip T. Conrad—Permission to copy for non-commerical academic purposes is granted provided credit is given—all other rights reserved. Thanks to F09 CS16 students Jordan Dyer and Matt Kwis for the original caricature of the author (used by permission). Bob Nieder helped me adapt it to the stick figure.