Remove trailing slash on App Engine

June 07 at 11:52 AM
class BaseRequestHandler(webapp.RequestHandler):
    def initialize(self, request, response):
        webapp.RequestHandler.initialize(self, request, response)
        if request.path.endswith("/") and not request.path == "/":
            redirect = request.path[:-1]
            if request.query_string:
                redirect += "?" + request.query_string
            return self.redirect(redirect, permanent=True)
View comments

DIY cheap (or free!) macro photo studio

May 25 at 01:31 PM

To celebrate memorial day I built a cheap DIY macro photo studio following instructions from Strobist.

If you have most of the stuff (and most of you probably do) it should be free. I had to buy the light source, in my case a 500 watt halogen lamp, but it only cost me $17 from Home Depot. I plan on buying another lamp so I can light the other side.

The setup:

My DIY Macro Photo Studio

The result:

My first studio shot - Canon PowerShot SD880 IS

I learned that I should definitely clean up anything I place in the box because it shows off all imperfections; look at all the dust on the SD880. And I should buy a second lamp to light up the other side as well.

View comments

Requested: My Photography Workflow/Equipment - Aperture

April 26 at 01:34 PM

Alex asked that I explain my workflow. It's pretty simple and rather short but this is how I post process my photos:

  1. Plug camera directly into computer (yes I don't own a memory reader...yet).
  2. Import into Aperture into an "archive" folder that has sub folders organized as YYYY/MM/DD. I do not let Aperture import photos into the Aperture library as I am worried about it corrupting. If the photos are just in a folder on the disk then I know they are safe (and can easily be backed up using Dropbox).
  3. I have a problem: I now delete most of my photos. If they aren't perfect I get rid of them.
  4. Process the best of the bunch. This is fast as I know the keyboard shortcuts and batch process things like white balance as much as I can. Usually I:
    • fix the exposure and levels
    • add some vignette (I love that look)
    • a touch more contrast (I like contrast)
    • and sharpen (using edge sharpen)
    If it was shot at a high ISO I add noise reduction. If the photo needs saturation and has people in it I add vibrancy. If it needs saturation and has no people in it then I add saturation but very lightly. The difference between the 2: saturation will cause issues with reds and skin tones looking unnatural but is great for greens and blues, vibrancy is like "smart" saturation in that it won't touch skin tones.
  5. Export to JPG. The photos are organized into an "export" folder that has sub folders organized as YYYY/MM/DD just like the "archive" folder. This folder is not backed up and is periodically expunged.
  6. Upload to Flickr. Tag, place on a map, etc.

That's it. Each photo takes about 30 seconds to process. Aperture makes it really easy to fix the white balance on a single photo and batch apply the same operation to others shot in the same conditions. I don't do anything fancy in Aperture like tag/rate/organize. I'd rather do the organization on the filesystem and tag on Flickr.

Oh and Alex asked about equipment also: Nikon D40, 18-55mm, 35mm 1.8, 55-200mm VR. Lately the 35mm 1.8 stays on my D40 all the time. Leave a comment if you have any questions or tips for me.

View comments