iPhone Badge API

Posted: July 15th, 2010 | Author: | Filed under: Development, iPhone | Comments Off on iPhone Badge API

The iPhone is in desperate need of an API that will allow a developer to post a count, such as that used on the icon badge and an optional short message.

A developer can then use the information posted by any application in a single application that will display the counts, the optional message and allow the user to launch the application that generated the data.

Please create a unified API that developers can use to post messages to, such as the total count used on a badge. The purpose is to allow any developer to create an application that can read the common values posted here and use them to display these counts in another program.

For example, I have a dozen or more programs that update their badge count when an event happens, such as a facebook update, or new mail is received in Mail. A developer could write a program that would take all the badge counts, along with maybe a short message, and display them to the user in a single application. The API should also allow the user to be able to launch the program that generated that badge count.

Google throws errors

Posted: June 3rd, 2009 | Author: | Filed under: Development, General | Tags: | Comments Off on Google throws errors

On and off all day Google has been throwing some errors. I think this is the first time I’ve seen Google bug out. This one is related to YouTube specifically (I think), but still.

Google, what’s up? Seems like there have been several server failures in the past few months.

Google throws a Server Error

Building PHP on Leopard 10.5

Posted: October 30th, 2007 | Author: | Filed under: Development, OSX | Tags: , | Comments Off on Building PHP on Leopard 10.5

When I first installed OSX 10.5 I noticed that they had current versions of Apache 2.2 and PHP 5.2.4 installed. This was a first, as Apple has always lagged with these tools, so I figured I’d give them a try. Unfortunately, the out-of-the box version of PHP just didn’t cut it for me.

I thought I would try to duplicate the “Apple” way and use the configuration that Apple used for their version of php5, but it wouldn’t produce a loadable libphp.so module for Apache 2.2.

So as always I set off to build my own version. Because of the way that Apache is built on Leopard I will also build Apache 2.2 as part of this process.

First let me explain what my directory plan (or layout) is. All my custom libraries and configurations go into the /usr/local directory. This is a common practice that will be familiar to many who work with unix. When we are done there will be a number of directories in /usr/local:


The advantage of doing this is that it keeps everything separate from the default locations that Apple uses. If Apple makes any changes to their versions it won’t mess up the installation. It also makes it easier to upgrade and manage the installation.

In addition to the additional libraries we will also take advantage of some that are provided by Apple. In some cases, the extra libraries we are building are already part of OSX but might be a little older and/or conflict with the installation we are creating.

The first part of this will involve building some common libraries, followed by Apache 2.2 and then PHP. Optionally, we will also build Postgres and install MySQL.

The additional libraries include those for processing images, including png and jpeg, freetype, readline and others related to text handling and parsing.

Most of the commands presented here can be copied & pasted into terminal. You will need to have sudo capabilities as well.

Let’s start by creating the /usr/local/src directory where you will keep the source code. You should also make yourself the owner of this direcotry so that you don’t need to be root to be able to build programs (only to install them).

sudo mkdir -p /usr/local/src
sudo chown yourusername:admin /usr/local/src
cd /usr/local/src

Now let’s download libraries we are going to build. The curl tool is very handy for this. The -O option tells curl to save the file with the same name as the source. Note that some of the links below are to direct download locations from sourceforge. If for some reason the link doesn’t work go to sourceforge.net and download the file from there.

curl -O ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.22.tar.gz
curl -O http://www.ijg.org/files/jpegsrc.v6b.tar.gz
curl -O ftp://ftp.remotesensing.org/pub/libtiff/tiff-3.9.0beta.tar.gz

curl -O http://superb-west.dl.sourceforge.net/sourceforge/re2c/re2c-0.13.0.tar.gz
curl -O http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz

Once we have our files, let’s build them. The steps are almost identical for everything. We need to unpack the file, configure the source code for use with OSX (aka Darwin), compile it, test it (if supported) and install it. By default all these programs are designed to use /usr/local as the installation root, but I like to specify the prefix anyways.

The -j2 option with make tells it to use both processors to compile which will speed up the process.

tar zxf libpng-1.2.22.tar.gz
cd libpng-1.2.22
./configure –prefix=/usr/local
make -j2
make test
sudo make install

cd /usr/local/src

tar zxf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure –prefix=/usr/localmake -j2
make test
sudo make install

cd /usr/local/src

tar zxf tiff-3.9.0beta.tar.gz
cd tiff-3.9.0beta
./configure –prefix=/usr/local
make -j2
sudo make install

cd /usr/local/src

tar zxf re2c-0.13.0.tar.gz
cd re2c-0.13.0
./configure –prefix=/usr/local
make -j2
make test
sudo make install

