/dev/random

Reality has a liberal bias

/dev/random random header image

Entries Tagged as 'Programming'

Lesson of the day

August 22nd, 2007 · Comments Off · Programming

When writing Objective C code, never forget to have your init method return self or bad things will happen, but maybe not in a debug build. I wasted over an hour on that today when my debug build worked perfectly but a release build crashed in awakeFromNib where it was initializing a series of items [...]

[Read more →]

Tags:

My2unz.com Improvements

August 19th, 2007 · Comments Off · Drupal, Programming, Web

I’ve made a few improvements to my2unz.com over the weekend. I set up several color variations of the theme, and enabled theme switching. I also did some work on the iTunes module and changed the database tables slightly to add a few new features.
One of the problems with the previous version is that I considered [...]

[Read more →]

Tags:

Clean SOAP

April 30th, 2007 · Comments Off · Programming

I gave up on using AppleScript Studio for my Installer front-end application. AppleScript’s SOAP implementation seems to be broken. I ended up writing it in Objective C instead, using Web Services Core. It isn’t that much more difficult than writing it in AppleScript, and I’m able to use the window layout I already created for [...]

[Read more →]

Tags:

AppleScript and dirty SOAP

April 25th, 2007 · 1 Comment · Programming

I’m writing an AppleScript Studio application which needs to call some SOAP web services before running an installer. Somehow AppleScript seems to be adding a bogus namespace to the SOAP call.
The method I want to call should look something like this (actual names changed):

<RegisterUser>
<UserData>xyzzy</UserData>
</RegisterUser>

Instead, the request looks like this:

<m:RegisterUser xmlns:m=”http://myserver/mynamespace”>
<UserData>xyzzy</UserData>
</m:RegisterUser>

The AppleScript code looks pretty standard:

tell [...]

[Read more →]

Tags:

Working on Mii Transfer

March 28th, 2007 · 5 Comments · Programming

I’ve been trying to use Jasen’s branch of WiiRemote Framework from Subversion which integrates my code and is supposed to make it more reliable on PowerPC. Unfortunately I found that it makes the connect much less reliable, at least on my MacBook Pro. I fixed the problem with Miis other than the first one being [...]

[Read more →]

Tags:

Mii Transfer progress

March 21st, 2007 · 2 Comments · Macintosh, Programming

I haven’t had a chance to do much work on Mii Transfer this week. but I’ve changed the way I read Mii data to read the entire 750 byte block (+ CRC bytes) into a buffer and then simply copy the requested Mii from the buffer. I also fixed the reported bug where Miis other [...]

[Read more →]

Tags:

More about Miis

March 16th, 2007 · 2 Comments · Programming

I’ve been looking at the code for sending Miis to the remote and I discovered it’s not as simple as receiving a Mii. You can request a single Mii, but you can’t send only a single Mii - you need to send the entire block of 10 Miis with the properly calculated CRC. That means [...]

[Read more →]

Tags:

Mii Transfer 0.1a fixes PowerPC compatibility

March 13th, 2007 · 6 Comments · Macintosh, Programming

I just released Mii Transfer 0.1a to fix the launch problem on PowerPC Macs. There are no code changes, I simply linked it with a universal build of WiiRemote framework. Intel Mac users don’t need to update.
I also added a troubleshooting section to the readme file. The major problem on G4 Macs (which is actually [...]

[Read more →]

Tags:

Mii Transfer source code & project page

March 11th, 2007 · Comments Off · Macintosh, Programming

I’ve released the full source code for Mii Transfer including the modified version of WiiRemote Framework, and I’ve also created a project page with all of the download links.

[Read more →]

Tags:

It’s Mii!

March 8th, 2007 · Comments Off · Programming

After I created my Mii, I wanted to get it on my Mac so I can use it as an avatar in other forums. I found that there are several Mii copy & edit utilities for Windows but none for Mac OS X, so I decided to hack Mii support into WiiRemote Framework. For anyone [...]

[Read more →]

Tags:

Get rid of dialog boxes

February 8th, 2007 · Comments Off · Programming

Coding Horror notes that most users simply ignore dialog boxes and simply dismiss them without actually reading them or understanding what they mean.
This is a result of the overuse of dialog boxes. According to the original Macintosh Human Interface Guidelines, a dialog box should only be used for an exceptional condition that requires immediate user [...]

[Read more →]

Tags:

The kind of bug I like to find

December 18th, 2006 · Comments Off · Programming

Simple, obvious bugs with a quick fix are always fun. In some old code, I found this:

fread(&type,4,1,pkginfo);
if (type == ‘APPL’) ….

Guess what happens on an Intel Mac?

[Read more →]

Tags:

bush hid the facts

November 17th, 2006 · 1 Comment · Fun Stuff, Programming

Here’s an interesting Windows bug.
1. In a new window type “bush hid the facts” (all lower case, no quotes)
2. Save the document.
3. Reopen it.

Where did the text go? Windows mistakenly identifies the file as Unicode rather than ASCII if you create a document with certain text. Almost any 4 letter word followed by two 3-letter [...]

[Read more →]

Tags:

Another reason VSTS sucks

October 5th, 2006 · Comments Off · Macintosh, Programming

My company recently switched from Visual SourceSafe (which I accessed using SourceOffsite) to Visual Studio Team System for version control, which has caused me endless grief.
The first annoyance was there’s no way to see which files were changed locally in the file list. The bigger problem is it can’t handle Unix/Mac line endings. If you [...]

[Read more →]

Tags:

Fix for crash

September 25th, 2006 · Comments Off · Macintosh, Programming

I came up with a fix for the APE-related crash I found a few days ago. It seems that signals can be delivered to any active thread. If you have APE installed, it injects its own thread into the application. If the signal happens to be sent to APE’s thread, there’s a chance bad things [...]

[Read more →]

Tags:

APE caused a crash

September 21st, 2006 · Comments Off · Macintosh, Programming

I know Unsanity’s Application Enhancer is often unjustly blamed for crashes, but in this case it definitely caused one of my applications to crash, as shown in this stack frame from the crash report.
Thread 1 Crashed:
0 com.absolute.ctmweb 0×0002b9a9 CheckForListen() + 253
1 com.absolute.ctmweb [...]

[Read more →]

Tags:

New version of theme is available

September 6th, 2006 · 3 Comments · Programming, Web

I’ve uploaded the new version of my Random Image theme. You can download it here.
Blogged with Flock

[Read more →]

Tags:

My life just got more difficult

September 5th, 2006 · Comments Off · Macintosh, Programming

My company switched their source control from Visual SourceSafe (which I accessed using SourceOffsite) to Team Foundation Server (VSTS). Since XCode has no built-in support or plugins for either system, I always worked locally, did a checkout of any files changed locally, and then checked in my changes (after merging, if necessary). It was easy [...]

[Read more →]

Tags:

Mac OS X Internals

July 7th, 2006 · Comments Off · Macintosh, Programming

My copy of Mac OS X Internals: A Systems Approach arrived today. I’ve been buried in it most of the day. This is the first book I’ve seen that really goes deeply into how OS X works.

[Read more →]

Tags:

A Tip for QA

May 25th, 2006 · Comments Off · Programming

“It Doesn’t Work” is not a useful bug report.

[Read more →]

Tags: