English: compound words

From essay writing, one learns to define one’s own terms.  During the weekend before regular tutoring recommences, the tutor discusses a topic his own children have been exploring.

My (smart aleck) son recently told me, “Dad, important is a compound word.”

“No, it’s not,” I replied.

“But it is though:  import…ant.”

I told him that, although import and ant are both words unto themselves, important is not a compound word.  My reasoning:  a compound word’s meaning combines the meanings of the words it contains.  That’s why something is a compound word: it means some thing.  Overpass is another example.

Important is not a compound word, I continued, because import ant is meaningless – unless, perhaps, you’re in the business of ant importation.  Even then, its meaning isn’t the same as important.  A true compound word has the same meaning even if the words are said separately.  That’s my definition.

I sought back-up for my definition in three dictionaries.  Those that commented at all, tended to side more with my son:  that a compound word simply is made from two standalone words.

This fun little post has opened up a few great topics. I’ll be happy to continue them in future posts:)

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Humidex: a Canadian invention

The tutor enjoys discussing scientific concepts, particularly ones with a Canadian dimension.

The humidex provides a meaningful measure of a day’s heat. By considering dew point and temperature together, it provides an “effective temperature” that suggests the comfort level of the conditions. The “effective temperature” is referred to as “the humidex”.

The humidex is calculated as follows:


where T is in Celsius, while dewpoint is, importantly, in Kelvin. To get Kelvin, you add 273 to the Celsius temperature. Therefore, a dew point of 20C is 293 K.

I have verified the formula using the following data set:

temp (°C) dewpoint (°C) humidex source
30 25 42 Wikipedia
28 20 36 Planetcalc: Humidex

When the dewpoint is 10C (283K) or less, the humidex is virtually the same as the Celsius temperature. For day-to-day life in Canada, it’s only on hot summer days, when the dew point can rise into the high teens or above, that the humidex becomes important.

Today’s humidex formula comes from J.M. Masterton and F.A. Richardson, Canada’s Atmospheric Environment Service, 1979. However, the humidex was first used in 1965, possibly with a different formula.

Source: csgnetwork.com

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Social Studies: How Upper Canada became Ontario

The tutor spends most of his time on math and science.  This particular question has never been asked during tutoring; rather, it comes from personal curiosity.

While I’ve long known that Upper Canada is now Ontario, while Lower Canada is now Quebec, I’ve always wondered how the names Ontario and Quebec came about. The names Upper Canada and Lower Canada are easy to understand, since they relate to progress of the St. Lawrence River:  Upper Canada was proximal to its upper course, while Lower Canada straddled its lower course.

Due to problems chiefly in Upper Canada, it was merged with Lower Canada in 1841, resulting in the United Province of Canada.  Ontario and Quebec emerged thence in 1867.

Ontario, according to Wikipedia, is named after Lake Ontario; the name originates in either the Huron or Iroquois language.  Wikipedia also informs me that Quebec is the Algonquin name referring to the environs of Quebec City.

Clearly, much more needs to be discussed (in this blog) about the history of Canada. I look forward to livening it up in future posts:)


Bowers, Vivian and Stan Garrod. Our Land: Building the West.  Toronto: Gage    Education Publishing Company, 1987.

Wikipedia: Province of Canada.

Stanford, Quentin H.,ed. The Canadian Oxford School Atlas, 6th edition. Toronto:           Oxford University Press.

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Random numbers, continued

Tutoring math, computer science might always be around the corner.  The tutor continues the discussion of random numbers, including a “live” example.

As I mentioned in my previous post, random numbers comprise a favourite topic among computer science people. At its core is the paradox of a random number being produced by a calculation device.

The definition of random, from the point of view of statistics, is that every possible value has an equal chance of being selected. For example: imagine you write each number from 1 through 100 on its own (equal-sized) slip of paper, put the slips all into a hat, then have someone reach in (without looking) and grab one of the slips of paper. We’d likely agree that’s a random selection. The person drawing the number, we believe, would be equally likely to pull out any of the slips of paper, hence any number between 1 and 100.

The experiment above is trustworthy because we can picture it and empathize with the person drawing the number. We know that, not looking at the hat while pulling the number from it, we ourselves would be hard-pressed to control the number drawn. When a computer produces a random number, however, we may not know how. The question inevitably arises, “Can we be certain the number is random?”

To offer some reassurance that the random numbers offered by computers are “random enough”, I’ve put a random number generator below for the skeptical reader to try. You can look at each number in its totality, or just follow certain digits – the fifth digit of each number produced, for instance. For random numbers between 1 and 100, you could follow the fifth and sixth digits, for another example.

This random number generator is powered by the Javascript built-in Math.random() function. Like many, it produces a number between 0 and 1. Users can customize the results, if desired, using other mathematical functions that multiply and round.

Your random number is  

