This lesson is about Control flow statements – control flow statements are Loops and Conditional Statements. They are the basic building blocks for writing any complicated logic in a program. Here is the Code file associated with the lesson. To download the file, right click on the link below and select “Save As” and save it to disk. Just clicking the link opens it in browser and that may not look right depending on which browser you are using.

22-control_flow

Here is the second lesson, syntax and basics. We go over how to run JavaScript code using Node and learn about data types.

Here are the JavaScript files used in this lesson:

10-syntax_and_basics

20-data_types

21-truthy-and-falsy

Follow along the lesson in this video using the files above.

After a long time thinking, preparing and finally getting to recording, I am pleased to announce that I am starting a course on Windows 8 app development with HTML5 and JavaScript. Today, I am posting the Introduction to the course Video.

To follow along this course, you would need at least the following tools:

  1. Windows 8
  2. Visual Studio (You can get the Express version for Windows 8 applications for free from Microsoft’s website. Click Here Make sure to download the “Visual Studio Express 2012 for Windows 8″)
  3. Node.js. Download and install it from its website

People on the side of The People always ended up disappointed, in any case. They found that The People tended not to be grateful or appreciative or forward thinking or obedient. The People tended to be small-minded and conservative and not very clever and were even distrustful of cleverness. And so, the children of the revolution were faced with the age-old problem: It wasn’t that you had the wrong kind of government, which was obvious, but that you had the wrong kind of people. As soon as you saw people as things to be measured, they didn’t measure up.

Terry Pratchett from Night Watch.

“He wanted to say, oh, how he wanted to say:

Craftsmen, D’you know what that means? It means men with some pride, who get fed up and leave when they’re told to do skimpy work in a rush, no matter what you pay them. So, I am employing people as “Craftsmen” now who’re barely fit to sweep out a workshop. But you don’t care, because if they don’t polish a chair with their arse all day you think a man who’s done a seven-year apprenticeship is the same as some twerp who can’t be trusted to hold a hammer by the right end.

He didn’t say this aloud, because although an elderly man probably has a lot less future than a man of twenty, he’s far more careful about it…”

- Going Postal (Terry Pratchett)

I was watching “Tapestry”, one of my favorite episodes on Star Trek: The Next Generation. In this episode, Captain Picard lay dying because of a condition he acquired when he got into a fight when he was young and rash. An omnipotent being called Q talks to Picard in this near delirium state and proposes to turn the clock back and give Picard a chance to correct things. Picard takes up the offer and by the end realizes that he would much rather have made the same choices and died than change anything in his past.

This nicely ties in with this quote from Terry Pratchett’s “Men at Arms”:

“That was always the dream, wasn’t it?  ‘I wish I’d known then what I know now’?  But when you got older you found out that you now wasn’t the you then.  You then was a twerp.  You then was what you had to be to start out on the rocky road of becoming you now, and one of the rocky patches on that road was being a twerp. A much better dream, one that’d ensure sounder sleep, was not to know now what you didn’t know then.”

“It was said later that he came under bad influence at this stage. But the secret of the history of Edward d’Eath was that he came under no outside influences at all, unless you count all those dead kings. He just came under the influence of himself. That’s where people get it wrong. Individuals aren’t naturally paid-up members of the human race, except biologically. They need to be bounced around by the Brownian motion of society, which is a mechanism by which human beings constantly remind one another that they are … well … human beings. He was also spiraling inward, as tends to happen in cases like this.”

– Men At Arms (Terry Pratchett)