Category Archives: Nostalgia

How do You Measure Inflation?

Inflation is supposed to be one, measurable number. There’s a number that’s quoted in all the newspapers, and is used all over the place, to help determine how well the economy is doing, to index pensions, to negotiate union contracts, etc, etc…

This is generally known as the ‘CPI’, or ‘Consumer Price Index’. I’ve reproduced the numbers for Canada from Statcan[1] below:

Consumer Price Index, historical summary
(1996 to 2015)   	All-items 	Change from previous year
  	2002=100 	%
1996 	88.9 	1.5
1997 	90.4 	1.7
1998 	91.3 	1.0
1999 	92.9 	1.8
2000 	95.4 	2.7
2001 	97.8 	2.5
2002 	100.0 	2.2
2003 	102.8 	2.8
2004 	104.7 	1.8
2005 	107.0 	2.2
2006 	109.1 	2.0
2007 	111.5 	2.2
2008 	114.1 	2.3
2009 	114.4 	0.3
2010 	116.5 	1.8
2011 	119.9 	2.9
2012 	121.7 	1.5
2013 	122.8 	0.9
2014 	125.2 	2.0
2015 	126.6 	1.1

These numbers should dovetail well with what you read in the news. They even nicely break the CPI down by type of item:

Consumer Price Index, by province (monthly)
(Canada)   May 2015 April 2016 	May 2016 April 2016 to May 2016 May 2015 to May 2016
  	2002=100 	% change
Canada 	  	 
All-items 		126.9 	128.3 	128.8 	0.4 	1.5
Food 			140.8 	143.8 	143.3 	-0.3 	1.8
Shelter 		133.2 	134.9 	135.1 	0.1 	1.4
Household op & furn. 	119.7 	121.6 	122.1 	0.4 	2.0
Clothing and footwear 	95.0 	96.0 	96.0 	0.0 	1.1
Transportation 		128.0 	127.8 	129.4 	1.3 	1.1
Health and pers. care 	120.7 	122.2 	122.3 	0.1 	1.3
Rec, ed, & reading 	109.9 	110.3 	111.7 	1.3 	1.6
Alc. & tobacco products 151.9 	156.5 	156.8 	0.2 	3.2
Special aggregates
All items excl. food 	124.2 	125.3 	126.1 	0.6 	1.5
All items excl. energy 	124.8 	126.9 	127.2 	0.2 	1.9
Energy 			152.4 	143.4 	146.9 	2.4 	-3.6
Source: Statistics Canada, CANSIM, table 326-0020 and Catalogue nos. 62-001-X and 62-010-X.
Last modified: 2016-06-17.

But many peoples’ experience of inflation can be very different.

I’ll use an example near and dear to my heart:

Today, I had the

Vegetable Chow Mein from my favourite food truck: Wokking On Wheels!
Vegetable Chow Mein from my favourite food truck: Wokking On Wheels!

I first visited the Wokking on Wheels food truck sometime during the fall of 1996, when I was working on Calculus with J (Thanks, J!). At that time, they had five daily specials which, if I recall correctly, they were selling for $3.75. These included the special Thursday special, ‘Singapore Fried noodles’, which you could persuade them to add red sweet sauce to. Delicious!

Anyway, the Vegetable Chow Mein was the least expensive thing on their menu today, at $7.

So, 20 years later, how has inflation fared? By the CPI deflator above, you would expect a $3.75 item in 1996 to cost $3.75*128.8/88.9 = $5.43, about $1.50 less than the actual.

Even if you use the ‘food’ number above, you get: $3.75*143.3/88.9 = $6.04, or about $1 less than the actual.

There are a number of reasons for this (which are beyond the scope), but it’s enough for now to note that there are reasons that people have a different feeling of inflation than what is ‘official’.

[1]The numbers for Ontario seem to be about the same to me.

“It felt like flying.”

Walking, walking, walking. It felt like that was all he ever did. He didn’t mind, though, it was actually kind of fun. Most of the time, there would be new things to see, or at least new people. In a city of five million, you would rarely see the same person twice, unless you were specifically going somewhere to meet someone.

But today was different. He was biking instead. He had avoided it for years, after an accident in his youth, where his back carrier had become detached, lodged in the spokes of his back wheel, throwing him over his handlebars.

He had wondered if riding a bike was really ‘like riding a bike’, that you never actually forgot. He wondered how all of the muscle memory (if that was what it really was) worked, to help him keep his balance. He wondered if he’d ever be as balanced as those who biked without hands.

