Tuesday, 5 April 2016

Babies first words

/*
I was pleasantly surprised to be asked by a friends child, "which language should I learn?" From the context it was clear that they meant computer language. I regularly write in five, (though which five changes with time context and application, and that's not including things like CSS,) so my first reaction was to resist recommending the language de jour, (either mine, which happens to be C++, or the a-la-mode python.)
  I asked what operating system they had regular access to and found out that they had windows. One of the most under rated, and most abused languages is ECMAscript. I remember, (I'm that old) waaay back when Microsoft created their only tolerable operating system, XP I had to create some scripts to automate a project for a client and I ended up using JScript.

So I installed notepad++ and naturally wrote:

wscript.echo("Hello World");

Saved it as hw.js and told them to double click it.... (My kingdom for a horseshoe nail.)  My "cool" melted away with a jarring "gank" alert noise. I then took far too long to remember/realise why.

Some part of my brain had automatically discarded the solution because, "everyone knows that windows is case insensitive."

*/
WScript.echo("Windows JScript IS case sensitive: wscript.echo\n Error: 'wscript' is undefined\n Code: 800A1391\n Source: Microsoft JScript runtime error\n I feel like my whole life is a lie; unix = case-sensitive (it cares), microsoft = (case) insensitive. Jay script? more like BS cript.");

// JScript is NOT windows filesystem.

No comments:

Post a Comment

About this blog

Sort of a test blog... until it isn't