- January 2006 (1)
- January 2007 (1)
- July 2007 (8)
- August 2007 (3)
- September 2007 (3)
- October 2007 (2)
- November 2007 (3)
- January 2008 (5)
- February 2008 (4)
- March 2008 (1)
- April 2008 (5)
- June 2008 (3)
- July 2008 (2)
- August 2008 (1)
- September 2008 (6)
- November 2008 (3)
- December 2008 (1)
- January 2009 (4)
- March 2009 (1)
- April 2009 (14)
- May 2009 (9)
- June 2009 (7)
- July 2009 (6)
- August 2009 (4)
- September 2009 (4)
- October 2009 (2)
- November 2009 (23)
- December 2009 (23)
- January 2010 (4)
- February 2010 (3)
June 2009
iPhone Temperature Warning
Mon, 06/29/2009 - 11:59 | by KrisIn case you're curious: here's what you'll see if you rescue your iPhone from a hot car:

Appel d'urgence indeed!
How Not to Refactor a Function That Has Too Many Parameters
Sun, 06/28/2009 - 11:13 | by KrisMost programmers know that having functions with too many parameters can be confusing. However, fixing such problems requires some intelligence. A programmer once saw some code like this:
SetObjectParams(obj, foo, bar, baz, quux, xyzzy, abra, cadabra, hocus, pocus, presto, shazam);
Finding a stylistic rule somewhere that said a function should have no more than five parameters, the programmer “refactored” it to this:
SetObjectParams1(obj, foo, bar, baz, quux);
SetObjectParams2(obj, xyzzy, abra, cadabra, hocus);
SetObjectParams3(obj, pocus, presto, shazam);
No, that's not how one resolves this problem. You fix this problem by defining functions that each do something simple, give each function a name that describes what it does, and let them take however many parameters make sense.
Kristopher Johnson's Résumé
Kristopher Johnson's résumé is available here, in several formats:
It is also available at Stack Overflow Careers.
Menubar Countdown 1.2 Released
Mon, 06/22/2009 - 20:32 | by KrisMenubar Countdown is a simple countdown timer that displays itself on the right side of the Mac OS X menu bar.
Version 1.2 has these new features:
- Supports Growl notifications. The Announcement text specified in the Start dialog will be displayed in the Growl notification window.
- New application icon
- Adds option to hide seconds in the menu bar
- Shows start-timer dialog when application launches (behavior can be disabled in Settings dialog)
- Command-X, Command-C, Command-V, and Command-A now work in the text fields in the settings dialog
- Command-R is now a shortcut key for the Restart Countdown... button in the alert window
To download the application or get more information, see the Menubar Countdown product page.
New Menubar Countdown Icon
Mon, 06/15/2009 - 08:02 | by KrisWhen I released Menubar Countdown 1.1, I whipped up an application icon by simply taking a screenshot of the menu bar and cropping it. The application icon looked like this:
![]()
Fugly, eh? Not only is it ugly, but the narrow shape makes it hard to recognize as an icon, and makes it hard to click.
For version 1.2, I wanted a better icon. I thought an hourglass would be a good symbol, so after a few hours of looking at images on the web and dinking around in Photoshop Elements, I wound up with this:
![]()
I'm was very happy with it. Unfortunately, the hourglass image is based upon a photo I licensed from iStockphoto. iStockphoto considers an application icon to be the same as a logo or trademark, and such usage is expressly prohibited by their licenses. I'm not a lawyer, but I assume this is to prevent someone from putting a stock image into a logo and then suing all the other users of that image for trademark infringement.
So, I again went to the web, to look for public-domain images I could use. I eventually wound up with this:
![]()
I don't like it as much as the last one, but I've decided I've spent too much time on my application icon, and not enough time on making the application better, so this will be the icon for version 1.2. Maybe I'll revisit it for the next version.
I remember the good old days when a Macintosh application icon was a 32x32 black-and-white bitmap. Those were pretty easy for a non-artist like me to create, using simple tools like ResEdit. Now, this stuff is better left in the hands of professional designers, but Menubar Countdown is free, so I trust users will be satisfied with my amateurish effort.
If there are any real designers out there who would like to give me a better icon, I'd definitely appreciate it.
ESATInformer = FAIL
Thu, 06/11/2009 - 11:11 | by KrisOne of my clients, whose e-mail system I have to use, uses a product called ESATInformer to filter spam. I don't understand exactly what the benefit of this system is.
When the system receives suspected spam, it keeps that spam message on the server, but it sends me an e-mail saying "We've received a message that might be spam. What do you want to do with it?" So my inbox still gets filled with unwanted e-mail about suspicious e-mail.
If I want to read the suspicious messages (and I usually do), then I have to send an e-mail request back to the system, which will then send them to me. It would be a whole lot easier if they would just let the suspicious messages through in the first place.
If your spam-filtering system is more annoying than spam is, then you've really screwed up.
How to Learn Programming, in Two Easy Steps
Wed, 06/10/2009 - 07:03 | by KrisI am sometimes asked by non-programmers how they can get into programming. They want to know what programming language they should learn, which programming tools to use, and so on. These are hard questions to answer. It's like asking "I'd like to be a musician. Which instruments and which pieces of music should I learn?"
Here is my advice:
- Think about an application you'd like to see developed.
- Learn what you need to know to develop that app, and develop it.
Programming is a big field. Choosing a concrete goal narrows it to something manageable. Once you know exactly what you want to make, it is a lot easier to decide upon a programming language and tools.
Professional programmers don't "learn how to program" and then just apply that knowledge for the rest of their careers. Every day, we learn new things: programming languages, tools, libraries, operating systems, and so on. We pick it up as we go, learning what we need to know as it's needed. If you want to be a programmer, you need to learn how to do the same.
Recent comments
4 days 1 hour ago
1 week 3 days ago
1 week 3 days ago
1 week 4 days ago
1 week 5 days ago
3 weeks 3 days ago
3 weeks 5 days ago
3 weeks 6 days ago
5 weeks 5 days ago
6 weeks 1 day ago