Archive for the 'Technology Bits' Category
SABA Freudenstadt 15M
Yesterday I opened my SABA Freudenstadt 15M vintage radio because the right channel didn’t work. My modest artillery of troubleshooting techniques failed me, so I punted and just wired all of the speakers to the left channel. It’s mono now, but at least all of the speakers make sound!
But the real reason for this post is to show off my photos of the radio guts.
1 commentAn impossibly tiny version of Operation™
My iPhone broke. For the last two weeks, the home button has only worked with excessive force. Yesterday it stopped working completely. I took it to the sickningly perky genius at the Apple Store in Pacific Centre, and she told me she could fix it in twenty minutes. For $300. I gave her a look that said I’ve been hacking on Apple products since before the Gil Amelio dark ages. Respect me. I actually just said Erm, thanks. I’ll try and fix it myself.
So here are some photos of my iPhone coming apart on my kitchen table. This was a bit scary because my last experience opening an iPhone resulted in lots of itty-bitty electro-rubble all over the place, so first I gained confidence by looking at this.


After two tries, I was able to bend a couple little metal contacts so that they did more contacting with one another. It works now!
But I got fingerprints on the inside of the glass.
3 commentsTrees for the Forest
Look at these pretty pictures I made:
They’re made by a short program… programatically. It’s generative. So I guess it would be more precise to say that I didn’t make these pictures, but I made something that went on to make these pictures. And each time it is run, it makes a different one—no two the same! Not to sell myself short, my choices as a programmer did greatly influence their final design. I think of this as designing at the second degree.
One difficulty with designing at the second degree is not spending too much time designing the first degree—that is, the program and all of the facets of software engineering that could be poured into it. One must instead be thinking about the final visual outcome. It’s rightbrain vs. leftbrain, creativity vs. analysis. These dichotomies must be managed.
Luckily, there are some braindeadly easy tools that help programmers forget about things like buffers and pixels and multiple coordinate systems. Processing is one that I’ve dabbled with before, but it’s based in java and frankly java isn’t very cool anymore. These days I’m playing with NodeBox.
Desktop Backgrounds
If you’ve got a 1440×700 pixel MacBookPro screen like mine, then you can use these as desktop backgrounds. Set it up to cycle through them every couple of minutes and it’ll be magic.
1 commentEstelle’s “American Boy” mastering is shit
Listen to this…
This is an incredibly catchy song, but how did it make it to market with such poor audio quality? It distorts throughout, but not in the warm way… more in the no-regard-for-digital-full-scale way.
I decided to investigate in Pro Tools…
Yeah. Except for the intro, the whole thing is pegged. This is what the channel strip looked like most of the time…