cd /usr/local/src
tar zxf freetype-2.3.5.tar.gz
cd freetype-2.3.5
./configure –prefix=/usr/local
make -j2
sudo make install

libcrypt & mcrypt

curl -O http://download.savannah.gnu.org/releases/freetype/

Databases, MySQL and Postgres

MySQL is always a symlink to the original directory name:

/usr/local/mysql -> mysql-5.0.45-osx10.4-i686

Any my MySQL databases always live in a separate directory outside of the /usr/local/mysql directory. In my case I call this:


Color Picking in OSX

Posted: October 23rd, 2007 | Author: | Filed under: Development, OSX | Tags: | Comments Off on Color Picking in OSX

Apple’s Color Picker tool is a very flexible and powerful tool, but most people don’t seem to realize this. The tool is available in virtually every program, even in the Adobe Creative Suite tools (you can change the color picker in the preferences).

The Color Picker gives you many options for managing colors. These include the ability to create custom palettes which can be shared and Image Palettes which use an image to provide color selection. The image can be anything, including color wheels, photos, illustrations, etc.


Because the Color Picker is extensible there are a number of free and commercial extensions available which extend the functionality and utility of the Color Picker. As you can see in the Color Picker tool bar, I have several extra color tools Installed:


Here are some of my favorites.

Hex Pickers – Provides a handy “Copy to Clipboard” of the hex color value. You can also enter your own value.


Rubicode RCWebColorPicker (Use this link to download the DL link on the Website is broken) gives you the ability to set HEX color codes using sliders and you can also limit these to “Web Safe” colors.


Chromatic Bytes Shades – this is an excellent tool to work with finding shades of colors:


Old Jewel Painters Picker – This is one of my favorite color pickers. You have multiple color wheel schemes which make it very easy to find complementary colors.


Spot Picker gives you access to all the colors that you have in Adobe Creative Suite, which include Pantone, TruMatch, TOYO, etc.


ColorListEditor makes it easy to create custom color palettes. It’s an external program program that doesn’t run in the color picker itself, but you can easily set all the colors for a project this way and have easy access to them. All the Color Palettes are stored in Library/Colors/ (either in the your Library folder or the main Library folder).


More Tiger Notes

Posted: May 2nd, 2005 | Author: | Filed under: Development, OSX | Tags: | Comments Off on More Tiger Notes

The upgrade actually replaced my /etc/httpd/httpd.conf file and didn’t even make a copy! Fortunately I had a copy and I only use that for my Apache 1.3 series install.

I realized that I had some additional 10.3.x items that I should remove. In particular, some Kernel Extensions (kext) as they where not loading on startup. Among these was PACE which I understand is used to provide copy protection, but I’m not sure for what app.

I also had Soundflower, uControl and something from Ambrosia (unfortunately I don’t remember the exact name). I removed those.

I still haven’t tested to see if the Wacom is working, but the logs show that attach was denied.

Looking at the system.log also shows that a dozen or so fonts now appear to be corrupted and should be removed or replaced. I guess Tiger more picky when it comes to fonts. These are all Adobe fonts that I’ve had for some time. I haven’t run Font Doctor on them yet. The messages are coming from: /System/Library/Frameworks/ApplicationServices.framework/ Frameworks/ATS.framework/Support/ATSServer:

In general, it seems that reviewing the system.log file is a good idea, in particular if you do an upgrade install. There are likely to be items that you might have missed, but they don’t work in Tiger.

Blogging Tools

Posted: April 28th, 2005 | Author: | Filed under: CMS, Development, Software | Tags: | Comments Off on Blogging Tools

I’ve been playing around with some different Blogging tools. I like WordPress because it’s very easy to setup, but there are some little things here and there that I wished it did. I could modify it or try out some others. I’ve spent some time on OpenSourceCMS.com

So far, I’ve narrowed it down to a few from the list.

I’ve been tinkering with Nucleus, which I must say is pretty nice. It’s really geared at more of a developer type as it does require more effort to get it working the way one wants to, but by the same token takes less effort then making a bunch of changes to WordPress. BTW, I also noticed that there is a BLOG:CMS, which seems to be a derivative of Nucleus, with some added features. Some of those features are things that I’m also interested in such as PunBB, Dokuwiki, and Singapore.

I’ve also been checking out Drupal, which has some nice features too, even though it’s more of a hybrid CMS and Blog.

I also installed Textpattern which has an interesting backend, but in the end felt it wasn’t right for me. Ditto with pLog.

So, this site will likely change soon.


Posted: April 8th, 2005 | Author: | Filed under: Development, Software | Tags: | Comments Off on Subversion

I have been using subversion for all my projects for over a year now. It’s much better then CVS which has become rather dated. The clients are better too.

Automating deployment with Subversion is a good article over on arstechnica on using subversion to make deployment easy.