Wednesday, December 19, 2012

Shell Science Lab Challenge Regional Finalist

Just when I thought I was not in the running, today just before noon, I got an e-mail telling me that I was a regional finalist for the Shell Science Lab Challenge.  I will have to make a short video about the science facilities at my school and submit it for the next round.

The joy of this happy news was tempered by last Friday's tragedy.  I saw this article posted in the staff room and those heroes epitomise Bunyan's famous quote:

You have never really lived until you have done something for someone who can never repay you.

God bless them and their families.

Tuesday, December 18, 2012

God keep our land ...

Today, I found a little booklet in the supermailbox:


It was a King James version Gospel of John and Book of Romans from Bearing Precious Seeds Canada.  The Bible Society isn't allowed to distribute New Testaments and Psalms at citizenship ceremonies anymore and I don't think the Gideons give out Bibles to grade 5 students anymore.  So, it was kind of refreshing to see this new effort to plant God's seed.  Interestingly, I was feeling kind of empty today.  Perhaps, it was because of some minor disappointments (don't think my application for the Shell Science Challenge is going anywhere and I'm waiting to see if I'll get a paper published in the Science Teacher).  I was also looking for my Delphi Informant CD.  I had tried to find it last week when I was working on the RSS feed submitter.  Well, I found it today!  I was also reading the first chapter of Joel Osteen's Christmas book.  Well, when one door closes, there is always another that will open!

Friday, December 14, 2012

Dinu Lipatti and Clara Haskil

December is the month when both of these Romanian born pianists died.  Lipatti succumbed to leukemia on 1950 December 2 at the age of 33.  Haskil died from a fall at the Brussels train station on 1960 December 7 just shy of her 66th birthday.  They are two of the supreme pianists from the 20th century.

Argh! MS Word special characters and RSS

This is a possible solution, but it's in Java.  Did a Google search:

how to replace apostrophe from word to plain text

Should also set the character encoding to UTF-8.  Have to add this to my Delphi program and see if it will fix some problems!

These MS 'smart quotes' are a real pain.  I simply looked for any character out of the certain ASCII range and replaced it with a space, but this is amateurish.
http://www.garfieldtech.com/blog/stupid-quotes
http://www.dwheeler.com/essays/quotes-in-html.html
http://www.joelonsoftware.com/articles/Unicode.html

Finally found a quick fix!


The other issue was sizing the image properly.  The programming logic was correct, but the program wasn't always getting the right dimensions from the internal TWebrowser component I had in my program.  It always  seemed to lag behind.  I finally figured out that you had to wait for the image to load completely before proceeding with the image size calculations!  That took me several hours until it dawned on me what the problem was!


This uses the pause routine found here


Monday, December 10, 2012

Xibo Digital Signage

Xibo is a free, open source computer program for digital signage.  Here is an example of it in action:


There is an RSS feed on the left for the announcements, the top right corner is for pictures and video and the bottom right corner plays RSS feeds from news sites.  This was running on Windows XP Pro on a Pentium Dual Core computer with 2 gig of memory.  The clock on the top left is from Greenwich Mean Time and set to the local time zone. A bit sluggish at times.

Saturday, December 8, 2012

Delphi is my favorite tool for Windows Programming

I've always been drawn to Pascal and preferred it's syntax to the terseness of C.  I learned the basics of Turbo Pascal in an afternoon (after experience with Turing, BASIC and FORTRAN).  For Windows programming, I've always found Delphi to be the best tool available - especially if you aren't a C++ expert.  Delphi combines the power of C++ with the ease of Visual Basic.  I only stopped using Delphi for grade 12 computer science because Delphi 5 (1999) wouldn't run on Vista or Windows 7 and I switched to Java because it was free.  Delphi would have cost the school $100/license.  I never really got into Java (it's a huge language) and now I'll be switching to Python which has a syntax that I prefer.  Some of the programs I use a lot are written in Delphi:  WinGrab and Integrade Pro.

Before the social media craze, I thought RSS feeds would be a great way to publicise school events.  I wrote a Delphi 7 program to update RSS feeds 5 years ago.  It took me about 45 minutes to figure out how to call the Windows API to do FTP tasks with Delphi.  Unfortunately, this never caught on with the school.