And so he went out and bought a bike. It was nicely coloured, and had front and rear shocks. Not too expensive. It spoke to him somehow. Strongly enough that he didn’t notice that pun until many years later.

Slowly at first, he tried the bike. It rode well, and it turned out that riding a bike was in fact ‘like riding a bike’.

He rode that bike for years, his trusty steed, even getting it repaired for more than it cost to purchase, after an unfortunate overnight stay in a bad neighbourhood. But it was too important, and he was too attached to it to let it go. They continued, and had many adventures together, braved travails and stress, pain and joy.

Some time later, he and the bike moved on to a new place. They continued their adventures, but they were increasingly discovering that riding was causing him pain in the knees. It was time to move on, but he wanted to make sure the bike would continue adventuring, especially because of all they had been through together.

So he put out the call. He put a price on it, not because the money was important, but because he wanted whomever the new person was to take it seriously.

He met the new person, he was a good person. He went away with the bike, sending back a picture as a momento. But the bike had given him an even better parting gift.

Looking back many years later, the bike’s new person had become a good friend. One last time, the bike brought him together.

But perhaps some of that spirit had transferred to his new trusty steed. Biking down the street near what would be their home, his new bike brought him towards a person who would end up being very special indeed.

Numerical Jokes

So, a person walks in to a bar. As they enter, someone up on stage says ‘one hundred and fourty seven’, and the whole bar erupts with laughter.

The person walks over to the bartender and asks ‘What are they doing? Why did everyone laugh just then?’

The bartender says ‘Well, a few years ago, they realized that they were just telling the same jokes over and over again, so they wrote them all down and assigned numbers to them. Saves a lot of time.’

‘Oh! Let me try!’

The person runs up on stage, and yells ‘Fifty-two!’. Dead silence. ‘Fifty two?’ Dead silence. They disconsolately walk off the stage and back to the bar. The bartender says ‘It’s alright.’

‘What did I do wrong?’

‘Just watch.’

A person from the crowd, a regular it would seem, walks up onto the stage. ‘Fifty two.’

The crowd erupts with laughter again.

‘What? Why did that work?’

‘Well, it’s all in how you tell a joke.’

Then a different person comes out of the crowd, and walks slowly up to the stage. They pause for a while, and then say ‘One thousand, two hundred and seventeen.’

There is a pause. Another pause. Then one person starts laughing, then another, soon the whole bar is laughing.

‘What did they just do? Why did the crowd react like that?’

‘That was one they hadn’t heard before.’

Notes: I think I heard this one from my dad for the first time when I was very young. I’ve always enjoyed it. It felt difficult to ambiguate the gender of the participants, but it felt necessary. I think there are two endings above, everything after ‘it’s all in how you tell a joke’ is an alternate ending, but I enjoy the whole thing together, if only because you get to surprise people twice.

Slide Rule Accuracy and F=ma

Earlier this week, we were talking about drawing a Large diagram as one of the lasting and important things I learned in Prof. Collins’ Structure & Materials course.

Here are some of the others:

‘Slide Rule Accuracy’

This is the idea that in the real world[1], you’re never going to use more than three digits of accuracy (or four if your number starts with a ‘1’)[2]. Beyond that, things will get lost in the noise, or other inaccuracies, whether it’s budget contingencies, manufacturing defects, or whatever. (It would be interesting to see whether this has changed for manufactured parts with increased automation.)

The ‘3 laws of engineering'[3]:

1) F=ma

Simple, yet profound. When you’re dealing with non-relativistic systems (pretty much all of them), you push on something, it will move or react proportionally. This is not limited to physical systems.

2) You can’t push on a rope.

Also simple, has a number of applications for mechanical systems, but is probably the most ‘Engineer-y’ useful statement for dealing with other people.

3) In order to solve an engineering problem, you must first know the solution.

This one doesn’t really make sense on first blush, but I’ve experienced it. I mentioned earlier that the brain is often a structure that problems flow through, and in a sense this is a statement of that. You’re going to try to fit a new problem you’re looking at into the structure(s) of all the problems that you’ve seen before, and you have a huge advantage if you’ve seen similar problems before, or seen other problems you can apply by analogy.

We also had a ‘notebook’ that we put all of our class notes in, including cut and pasting from technical sheets, and this ‘notebook’ was our open book for the exam. It was a great exercise in focusing note-taking and coalescing your thoughts onto a medium-small piece of paper.

“When someone is paying you $100 for an hour of work, it’s worth paying a few extra cents for a good sheet of paper to give it to them on.”

The course had special ‘engineering notepaper’ that they wanted us to hand problem sets in on. There wasn’t any penalty for not doing so, but the lesson was that a little bit of professional presentation went a long way.