Now I understand that this is sort of typical of the music of our day. There is the so-called loudness war and every mastering engineer wants their track to have the highest possible RMS so that it sounds really loud. It’s a tragedy of the commons.
But this isn’t even the same thing—it’s way worse. This song isn’t just compressed and limited, it’s actually clipping. A lot.
Here’s a zoomed in portion of the song at 2:51 (2:27 in the video version above) where it kind of breaks down and Kanye does his thing. Totally clipped.
Seriously. wtf.
2 commentsGLUI 2.35 Framework for Mac OS X
Here is a new framework for version 2.35 of GLUI that you can use in your XCode projects.
A notable improvement since last time is that this one is a universal binary for both 32- and 64-bit. Whee…
The source package below includes the XCode project used to create the framework, as well as an XCode project for the 6 examples.
Download source, XCode project, and examples
To use the framework
- Install the framework
- Add the framework to your XCode project.
It’s located in/Library/Frameworks/ #include <GLUI/glui.h>from your source files
Economics of the tubes
A recent article on Ars Technica explains the economics of peering and transit…
![]()
How the ‘Net works: an introduction to peering and transit
…which led me to even more interesting reading. Srsly.
No commentsHOWTO Install Zabbix 1.6 on Mac OS X 10.5
I wanted a local copy of Zabbix to test and hack on, so I installed it on my mac. It’s not as brain-dead easy as it should be, so here are the steps.
1. Install PostgreSQL 8.3.3
This couldn’t be easier. Go and download the click-through installer. Choose all the defaults and let it do its thing. It’ll make you restart your computer. Remember the superuser password you enter at this step.
2. Compile & Install Zabbix
For this step, you’ll need to install Apple’s developer tools.
Go download the Zabbix sources and untar them.
Navigate to the directory and run the configure command. Depending on what strikes your fancy, you might enable more options like --with-ipmi or --enable-agent or --with-jabber.
$ ./configure --enable-server \ --with-pgsql=/Library/PostgreSQL/8.3/bin/pg_config \ --with-net-snmp --with-libcurl --prefix=$HOME/Library/Zabbix
Unfortunately it won’t compile on Mac OS X. Fortunately this guy figured out why.
Edit include/common.h and right after the following line…
#define ZABBIX_COMMON_H
…add this line…
#define MAXDNAME 2048
Edit include/sysinc.h and replace this line…
#include <resolv.h>
…with this line…
#include <resolv8_compat.h>
Now build it…
$ make -j3
And install it…
$ make install
3. Set up the database
Create a new database user. Choose a database user password. I chose al9a0941h9.
$ /Library/PostgreSQL/8.3/bin/createuser zabbix --no-superuser --createdb --no-createrole --pwprompt -U postgres Enter password for new role: <database user password> Enter it again: <database user password> Password: <superuser password>
4. Create a new database
$ /Library/PostgreSQL/8.3/bin/createdb zabbix -U zabbix -W Password: <database user password>
Populate the database with tables and data…
$ cat create/schema/postgresql.sql | \ /Library/PostgreSQL/8.3/bin/psql -U zabbix -W Password for user zabbix: <database user password> ...
$ cat create/data/data.sql | \ /Library/PostgreSQL/8.3/bin/psql -U zabbix -W Password for user zabbix: <database user password> ...
$ cat create/data/images_pgsql.sql | \ /Library/PostgreSQL/8.3/bin/psql -U zabbix -W Password for user zabbix: <database user password> ...
5. Configure the zabbix server
$ mkdir ~/Library/Zabbix/etc $ cp misc/conf/zabbix_server.conf ~/Library/Zabbix/etc/
Edit ~/Library/Zabbix/etc/zabbix_server.conf. Leave everything as default, but change the following two values…
DBUser=zabbix DBPassword=al9a0941h9
Start the zabbix server…
./zabbix_server --config=$HOME/Library/Zabbix/etc/zabbix_server.conf
6. Install & Configure MAMP
MAMP is the quickest way to get a full-blown Apache up and running with PHP5. Download it here and install the regular (non-pro) version.
Configure PHP by editing /Applications/MAMP/conf/php5/php.ini. Change…
max_execution_time = 300
Then go to the bottom of the file and add your timezone
date.timezone = America/Vancouver
Install the Zabbix front-end so MAMP can serve it
$ mv frontends/php ~/Library/Zabbix/frontend $ ln -s ~/Library/Zabbix/frontend /Applications/MAMP/htdocs/zabbix
7. Launch MAMP & Configure Zabbix front-end
Double-click the main MAMP application and see that the servers start up.
Navigate to http://localhost:8888/zabbix/
Go through the configuration screens.
On the database screen, choose PostgreSQL, set the username to “zabbix” and the password to whatever database user password you chose.
On the zabbix server details screen, set the port to 8888.
You can now log on in with the username/password of Admin/zabbix
Notes on Security
This is a test installation on my home network, so I’ve foregone best practices for security and reliability. If you are relying on this zabbix installation for a production environment, you should consider taking some precautions…
- PostgreSQL and Zabbix should both run as separate users
- Zabbix should be started at boot via launchd
- In order for launchd to monitor Zabbix, the zabbix_server process should not background itself. I don’t think this is currently possible without changing the server’s source code.
- Don’t use MAMP for a production service. Configure Apache and PHP properly to start up at boot and run as a separate user.
Algorithmic Mirror

