Sunday, March 31, 2013

630m operation and Class E at Home Brew Group

Two excellent talks at the ARNSW Home Brew Group meeting today. The main talk was by Nick, VK2DX, who talked about getting on the 630 meter band (472-479kHz).


Nick talked about his long history of listening to interesting things he's seen on the waterfall including over the horizon radar and non directional beacons. Getting on air with such a low frequency is a challenge anywhere but particularly in a dense metropolitan area.

The challenge is the antenna and matching to it. Ironically, while the best antenna is something huge like a beverage antenna, the second best is a tiny E-Field probe like the PA0RDT mini whips.

Nick uses a vertical antenna that is resonant on 80m but with the addition of a huge 600uH loading coil (60 turns on a bucket), a home built variometer and an impudence matching transformer he's getting to QLD, SA and NZ using the WSPR mode.

The supporting talk was my regular Mike, VK2BMR who talked about his experiments making a tesla generator operating in class E.


Mike is getting great efficiency, which is the great benefit of Class E, and his biggest challenge seems to have been to build attenuators and dummy loads that can handle the power he's generating. I was hoping for a demonstration with a bit of indoor lightning but maybe next time.

As always, thanks to the organisers for another great day at Dural.

Saturday, March 30, 2013

Raspberri Pi as a WSPR beacon

I've been trying out the threeme3/WsprryPi source that cleverly turns a Raspberry Pi into a little WSPR beacon. It really works! Here's my in-house big power transmitting station:


Here's the command line I used to transmit, pause twice, and transmit:


So, note that the arguments to ./wspr are call locator dBm freq freq freq...

To pause you put a zero for a frequency. And here's how it looks on a local WSPR receiver:


While there is some spurious signals there, it's basically quite stable and on time (that last one ended early because I killed it).

Mine was 1.4KHz below frequency and to get it close to 14,097100 (mid wspr band) I had to tell it to transmit on 14,095700.

Later when band conditions improve I'll connect it to an antenna and see how we go.

Friday, March 29, 2013

Converted to Cocoapods

Went to an excellent Sydney CocoaHeads meeting last week where Mark Aufflick explained and demonstrated CocoaPods. I have now "seen the light" and am using them extensively.

Years ago, I used Perl as my scripting language of choice, the language was similar enough to C, had regular expressions built right in and didn't need a compile tool chain to run. The greatest thing about Perl wasn't the language but the amazing library of modules people had written to do just about anything, this library, called CPAN could be searched and installed from the command line.

CPAN has 119,767 modules, which is overwhelming but means that anything you need to do has probably been done and packaged up pretty well.

When I "saw the light" and moved to Python (thanks Alastair!), it eventually got a similar system called PyPi with just 29,430 packages. Then again, python has batteries included so there's a lot of stuff built right in.

CocoaPods is built on top of Git. There is a GitHub repository of specs that tell the tool where to get the files for each library. There are 1,277 pods so far. I won't reproduce the getting started guide here, but suffice to say, it's simple. You add a Podfile to your project directory and it brings in the source and adds it to your xcode project. Here's a Podfile for one of my projects:


platform :ios
pod 'MBProgressHUD', '~>0.6'
pod 'Facebook-iOS-SDK', '~>3.2'
pod 'FlurrySDK', '~>4.1'


The first thing I've noticed is that many of my projects had old versions of the Facebook, and Flurry SDKs and cocoaPods quickly fixed that.

I was worried about ending up with projects with external dependencies being left in our source code repository, but the solution to that is to add your Pods directory so the last source is always available even if the pod goes away in the future.

Sunday, March 24, 2013

iOS face detection

While playing around drawing text over images that ended up looking bad because the faces would be obscured, I had the idea of trying to find faces and then avoid them.

You can see the end result on the right. The software finds faces in the image and gives you a box that contains the features. I make a green box that encloses all of the faces. Finally I find the largest area between the edge of the enclosing box and the edge of the image and use that to place the text.

The code on iOS is incredibly simple, (although being cocoa the words get rather long).


The resulting array of features objects have a .bounds CGRect that is the location of the face.

NSDictionary *detectorOptions = [[NSDictionary alloc] initWithObjectsAndKeys:CIDetectorAccuracyLow, CIDetectorAccuracy, nil];

CIDetector *faceDetector = [CIDetector detectorOfType:CIDetectorTypeFace context:nil options:detectorOptions];

CIImage *ciImage = [[CIImage alloc] initWithImage:image];
NSDictionary *imageOptions = @{CIDetectorImageOrientation: @(1),
                                   CIDetectorAccuracyHigh: @(1)};
    
NSArray *features = [faceDetector featuresInImage:ciImage options:imageOptions];

The face detector needs a full face, it doesn't recognise heads turned to the side so that one eye is gone but interestingly it does detect a few cartoon characters.


