Computer science: cloud computing

The tutor shares some insight into cloud computing.

Here at Oracle Tutoring, Campbell River, BC, our IT department has a staff of one and manages 5 pcs, the newest of which is from last summer (it was a discontinued model then:).  I have an XP computer, two Windows 7 ones, and two Linux (Ubuntu).  One Windows 7 and the two Linux are laptops.  The two Linux and the XP one might be ten years old.

Although it’s very attractive, in a way, to have so many computers to choose from, it’s likely not the way of the future.  One immediate reason is that each computer needs its own operating system and software.   Moreover, the five computers do take up a lot of space in a crowded house (even the laptops have to be put somewhere).

If Oracle Tutoring was in the cloud, we might have workstations in the house rather than pcs.  Right now, our kids aren’t allowed to be on the computer without adult presence, so they almost never go on at the same time.  Therefore, we’d likely have two workstations – three at most.  They’d probably be portable, and could even be taken off site.

In the late 80s and early 90s I had jobs where I sat at a terminal.  It wasn’t a standalone computer; I guess it networked to a mainframe.  The mainframe took in all the data from the terminals and “knew all”. It alone housed the software which the workers used.

Nowadays, you don’t hear the term “mainframe”; I’d say you hear “server” instead. With cloud computing, the server is your gateway to the cloud.  It offers the software you need, probably in desktop format on your terminal.  The software resides in the cloud. So does your work, if you store it there.  Your terminal just provides access.  No doubt, your terminal has USB slots where memory sticks can be plugged in to receive downloaded files from your space in the cloud.  Alternatively, you can send files directly from your cloud space to another one via FTP or email.

Children of the late 70s and early 80s, who first saw desktop computers, remember how expensive and rare they were.  Like a car, you had to possess the computer to benefit from it.  To the cloud computing user, the principle of owning the hardware is obsolete; instead, the emphasis is on the information.  The cloud is where you can generate, share, and store what you create.

You can still be on the cloud from a typical pc, of course. However, the onboard resources of the pc are probably redundant with cloud computing. Therefore, as people embrace cloud computing, they will just as likely use more minimal terminals rather than fully-featured pcs.

Is Oracle Tutoring going on the cloud?  Not tomorrow.  However, some people think that within ten years, most companies will be.  In a future post I’ll discuss why.


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

Internet research: the tutor comments

The tutor opens a discussion of research in today’s context.

Nowadays, virtually everyone counts on the internet not just for entertainment, but for important information.  Travelers likely use it to access ferry schedules, highway routes, and weather forecasts.  DIYers might use it to gain advice about projects. Of course, students use it for research towards papers.

I think there are more mundane uses people make of the internet that aren’t even considered research.  Recipes, for example, are easy to get from it.  In fact, I think the internet offers better coverage of recipes than of academic information.

If you use the internet to find a garlic bread recipe (which I did, here), you needn’t report the source or judge its validity. You’ll know by how the bread turns out whether it’s a good one. (BTW: that recipe worked out well for me on the first try:) The recipe is likely not controversial; moreover, you’re not quoting it.

Compared to the safety of recipe hunting, academic research can be a whole other thing. There might be four reasons:

  1. The point is usually to write an article based on what you find from the sources.
  2. Often, an academic article is based on surprise or controversy.
  3. Unlike a recipe, an academic article can’t be “proven in the pudding.” Its only legitimacy may be its credibility.
  4. People who read an academic article like to see evidence you’ve “done your homework.”

For the above reasons, it’s my opinion that citing sources is much more important for academic research than for domestic.

Of course, if one cites sources, it’s best to have good ones. Below are some of my favourites. A regular reader of this blog might recognize them:

I’ll be talking more about research in future posts.


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

Math: order of operations (BEDMAS): a common pitfall

The tutor points out a common error in evaluating expressions.

Most students, from grade 7 on, are familiar with the order of operations BEDMAS (first brackets, then exponents, then division, next multiplication, then addition, finally subtraction). However, sometimes the order gets mistaken.

Example 1: Simplify -(-2)^4


The correct way to proceed is to evaluate the exponent (-2)^4 first, which gives 16. Next, multiply it by the negative in the lead, arriving at -16. The correct answer is -16.

The mistake often made is “cancelling” the two negatives by mulitplying them together first. That can’t be done, since it means multiplying before evaluating the exponent.

Example 2: Simplify 2(3)^2


