Next Image
Make the current image sticky.
Previous Image
randys.org - randys.org

Untitled

via shakeit

Howling

Download now or watch on posterous
IMG_0684.MOV (2693 KB)

via shakeit

WTF?

Posted via email from shakeit

Lightty Cake: CakePHP + Lighttpd Rewrite Rules

This little snippet will also allow you to capture your query string variables should the need arise.

url.rewrite-once = (    
    "^/(css|files|img|js)/(.*)" => "/$1/$2",
    "^/([^?]*)(?:\?(.+))?$" => "/index.php?url=$1&$2"
)

Posted via email from shakeit

New post

This post is only for people who complain that I haven’t posted since May.

Prototype: It’s Not Just a JavaScript Library

Used to be that writing front-end code (HTML, CSS, JavaScript) wasn’t terribly complex. The syntax of HTML and CSS isn’t all that difficult to get the hang of and JavaScript (back in the day) was just a tool to validate form fields and play funny tricks on poor unsuspecting visitors. These days, JavaScript has become the language for front-end development and it’s not just for printing the ‘lastModifiedDate’ of a document.

Anyone who has kept up with the advancements of JavaScript knows the Prototype library. For those who don’t know, it’s a JavaScript library that wraps a whole bunch of functionality into easy to use (and remember) “shortcuts” for doing things like getting elements on a page, manipulating said elements, and dealing with data. It’s all written in JSON notation and allows you do things like:

$('element-id').addClassName('active').show();

Instead of

var element = document.getElementById('element-id');
    element.className = 'active';
    element.style.display = 'block';

Anyway, things like Prototype, jQuery, Dojo, and YUI all provide some convenience to writing custom JavaScript applications. I haven’t dug super deep into any of the frameworks’ source (mostly because the code has been somewhat obfuscated and “compressed” to save space), but I imagine that they all have one thing in common; they make use of the prototype property to extend both existing and custom built objects/classes in JavaScript.

The prototype Property

Even if you don’t make heavy use of one of the afforementioned framework/toolkits, using the prototype property to extend existing JavaScript objects and/or classes can be quite useful. Say you want an easy way to print out a date. Rather than createing a separate function, just extend the Date object itself.

Date.prototype.months = new Array(
    {name: "January",   abbrev: "Jan", number: "01"},
    {name: "February",  abbrev: "Feb", number: "02"},
    {name: "March",     abbrev: "Mar", number: "03"},
    {name: "April",     abbrev: "Apr", number: "04"},
    {name: "May",       abbrev: "May", number: "05"},
    {name: "June",      abbrev: "Jun", number: "06"},
    {name: "July",      abbrev: "Jul", number: "07"},
    {name: "August",    abbrev: "Aug", number: "08"},
    {name: "September", abbrev: "Sep", number: "09"},
    {name: "October",   abbrev: "Oct", number: "10"},
    {name: "November",  abbrev: "Nov", number: "11"},
    {name: "December",  abbrev: "Dec", number: "12"}
);
Date.prototype.dow = new Array(
    {name: 'Sunday',    abbrev: 'Sun', number: "01"},
    {name: 'Monday',    abbrev: 'Mon', number: "02"},
    {name: 'Tuesday',   abbrev: 'Tue', number: "03"},
    {name: 'Wednesday', abbrev: 'Wed', number: "04"},
    {name: 'Thursday',  abbrev: 'Thu', number: "05"},
    {name: 'Friday',    abbrev: 'Fri', number: "06"},
    {name: 'Saturday',  abbrev: 'Sat', number: "07"}
);
Date.prototype.getShortDate = function() {
    return this.months[this.getMonth()].abbrev + ' ' + this.getDate() + ' ' + this.getFullYear();
};
Date.prototype.getLongDate = function() {
    return this.dow[this.getDay()].name + ', ' + this.months[this.getMonth()].name + ' ' + this.getDate() + ', ' + this.getFullYear();
};
Date.prototype.getValueDate = function() {
    var d = (this.getDate() < 10) ? '0'+this.getDate():this.getDate();
    return this.getFullYear() + '/' + this.months[this.getMonth()].number + '/' + d;
};

