Motorcycles and Babies

June 10, 2006 at 12:17 PM | categories: Photography | View Comments

Last weekend I got to spend a lot of time with my camera. On Saturday Marc and a bunch of other motorcycle enthusiasts headed down to Cayuga to ride the track at Toronto Motorsports Park. I tagged along to take some pictures. The one to the right shows Marc's new cobbled together bike. It has been dubbed MOB, which may stand for Marc's Own Bike, or Made of Bits. No one could give me a definative answer on what the name means. I had some fun taking pictures and got to try out a few techniques. For the picture on the right I kneeled down at the side of the track, set the shutter to a slow speed and panned the camera to to keep the rider and the bike stationary while the background blurs in a fast action motion kind of way. I think my execution of the technique was generally ok, but the grey day and very green background left something to be desired from the result. I do like how the pavement makes it look like I took the picture riding beside the subject. I also took a bunch of pictures of bikes leaning into the corners of the turns. Ultimately the pictures are probably most intersting to people who know Marc, or who were participants in the track day themselves, but I still had a lot of fun taking them and learned a lot in the process.

On Sunday Kate and I went to Sarah and Will's. We try and see them as much as possible and Kate often berates me for not taking my camera so that I can take pictures of Xavier. I still sometimes feel uncomfortable about bringing my camera with me when I go places. This is mostly because I am concerned that wherever I am going with the camera people will feel uncomfortable about it, or that taking pictures will become the focus of the event. I am much more interested in candid pictures, so I of course don't want picture taking to be the focus. I want everyone to go about their normal business while I photograph it. Sunday however turned into quite the photo shoot. When I showed up I imediately started taking pictures of Xavier. He was kinda cranky and it was a struggle to get a smile out of him. After a while I gave up and put the camera away. That is when the food came out. The camera came out again shortly after. I think some of the best pictures from that day are of the feeding. After the little guy (maybe little is a stretch) finished eating and I had put my camera away once again, it was changing time (Note that the original gallery is not there anymore). Again Xavier started being all cute and I had to take my camera out. The result of the last session is on the right. The thing I like most about the pictures over all, is that they show a great range of emotion from Xavier. I think they capture his expresiveness. Of course I can't have a photographic weekend without learning something. On Saturday I learned that I can have fun taking pictures even if I am less than satisfied with the result. On Sunday I learned two things: don't put the camera away and give your subject time to relax. If you keep your camera with you, turn it off, put the lens cap on, but don't put it back in your bag you won't have far to go when that great shot comes along and you won't have to regret missing it. A relaxed subject is not worried about what you are doing with the camera and will provide you with the oportunity for the great candid shot.

Read and Post Comments

Chrysanthemums

March 12, 2006 at 11:05 AM | categories: Photography | View Comments

Kate loves plants. This means we tend to have a fair number of them around which means that I end up taking pictures of them. I buy her flowers every now and then and have taken to picking ones that I think will photograph well.

These mums are from Valentines day. They are potted so they have lasted a while. I took this picture last weekend using the sunlight streaming through our porch door. This weekend it looks like the plant isn't going to last much longer.

Read and Post Comments

Making Windows Usable

March 11, 2006 at 01:40 PM | categories: Programming | View Comments

I previously talked about build environments in Windows and promised to do some more testing of the reliability of certain tools. I turns out that the only set of tools which actually works as expected are the ones provided by Cygwin. I could not get the AT&T UWIN tools to install and they are just as heavy weight as Cygwin, which at least provides BASH. I thought the GNUWin32 tools had promise, but unfortunately they have problems with quoting, and don't provide make. I have also determined that MSys has similar quoting problems and a very outdated make.

There are a handful of other options, but Cygwin just seems to be the best. The real downside to Cygwin is that its setup tool that has a UI more suited to torturing its users than letting them install packages. Luckily someone realized that Debian got the model mostly right and created an apt like tool for Cygwin.

The site I linked to above suggests installing rxvt. The command they give to replace the Cygwin Bash shell link needs some help try adding -e /bin/bash --login -i to the end of it.

The comments over here also provide some potential terminal emulator and shell alternatives for Windows.

Read and Post Comments

GNU Make, win32 and sed

January 26, 2006 at 09:31 PM | categories: Programming | View Comments

Recently I have been playing a bit with makefiles on win32 and Unix. I want to be able to accommodate a couple of build environments without using automake, configure and friends. I am also following Peter Miller's suggestions from Recursive Make Considered Harmful.

