Autotest Your Rails Apps

Posted Posted in Development

UPDATE: I’ve noticed that autotest seems to require complete restarts for similar reasons to the rails server. If you don’t restart it, it will report a slew of false errors.

Do this:

$ sudo gem install ZenTest autotest-rails autotest-fsevent
    autotest-growl redgreen

Edit ~/.autotest (create it if it doesn’t exist) and add the following:

require 'autotest/fsevent'
require 'autotest/growl'
require 'redgreen/autotest'

If you want autotest to skip certain paths, you can add something like the following to ~/.autotest as well (thanks to Bitcetera):

Autotest.add_hook :initialize do |autotest|
  %w{.git .svn .hg .DS_Store ._* vendor}.each do |exception|

Then run autotest for your rails app:

$ cd myrailsapp
$ autotest

Tar2RubyScript, RubyScript2Exe and wxRuby

Posted Posted in Development

Recently, I needed to write a quick proof of concept Windows app. Not wanting to install Windows on my Mac or work on the POS Windows box over there (points to shitty box), I went in search of a way to write Windows apps on OS X.

I found Tar2RubyScript, RubyScript2Exe and wxRuby which let me use Ruby, any gems I needed and creates an app with native widgets. As a final step you can ‘compile’ on the Windows machine and it creates a (rather large) Windows executable file. Once the app is bundled, it can be distributed to any machine without the need for Ruby to be installed.

There was a hitch, however. Tar2RubyScript and RubyScript2Exe no longer worked and hadn’t been updated for a few years.

Well, now they work:


On App Store Pricing and Developer Payments

Posted 1 CommentPosted in Development

UPDATE: A reply from Apple

I had a rather long and messy discussion with Garret Murray on twitter today, after he expressed some concerns regarding apparent discrepancies in App Store developer payments. I think the confusion can be put down to two issues:

  1. Apple is less than transparent
  2. There is a minor misunderstanding with regard to sales taxes

On Transparency

The only official word is that developers receive 70% of App Store profits. Without any further details, many developers make the reasonable assumption that this equates to 70% of sales. After all, Apple made a big deal of covering all the costs for us. Unfortunately, a quick look at your monthly financial statements scuttles this idea.

Tier 2 pricing is $1.99 USD in the US, and £1.19 in the UK. So, we might expect the following payments in our financial statements:

$1.99 * 0.7 = $1.40
£1.19 * 0.7 = £0.83

What we find is a UK payment of only £0.72. Bastards.

On Sales Taxes

Sales taxes are applied to the price of goods and services. They are collected by the seller and remitted directly to the government, having no relationship with the seller’s income tax obligations.

There are two ways to apply sales taxes. They can be included in the list price or applied at the register. For example, Europe and Australia include the tax, but some states in the US apply it at the point of sale. However applied, when considering profit margins and pricing the seller only cares about the base price. That is, the price not including sales taxes. How the final sale price is displayed is a semantic issue and the result of local laws.

So What Happened?

My educated guess is that Apple withheld sales tax (VAT of 15%) from the UK payment. A quick calculation confirms this as a definite possibility, assuming tier prices already include any applicable sales taxes. That is, the tier price in this case is 115% of the base price.

Base Price  = Price * 100/115
            = £1.19 * 100/115
            = £1.03
£1.03 * 0.7 = £0.72

This satisfied me. However, Garrett wondered if Apple is reducing the price in other regions to absorb the sales taxes. I doubt it, but we really don’t know and that’s the biggest issue. There doesn’t appear to be any information available on exactly how tier prices were converted from USD.

My guess? When the tiers were priced, Apple used the current exchange rate to convert $USD to £ then added 15%. Of course, without word from the mother ship, we have absolutely no way of verifying this. If Garrett’s right, the tiered pricing model is fundamentally broken; charging different relative prices in each region.

Clear as mud

Personally, I think Apple should release details of the pricing model and include a specific break down of developer payments in our monthly financial statements. However, I don’t expect to find a story dissimilar to what I’ve described above.

Busy Bee

Posted Posted in Development

Things are busy here at the moment. Firstly, I have a new scuba diving app in progress for iPhone OS. With the back end work done and wrapped in a nice set of unit tests, I’m finishing off the interface, which requires a lot more thought than either Air Depth or Depth Gauge.

Secondly, I’m working on a large rails app for a friend’s business, which is keeping me busy and hopefully fed for a while.

On a marginally related note, if anyone has a line on some research or film related diving work, paid or volunteer, let me know. I’d like to do some grunt work underwater for someone.

Depth Gauge Now With More Air Depth

Posted Posted in Development, Diving

UPDATE: Air Depth and Depth Gauge are no longer available. Check out Gas Manager on the App Store.

I’ve submitted a new version of Depth Gauge to the App Store. Other than being recompiled for OS 2.x backward compatibility, this update brings an enhanced version of Air Depth EAD calculator. The Depth slider’s range is now tied to the MOD of the gas.

Version 1.1 of Air Depth has also been submitted. Other than recompilation for backward compatibility, this is a cosmetic update.


Posted Posted in Development, Diving

UPDATE: Depth Gauge is no longer available. Check out Gas Manager on the App Store.

Air Depth and Depth Gauge 1.0.1 have finally gone live on the App Store. The biggest change is that both now share a lot of code (in preparation for Depth Gauge 1.1), however the visible changes are:

  1. The Nitrogen slider’s visibility is controlled by a new setting: “Show Nitrogen %”.
  2. New gas icons replace the labels to the left of each slider.
  3. Localización española.

Depth Gauge 1.1 is almost ready for publishing. I’m just waiting on one last piece of localised text and for the resurrection of my MackBook Pro. The big change for 1.1 is the inclusion of Air Depth, allowing you to use both tools from the one application. The free version of Air Depth will of course still exist and could be considered a lite version of Depth Gauge.

WARNING: MacFUSE, Disk for iPhone

Posted Posted in Development

UPDATE: I have my MBP back and working. The Logic Board was fried. I suspect this was a remarkable coincidence and I have since started using Disk for iPhone again. It is working perfectly. However, I can’t claim with any degree of certainty whether or not it had anything to do with my MBP’s sudden demise.

A friendly warning. I wanted something to mount my iPhone via the USB cable. I found Disk for iPhone, a MacFUSE file system.

Of course, this could be a remarkable coincidence; it seems odd that this would happen; but my MackBook Pro is now a brick. So stick to Air Sharing until I have more information.

Inconsistency Upsets Me

Posted Posted in Development, Diving

UPDATE: Air Depth and Depth Gauge are no longer available. Check out Gas Manager on the App Store.

UPDATE: I’ve seeded new versions of each app.

So today version 1.0.1 of Depth Gauge was rejected by Apple. Why? Because it contains a disabled slider control. A control disabled on purpose and for good reason. A control included and displayed to the user for good reason.

According to the rejection letter, Depth Gauge was rejected for two reasons. Firstly, it doesn’t do what it claims in the release notes. This is, of course, utterly wrong. It does exactly what it claims.

Secondly, apparently you aren’t allowed to disable or automatically update slider controls. Say what? No, the HIG doesn’t mention that. No, no other documents I can find mention that. Oh and the SDK explicitly supports both things. Which you’d expect, seeing as they’re useful features particularly in the way I’m using the controls.

By far the worst aspect of this is that version 1.0.1 has been in the queue for about three weeks, for only cosmetic changes. That’s right. This functionality was in the original version. It has already been approved.

So what’s a poor boy to do? Send a nicely worded, if mildly abrasive, email to Apple and in the meantime, try to come up with a work around that doesn’t confuse users.