var now = new Date();
document.write(now.getLongDate());

And you get something like this . Handy.

Now, there’s a couple of issues with the above script. One, the names aren’t localized and two, there’s probalby a more efficient way to formatting a date (much like the example on this page). But, it works in all the browsers I tested (Chrome, Firefox, IE7, Safari [Mac]).

You can prototype most of the default objects in JavaScript. Say you have an application the has to validate a bunch of text fields. Prototype the String objects to add built in parsing methods for various fields.

String.prototype.isValidEmail = function() { ... }
String.prototype.isValidPhone = function() { ... }

You get the idea.

The prototype property is a handy little tool. There maybe some limitations between browsers, but overall, it should help simplify your code and prevent repetitive and reduntant methods.

FocusingScreen.com focus screen review (Canon XTi/400D)

Preface

If you haven’t seen my previous posts on the subject, I’ve had a little bit of an obsession on film cameras. It started innocently with a couple rangefinders and a TLR, then started growing. An old Rolleiflex SLR, another rangefinder, another SLR, a 90s point & shoot; I’ve become obsessed with the value of older optics and their potential for image quality.

I had heard of people using old manual focus lenses on their modern SLRs but never really gave it much thought. Mostly because I was on a film binge. The film bingeing has subsided (for now) so I bought a couple of cheap lenses (Asahi Super-Takumar 55mm ƒ2 and a Fuji EBC Fujinon 55mm ƒ1.8) and an adapter to mount them on my Canon XTi (400D for you folks across the pond, Kiss Digital X the Asian crowd). All toll, I think I might have been out $45 for the three items (all from ebay… of course). Not bad considering even the cheap-o Canon EF 50mm f/1.8 II will run you between $90 – $100 shipped and I’d argue the Super-Tak is just as sharp with better bokeh.

The Issue

The best manual lens you could get for your digital SLR is only good if you can focus properly. And, when you have a manual lens on your camera, your auto-focus system doesn’t work and most entry level DSLR have pretty crappy viewfinders (dim and small). Yes, they make adapters with focus confirmation which will trick your camera into thinking it has an AF lens on there so that your AF system will tell you when it “thinks” your shot is in focus. I haven’t used one personally, so I can’t really confirm (look, a pun) nor deny their usefulness and/or accuracy.

Personally, I prefer the old school method of a split-image / micro-prism matte focusing screen.

Choices

There are, as far as I know, three choices to choose from. The ever popular Katz Eye focusing screens, the slightly more affordable Haoda focusing screens, and focusingscreen.com. The Katz Eye and Haoda screens both have good reviews all over the web and I probably would have given one of them a chance if I were not in a penny-pinching mode. The Katz Eye starts at $105 and the Haoda at $72 plus shipping. It’s not a bad price for the quality of product, but the focusingscreen.com basic model is $45 and change plus shipping (and tax if your fortunate enough to live in a state with such a thing).

Well, there’s actually a fourth option which I have tried, but didn’t quite workout. It involves dismantling some older camera with a focusing screen, sanding it down to size and installing it. On the XTi I can say that the focus screen that comes in an old Canon T-50 will not work without some serious engineering. You can give it a shot, but, it will be much easier on your constitution to just buy one of the aforementioned products.

The Canon T-50 focus screen is much larger than that of the XTi

The Canon T-50 focus screen is much larger than that of the XTi

Sanded down to size, the T-50 focus fits, but is too thick and needs re-engineering.

Sanded down to size, the T-50 focus fits, but is too thick and needs re-engineering.

The focusingscreen.com Screen

Installing the screen isn’t really that difficult. It just takes a steady hand and some patience (neither of which I possess). I’d recommend having a professional do it purely for the fact that the focus screen is a precision part of your camera’s operation. Screw it up, and you’ll end up paying to get it fixed anyway. I’m currently half way there. The focus screen is installed, but since I live with a bunch of animals, there’s a nice hair in there that I can’t get out. Not detrimental to it’s operation, but annoying nonetheless.