The first step to doing this is removing reliance on external tools. There are a couple of things you can rely on, but not very many; the least of which is shell syntax. Very helpful is the <a style="font-family: times new roman;" href="http://gmsl.sourceforge.net/">GNU Make Standard Library</a> (GMSL). While I have only used a couple functions so far, it hints that there is much that can be done right in the makefile that many people rely on external tools for. The GMSL for instance provides a tr(translate) command and associative arrays.

Some of the things I am currently finding most useful are the gmake built in functions 'define', 'call' and 'eval'. These three constructs allow for some very interesting techniques (avoid using spaces between arguments or you will get a cryptic missing separator error). For those of you who are looking for ways to deal with some standard win32 compatibility things here are a couple of snippets:

ifeq ($(notdir $(SHELL)),cmd.exe)
#make didn't find a bourn shell.
#We probably don't have rm, cp or a proper mkdir either
CP=copy $(subst /,\,$(1))
RM=for %f in ( $(1) ) do if exist %f del %f
MKDIR=mkdir $(subst /,\,$(1))
else
#make found some variety of bourn shell,
#assume that we have rm, cp and a sane mkdir
CP=cp $(1)
RM=rm -f $(1)
MKDIR=mkdir -p $(1)
endif

In order to use the piece above you need to get out of the habit of doing:

clean:
    $(RM) file1 file2 file3
And use the following instead:
#!make
clean:
    $(call RM, file1 file2 file3)

This probably will require some retraining to be consistent about it, but ultimately will make your makefiles more easily cross platform.

My unfortunately discovery is that not all gmake versions are the same. I know of 3 separate sources of gmake for win32: MinGW, MSys and Cygwin. The make from MSys is the least useful; it is an old version (3.79.x) and does not seem to handle define properly. The make from Cygwin works beautifully, except that when directories change, it uses its /cygdrive/c/path notation, which is more than a little annoying if you are trying to catch directory changes in another tool like VIm or Emacs. The make from MinGW may be slightly more useful in that define works, but I was having trouble with the test suite. Thinking about it now, it is possible that I may have messed things up with pathing. I will have to check that and report back.

While I am talking about makefiles and compatibility on win32 I might as well also talk about my discoveries about sed. The goal of my work was to require only gmake, a compiler and sed. As it turns out not all versions of sed are created equal, much like the problems with make described above. Apparently the sed that ships with MSys is doing some strange things with backslash escaping. The following should work identically using either Bourne shell or cmd.exe:

target:
   sed -e 's/ *\\ *$$//' < file.in > file.out

This works with the sed from http://gnuwin32.sf.net/ but not with the GNU sed that ships with MSys. Strangely the following works with the MSys sed:

target:
    sed -e 's/ *\\\\ *$$//' < file.in > file.out

Maybe I should just cut my losses and add a * since given the data, I know I will never have more than one backslash:

target:
    sed -e 's/ *\\\\* *$$//' < file.in > file.out

That should make work with either sed, but it is not very helpful for the general case.

Update: I just looked again at http://unxutils.sourceforge.net/, who's make I previously discounted because the version listed is old (3.78.1), and noticed that the news section says they have updated to 3.80. I will try the GNU make and sed from this package and see what I get.

Update 2: It appears that just MSys is broken. Both the make from MinGW and the make from UnxUtils both pass the gmsl-test once I fixed my path problem. I still noticed some thing funny about those two make programs, Cygwin's make continues to work flawlessly.

The last sed command, above, does not work, and the sed provided by MSys broke several sed scripts that I was using. I don't know if taking the scripts from a file would work better since there would be no escaping issues. At this point I recommend staying away from MSys.

Read and Post Comments

Introduction

January 21, 2006 at 10:08 AM | categories: General | View Comments

I am Chris Lambacher. Welcome to my blog.

I am a programmer living and working in Burlington, Ontario, Canada, which is between Toronto and Hamilton. I mostly do embedded C and C++ programming, but also get to work with Python.

I interested in photography. I got a Canon EOS Digital Rebel (300D) almost a year ago and have improved a lot since then. You can check out my best pictures on flickr.

I am recently married to Kate, our 5 month anniversary was yesterday. I have known Kate since my second year of university. We didn't get together until my second year of grad school, 6 years later. We were really good friends before that. Many of the people were surprised by our getting married and many were not. Wedding photos are on my other photo page.

This blog will likely be mostly technical, a little bit photographic and a little bit personal. I hope whoever reads this finds some kind of amusement.

Read and Post Comments