Corbin's Treehouse - Corbin Dunn, Santa Cruz, CA
Plug Bug

Archive for August, 2008

natural vista

Posted from:,-122.0307

Greener AAPLs

I’m quite happy that my work promotes green living.

Cocoa programmers: avoid writing to the user defaults when you don’t need to

[Edit: ecto ate this post, so I’m typing it in again!] I discovered that a lot of applications will unnecessarily write to NSUserDefaults. This causes your app to hit the disk when it shouldn’t, and is a slight performance penalty. AppKit is also susceptible to this problem; if you hit cmd-O to bring up the open panel in any application, you will see it writing things to the user defaults, when it probably doesn’t need to do so. I’m working on fixing that, and you should to! So, how do you do it? It is easy — just add a... [read more]

Post muni pizza

Hmmm pizza! We had a great time riding mr Toads. 3hrs and 15 min– quite fast! Chuck and kevin finished an x large pizza. Louise and I ate only half.

Chuck with 4 dinners

Chuck had a snack on the drive up.

Getting rid of the undo warning in Xcode after saving

One of the most annoying dialogs in Xcode is the undo warning dialog you get when attempting to undo after a save. I do this all the time, and I hate the warning. Luckily, there is a user default to turn it off: defaults write XCShowUndoPastSaveWarning NO

Tips for getting into unicycling and mountain unicycling

Do you want to just learn to unicycle, or do you want to eventually mountain unicycle (muni)? If your goal is simply to learn to unicycle, your best bet is to get a cheap starter unicycle. These can cost $40-$160, depending on how you get it and from where. If you want a new one, the easiest way is to buy one from . A good starter uni could be the Torker Unistar CX 20-inch for $86, or the slightly stronger Torker Unistar LX 20-inch. Torker also has 24″ models that you can easily find on — they... [read more]

Northstar muni this weekend!

We are going to go muni riding in northstar this weekend! The place has lifts so we can just ride downhill. Here’s the car with my first ever attempt of loading unicycles on the roof. Edit: I can spell…but writing some posts on the iPhone sometimes doesn’t work well…

Wake up and smell the cocoa

Your most important breakpoint in Cocoa

…..drumroll please…and it is…is: objc_exception_throw. You should always have this breakpoint setup in any Cocoa or Cocoa Touch app that you are building. How do you do it? In Xcode, Run -> Show -> Breakpoints and double click on a new breakpoint. Type it in, ie: Exceptions in cocoa are, well, exceptional. If your app is throwing them, then you should fix them.

Project Huchinson is alive again!

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: 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. Then there is the matter of the ugly... [read more]

Barack Obama on twitter

What’s even cooler is that he’s following me now: —– I’m sure it is an auto-added thing, but still, cool :) He’s got my vote!

Typical ride to eork

The typical ride to work with my 20″ uni:

WordPress for iphone

… Woot! Simple blogging from my iphone 3g. How about this lamp I saw last week? Louise said NO.

Xcode code completion and your code

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... [read more]

Louise has a music concert tonight – Saragota – Divide Light

New blog layout

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... [read more]

Unicycle paint jobs (2)

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-2017 Corbin Dunn

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

Subscribe to RSS feeds for entries and comments.

35 queries. 0.510 seconds.