Now, on to the good bits. The focusingscreen.com screen is nice. It has everything you need in a basic focus system: split-image focusing for lining up straight edges in your composition, a micro-prism circle for everything else. Once you get it dialed in and focus is accurate, the split-image / micro-prism is an enormous improvement when it comes to focusing. The focus screen I purchased also has some laser cut dots where the AF points are (with the exception of the center point since it’s occupied by the split-image) so when using an AF lens (like, say, the Canon EF 24mm f2.8), they light up just like normal. They don’t particularly line up for me, but you can certainly see which points are flashing at you. Handy! That’s an extra $45 alone on the Katz Eye.

It came very well packaged and with all the necessary tools to install it yourself. It even came with two finger condoms. How thoughtful. I ordered the focus screen on April 6th and it arrived on April 14th. Pretty fast service coming from Taiwan.

The focusing screen kit came well packaged complete with two finger condoms.

The focusing screen kit came well packaged complete with two finger condoms.

There is a downside to focus screens. The split-image gets dark around f5.6 or f8 and becomes close to impossible to focus. This plagues pretty much all focus screens no matter what brand, type, or age of camera/lens. Cameras that use lenses with ‘Auto’ mode (meaning they automatically ’stop-down’ the aperture blades when the shutter is pressed) don’t see this because the aperture is always wide open. Unfortunately, on a DSLR with an adapter, that mechanism doesn’t likely exist so you have to manually stop-down the lens when taking the picture after focusing. Not really the fault of the focus screen, but more of an issue with old manual lenses on a digital body.

Another issue (and this might not be an issue at all for some) is the fact that the company is based in Taiwan and their English is less than perfect. Support might be challenging. But, for $45 plus shipping, it’s easy to overlook this. If you’re concerned about support, both Katz Eye and Haoda are noted to have excellent service and support (or, so I’ve read).

A Test Shots

I haven’t done any precise measurements in terms of how accurate the installed screen is, but from the below picture, what was intended to be in focus, is actually in focus.

Canon XTi + FocusingScreen.com focus screen + Vivitar Series 1 70-210mm f3.5

Canon XTi + FocusingScreen.com focus screen + Vivitar Series 1 70-210mm f3.5

Canon XTi + focusingscreen.com focus screen + Vivitar Series 1 70-200mm f3.5 Macro

Canon XTi + focusingscreen.com focus screen + Vivitar Series 1 70-200mm f3.5 Macro

Update

More test shots. This time with a ruler. Not pretty, but shows the accuracy of the focus screen. I did three tests with three different lenses and two different mounts.

  1. Asahi Super-Takumar 55mm ƒ2
  2. Fuji Fujinon 55mm ƒ1.8
  3. Olympus Zuiko OM-System 50mm ƒ1.8

All three shots were taken wide open and focused as best I could. I tried to focus on the 90 of the ruler using the micro-prism. Exported from Aperture (from RAW) with Auto-Levels applied in Photoshop for contrast. Given the small size of the lettering and shallow depth of field, it was more difficult that I thought. While they appear to be a tad off, I’d still say the focus screen is accurate. I may redo the test in better lighting at some point. But, here’s the shots.

1. Super Takumar 55mm ƒ2

1. Super Takumar 55mm ƒ2

2. Fuji Fujinon 55mm ƒ1.8

2. Fuji Fujinon 55mm ƒ1.8

3. Olympus Zuiko 50mm ƒ1.8

3. Olympus Zuiko 50mm ƒ1.8

Conclusion

The focusingscreen.com focus screen is a very useful tool. Even if you never plan on using a manual focus lens, it can provide valuable feedback. Feedback your AF points will never give you. You will know what is exactly in focus. If you’ve used an old 35mm film SLR, you’ll feel right at home and most likely enjoy the familiarity. If you’ve never used one before, it’s an easy concept to grasp. I highly recommend them.

Is the focusingscreen.com screen superior to the katz Eye or Haoda version? I don’t know. Is it worth the roughly $60? Absolutely.

