Archive for the 'programming' Category

Introducing NewsHawker 1.0 Beta

Monday, January 15th, 2007

NewsHawker, the first application from Sugar Maple Software, has recently reached beta.

NewsHawker

Download Now

Do you spill your breakfast cereal on your keyboard or yourself while trying to eat and read your news at the same time? Does your keyboard get sticky from your dirty fingers as you eat pizza and advance to the next news item in your news reader? If so, NewsHawker can help you read more news while keeping your keyboard clean.

NewsHawker reads you your news so you can focus on other tasks. NewsHawker extends the functionality of NetNewsWire to speak the news items in NetNewsWire. NewsHawker is configurable. Do you want to read just the headlines of the news items? No problem. Just the bodies? Sure. Read the bodies of some items as their headlines are being read? Certainly. Open certain items in your browser if they sound interesting? Of course. …

Helping Myself

Sunday, January 7th, 2007
As I’ve mentioned before, mailing lists are an excellent resource when looking for answers to your development questions. This is especially the case of the mailing lists hosted by Apple (at least those to which I subscribe). I frequently take advantage of this resource and also try to contribute. Often, I don’t have the answer or someone, who checks their mail much more frequently than I, has already answered the question, but, when the opportunity is there, I take the time to help. A couple of days ago, when I couldn’t remember the kernel equivalent of the gettimeofday function, I searched the Apple Mailing Lists and immediately found the answer (clock_get_calendar_value which lead me to kern/clock.h and the currently supported function clock_get_calendar_microtime). The signature of the reply to the original poster’s question caught my eye. It was mine. I had provided the answer exactly two years ago today. It’s like something out of a Sci-Fi movie… or maybe just good karma.

Kernel Logging

Thursday, December 21st, 2006
While I usually write about programming in the land of milk and honey (i.e., Cocoa), I spent most of the previous ten years writing kernel-level code. Recently, I’ve ventured back into the kernel and was reminded of the challenge of logging from an I/O Kit driver. When writing code in the kernel for an I/O Kit driver, you can’t invoke printf to log messages. Instead, you usually invoke IOLog. …

Supporting Apple Help

Tuesday, November 14th, 2006
I recently wrote my first draft of documentation for my upcoming application. Integrating this documentation into Apple Help was much easier than I expected. The Apple Help Viewer simply displays HTML files. More impressively, cascading style sheets (CSS) are supported. I hope this will allow me to share the identical HTML files between my application and the support section of my web site and simply have different CSS files for each. …

IronCoder 4 Results

Monday, October 30th, 2006
IronCoder 4 is over. Congratulations to Jonathan Wight for winning. His SpaceCam application is quite impressive. Thanks to Mark Dalrymple for choosing a cool theme (space) and API (Core Image) and judging the competition. Thanks to all the IronCoders for participating.

Open URL in Background

Friday, October 27th, 2006

I wanted to programatically open a URL in the associated application. I started in Xcode’s Developer Documentation and searched for openURL which seemed like a good method name. I found the NSWorkspace class’ openURL method. I love it when that happens. One line of code later and I was opening URLs.

Preparing for IronCoder 4

Thursday, October 26th, 2006

I’ve been trying to clear my plate for this weekend so I can participate in IronCoder 4. Since I work best under pressure, this is a great way for me to expand and refine my Cocoa skills.

If you are interested, you can learn more on the IronCoder website and the #macsb IRC channel. (Yes, IRC. Until this week, I probably hadn’t used IRC since 1992. If you are in a similar position, don’t worry; the clients are much better now. Freenode’s FAQ was helpful in figuring out how to register my nick.)

Speech Synthesis Manager

Tuesday, October 17th, 2006
My honeymoon with Cocoa lasted about two weeks before I found myself having to invoke a Carbon API since the Cocoa one didn’t support the features I wanted. I wanted my application to speak some text, but I wanted to configure various speech-related properties. The NSSpeechSynthesizer class is extremely easy to use, but doesn’t provide access to any speech-related property other than the voice. So, I was off to read up on the Speech Synthesis Manager (which I remember as just the Speech Manager). While I think it would be great if NSSpeechSynthesizer exposed all of the features available in the Speech Synthesis Manager, I’m not going to rake another Carbon library over the coals; that’s already been done quite well. Instead, I’m going to share the problems I encountered and the solutions I found when integrating the Speech Synthesis Manager into my Cocoa application.

Xcode Project Template

Wednesday, October 11th, 2006
Once I setup Perforce, I created an Xcode project for my first application for Mac OS X. Since I’m building a Cocoa application that isn’t document-based, I started with the Red Sweater Cocoa Application Xcode template which is reportedly based on Jon Wight’s CocoaApp template. Within a minute, I had an application running that displayed a nice about box. Thanks to Daniel and Jon for sharing their templates!

Perforce and Xcode

Friday, October 6th, 2006
I’m a big fan of Perforce for source control. I have limited experience with CVS and Subversion, but compared to MPW Projector and tlib, Perforce is a godsend. While not free like CVS and Subversion, an unlicensed version of Perforce does not expire and support two users and five client workspaces. BBEdit integrates well with Perforce. Xcode also integrates with Perforce, but I ran into some difficulties getting it configured.
thoughts yet to be boiled down to their essence