I’ll be discussing Javascript and other aspects of tonight’s post in future ones:)

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Perl programming: random numbers

Tutoring math, you realize that some of your students will move on to computer science at university.  The tutor brings up a time-honoured favourite among comp-sci people:  random number generation.

Every computer programming language I know of has a random number generator.  The one I know in Perl is rand().  Common among such functions, it gives a random number between 0 and 1:  a decimal to 10 or so places.  If you want a random whole number, you can  multiply the output of rand() by 10, 100, 1000, or some other power of 10, then truncate it.  The following little program serves an example:





print “\n\nYour random number between 0 and 1000 is $num2\n\n”;

How are random numbers accomplished? There are several ways a computer might do so. A deeper question is, “How can a computer generate a truly random number, when a computer calculates numbers rather than creates them?” The answer lies in the compromise of accepting unpredictable as random.

For more about this wonderful topic, please return soon.

Source: perlmeme.org

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Ecology: environmental energy

Out for a walk in the woods recently, the tutor couldn’t help but arrive at this topic.  Like so many others, it’s relevant, yet rarely covered during tutoring….

On a hot day like we’ve had here lately, a hiker might notice the jungle-like foliage in the forest.  Then, feeling the sweat on their brow, and the insects on their bare arms, they might ask, “Is this what it’s like in the tropics?”

The answer is that, in the summer, conditions here can be similar to some much hotter places.  Of course, the difference is that they get those conditions the year round – or nearly year round.

Why is there so much more biological activity when it’s hot?  It comes down to the formula


where KE means kinetic energy, while T means temperature. The reality this equation points to is that the environment’s available energy increases with rising temperature.

Specifically, kinetic energy is the form of energy that is embodied in the motion of the molecules. The faster they move, the higher their kinetic energy. It is kinetic energy that facilitates chemical reactions, which is why turning up the heat on food cooks it faster.

When the outside temperature is higher, plants grow faster because growth is the sum of many chemical reactions. The plants, such as the grasses, feed everything else. In a tropical grassland, an acre has a much higher output of vegetation than it would have here on Canada’s west coast. Therefore, it can feed many more animals than an acre here. The result is not only more animals on the acre of tropical grassland, but a greater variety of them.

If it was always as warm here as it’s been lately, we would have a comparable biodiversity to a tropical setting. However, that might likely include poisonous snakes, parasites and diseases that Canadians never need think about – unless perhaps they travel to some tropical places.

Further exploration of the formula


and its energy implications will be explored in a future post:)

Source: hyperphysics.phy

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Perl programming: the user input array

The tutor notices that, given it’s Aug 14, we need a little progress in our summer project of Perl programming.  This rarely comes up in tutoring, but it’s a labour of love….

Back on June 22, I broached the idea of getting started with Perl. After all, I argued, academic pursuits can continue through the summer, the motivation being interest rather than preparing for an exam.

For those of you who actually took up the challenge and got started, you likely followed my blog through the summer. Not every article has been about Perl, but a good few have. The time has come for more.

Today’s article plugs an obvious hole in our knowledge base so far: getting user input. After all, it’s hard to interact with a program if you can’t give it different values to see how the output changes.

Perl has an array called @ARGV that is dedicated to storing inputs from the command line. (See my article on arrays here.) The following program serves as an example:

$ans=$firstnum + $secondnum;
print “\n\nHello, $name.”;
print ” You entered $firstnum and $secondnum.”;
print ” Their sum is $ans\n\n.”

The activity of this code is likely not mysterious. It is given the input array @ARGV with three values in it. $ARGV[0] is expected to contain your name; $ARGV[1] and $ARGV[2] should each contain a number. The program fetches your name from $ARGV[0], then stores it in the variable $name. Next, the program fetches the numbers from $ARGV[1] and $ARGV[2], stores them in $firstnumber and $secondnumber, adds the two, then stores the sum in $ans. On the command line, it gives you a friendly greeting by the name you gave, afterwards reminding you the numbers you gave and telling you their sum. Where you see \n, the terminal will start a new line. That’s just done to make space on the screen for the output.

At this point, the serious reader might have four questions in mind:

  1. How does your name get into $ARGV[0]?
  2. How does the first number get into $ARGV[1]?
  3. How does the second number get into $ARGV[2]?
  4. How does @ARGV get handed to the program as input?

The answer is that you enter those inputs, in order, after the program name. Let’s imagine the program above is called lucy.txt,and that your own name is Edward. Furthermore, you are just now wondering what the sum of 329 and 1982 is. Without a pencil or calculator handy, you’d like to call on lucy.txt for the answer. First, you will go into the terminal (see my articles here, here, and/or here, depending on your operating system). Next, you will place yourself in the directory where lucy.txt resides. Finally, you will call her and give her the three inputs by entering the following line:

perl lucy.txt Edward 329 1982

If all goes well, Lucy will answer with