The correct way to proceed is to evaluate the exponent (3)^2 first, which gives 9. Next, multiply it by the 2 in front, arriving at 18. The correct answer is 18.

The mistake often made is to multiply before evaluating the exponent, as follows:

2(3)^2=6^2=36 (wrong)

While this mistake might seem obvious, it leads to many lost marks. Sometimes a flaw only becomes obvious after someone points it out (likely because someone pointed it out to them earlier).


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

Organic chemistry: cis and trans

The tutor gives a simple explanation of why trans fat may be disadvantageous.

Cis and trans compounds have the same chemical formula but are shaped differently. With both cis and trans, a row of atoms experiences two irregularities.

The cis pattern navigates the two irregularities in such a way that it ends up on the same side whence it started. The letter “c” is a good way to think of “cis”: the letter starts and ends at the right.

The trans pattern ends up opposite whence it started. Letter “z” is a good illustration of the trans pattern: it starts at the left, but ends at the right.

I’ve heard that trans fat is to be avoided. (I’ve never heard that cis is better, just that trans is not preferred.) The reason, as I understand, is that trans fat molecules, because of their zigzag geometry, stack alongside each other more easily than do cis fat molecules. Since the trans fat molecules stack together more easily, they can be more difficult to separate as well. Therefore, they have a stronger potential to form layers inside blood vessels.

Cis and trans are examples of isomerism. Isomers are molecules with the same formula but different arrangment of the atoms. Organic chemistry has so much focus on isomerism, I could easily write twenty posts about it. I may, in time….



Solomons, T.W. Graham. Organic Chemistry, 4th ed. Toronto: John Wiley &Sons, 1988.

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

Driving: speed and fuel consumption

Having returned from a long day trip, the tutor shares some reflections about driving.

I’m not much of a driver, yet sometimes I have to be. Yesterday my son had a dance competition in Victoria, which I’d say is about 320km south of here. Unfortunately, we couldn’t all go as a family because of my wife’s work. Typically, my wife is the driver; yesterday, however, it had to be me.

We drove down in the morning, then started back for home about thirteen hours later, finally arriving in our driveway at half past midnight. We are very lucky the trip went smoothly.

What made returning the same day possible is the new highway between Nanaimo and Campbell River, on which the speed limit is now 120km/h much of the way. The speed itself is probably safe enough under optimal conditions. However, the potential increase in fuel consumption from that speed, versus the more common 90km/h, might interest a driver.

I recall hearing that past 80km/h, most of a car’s fuel consumption is spent fighting air resistance. In such a context, air resistance (aka air drag) can increase by the square of the speed. To put the idea in simple terms, the comparison between driving at 120km/h versus 90km/h could be

(120/90)^2=(4/3)^2=16/9=178% fuel usage

A typical household driver may not be aware of the effect of speed on fuel consumption, but truckers more commonly do know of it.

Driving is such a complex topic, intrinsic to daily life for so many, it warrants future posts.

To all our cohorts from the dance companies: I hope you returned home safely last night:)


Serway, Raymond A. Physics for Scientists and Engineers with Modern Physics.    Toronto: Saunders College Publishing, 1986.

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

Math: rational expressions: non-permissible values

The tutor explains the idea behind non-permissible values.

In high school math, non-permissible values become important. Yet, they root back to elementary school:

“You can’t divide by zero,” uttered in metallic timbre, is recalled by many from then.

A rational expression is defined to be


an example being


Fundamentally, such an expression is division, since by definition,

a/b = a÷b

Accepting that we can’t divide by zero, it follows that the bottom of the fraction mustn’t be zero. The bottom of the fraction is also called the denominator:


We arrive at the condition that the denominator mustn’t equal zero. Then, the values that would make it zero are the non-permissible values.

Example 1:

Give the non-permissible values of (2x+4)/(x2+3x)


First, we factor the denominator:


Now we observe that if x=0 or x=-3, the denominator will be zero. Therefore, 0 and -3 are the non-permissible values.

Example 2:

Give the non-permissible values of (x+5)/(x2-25)


Once again, we factor the denominator:


We see that the denominator will be zero if x=-5 or if x=5. Therefore, -5 and 5 are the non-permissible values.

Some people ask, Can’t you cancel the (x+5) top and bottom, to arrive at

1/(x-5) ?

Since that cancellation is actually division, you can only do so if x+5≠0. Therefore, potential cancellation does not change non-permissible values.

