26 Aug 2010, 4:54pm

3 comments

Would you steal this bike?

A few months ago, I bought a nice shiny bike in Shanghai, pictured here:

I had it for a whole 7 days before it was stolen from the bike rack in front of my building (the “building gate men” [cannot call them guards, as guard things they do not] proved little deterent).

I had made two mistakes.  The first was assuming the 2 free locks I was given from the shop were any good, and the second was that it looked too attractive. The lock issue really pissed me off, especially when I went back to the shop and the guy proceeded to tell me how shit the locks were (he used a scissor snippy motion to show me just how easy it was to cut).  It’s one thing to give a guy a free lock, but surely you can give a disclaimer at the same time (and I had a chinese speaking friend with me so it wasn’t a comms issue).  He then offered me a $1 discount on a new bike (yes, $1), so I pretty much stormed out of that shop never to return.

Two weeks ago I bought a new bike.  Again this one was a shiny red color (unfortunately this model had no other colors, and the other models were granny bikes).

Here it is:

And now with some modifications :]

My plan is this: make the bike look shit, and lock it up with 2 huge-ass locks (ones designed for expensive mopeds).

I think it worked… was at my local coffee shop (yes I found a sweet western style independent coffee shop in my area, how cool is that!?), and one of the customers (they are all fairly affluent) rode up on his shiny black bike.  Later someone asked him if my bike was his, and they all had a good laugh.  So… show off with it I cannot, but at least it won’t get stolen – and under all the crap, is actually a brand new bike, shimono gears and everything, that rides very smoothly.  Even if it looks like your average 10yo grampa rust-bucket.

So far so good… lets hope it lasts.

This is one valid reason for a “crapification” filter (unlike others, looking at you HDCP).

26 Aug 2010, 2:29pm

leave a comment

Forcing PHP to show errors

Running PHP on a production server with no visible error messages?  This is good for security, but a real pain when debugging.

Calling ini_set(‘display_errors’, 1); somewhere important does the trick.  Just remember to remove it when you’re done.

In my mantis install, I had to put these two lines in constant_inc.php:

date_default_timezone_set(‘Australia/Melbourne’);
ini_set(‘display_errors’, 1);

To fix the default timezone warning, and display errors when they happened.

24 Aug 2010, 10:35pm

leave a comment

Windows vs Mac vs Linux

I’ve long stopped caring what OS *other* people use. But to me, this describes the 3 of them perfectly (from the Android Developer manual):

Setup your system to detect your device.

  • If you’re developing on Windows, you need to install a USB driver for adb. See the Windows USB Driver documentation.
  • If you’re developing on Mac OS X, it just works. Skip this step.
  • If you’re developing on Ubuntu Linux, you need to add a rules file that contains a USB configuration for each type of device you want to use for development. Each device manufacturer uses a different vendor ID. The example rules files below show how to add an entry for a single vendor ID (the HTC vendor ID). In order to support more devices, you will need additional lines of the same format that provide a different value for the SYSFS{idVendor} property. For other IDs, see the table of USB Vendor IDs, below.
    Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
    For Gusty/Hardy, edit the file to read:
    SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0666″
    For Dapper, edit the file to read:
    SUBSYSTEM==”usb_device”, SYSFS{idVendor}==”0bb4″, MODE=”0666″
    Now execute:
    chmod a+r /etc/udev/rules.d/51-android.rules
6 Aug 2010, 1:52pm

2 comments

Ability to Downgrade iPhones

There are many legitimate reasons to downgrade iPhones. As a user, perhaps you just don’t like the new OS.

As a developer, I have a need to test my App on all OS versions my users may reasonably use. I even have a spare iPhone I use just for testing. Alas, Apple only allow the very latest OS to be installed, even if you are a developer.

Apple also don’t ship old OS versions on the iPhone Simulator anymore, so that can’t be used to verify that you’re not calling any new methods either.

For a recent release, this meant I actually could not test it properly. I did the best I could by using the iPad 3.2 * simulator* (a very poor man’s substitute), crossed my fingers, and released. It was a nail-biting day…

Not all users upgrade immediately. Upgrading requires iTunes, yet normal day to day usage of an iPhone does not (you can do everything, buy/upgrade apps, buy music, etc). Actually I believe this is a pretty common use-case, especially for a key audience of mine: travellers. In fact, with my App, at least 10% of my active users (ones using the export server) are not yet on iOS4! That also means 10% of my potential customers. No way am I going to ignore them.

A bug has been reported to Apple on this issue.

To summarise, there are many legitimate reasons why people are on old OS’s, and why (especially developers) have a need to downgrade to old OS’s.

Fortunately there is a solution. And it doesn’t require doing anything illicit to your iPhone either.

Download The Firmware Umbrella. Plug in your iPhone to USB, and press a button.

What the Firmware Umbrella does is cache the iTunes server OK response to your firmware installation request, allowing you to fake this response in the future (to allow the downgrade). Only catch: you can only cache responses for the latest firmware, so do it today!

Important TIP: tick “Advanced Options” and change the “Request From” option to “Apple” (Cydia is for jailbreaking). Optionally, you can do both.

Caching the response is easy. Using it a bit harder – but do yourself a favour, cache the response now, and if you need it in the future, you’ll thank yourself.