Hello, Edward. You entered 329 and 1982. Their sum is 2311.

The very first line of lucy.txt, specifically


is called the shebang line. (You can read more about it here.) It is needed in non-Windows environments. While it’s not necessary in Windows, it doesn’t seem to hurt if it’s there.

Good luck with this!

Source: Robert Pepper’s Perl Tutorial

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Driving: fuel consumption

Progressing through summer, the tutor recalls these issues he’s always loved discussing.  During tutoring, he rarely gets to….

One source of fascination, for some drivers (and MOST people in the transport business), is how fuel consumption increases with speed.

Any cyclist knows that on level ground, their speed tops out very quickly even under optimum conditions. Riding my mountain bike avidly in my early 20s, I noticed that it’s hard to ride 20km/h for more than an hour – yet 15km/h can be sustained indefinitely with good conditions. On a racing bike, both speeds would be higher, but the point is the same.

Driving, your car doesn’t get tired; rather, it just uses more fuel. How much more? Well, the good people at the US Department of Energy are offering this rule of thumb:

For every 5mph over 50mph, it’s like you’re paying $0.25 more per gallon of gas.

Converting to Canadian units, we can translate:

For every 8km/h over 80km/h, it’s like you’re paying $0.066 more per litre.

Since I rarely drive, I don’t know the pump price today; I hear it’s around $1.40 per litre. If you drive 100 km/h (as opposed to 80km/h), you’re effectively paying about $0.16 more per litre, or around $1.56.

Then again: time is money:)

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Energy consumption: usage of a few common devices

Continuing our summer articles about lifestyle and general interest, the tutor discusses the power usage of a few devices in the home.  While these matters seldom come up during tutoring, it might be surprising more people don’t ask….

If you look back over my posts from this summer, you’ll find energy has been a theme. I’ve talked about electric cars vs gas ones, I’ve discussed electricity vs gas and diesel, I’ve talked about different units for measuring power, etc.

To someone gaining interest about the general topic of energy, an inevitable question is, “What is the energy use of a given device in my home? What does it cost to run?”

I’ve chosen a couple of devices pursuant to this discussion: my little laptop computer (which uses low power), and my wife’s hairdryer (which uses much more power).

The power supply attached to the laptop says 65W, which is 0.065kW. Therefore, running it for an hour uses 0.065kWh. BC Hydro, which is the electrical utility here, has a stepped rate: over a two month period, you are billed as follows:

    For the first 1350kWh you use, the rate is 7.52 cents/kWh.

    Usage above 1350kWh is billed at 11.27 cents/kWh.

Assuming I’m within my first 1350kWh this billing cycle, running my laptop for an hour will cost (0.065)(7.52)=0.4888 cents: about half a cent. Running the computer non-stop for 30 days will cost about $3.50. It’s only on about 4 to 8 hours per day; let’s call it 6 hours. Then the monthly cost is about 90 cents. BC Hydro’s billing cycle is two months, leading to $1.80 on the bill due to laptop use.

Now, let’s check out the hairdryer. It uses a whopping 1875W, or 1.875kW. Using it for an hour costs 14.1 cents. (This assumes, once again, I’m within the first 1350kWh.) Using it non-stop for 30 days would cost about $101.50. I’d say my wife actually does use it about 4 hours per month; for that, we’re on the hook for about 56 cents: $1.12 for a two-month period.

With a bill of $1.80 +$1.12=$2.92 for the laptop and hairdryer, one starts to get a picture of where the money is going. Note the computer, while it uses only about 1/29 the power of the hairdryer, actually costs more to run per month because of usage habits.

For more about household energy consumption, and the divergent topics to which it might lead, please come visit again:)

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Computer Science: what is an array?

Returning to computer science, we continue our summer tutoring project surrounding PERL programming.  The tutor introduces the concept of an array – first, from a generic viewpoint.

Every computer programming language I know of uses the concept of an array. Python, if I recall correctly, uses the term list. Although a given computer language has its own flavour of it, the array is useful to preview from a generic point of view.

Here’s an example of an array: (“eggs”,”bread”,”milk”,”butter”,”jam”). This array contains five pieces of information. You could also say it contains five items. However, computer science people would commonly say it contains five values. Note that a value doesn’t have to be a number; it can also be a noun.

One curiosity of arrays is that they start at 0: in the array above, element 0 is “eggs”. Element 1 is “bread”. Therefore, “jam” is element 4, even though it’s in the fifth position.

Perl has functions that remove or add values to an array, give its length, etc. In Perl, the array above might be defined as follows:


The @ symbol means it’s an array. $groceries[0] is the zeroth element of @groceries, so $groceries[0] is “eggs”. $groceries[3] is “butter”.

For more about arrays, as well as programming in general, please return soon. Hope you’re enjoying the season, wherever you are. Here, the heat wave continues:)

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.