It's very fast and can even be passably used on video - I guess the code is in there for the face detection in the camera. CIDetector has only one concrete sub-class but I wonder how hard it would be to implement detectors for other things?

Saturday, March 23, 2013

On News24 this morning

I was asked to comment on the inquiry into IT pricing which is under way in Australia at the moment on ABC News24 this morning.


Being a fairly experienced radio pundit, I've developed some habits that need to be avoided when on screen. (Like reading my notes and slouching while talking). ABC News24 is an impressive setup with a surprisingly small number of people producing a 24 hour news service.


The studio has remote controlled cameras "robot cameras" they call them. Everyone is very professional and nice. I brought my daughter along and she took the photo above from the control room. She had a great time and reflected on how a regular viewer of TV doesn't really understand what goes in to that smooth presentation we're used to.

My actual job is iOS programming but hopefully I do a passable job at technology analysis, including on TV.

Wednesday, March 20, 2013

Samsung Chromebook Australia review

The long-awaited ARM based Samsung Chromebook finally appeared in local stores yesterday. I rushed to hand over $346 to try one out.


It's hard not to compare this device with an 11" MacBook Air, but that's unfair as it's a third of the price. For this money, it is excellent value. The keyboard is full size, rather Mac like (see there I go). The screen is the same resolution as an 11" Air but not quite as bright.


The keyboard has a huge "alt" key oddly and caps lock is a search button - rather like the Windows key on a linux box. Happily the track pad supports two-finger scrolling and even mac natural mode. (They call it "Australian" scrolling for some reason).

Boot and shut down is very fast so I tend to turn it off rather than sleeping it. They say the battery life is 6.5 hours but mine doesn't quite indicate that much at this stage - perhaps it's a calibration issue. (Update: now it says 7.5 hours)


Speaking of power, one hardware criticism I have is that the DC charge plug is really thin and seems like it might break if pulled the wrong way. (No Magsafe here).


I have read, but not confirmed, that it takes 12V which means this might be a good laptop for use on a 12V supply like in my solar powered shack.

Being ARM processor based and using a 16GB SSD, this device has no moving parts such as fan or disk. You can plug in an SD card, but it's not designed to be left in and sticks out.


I tend to live in Google's cloud world, being a GMail and Docs user so this works well for me but I do miss a few apps starting with DropBox and Skype. This is a great device for sharing on the living room couch where you want a keyboard, perhaps for doing some writing or replying to email. I imagine they might will be attractive to business or education where they've gone to Google Apps.

It can work off line after initial set up and syncing of recent documents in Google Drive.

The only problem I've had so far is with Wifi - it works brilliantly on my home WPA2 network but I cannot get it to connect to the office PEAP MSCHAPv2 authentication network and I did have quite a bit of difficulty getting it to see my iPhone personal hotspot on the bus. It seems I'm not alone with the enterprise connection problems.

JB HiFi and Harvey Norman are stocking these but only the largest stores so far.

Hacking update

I've now enabled developer mode, which gives you another virtual console with access to a root shell. (There is a built in console normally accessible with ctrl-alt-T but it's very limited and just enough to look at top and ssh out).

I did install Ubuntu on an 8GB SD card which turned out to be extremely slow, probably because of my card, but also the track pad is very annoying to use so I've given up on that approach for now.

Tuesday, March 19, 2013

Home Brew Group net - with a special guest

It was the ARNSW Home Brew Group radio net tonight and it was a great pleasure to hear Peter, VK3YE, on 7.159MHz 5 and 7 running a home brew SSB rig about the size of a house brick.

In the end John VK2ASU faded out for me although, as is the way with HF sometimes, Peter who is some 800Km away was still quite readable.

I thanked Peter for all his contributions to AR in recent times and complimented him on his very readable audio here in Sydney even though he's only running 3W.

Saturday, March 16, 2013

Should app developers target Android first?


As a mobile app developer specialising in iOS I get a lot of comments from Android users to the effect that as there are now more android devices in the market than iOS devices, apps should be made for Android first or at least made for both at once.

There is no doubt that there are now more Android devices in the market. But does that mean that the extra effort (yes really) is worth it in terms of the usage an app would get?

How big is the "Android" target market?

Android is a fragmented market. Not only are there many screen and resolution sizes, there are many versions and not all are easy to develop for. In fact it only makes sense to develop for version 4.1 and later if you need to use modern features. This chart from Google illustrates that the actual interesting Android market is quite small. (These are from March 2013).




Not only are there many different screen sizes, each manufacturer supports different hardware features, and most importantly for media app makers, different streaming capabilities, so we need to choose the most popular devices to target. OpenSignal published a nice breakdown last year:


Happily, one is very dominant, the big green block is is the Samsung Galaxy SII followed by another Samsung and the HTC desire HD. So maybe we should go for the top three?

Note that we only target a few of the iOS devices out there. Xcode only builds for iOS 5.1 and later and there are really only three phone screens: 3.5", 3.5" retina and 4" retina plus two tablet sizes.

