These Times They are a Changing
Wednesday, May 12th, 2010This blog will continue at a new location so if you’re using an RSS reader, update your feed monster.
http://www.preenandprune.com/cocoamondo/
Eventually these bits will be recycled.
Kode on!
This blog will continue at a new location so if you’re using an RSS reader, update your feed monster.
http://www.preenandprune.com/cocoamondo/
Eventually these bits will be recycled.
Kode on!
Recently I started using some kode (UKKQueue) that Uli Kusterer published as open source. Instead of just including the source files in my software I decided to wrap it in a framework.
One of the advantages of taking someone else’s kode and wrapping it in a framework in this manner is that it makes you stop and take the time to examine the kode. It’s great that you have kode that you didnt’ write and you haven’t succumbed to the “not invented here” phenomena, but you’re still using this kode in your application. You need to do your homework and examine what it is your plugging into.
Uli’s kode is solid and many people have already hammered at it. But sometimes it’s good to make trivial changes to get that feeling of ownership. For instance: Some people like the { on the line after the function implementation, and some people like the { an the same line as the function implementation. This is a trivial coding style difference; but if while you are reading the source kode you change it to your preferred style you will gain a sense of ownership. Or maybe this isn’t true at all and I’m trying to justify the fact that I do this when reading kode that I’m including in my project.
Here is a more concrete example of something I changed. In the file UKFileWatcher.h Uli uses a category to define the protocol UKFileWatcherDelegate. There is nothing wrong with this. In fact, it is the standard by which Objective-C libraries are written. This is the way Apple defines delegate protocols in their API.
Personally, I prefer formal protocols So I changed the kode to use a formal protocol. At the end of the day, the code is functionally equivalent, but I twiddled with the knobs while I read the kode.
So I’ve created Zathras.framework. In the future, I plan to wrap any other kode by Uli that I use into this framework.
Kode on.
I looked high and low for a switch interface similar to the Time Machine switch. The iPhone uses this style of interface all the time with the UISwitch. Since I couldn’t find an implementation, I bit the bullet, created one and added it to CocoaMondo Kit 1.1.

Please don’t abuse this control and replace all your checkboxes with switches. Use common sense. A good guildine is to use a switch for a desktop application when the state of the switch has fare reaching implications. For example: The switch disables or enables the core functionality of the application.

If switches are used sparingly then the user will hopefully pay closer attention when enabling or disabling them.
Kode on!
A year ago I released the MondoTextField. Well I’ve modified the component, made some bug fixes, and wrapped it in an Interface Builder plugin called Cocoa Mondo Kit.

It’s seems slightly silly to release an Interface Builder plugin with only one component, but including the component as a framework is much cleaner than importing a bunch of source files.
Kode on!
What’s wrong with this picture?

On the first point, I’ve inserted a read only DVD into my machine and am shown a “Files Ready to be Written to Disc” section. How is this helpful and not confusing to regular users? Why do I care that Windows really wanted to write a file to the DVD but can’t because it’s read only?
The second point is more subtle. The column headers don’t even apply to this icon mode. You can’t resize them in this view. They are there in case you decide to switch to a view mode that might need them. Again, how is this helpful and not confusing to regular users?
The screenshot is from Vista.
Kode on!