[1]This is when you’re dealing with things of reasonable size. I’m guessing when you’re looking at gravity waves or Higgs bosons, you might be using somewhat more accuracy. But at the same time, you’re probably not really looking at more than the last few digits…

[2]This is one of those subtle things which is actually quite important and powerful. On a slide rule, the portion which starts with a ‘1’ is fully 30% of the length (log10(2) ~=0.301), so unless you use the fourth digit here, you’re losing a substantial portion of your accuracy. There is a better explanation of this here:

[3]For a slightly different set of three Engineering laws, look here:

Draw a LARGE Diagram

Draw a LARGE diagram. When you start, you have no idea which part you’ll be focusing on, so draw it large to start.

In undergrad, we had a Structures and Materials course with Prof. Collins. I owe a lot to that class. It was first year, first term, and it was our first experience with ‘real Engineering’ (with a capital ‘E’).

Collins talked about (along with how to build bridges and other structures) a number of things which you would actually use every day, no matter what types of things you were designing or calculating or planning.

The biggest[1] one is indubitably ‘draw a Large diagram’. Every time I do this, whether it’s on a whiteboard at work, or in my journal[2] at home, it helps far more often than I expect, especially when you’re drawing a teaching diagram, and people are asking questions.

It helps when you’re drawing a semicircle intersected by many lines, with some angles known, some angles not known, and you need to do a bunch of fancy figuring to get the answer[3].

Next time, we’ll talk about some other useful tidbits I learned in that class. Stay tuned!

[1]Ha!

[2]I use notebooks with blank pages. It helps me draw diagrams without extraneous lines, feels freer for thinking.

[3]I think this was a GRE question.

Running A Sprint Planning Meeting

It’s the little things that sometimes make a difference. When I was teaching standardized test math so many years ago, I noticed as I was drawing problems on the board, all the little habits that I had picked up. Habits which make solving problems easier, habits which reduce the chance for error.

Things like the curve on the leg of the lower-case ‘t’, so that it doesn’t look like a ‘+’. Curving your ‘x’ so it doesn’t look like a ‘*’ sign.

I think some of this (probably sometimes annoying) attention to detail had carried over to Sprint Planning meetings[1].

Planning Poker is a method for a group to converge on a time estimate for a task or group of tasks. There are a number of ways to do this. The ‘canonical’ way we were taught to do this was to use Fibonacci-numbered cards (1,2,3,,5,Eureka!). This involved a discussion of the task(s) to estimate until everyone had a reasonable idea of their complexity, then each person would choose a number estimate, all of which would be revealed simultaneously, to hopefully reduce bias. The discussion before estimation would not include estimates of how long things were estimated to take, to also try to reduce bias.

While we were running our planning meetings, I noticed that we would start to slip away from this ideal, perhaps because certain things were not important, perhaps because we didn’t see that certain things were important. For example:

We moved from cards to apps, and then to fingers. Using apps for estimation is less annoying than finding the cards each time, but fingers are even faster to find. I/we tried to get around the bias effect by having everyone display their fingers at once, and that worked reasonably well. Even making each person think about their estimate before display can help a lot with reducing the impact of what others might think of them.

One thing I tried which never really caught on when other people were running the meeting was saying ‘A,B,C’ instead of ‘1,2,3’, with the idea that it would be less biasing on the numbers people were choosing. (This may have mostly been an impression of mine, as the moving of the estimate from a mental number to a number of fingers may cement it in a slightly different mental state…)

If one is not careful, and perhaps somewhat impatient in meetings[2], one can start suggesting estimates before they are voted on. It can take considerable discipline and practice to not do this.

Another thing I noticed was how difficult JIRA was to use when one is not practiced in it, especially in a room with many people watching. Something that any experienced[3] demo-giver would know like the back of PowerPoint’s hand.

That’s all I have for now. For more minutiae, tune in tomorrow!

[1]For those of you who have not had the pleasure, these are the meetings at the start of an iteration, where the team sits down in a room, estimates a bunch of priority-ranked tasks, and decides (generally by consensus) how many of them they will commit to getting done in the next two weeks. Like all meetings, they can be good or bad, and the meeting chair (I feel) can make a large difference.

[2]I am probably as guilty of this as anyone. I would recommend Randy Pausch’s ‘Time Management‘ for those who feel similarly.

[3]Read: ‘Battle-scarred’

Which ‘Magic Numbers’ do You Use?

