Shit Boots

description

Shit Boots

Flow Review

description

Flow Review

Latitude Interview

description

Latitude Interview

MacWorld 2008

description

Macword 2008

iPhone Review

description

State of the iPhone

iLife 08 Review

Item Description

iLife 08 Review

Coda Review

Item 3 Description

Coda Review

CSSEdit Review

Item 1 Description

CSSEdit Review

Healthy Mac

Item 1 Description

Healthy Mac

Jun 19

A little overshadowed in the developer community by WWDC and all the inevitable ramblings that take place after, the famous Sparkle framework for automatically updating applications has seen an impressive update.

Still in beta, v1.5 introduces several new features including:

  • Support for .pkg files
  • Support for receiving demographic information from users
  • Can update bundles, not restricted to just .app applications
  • Minimum system version checking for users
  • Garbage Collection
  • Better version comparison algorithm
  • DSA instead of less secure MD5
  • Won’t update if app is running from a disk image

Andy has also taken the time to dramatically simplify the Sparkle site itself, and move the project over to Launchpad for easier development. Be sure to check out this new version to incorporate into your apps to gain the new features.

Sparkle Page

Sparkle on LaunchPad


Jun 17

For one, the SproutCore website is now back online after being Dugg a couple days ago. And not only that, there is a very good introduction to models, records (including saving and retrieving) and a brief introduction to the local database, called the Store. If you’re interested in developing more full-featured, Desktop like apps for the web, you need to check out the SproutCore framework.

Models Tutorial

SproutCore Site

My Introduction to SproutCore

Objective-J, Cappuccino, and 280Slides.com

My Introduction to Objective-J and Cappuccino


Mar 07

I spent most of last evening and some of this morning sifting through the various documentation and classes for the UIKit framework distributed with the iPhone/Cocoa Touch SDK. So, for the very quick, but cool observation.

You can easily create a UITextField to handle text input. The interesting part comes into play because there is a keyboard associated with the UITextField, obviously for providing input. That keyboard can be specified what action to do when the return button is pressed, giving a way to process the text. The cool part is, it’s extremely easy for developers to use the many different types of keyboards present on the iPhone. For example, there is a numeric keyboard, the default keyboard, one for entering URLs, one for entering email addresses, and so on. Below is a quick code block, adapted from the “Hello World” example.

aTextField.borderStyle = UITextFieldBorderStyleRounded;
aTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
aTextField.placeholder = @”Your name”;
aTextField.keyboardType = UIKeyboardTypeSingleEmailAddressing;

Some other examples of keyboard types:

  • UIKeyboardTypeDefault
  • UIKeyboardTypeNamePhonePad
  • UIKeyboardTypeNumberPad
  • UIKeyboardTypeNumbersAndPunctuation
  • UIKeyboardTypePhonePad
  • UIKeyboardTypeURL

Mar 05

So I have had a couple emails and some comments on this post, about finding and using the Leopard Intro video. I spent some time googling for that this evening and didn’t find anything on the subject (did find where the Panther and Tiger videos were stored though), so I thought I’d write a separate post with the location of the Leopard video.

You can download a quick Automator Application that will copy the two files and place them on your Desktop, or use the steps below.

or, in the Finder, go to:

/System/Library/CoreServices/

One of the many items in that folder is the “Setup Assistant” application. Ctrl-click on that and choose “Show Package Contents”.

Now find:Contents/Resources/TransistionSection.bundle and ctrl-click on the bundle, choosing “Show Package Contents”.

“Contents/Resources/intro-sound.mp3″ is the music that goes along with “Contents/Resources/intro.mov”

You can copy those files to your Desktop and run them through some software (iMovie or Quicktime Pro) and get them in one file, and you have a finished result!


Dec 29

So I have finally had time to code to my heart’s content over the holiday break. I thought that I would share some of my thoughts and experiences with programming for Leopard.

Fast Enumeration

Cocoa now implements a foreach() type of loop, which cleans up code tremendously. Iterating over an array or dictionary is pretty common stuff and being able to condense code from:

NSEnumerator *e = [myArray objectEnumerator];
id item;
while ( item = [e nextObject] ) {
NSLog(@”%@”, [item printSomething]);
}

to a more elegant:

id item;
for ( item in myArray ) {
NSlog(@”%@”, [item printSomething]);
}

Properties

Properties are a wonderful addition to Cocoa and essentially eliminate writing basic accessor methods for your objects (setters and getters).

@interface Song : NSObject {
NSString* title;
Artist* artist;
NSDate* dateAdded;
}

@property(readwrite, copy)NSString* title;
@property(readwrite, copy)Artist* artist;
@property(readwrite, copy)NSDate* dateAdded;
@implementation Song @synthesize title, artist, dateAdded;

The ObjC 2.0 compiler gives you extreme flexibility with properties, beyond just the basic use of accessors here. You can specify a property to be readonly instead of readwrite, or to retain or assign instead of copy.

@dynamic title; -(NSString* )title { }

The above would require you to implement the method yourself, letting the compiler know you are handling that.

NSTreeNode

Not a feature of the ObjC language, but certainly a nice addition to help using NSTreeController. NSTreeNode is a wrapper object which aids in creating trees. Just create a NSTreeNode and add other NSTreeNode objects to the -mutableChildNodes array and you are on your way to a tree. Binding this tree to a NSTreeController is relatively simple as well. Of note, remember that if you are using NSOutlineView delegate methods, you receive a NSTreeNode object now, so you must use -representedObject on “id item”.