This is a first look at non-permissible values. I’ll probably do a follow-up.


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

Linear algebra: Matrix multiplication

The tutor demonstrates the technique of multiplying matrices.

To go further with Markov chains (introduced in my previous post), the reader needs to understand matrix multiplication. To many, the method is surprising at first.

Example: Consider the matrices A and B. Find the matrix product A x B:

In preparation, the reader needs to know that matrix entries are commonly referred to by (row,column). Therefore, entry (1,3) in matrix A, above, is 9.


We start by mulitplying row one of A by column one of B, as follows:


This result is entry (1,1) of the solution matrix S.

Next, we multiply the first row of A by the second column of B to get entry (1,2) of S:

-1(0)+5(1)+9(-7)=-58 = S(1,2)

We move on to the second row of A, multiplying it by the first column of B. The result will be (2,1) of S:

2(9)+0(2)+3(0)=18 = S(2,1)

Finally, we multiply the second row of A by the second column of B, yielding (2,2) in S:

2(0)+0(1)+3(-7)=-21 = S(2,2)

The solution matrix, S=AxB, appears as follows:

I’ll continue about this topic in coming posts.



Johnson/Riess/Arnold. Introduction to Linear Algebra. Don Mills: Addison-Wesley   Publishing Company, 1989.

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

Probability: Markov chains: introduction

The tutor is happy to introduce the elegant topic of Markov chains.

A Markov chain is a sequence of states through which a probability system can pass. It’s not so complex as it sounds. Consider the following example:

Ms A must choose each day between a vegetarian lunch or a meat one. Here is a description of the parameters:

1: veggie

2: meat

1,1: veggie today, then veggie tomorrow

1,2: veggie today, but meat tomorrow

2,1: meat today, veggie tomorrow

2,2: meat today, meat tomorrow

In the probability matrix, the entries are referred to by (row, column).

Now let’s imagine the probabilities associated with each choice set are as follows:

1,1: 0.55 (if veggie today, then 55% probability of veggie tomorrow as well)

1,2: 0.45 (if veggie today, then 45% probability of meat tomorrow)

2,1: 0.31 (if meat today, then 31% probability of veggie tomorrow)

2,2: 0.69 (if meat today, then 69% probability of meat tomorrow, too)

In matrix form:

Such a matrix can be called a probability matrix; another name is transition matrix.


1) Being probabilities, each entry e must satisfy 0≤e≤1
2) The entries in a given row must sum to 1, since they represent all possibilites.
3) The diagonal entries (1,1 and 2,2) signify the probability of remaining the same.

A square matrix that satsifies 1) and 2) is called stochastic.

This is a good first step on our journey through Markov chains.



Tan, Soo Tang. Applied Finite Mathematics, 3rd Ed. Boston: PWS-Kent Publishing   Company, 1990.

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

Javascript: Regex part II

The tutor continues about regex in the context of Javascript.

In yesterday’s post I brought up regular expressions with an interactive example. Today, some more depth:

Let’s imagine an input string that means an amount of money. Likely, the amount includes a currency symbol; perhaps it’s

$1 117.89


€1 117.89

To Javascript, the presence of a currency symbol means the string is not a number. The same goes for the space between the digits. Therefore, if calculation is to be done on the number, it must be amended to


Let’s imagine the input is contained in the string catch0, like so:

var catch0=”€1 117.89″;

Everything but the digits and decimal point needs to be removed. The replace() function can be used, as follows:

var catch1=catch0.replace(/[^0-9.]/g,””);

The replace() function must be applied to a string. It can use the following syntax:


For instance, let’s imagine the string

var mailstring=”mailatsomewhere.there”;

Further, let’s imagine that we want to replace at with @. We could do so as follows:

var numailstring=mailstring.replace(/at/, “@”);

Now, the value of numailstring is mail@somewhere.there

This doesn’t quite explain the workings of the example from last post, but it’s on the way. I’ll be continuing …:)


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

Javascript: regular expressions

The tutor introduces Javascript regex.

Regex, aka regular expressions, is a programming concept. One regex function searches input for a given pattern, then reports presence or absence. Another, upon finding the pattern, might change it among the rest of the input – or else remove the pattern.

The input field below accepts user input. Then, when the button is clicked, a Javascript regex function weeds the non-numeric characters from the input. The input, weeded of non-numeric characters, is reported beneath the button.

Weeded input:

I’ll be explaining the workings behind this utility in a future post:)


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