Tuesday, December 2, 2008

Coalition Government - Bah Humbug

Layton, Dion and Duceppe

They're trying to create chaos, inefficiency and uncertainty during a financial crisis!! WHY ARE THESE GUYS SMILING!!

They're smiling because they're having fun playing political games and jockeying for positions of power. They're going to blow the Canadian economy out of the water so we'll join the Americans in a total state of chaos.

Supporters of these three will gawk in horror when they try to understand why their RSP values have taken another dive.

This insanity must be stopped!!!

Thursday, September 4, 2008


Hmmm.... maybe we think too much. But then again... thinking has resulted in some great things.

I'm reading this book about "unleasing your purpose in life", or something like that. I'll probably have some thing to say about that soon.

Wednesday, July 23, 2008

Python Script to Rename and Sort Pictures by EXIF Date

Ok, today I had a set of pictures taken from a couple of different cameras and spread over a period of more than a year. Since the different cameras name the files differently the order in the directory is no longer chronological. Also since I've cropped or resized the pictures the timestamps on the files no longer represents when the picture was taken. So I wanted a way to rename the pictures so that they would be sorted by creation date.

I was already aware of the fairly useful Python module out there called EXIF.py (http://sourceforge.net/projects/exif-py/) so I downloaded the latest version and then whipped together a couple of quick scripts.

The first script was really just a test to make sure I was using the EXIF module correctly and helped me to learn a bit about it. It just dumps some of the EXIF data for each file given on the command line:


import EXIF
import sys

for filename in sys.argv[1:]:
file=open(filename, 'rb')
print "'%s': Cannot open for reading.\n" % filename

# get the tags
data = EXIF.process_file(file, details=False, debug=False)
if not data:
print '%s: No EXIF data found' % filename

date = data['Image DateTime']
model = data['Image Model']
res = data['Image XResolution']
unit = data['Image ResolutionUnit']
speed = data['EXIF ExposureTime']
fstop = data['EXIF FNumber']

assert(type(fstop.values[0] is EXIF.Ratio))
fstop = float(fstop.values[0].num) / float(fstop.values[0].den)

print "%s: %s, %s, %s %s, F%s %s sec" % (filename, date, model, res, unit, fstop, speed)


So the above script can be used just to see things like the fstop and speed for each photo. Note however that there's very little error checking and I assume the appropriate tags are all there.

So a simple modification to the above script let's me rename all the files based on the time stamp so the new list is sorted by the date and time the picture was taken:


import EXIF
import sys
import os

list = {}

for filename in sys.argv[1:]:
file=open(filename, 'rb')
print "'%s': Cannot open for reading.\n" % filename

# get the tags
data = EXIF.process_file(file, details=False, debug=False)
if not data:
print '%s: No EXIF data found' % filename

date = data['Image DateTime']

key = str(date)
if key in list.keys():
print '%s: Duplicate datestamp with %s' % (filename, list[key])
list[key] = filename


datestamps = list.keys()
for datestamp in datestamps:
suffix = os.path.splitext(list[datestamp])[1]
newName = datestamp.replace(':', '_')
newName = newName.replace(' ', '_')
newName = "pic" + newName + suffix
os.rename(list[datestamp], newName)
print list[datestamp] + ' -> ' + newName
print '%s: Could not rename' % list[datestamp]

Thursday, July 17, 2008

Roger's Cell Phone Service Sucks

We've had nothing but grief dealing with Roger's WRT our cell phones. My wife got so fed up with trying to get them to replace a faulty phone that she just canceled her account and we ate the cost of the crap Motorola phone they sold us.

We recently traveled to Europe and were told that our phone would work there, but no such luck. Upon return we called them to find out why and it turns out that because we're on a pay-as-you-go plan we're out of luck. No service overseas.

They seem to just want to screw you and provide bad service.

Avoid them if you can.

Thursday, June 26, 2008

Snowbear Trailer Review: Poor Value

Two years ago we bought one of the Snowbear trailers sold at Home Depot. I must say that it's been a rather big disappointment in terms of quality and reliability. On the second or third trip one of the cotter bolts on the weird mounting bar for the rear gate came off and the gate actually popped right off the back.

A few months ago I noticed the lights weren't working properly. Upon opening them up I found that I couldn't even get the bulbs out of the cheap mount. It turns out the contact plate at the back of the bulb is this crappy flexed strip of copper that was no longer holding the bulb contact tight. To top it off the wires connecting to the contact were just fitted in with a pressure contact, no solder, no connecting screw. When the contact plate flexed the wrong way the wires just fall right out. The cheapest most poorly made piece of crap that I've seen in a long time. I've recently replaced both rear lights completely. The existing ones were beyond hope of repair.

Other issues with the trailer: bolts with no lock nuts or washers just falling off, enamel flaking off with rust despite regular spraying with oil for rust proofing. Needless to say, my next trailer will not be a Snowbear.

Oh, did I mention the license plate mount - it didn't last six months.

If you have a Snowbear trailer, check and tighten bolts regularly and check your lights before every trip. Keep some spare bolts with lock nuts around. Put some wire on your license plate so you don't lose it when the plastic mount breaks.


Thursday, June 19, 2008

Why aren't we all millionaires?

I was reminiscing today about the old days at the graphics lab at U of Waterloo. It was the early 80's and the pioneer days of computer graphics. Graphics hardware was quite primitive and C++ hadn't even been thought of yet. When you look back you think, my god, why couldn't we all have started up some graphics company (or several), and all be sitting on a beach somewhere now.

I guess it's the old adage that hindsight is 20-20? When you're in the midst of your studies who's thinking about how to leverage what you learn. We were geeks not MBA's.

Is there any way for students to know whether the technology they're learning today will dramatically grow and change the world of tomorrow? Or do all technologies being studied today become lucrative businesses in the future?

It makes you wonder.

Thursday, June 12, 2008

Beware Direct Energy Protection Plans - they cheat

We recently discovered that Direct Energy marks up their parts by 400% over retail cost. They also charge a "diagnostic fee" on top of their labour charges. Since their protection plan only covers a maximum of $1000 per year this price gouging makes the plan close to worthless. This type of price markup done under the covers of an insurance plan is illegal but there doesn't seem to be any way to stop them. Complaints - they could care less.

My advice: Take the money you would pay for a protection plan and put it in a savings account. Find a local company that will service your heating equipment for a fair price and pay them on an as-needed basis and you'll probably do just fine. If your furnace is old consider getting a new one which will have a 5 year protection plan built-in and will likely save you energy by being more efficient.

For more complaints about them try this: http://www.ellenroseman.com/?p=120

Or this: http://www.ontariotenants.ca/electricity/articles/2004/ch304e16.phtml

Wednesday, June 11, 2008

New Nikon Lens

Well, I bit the bullet and decided to go ahead and buy the Nikon 18-200mm VR lens. Now I've got a wide range lens that can stay on my camera almost always. Since I have the (less expensive) 70-300 VR, I was considering just buying a second body for the long lens. But having the 18-200 will mean traveling lighter and more convenience. When my D50 gets long in the tooth I'll pick up a second body and start to expand my equipment portfolio.

A few test pics are now online: http://picasaweb.google.com/paul.h.breslin/NewNikon18200VRLens


Tuesday, June 10, 2008

Latin terms: e.g. and i.e.

I always (well, maybe not "always") knew that e.g. and i.e. were abbreviations of Latin terms but I could never remember exactly what they were so here's another reminder...

The Latin abbreviation i.e., stands for id est, and means "that is", "that is to say", or "in other words". The letters e.g. stand for the Latin phrase exempli gratia, which means "for example".

More Latin abbreviations here: http://en.wikipedia.org/wiki/List_of_Latin_abbreviations

Solar Power

I discovered a great site with information about using solar power in Ontario: http://www.gosolarontario.ca/. With energy prices soaring solar power equipment and technology will be increasingly in demand. The FAQ on this site covers a lot of ground and answers a wide variety of questions.

This would be a great business area to get started in and I wish I had more time available to learn about it.

Let's all start thinking about generating our own electricity and eventually we can drive the cost of it down since the supply will be abundant some day.

Friday, June 6, 2008

Astronomy Picture of the Day

I've become a fan of the Astronomy Picture of the Day. You get to see some pretty cool stuff if you watch it regularly.

Here's a hot picture of our Sun on a day when it seems to be mad at someone:


Tuesday, June 3, 2008

Internet Explorer Bug

I had the pleasure today of beating my head against the wall trying to find a workaround for a known bug in IE6. The problem shows up when you try to using a floating element via the commonly used CSS float: right command, for example. Apparently IE6 will often expand the float element to 100% width before placing it, which sort of defeats the purpose of asking for it to float.

I couldn't find a work-around for my case that still worked in Firefox and IE7.

Well, hopefully Firefox will continue to gain popularity and eventually IE will die a slow death.

I've tried IE7 and don't really like the interface changes at all. Long live Firefox.

Monday, June 2, 2008


Played around a bit with Panoramio a bit: My pictures.

The biggest problem I have with this site is remembering how to spell the darn name.

Also, when looking up location names, it didn't seem to know about the small country I live in called Canada. Maybe they've fixed that. It's also tagging some of my pics as being in a fictitious location named "Hindon" Ontario.

Anyway, at some point you might see some of my pictures showing up on Google maps.


Great Music

Was listening to some great music on the weekend. If you like guitar music here are some recommendations:
  • Vicente Amigo - Flamenco extraordenaire.
  • Sahnas - Enjoy some modern classics in a new way.
  • Strunz & Farah - Classical/Flamenco/Jazz fusion.
  • Oscar Herrero - Great classic flamenco.
  • Jesse Cook - New Flamenco with arabic/jazz seasoning.

Saturday, May 31, 2008


It's pissin' down rain, along with thunder and lightning this morning. Got to pack up my stuff and head to the cottage. Ha, figures today we're supposed to do some construction work outside. Ah well, maybe it won't be raining when I get there.

This blog interface is pretty good. Wish the software was available to use on other websites. Maybe it is for all I know.


Friday, May 30, 2008

First Blog Entry

Don't have time to put much here right now.

Some things we can talk about:
- Photography
- Gravity
- Software Technology
- Software Architecture
- Off the grid power generation
- Cottage water systems
- Web and software peeves
- Learning to play classical and flamenco guitar
- More I'm sure