Holiday Beer Report: White Christmas, Old Jubilation, Jolly Pumpkin & More

So, I’ve gotten a little behind in my posts. So behind that I’m having trouble remembering what I’ve tried. Below is a list of seven I can remember at the moment. In no particular order… here you go.

White Christmas Spiced Winter Lager

Moylan’s Brewery 6% N/A

Nothing special here. I’m not a large lager fan to begin with (unless it’s PBR) and adding spices to it didn’t help. I have to admit, I had this one after a glass of Deschutes’ The Dissident which is a very difficult beer to follow.

Old Jubilation

Avery Brewing Co 8% 30

Avery is awesome. This is a good beer. Has a good malty flavor with hints of hazelnuts and slight chocolate finish. I recommend this one.

I’ll also recommend their Fifteen Anniversary Ale

Special Holiday Ale

Stone Brewing Co 9% N/A

Another interesting brew from Stone, Jolly Pumpkin and Nøgne Ø. This thing is brewed with Chestnuts, Juniper Berry, White Sage and Caraway Seed. Pretty good.

Brrr

Widmer Brothers Brewing Co 7.2% N/A

I’m not a huge fan of Hefeweizen style beers and since Widmer is pretty much known for their Hefe, I generally shy away from the brewery. But I have to say, their Brrr is a really good seasonal beer. I was pleasantly surprised by the flavor of this brew. Very recommended.

Brown Shugga

Lagunitas Brewing Company 9.9% 51.1

Lagunitas is another brewery that rarely disappoints. This “sweet release” brown ale is probably the best brown ale I’ve tasted. I know, I’ve said that before, but I really think this one is better. Enjoy!

Winter Warmer

Skyscraper Brewing 5.4% N/A

Skyscraper is a new brewery that sprung up in 2007 down here in Souther California (El Monte of all places). I tried their Winter Warmer last year at Hollingshead and liked it enough to buy a bottle this year.

Holiday Porter

Samuel Adams 5.9% N/A

Another decent beer from Sam Adams. I picked up a sampler pack of Samuel Adams holiday beers so I have a couple more to write about a little later. But this Holiday Porter is good. Worth a try. So far, I’m not disappointed of the purchase.

Wow. OK, so with the previous 18 beers and these seven, I am now at 25 holiday beers. I think I can squeeze in five more before the weekend is over to bring me to 30. Stay tuned. Since everyone likes a good list, I’ll have a top 10 list to round up the best of the best of 2008/2009 holiday season.

Holiday Beer Report: Affligem Noel

Noël

Brouwerij Affligem 9% N/A

Affligem NoelThe Belgium’s are truly maters at brewing and, in general, most of the Belgium beers I’ve tried have been really good. Affligem’s Noël, while a true Belgium in flavor, is nothing to write home about. It’s certainly no St. Bernardus Christmas Ale, but good overall. Smells of good Belgium with hints of spices and caramel and medium brown in color. Careful pouring this, I ended up with a good three inches of cream colored head in one glass (and it takes forever to dissipate). While the taste is that of a decent Belgium strong ale, it didn’t stand out for me.

Worth a try, but don’t go out of your way to hunt this one down.

Holiday Beer Report: Alesmith Yulesmith Holiday Ale

Yulesmith Holiday Ale

AleSmith Brewing Co. 9.5% N/A

AleSmith YuleSmith Holiday AleHop heads rejoice! This YuleSmith Holiday Ale is chock full of hops. It’s very different from your traditional holiday selection but a welcome change from norm. It has that murky golden color and a wonderful citrus hop smell. It also has an awesome hop kick that lingers in the back of your mouth. If your a true hop head, this is the holiday ale for you. Just pay attention when picking up a bottle; YuleSmith comes in a summer version as well. The summer version comes in a patriotic, 4th of July bottle. It’s hard to miss, but I made the mistake last year and was forced to drink both (such a shame, I know).

All content Copyright © 1999 — 2010 Randy Sesser | Happily Hosted by WebFaction
Entries (RSS) | Comments (RSS)