This is a repost from my old blog from a couple years ago…
Algorithmic Mirror is an art piece using computer media. It’s not really useful in any way, but is rather meant to be interesting, thought provoking, and visually stimulating.
The setup consists of some software I wrote using Processing running in fullscreen, and a webcam. When the viewer enters the webcam’s field of view, they will see a mirror image of themselves on the screen. What makes the algorithmic mirror unique is the way in which the image is displayed.
Over a thousand particles are in constant motion on the screen. When a person or object enters the camera’s field of view, the particles arrange themselves in order to show a vague silhouette version of the image. The result is like a sketch in motion.
Algorithmic Mirror was on display at the National Exhibition Centre in Swift Current, SK from February 19 to March 20, 2005.
Download
Requires Mac OS X 10.4 or higher and an iSight camera
AlgorithmicMirror1.1.zip (1.5Mb, Application + Source Code)
Push email on Symbian S60 smartphones
There is a lot of discussion about using IMAP Idle with the Symbian Series 60 smart phones but nobody seems to have really gotten it working well. I have, and here are my experiences…
My setup
- Nokia 6120 Classic (Symbian OS 9.2)
- Fido Canadian GSM carrier
- Cyrus IMAP server included with Mac OS X 10.5 Server with SSL required
- GoDaddy SSL Certicifacte
Configuring basic email
Since this phone was purchased unlocked and unbranded, none of Fido’s settings were pre-configured. I called them and they sent me a couple SMSs with all of the settings I would need. For email, I created a new access point at Menu -> Settings -> Phone Settings -> Connection -> Access Points for internet.fido.ca.
I was able to quite easily get basic email sending and receiving by filling out the usual settings such as server, login and password in: Messaging -> Options -> Settings -> Email. It’s painful to type in all those settings using a numeric keypad though.
My mail server requires SSL (actually, TLS) for encrypted connections, and uses a certificate from GoDaddy. The phone complained about it being an untrusted certificate until I installed GoDaddy’s root certificate on the phone. To do this:
- Download gd-class2-root.cer
- It still isn’t in the right format, so run the following command on it in terminal:
openssl x509 -in gd-class2-root.cer -out cert.cer -outform DER - Use bluetooth to send cert.cer to the phone. When you open it, it will ask you to install it.
Of course, if your mail server doesn’t use SSL/TLS, then you don’t really need to do this, although you should probably think about switching to SSL/TLS ’cause the Internet is a scary place and someone’s probably spying on you.
Enabling IMAP Idle
The Cyrus server supports Idle by default. To get the phone to take advantage of it, you have to make a couple adjustments:
- Menu -> Settings -> Phone Settings -> Connection -> Packet Data, set to “When available.”
- Messaging -> Options -> Settings -> Email -> Mailboxes -> (yours) -> Automatic retrieval:
- Email notifications: disabled
- Email retrieval: enabled
- Retrieval interval: 15 minutes
Is it working?
IMAP Idle keeps a persistent connection alive, so the most convenient way to verify that it’s working is to look at your phone’s network status icons.

If you have the solid arrows, there is a connection and chances are good that IMAP Idle is working. It doesn’t matter what connection type you have, but a UMTS one will likely suck your battery dry pretty quickly.
Of course, the only real way to test is to send yourself an email. Your phone should get it in about 30 seconds or less.
Caveats
The email client software feels a little buggy on the S60 phones. Occasionally it will stop checking automatically. To jump start it again, you need to go into Messaging -> Options -> Settings -> Email -> Mailboxes -> (yours) -> Automatic retrieval, and then exit them all. Somehow just visiting this menu reminds it that it should be checking your email.
Your carrier is probably also dropping connections that are open for more than about 20 minutes with no activity. (At least that’s what mine seems to be doing). Luckily, if you receive enough emails, your connection may stay active enough to keep the connection alive for hours at a time. If it does drop, your phone should re-establish it when it is next scheduled to check email (every 15 minutes).
Overall
It’s not perfect, but it’s definitely a workable solution if you want instant email notification on your mobile without using proprietary setups like ActiveSync or BES.
I’m interested in trying out Zimbra’s S60 client now…
4 commentsGLUI 2.3 Framework for Mac OS X
Update: A newer and mo’ betta’ version is available.
Previously I published a quick tutorial on how to get GLUI installed on Mac OS X. Enough people were still having problems getting it to play nicely with XCode that I decided to just package it up as a nice little framework.
This is the first time I’ve made a framework for OS X, so tell me if it works or if it makes your computer go boom.
20 comments