A further note, when using the “selection” controller key on a NSTreeController, the controller returns an array of NSTreeControllerProxyObjects. Either call -self on the NSTreeControllerProxyObject or when using bindings (binding a second NSTreeController to the “selection” of the first one) remember to use “selection” with model key path of “self”. I don’t believe this is documented anywhere, but using “self” clears up a whole world of heartache and gives you the actual NSTreeNode instead of the NSTreeControllerProxyObject.

Interface Builder

It took some getting used to, but recall that you have to drop a NSObject (blue cube) from the IB Library and set the custom class to initiate an object in IB 3. The old method of “Initiate Class” or whatever from the menu isn’t available. Also remember that IB Palettes don’t work with IB 3, you will need to find (or create) IB Plugins.

Core Animation

Recall that the -orderIn and -orderOut options in IB are for adding and removing subviews to the selected view in IB (-setWantsLayer:YES). So NSTabView will not magically transition views in and out unless you are programatically creating new tabs and such.

That was just a quick list of the headache I endured over the last few weeks adjusting to Leopard and mainly spending lots of time with trees in Cocoa.

I’d love to hear your thoughts about ObjC 2.0 additions, whether it’s garbage collection or something more minute!


Jul 30

I ran across another Mac shareware team I’d never heard of, Bruji, makers of the “Pedia” software, such as Bookpedia, CDPedia, and DVDPedia. Looks a lot like Delicious Library, except split up into different applications.

What is interesting here is the little gem I found on the website in some sample code and open-source frameworks. The Bruji team released a framework allowing Cocoa developers to grab barcodes from an internal or external iSight or other firewire camera.

Download the source here.


Jul 27

I’ve given much thought to the wonders of tabbed navigation in website design, but today I ran across a wonderful example that is brilliant in it’s simplicity.

What I’m trying to accomplish is a row of tabs, but the current selected one being a different color. There are all kinds of ways to accomplish this, but here is one developer’s beautiful solution for static pages. Just wrap each page in a different div. Example being, homepage has <div id=”home”>, the Help page has <div id=”help”> and so forth. On the links that make up the navigation, assign each link a class, such as “navigation-link”. Then in the stylesheet, just add something such as

#home .navigation-link, #help .navigation-link { //stuff to make it stand out }

That works wonders. However, in my case, I’m trying to accomplish the same thing on dynamic pages, created through a WordPress theme. I have a dirty solution written in Javascript, but I’m going to work on writing it in PHP if at all possible so that it doesn’t have that momentary lag that the page has right now. You can preview the work at http://www.macfanatic.net/testing/

Javascript Code for changing the class of a link to reflect it’s currently selected:

window.addEvent(’domready’, function() {
var a_list = $$(’#nav li a’); // Array of nav link elements
var i = 0;
while ( i < a_list.length ) {
if ( (window.location.pathname).search(a_list[i].getProperty(’href’)) != -1 ){
//alert(”Match found at location ” + i +” with name ” + a_list[i]);
a_list[i].addClass(’current’);
}
i++;
}
});

Also note that this uses the MooTools library, which you can download here.


May 29

I was asked a little while back if I wanted to take on a small project and I jumped at the chance. I was given some mockups for the pages in the site and asked to turn all that into a website, in 3 weeks.

1 week early I gave the guy the files and the site went live. Overall it was an awesome experience. Was my first time working with a client and working under a time restraint. I was given a featureset and I had to implement all that. In the end I was able to throw in a trick or two and get it done early, all of which pleased the guy to no end.

If you’re interested in taking a look at the work, you can check the site out over here. The site is for a new podcast with multiple shows, called MacLive. There is a teaser episode right now which you can listen to from the homepage. Be sure to read up a little on each episode and browse around.

NOTE: At the time of writing this, the site owner still hasn’t edited some text on a few pages or got the online store working yet. He wanted the site as it was to at least have something up and will edit the other pages as the information comes available. Just saving myself a little embarassment there.


Feb 05

I wrote this C based program for my Data Structures Computer Science class this last fall as our last assignment. By far the most difficult program I’ve designed and coded to date and I’m very proud of it. At an overview of the program, you provide text files that have information about your music files. The text file is labeled something like “Depressing.plist” and every song in that file is in the “Depressing” genre. From there the program will match every song with the Boolean search you use. This can get extremely complicated, but a very basic example of ” 50 A Billy” would return a list of songs up to 50MB that are from an artist with the word “Billy” in it somewhere.

For those that aren’t comfortable using the Terminal, you won’t want to use this. However, for anyone else a little more technically inclined, you could very well use this program for its intended purpose. Basically, you have to provide a plain text file with a “.plist” extension ( I know this is reserved for preference files on Mac, but get over it - playlist is what it’s standing for here) that contains some basic info in a given order.

There is more information available in the PDF I’ve attached to this post, as it’s the same thing I had to write the program from. This program would be great for anyone interested in learning a bit more about data organization. The code is heavily documented showing how to use doubly-linked lists, red-black trees, hashing, and much more. And if you’re motivated, you could always read the program description and code one yourself, them compare with my code and executable. Sample input files are included.

Program description and prompt ( PDF )

Source Code (XCode Project)


Feb 03

I took some time this afternoon to formally post more sample code online. There will always be more discussion about the code itself when I create an individual post here on the main part of the blog, but for those just looking for the code itself, I have added it under the software section. I hope to add more projects from my past Computer Sciences classes. The data structures I dealt with were pretty intense, at least for right now in my educational career, and I’m sure there are plenty others out there who would like to see some examples of AVL trees and all that. Anyway, a project for another day.

Older Posts »