Speaking Your Language
Posted on June 26, 2008
Filed Under Process, Web Programming | 1 Comment

I have a slightly strange habit when coding that goes back to when I started to learn programming.
I started learning to program when I was 9 on a Beeb (that is a BBC Model B, good days
). Like many around that time my first programming language was BBC Basic (a reasonably well constructed Basic for those days). In BBC Basic string variables were designated by a $ after the identifier and integers (I think) used a %. This led me to internally pronounce $ as “string” in connection with variable names (although strangely nothing analogous for %).
I continued merrily doing this for years (decades) without thinking anything of it until a recent PHP (where $ prefixes a variable identifier of any type) code walkthrough with a colleague. I pronounced “$identifier” as “string identifier” and he articulated his feelings on the matter as “WTF was that!”.
This has led me towards trying to implement a more reasonable and consistent internal monologue when I am programming. Where previously I might have internally pronounced
$foo .= $bar->fubar['queeg'];
while coding as
“string foo… fubar… hmm what am I going to do in the next section oops I’ve made a typo”
I am now trying to condition myself to stick to something more like
“var foo has appended var bar member fubar key queeg”
This does seem to keep my concentration more firmly on the code I am typing rather than leaping ahead to more interesting sections and potentially forgetting something in the current code (obviously you’ve planned out your next section of code before starting to type, right? Right?).
Anybody have any (helpful) suggestions, especially for PHP.
Comments
One Response to “Speaking Your Language”
Leave a Reply

Shame I thought this was going to be a useful blog!
Maybe you should avoid posting things like this in the future.