I was talking with S earlier this week, and the idea came up for a post about the numbers that I remember and use for estimation. I enjoy the sobriquet ‘Magic Numbers’.

‘Magic Numbers’. They’re considered bad practice[1] in programming, but are such a useful and helpful part of human ‘back of the envelope‘ problem solving[2].

Water:

The ‘Magic Number’ which precipitated this post was the fact that one tonne[3] of water is one cubic meter in volume. Interestingly, this is actually a number of interlocking ‘Magic Numbers’, including: One tonne is one thousand kilograms, water has a density of 1 gram per cubic centimetre (‘density of 1’), one thousand is 10x10x10, one tonne is one thousand liters of water, one liter is one kilogram, etc, etc…

I mostly enjoy using this to respond to ‘I could eat a tonne of this’, or to estimate whether you could fit a tankerfull of oil in an office.

It is commonly known that ice will float on water, because the hydrogen bonds give the water molecules a structure which is more spaced out and less dense than close packed[4]. Also, water has its greatest density of about one at about 4 degrees C.

Density:

Incidentally, hydrocarbons have a density of about 0.7, so the tankerful of oil mentioned above would rather difficult to swim in. This 0.7 is close enough to 1.0 so as to make no difference for most back of the envelope questions. Strong acids are known to have densities greater than one[5], but that’s not really that useful most of the time.

The Earth has a density of on the order of five. Interestingly, while reading this, I learned that granite and quartz have a density of about three, much less than I had been assuming. No wonder pumice can float.

Gold has a density of about 20 (19 and change, when that matters). Osmium and Iridium are the densest, at around 22 and change.

On the list of interesting curiosities, Saturn is the only planet in the solar system known to have a density less than one, about 0.7! This was only useful in winning a scientific trivia contest with TJFN when I was young.

Scientific Constants:

Avogadro’s number is 6e23, Coulomb’s constant is 9e9, the ideal gas constant is 8.314 (I remember that one because it includes pi), G is 6.67e-11, the Planck constant is 6.63e-34. Most of these are useless without things like the mass or charge of an electron or proton. The only one I use is Avogadro’s number, and that’s largely to calculate how much of your body is made up of atoms which were once part of a particular famous person[7].

For atoms, what I’ve found useful is the fact that a proton is about 2000 times heavier than an electron, and that chemical bond distances are measured in Angstroms (1e-10m).

c is 3e8m/s, which is useful for Star Trek and Star Wars-type arguments. One atmosphere is 101.325kPa, or about 30 feet of water (which is important for divers).

Math constants:

Pi is 3.14159, or 22/7[6] to its friends. Pi comes up a lot.

e is about 2.718. e doesn’t come up very often.

log10(1) = 0
log10(2) ~= 0.301
log10(3) ~= 0.477
log10(7) ~= 0.845
log10(10) = 1

With these three, you can calculate all of the logarithms from one to ten, and much of everything else. In high school, we memorized all of the perfect squares up to 100^2, but most of those have fled from memory.

The (x+y)(x-y) = x^2 – y^2 trick still comes in handy, though.

Large Things:

The CN Tower is 553m tall, really only useful in Toronto.

The Earth has a radius of about 6380m, has an orbit of 93e6 miles (150e6km), useful for things like Dyson Sphere and Red Giant arguments.

The Earth is about 6e24kg, has a diameter of about 40,000km (at the equator), axial tilt of about 23.5 degrees (Uranus is the only planet with an axial tilt significantly greater, almost sideways!).

The sun is about 400x larger than the moon, and is about 400x further away, and this is why solar eclipses work.

Conversions:

1.609 km/mi (0.621 mi/km), 2.54 cm/in (by law!), 9/5+32 degrees C-> degrees F.

SGD, AUD, CAD, USD, EUR, GBP are pretty close in value, and are in that approximate order with only a factor of about 2 separating them. HKD has maybe 6-8 times per unit, CNY is in that general ballpark, and JPY has about 100 times per unit.

Miscellany:

My handspan is about 10″, which is very useful for measuring things.

Stories are about 2m tall.

3600s/hour, 86400 seconds per day, the Unix epoch started 1970-01-01, useful if you spend any time coding, or want to know how long something will take at ‘x per second’. (100k seconds per day is a useful gross approximation for many applications.)

And I would be remiss if I left out my favourite physics approximation (from the same class where I learned about Stirling’s approximation):

sqrt(10) ~= pi.

Thank you and good night.

[1]Although, compare some cases where they are considered not quite so bad practice.

[2]They are also almost essential for proper answering of ‘Fermi Questions‘.

