Thursday, September 8, 2011

On Being an Engineer


I found this little blurb in an Atlantic article. And it's so true.

E is for Engineer

"I wish children could understand how much fun I have."

I am an engineer. Most people are scientifically and mathematically illiterate. Consequently, most people cannot fathom how much pleasure and delight I derive from my work. Of course I am also lucky to have a great job with great coworkers. But the pleasure of analyzing, say, the overall efficiency of a combined heat and power facility is hard to describe.

Well, this is partially true. My wife actually gets irritated that I never mind going to work. She does not feel exactly the same about her job.

I also wish children could understand how much fun I have. Because we need more engineers in this country for sure if we hope to remain globally competitive.

Saturday, May 7, 2011

Managing Olson Time Zone Data with C#

I recently had to add some logic to our ETL that converted UTC to local times. C# makes this a straight forward task, except all we were given was Olson Time Zones (for example "America/Toronto"). Although these are natively supported in Unix, Java and the like, Windows is another story.

The following code will make it easy to convert to the local time using an Olson Time Zone format.

First off, I created a "Tz" class to hold the properties of each Olson Time Zone.



Next, using this Tz class, I create a mapping to convert the Olson format to the regular Time Zone format. Notice that I've included a daylight savings time indicator since some of these Olson Time Zones use daylight savings time, and some don't



I have more entries than this, but just wanted to give you an idea. Also, when we're done, this will be a property of our time zone list class.

I then create a TzList class and add these as members.

Next I add functions return our local time given an Olson Time Zone. This is the where all the work is done.



That's it. We can then convert our UTC time to local time using the Olson Time Zone by calling it like this.

Saturday, April 23, 2011

How much do Canadian's pay in tax?


Happy Tax Season! A lot of people these days use one of the many software options for filing taxes. This definitely makes it easier, but sometimes it's nice to know what exactly is going on with your money.

I put together this little chart to help show friends and family how much they are paying in tax. Like other places, Canada has a progressive tax system where you pay more tax is paid on the larger dollar amounts you earn.

For example, on the chart you'll notice that the first $36,145 you make will be taxed at 20.06 percent (15% + 5.06%). Every dollar you earn over that will be taxed at 22.7 percent (15% + 7.7%). (Note the provincial tax amounts here are for BC. Check this CRA page for all Provincial rates).

If this is news to you, there are a couple of things to learn from this. One is, the very high income earners in Canada pay a lot of tax (nearly 45% on their income above $127K) and if you find yourself making over $71K, the amount of tax you save from contributing to your RRSP goes up and up...

Saturday, February 12, 2011

Drunkard's Walk


I recently read The Drunkard's Walk again for the second time. It's quite amazing that a book on probability and statistics (a subject potentially drier than trying to eat 6 saltine crackers in 60 seconds...) could be so engaging and interesting. Although I wish I had read this book before my university Probability and Statistics course, there were still many things I found interesting and useful at this stage in my life.

One of the great lessons that this book highlights, is that of the nature of Luck.

In fact, in recent years psychologists have found that the ability to persist in the face of obstacles is at least as important a factor in success as talent. That's why experts often speak of the "ten-year rule," meaning that it takes at least a decade of hard work, practice, and striving to become highly successful in most endeavors. It might seem daunting to think that effort and chance, as much as innate talent, are what counts. But I find it encouraging because, while our genetic makeup is out of our control, our degree of effort is up to us. And the effects of chance, too, can be controlled to the extent that by committing ourselves to repeated attempts, we can increase our odds of success.

This just reinforces to me that the more we try, and the better prepared we are, the luckier we'll be.

Sunday, January 23, 2011

What the heck is "Yodan Dojo"?


Coming up with a blog name is not easy--especially when most options under 20 characters are gone. So I decided to branch out to my 2nd language and see what I could find in Japanese.


Since this blog will really cover the gamut of topics, I decided to use the word Yodan (余談) which means "Digression" or "Aside". Dojo (道場) means "place of teaching/learning". Put them together and you get some semblance of a blog name that happened to be available!