NASA!

This post is part of a series. You can catch up with Cruzin’, Cruzin’: Day 2, Cruzin’: Day III, Mexico Adventures, Cruzin’ Day IV: Poison & Magic and Last Day Cruzin’

A quick note before we get going. This post covers a day and half but it’s a bloody long day and a half. You’re looking at 3,000 words so go put the kettle on.

Life is bright because we’re on the Brightline to Orlando. You may recall this photo from the previous post.

Brightline train

The Brightline runs up the East of Florida and is a privately run train that’s trying to be pretend it’s an airline. The stations have check-in, the waiting room is like an airport gate and they even have airliner-style carts selling snacks on the train.

Continue reading “NASA!”

Last Day Cruzin’

This post is part of a series. You can start with Cruzin’, then Cruzin’:Day Two, Mexican Adventures and Cruzin’ Day IV:Poison & Magic.

Cloudy beach view

See that? That’s the beach at Bimini, part of the Bahamas. See that ship, that’s our ship. See those clouds? Full of rain. Looks like that hurricane is getting closer.

Continue reading “Last Day Cruzin’”

Programming Basics for Duncan IV: Subs and Functions

In programming you’ll find that you want the computer to do the same thing again and again, usually something pretty basic. Early on, programmers decided that they didn’t want to write the same instructions again and again so they developed subroutines and functions.

A subroutine is a snippet of code that you can abstract so it can be used again and again. It can be dead simple like this one that makes the computer beep, twice:

SUB BeepTwice
BEEP
BEEP
END
Continue reading “Programming Basics for Duncan IV: Subs and Functions”

Programming Basics for Duncan part III: If and Loops

Your most basic and common decision-making statement is the if command. It always takes this form:

IF (some test that returns a boolean true/false) THEN (do something)

So you have a test and a something(s) to do if the test resolves to true. This is where we use the comparitors from last chapter:

IF x=5 THEN do something
Continue reading “Programming Basics for Duncan part III: If and Loops”

Programming Basics for Duncan part II: Primitives

It’s fun to call them primitives because it makes you feel smart but what we are talking about are the most basic things in a program.

Values

The most basic thing in a program is a value. It is what it is. It can be a number, 5 if my favourite, a letter like K or k or perhaps a decimal like 0.7. Or maybe a boolean value like 1 or 0. It is only one thing. It is a single answer to a question. It is not a word, those a strings, which are a list of values.

Continue reading “Programming Basics for Duncan part II: Primitives”