[3]’Tonne’ means metric tonne, or 1000 kg. You can tell because it’s spelled in the French way, and SI (Systeme Internationale) was brought in while France was a preeminent country.

[4]I didn’t know what the actual structure of ice was before looking it up. Apparently, it’s tessellating hexagonal rings.

[5]’Add acid to water, like you oughta’, else you may melt the top of your beaker off.

[6]Really, it isn’t, but it’s a useful approximation sometimes.

[7]With some reasonable approximations, I remember it being billions of atoms with each breath.

Brain Structure vs. Brain Thoughts vs. Hash Functions

So, I was doing a knowledge transfer session[1] last week, and I was struck by the way that my brain seemed to be answering the questions. It felt almost like there was a structure inside that was taking the input from the questions, and outputting the answers in a different part of the brain.

It felt different from the hash functions that I mentioned before. Those felt like they were hash functions[2] implemented in software, the structure above felt more like inflexible hardware, like you put a problem in, it or something upstream abstracts the problem to a useable form, it spits the answer out automatically and gives you that answer before you know it.

Hardware can be fun sometimes.

But this was the first time that I really felt that thoughts and reactions I was having were completely the result of brain hardware rather than software. It was a most interesting feeling.

It felt more like channels or a Pachinko/Peggle game.

It’s interesting the contrast here. When you’re trying to get something creative out of your brain, it’s like fish jumping out of water, and you’re trying to relax to allow yourself to see them and express them. When you’re answering a question, you’re taking the words in, and passing them through a filter and hash function. When you’re solving a problem, sometimes it’s all processed through some kind of a hardware structure.

Some might use the analogy of sound waves traveling through a Crystalline Entity, but I like the analogy of a collagen structure with the cells removed that concepts can travel through to and from specific places, so you could have a graph in many directions or dimensions, perhaps simultaneously[3]

Your brain structure can be dictating your answers to questions, perhaps not always your thoughts. Fascinating.

[1]PM me if you want to know more!

[2]They felt like hash functions both because they were in software, but more importantly because they each worked in one direction only, or with a specific ‘twig’ not the same as others'[4].

[3]Do these thoughts ever collide?

[4](Other people or other twigs)

Baba’s Cabbage Rolls

'Traditional Ukranian Cookery' cookbook

When I was about one year old, my family briefly moved to Ottawa. This turned out to be lucky, as it meant that my Baba wrote down all her recipes for my mom to take with her. This is my favourite, her amazing Cabbage Rolls, in her words:

Cabbage Rolls

Baba's famous Cabbage Rolls, page one
Baba’s famous Cabbage Rolls, page one


Parboil about 1 cup of rice and 3 cups or so of boiling water so you wouldn’t have any water to drain. Let it go dry but not burn. You have to guess.

I cook some onions chopped and celery if I have it and minced[1] meat any kind pork or beef or chopped ham anything you have around. Mix it with rice and season with salt , pepper, and sage & mace if you have it.

Scald leaves of Cabbage, but don’t boil; they will tear. Take a spoonful of rice and roll it tight. Put with end down.

Baba's famous Cabbage Rolls, page two
Baba’s famous Cabbage Rolls, page two


If you cook on top of stove, use a wire piece you have on bottom of pot[2] then lay your Cabbage rolls on top. Put some tomato juice mixed with little water and pour over Cabbage rolls . Don’t fill the pot too full, about a little over a half or near 3/4 full. You can use cans of tomato sauce diluted with water or dilute ketchup with water. Cook on low heat. After they start cooking, you can cover with chili sauce or spicy relish if you like them spicy. In roasting pan you don’t need the wire.

It takes about an hour or longer in pot, and a little [sic][3] in Roasting pan, or try one, taste it, if it’s cooked, it saves heat cooking on top of stove[4].

Before transcribing this, I didn’t know what ‘Parboiling‘ was. Cool.

(All punctuation mine.)

[1]Having eaten these cabbage rolls many years ago, I OCR[5]’d these words to ‘you need’, as the meat makes a large part of the flavour (I remember hot dog bits being especially tasty). Looking at it again, I’m pretty sure it says ‘minced’ instead. Either works, as long as the meat is in small pieces. 😀

[2]I’m assuming this means some sort of pot insert, but I’ll have to test to find out.

[3]Here, I’m assuming it should read ‘a little longer’, but I’ll have to try cooking them to find out.

[4]I think this either means it saves heat to cook the Cabbage Rolls on top of the stove instead of in the oven, or (more likely) it means that once they’re cooked, you can just keep them warm on top of the stove, which saves heat.

[5]With my eyes.