Corbin's Treehouse - Corbin Dunn, Santa Cruz, CA
Plug Bug
Treehouse
Photography
Videos
Shop
Unicycling
About

Archive for August, 2008

Project Huchinson is alive again!

Tuesday, August 19th, 2008

I’m back to working on my eternal house project. I finished the baseboards for the downstairs, so now it is time to tackle the upstairs. The upstairs is really rough.

First off, there are these weird vents that don’t do anything. It was also surrounded in an ugly wood paneling box, which I already removed:

IMG_0689.jpg

The back bedroom has only one half of a triangle window. Plus, it doesn’t open. So, I ordered a matching window, and two smaller horizontal ones fore below it that can open and let in some air.

IMG_0692.jpg

Then there is the matter of the ugly drywall on the left, which consumes up valuable space. My idea is to build cupboards the better utilize the space:

IMG_0693.jpg

Louise had the idea to get rid of this closet. It is super-ugly!

IMG_0694.jpg

The room at the top of the stairs has horrible slat windows. I ordered two new ones to replace them. Also..more ugly wood paneling!

IMG_0696.jpg

There are two frosted windows that you can barley see in this picture below. The one on the right is cracked. The one on the left wasn’t until I accidentally cracked it. I’ll have to get two more windows to replace them.

IMG_0698.jpg

Louise getting rid of some of the drywall. I had to convince her to come upstairs and whack the wall a few times with the hammer. It’s fun, and how often do you get to do something like that?

IMG_0765.jpg

IMG_0777.jpg

Barack Obama on twitter

Tuesday, August 19th, 2008

What’s even cooler is that he’s following me now:

Picture 2.png

—–

I’m sure it is an auto-added thing, but still, cool :)

He’s got my vote!

Typical ride to eork

Tuesday, August 19th, 2008

The typical ride to work with my 20″ uni:

WordPress for iphone

Tuesday, August 19th, 2008

… Woot! Simple blogging from my iphone 3g.

How about this lamp I saw last week? Louise said NO.

Xcode code completion and your code

Thursday, August 14th, 2008

How can you become a faster Cocoa programmer? One way is to adequately name your variables, enums and classes.

Let’s start with enums and take an example from something new to NSTableView in Leopard. This is copied from NSTableView.h with the comments stripped out for clarity.

enum {

NSTableViewSelectionHighlightStyleRegular = 0,

NSTableViewSelectionHighlightStyleSourceList = 1,

};

typedef NSInteger NSTableViewSelectionHighlightStyle;

- (NSTableViewSelectionHighlightStyle)selectionHighlightStyle;

- (void)setSelectionHighlightStyle:(NSTableViewSelectionHighlightStyle)selectionHighlightStyle;

There are several things to notice here, some of which are important to you. The most important thing (in my opinion) is the common prefix. Notice that the enum values fully contain the enum type name. Why? The answer is code completion, which you should be using. It is much easier to remember one key portion of the name than to remember all values. In this case, the key thing to remember is “selection”.
As a programmer working with NSTableView you know you want to change the selection highlight style, but you don’t remember the option for the specific style you want. You know the Cocoa convention is setFoo, so you type:

[tableView set

And hit escape (or whatever key combo invokes code completion for you. For me, I remapped the key to ctrl-space, since I was used to Delphi and Visual Studio. But, I also use escape).
You see this result:

TableViewSet_CodeComplete.png

and start typing “sel” to see the result you want:

TableViewSetSelResult.png
Which inserts this template:

TableViewSetTemplate.png
Now, I’m surprised, but most people don’t realize that they can type ctrl-/ (or maybe alt-/ depending on your key bindings) to select the placeholder and type over it. Memorize that keystroke, and use it.
Now, the common prefix name comes in really handy with code completion — just start typing in the type that the placeholder tells you and you’ll see what options you have:

TableViewSetOptions.png
In essence, you only have to remember “sel”, and from there you can derive exactly what option you want using code completion. Less memorization, and faster programming.
Unfortunately, a lot of Cocoa came along before code completion, and doesn’t follow this convention. But if you look at a new UI framework (ala: UIKit for the iPhone), you’ll find this pattern throughout it. It makes programming very fast with fewer trips to the header to find out what you need.

The bottom line: use a common prefix, wherever you have a list of options. Also note that the NSTableViewSelectionHighlightStyle has the prefix NSTableView, since it only applies to NSTableView. But, the property name is “selectionHighlightStyle”, since it doesn’t make sense to replicate the type name there.

Louise has a music concert tonight – Saragota – Divide Light

Wednesday, August 13th, 2008

http://dividelight.com/

dlite_landing.jpg

New blog layout

Friday, August 8th, 2008

I updated my blog layout. I realize it doesn’t work that well in IE. In versions less than 7, it doesn’t support transparent png images, so the backgrounds probably look bad. In IE 7 it looks better, but there are still some problems. In particular, the top of the titles is cut off by the top border. The worst part is that there are no shadows on some of the titles; Safari supports cool text shadows. Originally, I had white text with shadows to make them stand out, but I had to move to darker text for compatibility with IE and FireFox. At least you can download and use Safari on Windows — the website looks great there!

I’m quite happy with the new theme. It looks cleaner, and lays out better than my previous design (which I had borrowed from Bill at Apple).

My blog layout is a WordPress theme. I can change the look of the site with a single click in my blog admin page, which is quite nice. If you want a copy of the theme files, let me know. I’ll gladly send it to you, and it should work with little to no modifications. I borrowed the “round rectangle background” CSS from Transparent custom corners and borders | 456 Berea Street. There is also some FancyZoom javascript from Cabel Sasser / Panic Inc via fancyzoom.com.

Blog layout example picture

Unicycle paint jobs (2)

Monday, August 4th, 2008

I picked up some sweet metallic red auto paint, and painted our unicycles. Here’s some final shots, and eventually I may write up a post on how it was done.

Corbin’s KH 24 frame and wheel (to be built into a Schlumpf hub, when i get it back):

Close up of the cool rim:

My KH 20:

Louise’s rim:



(c) 2008-2012 Corbin Dunn

Corbin's Treehouse is powered by WordPress. Made on a Mac.

Subscribe to RSS feeds for entries and comments.

14 queries. 0.765 seconds.


Fatal error: Call to undefined function akismet_counter() in /home/corbin_dunn/corbinstreehouse.com/blog/wp-content/themes/corbins-treehouse-white/footer.php on line 38