If I make an app for Android will they use it?

iOS users browse the web twice as much as Android users according to NetMarketShare:

This is hard to explain as Chrome and mobile Safari are pretty much the same.

If you are trying to make money, Android users are even less "engaged" than their iOS counterparts. Asymco published stats last year showing online shopping by OS.


So despite being dominant in numbers, Android shoppers are 21% compared to 77% for iOS. 

Even simple paid web browsing on flights as reported by GoGo shows a similar ratios:


App Annie shows that App store revenues for Apps in the Google Play store are rising but iOS is still four times that of the most "popular" devices.


Does it cost the same to develop for Android as iOS?

I am reliably informed by people who have commissioned Android versions of iOS apps that it costs 30% more to make an Android version than the iOS version. This could be because they are targeting too many Android devices or it could be that the Android SDK is not as mature as the iOS SDK and takes more effort to implement the same features.

I'm also told that there's more money in Android development, presumably a greater demand for those skills and a smaller supply of developers - so perhaps the developers are being paid more thus pushing up the cost.

Draft conclusion

I would love to see every app developed for every device, that includes iOS, Android, Windows Phone, Blackberry, Symbian, Ubuntu, Firefox and more, but resources are limited.

When evaluating Android for the first target compared to iOS I think about [proportion of v1.4+] * [proportion of Samsung GSII and HTC] * [usage of device] * [willingness to pay]. (Reminds me of the Drake equation).

The result is very small compared to iOS at the moment.

Why don't Android owners use their devices, and why do they complain so bitterly?

Android devices are generally cheaper than Apple devices. If you are not prepared to pay a few dollars more for the device, presumably you are not interested in paying for Apps. 

Feature phones, for people who just want to make calls and maybe send a text, have now disappeared and have been replaced by low end (old OS version) Android phones, so a proportion of the market have devices that have features they never really wanted.

My theory on complaints is that many consumers see an iPhone running apps and decide they want one. Those who don't go directly to an Apple store are met at a phone shop by sales staff who get a higher commission for selling Android phones so they tell the customer to buy this one as it's cheaper and "the same".

When these users start looking for apps beyond Facebook and Twitter they find that the pickings are slim. They're angry (with themselves) for falling for the sales talk and figure that abusing the developers for not porting to their cheaper phone is the most likely way to get what they want. (This post is my answer to that enquiry).

Cross platform development?

There are a lot of cross platform development toolkits. I think if it's possible to do something as a web app then it should be done that way so that it will be available on everything with a modern browser. But users like native apps for their responsiveness and robustness in an unreliable network environment. Facebook is a good example of this.

Cross platform development is always a compromise, it must abstract away the platform and often ends up being a lowest common denominator set of features. Users don't like apps that feel alien on their device.

I think the ideal approach, if funds were available, would be to have a team with a UX designer, graphic designer and specialist developers for each platform who can provide the "love" and focus to make an app that uses the features of each platform.

There is no silver bullet so far.

Apple needs competition

Don't misunderstand me, I want strong competition for Apple. It keeps them focussed and moving forward. I've spent much of my working life developing for platforms other than Windows and I know what it's like to miss out on Applications.

Apple has had amazing success in recent years making phones and tablets that non-computer nerds can learn to use in minutes. Apple is not targeting technical users in iOS and that group will be looking elsewhere for highly customisable devices. Fair enough.

I don't want Apple to "do a Microsoft" and start adding every feature they can think of - making the OS complex and confusing. 

The proposition that Android is the first choice for developers right now is not correct in my opinion.

I welcome your feedback.

Friday, March 08, 2013

Helping each other with StackOverflow and github

There was a story this week about programmers getting half their documentation from StackOverflow. It's certainly true for me, I'm there many times a day and often a search for whatever programming problem is confounding me ends up there. I do try to answer questions when I can on StackOverflow but it's very unbalanced so far.

The other site I get help from is github where people share code. I'm happy to report that at the prompting of a friend, I've contributed my first snippet of code to github.


It's a minimal iOS project that illustrates a way to make an iPhone app with a side menu - like Facebook and many other apps do these days. It does this by making a View Controller Container.

Let me know if you see any bugs or can improve it, or, as they say - "fork me on github".

Friday, March 01, 2013

Try the ABC Vegie Guide iPhone app - just out

I'm excited to announce that an app I've been working on in recent months is now in the Australian Apple App store.

Vegie Guide includes great wisdom from the popular ABC Gardening Australia team.

Getting an app to this point is a team effort, combining the skills of content authors, artists, user experience designers and a touch of engineering (my bit).

The app looks at your location and the time of year and recommends the best plants to plant. Once planted you can record progress in the form of notes and photos. As well as a plant encyclopaedia there are useful fact sheets to read.

I hope you'll try the app (it's free) and tell your friends about it. Please let us know what you think.