However, when I setup Xibo digital signage at school last year, it required an RSS feed as the source of the announcements.  Consequently, I modified the program to suit the needs of this new task.


Recently, I learned how to add images to RSS feeds.  I've been doing this manually and had to figure out how to scale the images properly to maintain the proper aspect ratio.  Today, I figured out how to add this feature to my Delphi program.  I also tried to clean it up a bit so it could be more easily adapted for use at other schools.  I was amazed that you could import an ActiveX control which lets you access the image properties from the browser.  Once I had the height and width of the image, it was easy to scale the image for the RSS feed.  One page I Googled had a typo, but I figured it out by looking at the Delphi generated Pascal file (650,000 lines of code!) for the ActiveX control.  A different page didn't have the typo (I found this 2nd).

I'm glad Delphi is still around.  It's kind of expensive, but educators can have a copy for $100 (RAD Studio Pro even comes with RAD PHP, and C++). Here's a nice site called Delphi for Fun.  I think it's fun too!  It allows a non-expert like me to solve practical programming problems with relative ease!  Delphi Basics is a great reference as one is working with Delphi.

Tuesday, December 4, 2012

Great Pianists Speak for Themselves

I was browsing the books in the basement when I saw a gem I bought at U of T years ago for $3.99:  Great Pianists Speak for Themselves Volume 2 by Elyse Mach.
I think I had borrowed volume 1 from the library when I lived in Calgary (and worked at the downtown branch for minimum wage).  I found it very interesting reading.  A few of my favorites are missing though:  Maurizio Pollini and Krystian Zimerman stand out for me.  However, in this volume, Murray Perahia, Zoltán Kocsis and Leon Fleisher were featured.  I happened to find a the Dover reprint of both volumes called Great Contemporary Pianists Speak for Themselve on Amazon.ca and it arrived last Friday along with the BBC Rigoletto DVD. They lowered the price on me by about $4!  DARN.  I hope my kids read it sometime.  I think I like the pianists in volume 2 more than volume 1 (although Claudio Arrau and Alfred Brendel are artists I like too).  It's interesting to read Kocsis discovered as a teenager he had no piano technique!  I've been listening a lot to his DVD of Beethoven Opus 111 while exercising and just for pure enjoyment.  I'm now listening to another gem I dug out of the basement--Angela Hewitt's CBC disk of Bach piano concertos with the CBC Vancouver Orchestra recorded 25 years ago!

Argh!  Windows 8 Pro is giving problems on my AMD 6 core.  For some reason, I was trying to run Windows Media Player - it wouldn't start.  I checked the shortcut and saw it pointed to the 64-bit version.  I tried the 32-bit version and it ran.  Windows 8 may boot fast, but it still takes a while for everything to startup.  It is faster than Windows 7 though (but I've not had the setup for more than a year yet, so who knows?

Monday, December 3, 2012

Rigoletto

My DVD of Rigoletto arrived on St Andrew's Day (November 30).  I had seen this rather provocative David McVicar Royal Opera House Covent Garden production on PBS a few years ago.  I watched the first act and part of the second act on Saturday morning.  My older son was interested in this kind of art form and my younger son kept on saying "I want music singing" (Beethoven's 9th).  It occurred to me that opera must be really expensive to put together and they are usually over 2 hours long!  Quite an experience in live music.  I have a DVD of Bizet's Carmen as well from the DG 111 box.  I think the kids will like that one too!

Saskatoon Housing Bubble

I read a great article this past summer in Canadian Moneysaver while I was at the library.  The article was about the impending real estate bubble burst in Canada.  The second of four in the series is found here (well worth keeping it).  I decided to analyse Saskatoon data today.  It was harder than I thought to find data.  I don't know where this blog gets its data.  Using the following sources:
  • SRAR Average house prices from 2001-2011
  • CHMC Saskatoon rental prices 1992-2011
 I plotted this graph for 2001-2011 (download the spreadsheet here):



The divergence between rental costs and home prices is not sustainable and indicates a real estate bubble.  Best to wait for the prices to burst before getting into this market!

I was trying to get more data, but couldn't find it.  Remax had a RE/MAX 25 Years of Real Estate Report published in January 2007, but it is no longer available!  Too bad.