Categories
Uncategorized

Mobile Developer News Roundup: Google Maps for iOS, jQuery Mobile Panels, Windows Store Apps for iOS Developers

Google Maps Comes to iOS

Skeleton in the desert beside an iPhone displaying Apple Maps

I couldn’t resist posting this Apple Maps joke.

You can now get Google Maps for the iPhone, and there’s also a Google Maps SDK for iOS! Among other things, the SDK’s features include:

  • Quick-loading vector-based maps
  • 2D and 3D views, with controllable camera positions for 3D views
  • Gesture-based map rotation and tilt
  • Traffic conditions, and control camera positions in 3D.

According to the announcement, access to the Google Maps SDK for iOS’ API keys is being progressively rolled out to developers who register interest.

How To Use jQuery Mobile 1.3’s Panels

Here’s a video that explains how to use jQuery Mobile 1.3’s “sliding panel” UI elements. You see them in native iOS apps such as YouTube, and you can now have them in your HTML5 mobile apps.

Windows Store Apps for iOS Developers: An Online Tutorial

Joe HealyMy friend Joe Healy, Tampa-based developer evangelist with Microsoft points to an online course done in cooperation with iOS tutorial heavyweights Big Nerd Ranch on developing Windows Store Apps for iOS developers taking place today and tomorrow. Check it out!

This article also appears in Mobilize!: The CTS Mobile Tech Blog.

Categories
Uncategorized

Mobile Developer News Roundup: Ereaders Losing to Tablets, Cracking Windows 8 Games, 2012’s Top Mobile Vulns and Sploits, DevOps Best Practices

Ereaders Losing Out to Tablets

Amazon Kindle Fire HD vs iPad and iPad Mini

GeekWire reports that the tablet is “killing the e-reader”. They cite an IHS report titled Ebook Readers: Device to Go the Way of Dinosaurs?, which reports that shipments of ereaders will be just under 15 million units by the end of the year, a 36% drop from the end of 2011, when they were over 23 million.

According to IHS, tablets are doing quite well:

In contrast, tablets are enjoying unstoppable growth, mostly thanks to the Apple iPad, which made its appearance in 2010. Tablet shipments will hit 120 million units in 2012 only after two short years of the device being on the market, and 340 million systems are expected by 2016—a magnitude of sales exceeded just by mobile handsets.

It seems that tablets are pretty good ereaders, in addition to being capable of doing a lot of things that used to be the sole province of multimedia-capable computers. The three areas in which ereaders have traditionally surpassed tablets are being eroded as well:

  • Size: With tablets like the iPad mini and the Nexus 7, the small-size advantage that ereaders enjoyed is going away. The Kindle Fire HD is Amazon’s answer to this challenge: as tablets get smaller and more ereader-like, the Kindle Fire HD is an ereader that got more powerful and tablet-like.
  • Price: Tablets are getting cheaper, especially the Android ones. With 7″ Android tablets dropping below the $200 mark (a 16GB Nexus 7 sells for $199), ereaders have to lower their price points in order to remain attractive.
  • Battery Life: The low power requirements of epaper and cheaper processors give ereaders a considerably longer battery life than any tablet. This is the one advantage that will ereaders will continue to have over tablets, given the current trend for tablets to get better processors and displays.

Owned by an Angel

Justin Angel (in a suit) and Joey deVilla (in an Aloha shirt) sitting in a cafe

Justin Angel and Yours Truly. Photo by John Bristowe.

I know Justin Angel from my Microsoft days — he was a Silverlight engineer and I was a developer evangelist. He’s now with Nokia and is naturally working on Windows Phone, which leads me to wonder why he wrote an article on his site explaining how to get around in-app purchases, upgrade apps from trial mode to full-on mode without paying, and get rid of in-app ads. His site is currently down; whether it’s because of reasons technological or corporate is anyone’s guess.

2012’s Top Mobile Vulnerabilities and Exploits

Broken padlock

Dark Reading has compiler their list of the top mobile vulnerabilities and exploits for 2012. You should read the article for the full version; here’s the list of items:

  1. Twitter SMS spoofing (discovered by my former Shopify coworker, Jonathan Rudenberg!)
  2. Dirty USSD
  3. Android SSL/TLS woes
  4. Android NFC vulnerabilities
  5. Mobile man-in-the-middle attacks using Exchange
  6. Social and sharing authentication flaws
  7. Zitmo, a.k.a. Zeus-in-the-Mobile

Chart showing mobile traffic to The Guardian

The chart above is from the Guardian article Fragmented world: what two years of traffic data teaches you about mobile. In 2010, Apple devices were already accounting for over half the Guardian’s mobile traffic; by 2012, they’re now accounting for about three-quarters. The Guardian serves about 3.3 million page a day to mobile devices, not counting those served to their iPad-specific app.

DevOps Best Practices for Cross-Platform Mobile Apps

This video features IBM’s Sanjeev Sharma’s presentation, DevOps Best Practices for Cross-Platform Mobile Apps, which he gave last month at MoDevEast 2012. DevOps gets little love in the mobile world, and I’m glad to see Sharma explaining its importance as well as showing some good techniques.

This article also appears in Mobilize!: The CTS Mobile Tech Blog.

Categories
Uncategorized

Diving into Android

Photo: Joey's Samsung Galxy S III and iPhone 4S, side by side

My Galaxy S III and iPhone 4.

I’m overseeing the development of a mobile diagnostics app for both iPhone and Android, but I’ve been using my cofounder’s Samsung Galaxy Note as my Android testing machine. It was high time that I stopped using his and got my own, so I paid a visit to Rogers a couple of weeks ago and picked up Samsung’s current flagship phone, the Galaxy S III. My primary SIM card currently lives in it, while my secondary one has taken up residence in my iPhone 4S. I’m one guy on Rogers’ family plan, so I have a third phone number and matching SIM; I’ll see how the BlackBerry/Windows Phone kumite for Distant Third Place shapes out and I’ll drop that SIM into the “winner” (for lack of a better word).

As you can see from the photo above, the Galaxy S III seems considerably larger than the iPhone 4S. It made me glad that I didn’t opt for the even larger Galaxy Note II, which I suspect is a plot to bring back those cargo pants from the ’90s. I have the white 16GB model, which I put in a white OtterBox as a defensive move against Murphy’s Law and as a result of having watched Android Authority’s “iPhone 5 vs. Galaxy S III drop test” video:

(The white Galaxy S III inside a white OtterBox has a certain Space: 1999 charm to it.)

I had my last Android device during my Microsoft days as a competitive research device. It was a Sony Experia X10 running the janky old 1.6 edition of Android, and while it was a damn sight better than the even-more-janky-if-such-a-thing-is-possible Windows Mobile 6, it didn’t quite have the polish that the iOS of that era (version 3, back when it was still called iPhone OS instead of iOS). I’d since noodled with other Android devices as time went by, and they all had the same problems: the not-quite-right UI that was at least in part hastily cribbed off Apple and that jittery, jerky scrolling that reminded you that you were most certainly not on an iPhone. The UI and scrolling are a good deal better with the 4.0 version, and thus far, nothing on the Galaxy S III has made me want to say “Screw it, I’m putting my primary SIM back in the 4S”. I’ll probably switch primary phones from time to time, but so far, my experiences with the Galaxy S III have been quite good.

Splash screen for Android Developer Tools

In addition to teaching myself iOS development (which is going nicely, even though I haven’t been able to dedicate as much time to it as I’d like), I’ve started noodling with Android development, which takes me back to a language I haven’t touched since its 1.2 days: Java. In my opinion, C# has taken on a lot of features and syntactic sweetening that make it a better Java than Java, but Java is what you use to write Android apps, so I guess I’ll just have to take it on the chin. I have similar complaints about Eclipse — it’s got all the hallmarks of design-by-committee — but I’ve dealt with worse. At least getting the stuff you need to develop Android apps has become much simpler: it’s all in one place with the ADT Bundle; you can just download it and (mostly) go. You still have to go through the dance of fetching emulators, but after some very quick searching around, this video pointed me in the right direction. After that, I dove into the world of activities and intents.

Last evening, while my Galaxy was plugged into my MacBook Pro, I got an alert saying that there was new firmware available for my phone. It turned out to be the Android 4.1 (a.k.a. “Jellybean”) upgrade that Samsung Canada has promised to Galaxy S III users in early December (the stock Galaxy S III comes with Android 4.0, a.k.a. “Ice Cream Sandwich”). The upgrade installed without any technical problems, but I have one complaint: the upgrade app for the Mac is hardcore modal. Its window insists on being the topmost all the time and soaks up most keyboard and mouse events, making your Mac largely useless for other work as it downloads and installs the new Android. Luckily, I was running the upgrade before going to bed.

So far, nitpicks aside, I’ve had a pretty decent experience with the Galaxy and Android.

Categories
Uncategorized

How Software is Made

It’s funny because it’s true:

'Sandra and Woo' comic: 'Richard's Guide to Software Development'

Comic from Sandra and Woo. Click to see the original.

Categories
Uncategorized

A Fairer FizzBuzz? and Other Thoughts

In response to last week’s article, in which I wrote about interviewing programmers for a position at my startup and giving them the FizzBuzz test, a number of people wrote in to tell me that knowing how to determine whether a given number is a multiple of another number — a task made easy with the modulus operator — was esoteric knowledge.

One such complaint came from none other than Rob Conery, who among other things is the guy behind the tutorial site Tekpub and co-creator of the excellent podcast This Developer’s Life, and doer of other interesting, geeky things. He wrote:

I would fail that test. I would fail it for a number of reasons – the first of which is what *you* perceive to be a “good programmer”. I don’t want to sound negative, but I would urge you to reconsider what you’re doing. You probably sent some very good talent out the door.

Here’s my point: these are *people*, not machines! I find the attitude of “let’s see how good you are at writing this arbitrary bit of gotcha code under the gun” soooooo very Enterprisey, where arbitrary metrics can somehow convey what the worker will do for you.

I can’t tell you the number of programmers I’ve hired “on a hunch” – that didn’t know the basics of what I needed them to do. But I could see the light in their eyes, I could *feel* their need to WIN – and you know what? They were the best damn employees I ever had.

You know who were the worst? The ultra-geek engineers that could kick out FizBuzz in minutes.

I wish this mentality would shift. I just hired a person here at Tekpub who I now couldn’t imagine doing business without. You know what he was doing when I hired him? REAL ESTATE APPRAISAL. Why did I hire him? Because he was smart and motivated. He picked up *everything* I needed him to know with 2 weeks – and he did it on his own because he *wanted it*.

Anyway – sorry Joey if I’m coming off negative. I have a soft spot for these kinds of posts that translate to “OMFG Look how DUMB these kids are!”.

/rant

Hey Rob, don’t worry about coming off negative! I have no trouble with people taking issue with my ideas in the comments, especially if it’s in the service of our craft. It’s also an honour to get a comment from one of my favourite podcasters.

Modulo Math

While I think that the modulo operator falls under “basic programming knowledge”, I don’t think it’s the crucial part of FizzBuzz. I think the decision-making part — knowing when to output “Fizz”, “Buzz”, “FizzBuzz” or the number — is far more crucial. Programming as we commonly do at present boils to down these:

  1. Giving instructions in a specific sequence
  2. Repeating actions in a loop
  3. Choosing among two or more possible actions based on one or more given conditions

I picked FizzBuzz as a test because it’s about as domain-unspecific as it gets. Maybe the “determine if a number is divisible by 3 or 5” part is too mathematical, but there’s no reason I can’t eliminate it.

Would the FizzBuzz test be more fair if I said “Assume that there’s a function called multiple_of_3 that accepts a number and returns true if and only if the number is a multiple of 3, and a function called multiple_of_5 that accepts a number and returns true if and only if the number is a multiple of 5?”

Pen and Paper

Some people wrote that doing FizzBuzz with pen and paper was unfair. Would you consider the FizzBuzz test to be more fair if I let candidates use a computer?

The Observer Effect

Other commenters wrote in and said that I may have passed up some good people because watching them like a hawk with a stopwatch as they wrote down their solution might have thrown them off their game.

Allow me to clarify: I did no such thing. I gave them a spot at my desk, sat down at another desk, pulled up my iPad and read. There was no stopwatch; just a quick look at the time every now and again, mindful of the fact that we had only an hour for the whole interview.

I tried to make it as non-intimidating as I could, and I was aware that even so, it must been at least a little intimidating. Call me a hard-ass if you must, but this is a startup, and we’re int he business of writing mobile software for enterprises. The field is one giant moving target, enterprises can be rather arbitrary and fickle customers, and we’ll be competing with established players with far more resources than we have. If you can’t take a reasonable amount of pressure (and hey, sometimes there’ll be an unreasonable amount), the programming jobs I have to offer aren’t for you.

Looking at Candidates’ Past Work

I asked candidates if they could show me samples of past work, especially work from their previous or current job. Some could, but others weren’t able to for various reasons. Some projects were company-internal websites that couldn’t accessed from outside. Some couldn’t be installed on their own computer for technological or legal reasons.

I also asked candidates to show me any side projects. If you have the time to have one, they’re a great way to demonstrate what you can do, and they’re completely under your control. However, not everyone has the time or inclination to have a side project.

One of the reasons I used FizzBuzz was to get around the problem of assessing their programming skill in the absence of being able to view a candidate’s past work.

Going with Your Gut

In his comment, Rob Conery pointed out something that I believe in: depending on your situation, the “ultra-geek engineers” might not be the best people for the job. He talked about a Tekpub hire whose last job wasn’t programming, but real estate appraisal. He went with his gut and simply hired someone who was a good fit, smart and hungry.

To that, my instinctive reply is: You know who also went with their guts? Every U.S. election pundit who predicted a Romney victory in spite of Nate Silver’s silly “math”.

But seriously: the guys I hired would’ve likely have been overlooked by Shopify, Unspace and a bunch of other hot-shot startups. Like Rob’s hires, they’re smart, hungry, and a good fit — and they also passed the FizzBuzz test.

Is it Fair to Even Have a Test?

The last two companies for which I worked — Microsoft, then Shopify — are quite different in many ways, but one thing they have in common is that they issue tests to people applying for development jobs. I thought I was being fair by issuing what I consider to be an incredibly basic test, but some people have written in to tell me that it’s wrong to have any test as part of the interview. What do you think?

Categories
Uncategorized

The Worst Possible Name for an Apple Employee

Oh please, let this be real and not just an elaborate but funny prank.

Found via Make Use Of.

I’m sure he gets beaten up by the iPhone team every day.

Categories
Uncategorized

Further Into FizzBuzz!

As I write this, StatCounter is reporting that my recent post on giving the FizzBuzz test to developer job candidates has received over 21,000 pageviews. Without any prompting from me, my friend Reg “Raganwald” Braithwaite (we both live in Toronto and see each other from time to time) linked to it from both r/programming and Hacker News, and the discussion that first started five years ago with Imran Ghory’s blog post began anew. I thought I’d respond to questions posted in both the comments and forums here, as well as explain a few things.

A Quick Introduction

We’re a small consultancy creating two different applications:

  1. One that does cross-platform mobile device management, and
  2. another that performs a series diagnostic tests on mobile devices.

We’re currently paying the bills and getting in some market research by doing mobile strategy assessments for enterprises and organizations. We’ve also been approached about developing mobile “dashboard” applications that provide a high-level view of supply chains.

The positions we were looking to fill were:

  • A web-and-back-end developer (PHP/MySQL)
  • An iOS developer

A company like ours, at this particular stage of its evolution, often requires its people to not only perform their jobs really, really well, but to also take on a number of other roles as the situation dictates. Circumstances have already required us to — I hate to use the word, but it’s appropriate — pivot. We’re dealing with limited resources, long enterprise sales cycles, the moving-target nature of mobile development and Murphy’s Law. When it comes to hiring, we can’t afford not to be picky.

When Candidates Got FizzBuzz Wrong

That’s me: High Expectations Asian CTO.

In the comments, Vasi wrote:

I’m curious what “failures” look like. Is it complete inability to get anything done at all? Or relatively small mistakes, like ending at 99 instead of 100?

One candidate took longer than 10 minutes while working on FizzBuzz. Since we had only an hour for each interview and a number of candidates to go through, we I had to set that time limit. The candidate had decades of experience, was the one who asked “Do you think I should use a loop?”, and handed this in when time was up:

// Written in C
for (i = 1; i <= 100; i++) {

// A whole lotta stuff scratched out

}

I’m sorry; this is just plain unacceptable.

The most common mistake followed this pattern:

// Written in PHP
if ($i % 3 == 0) echo "Fizz<br />";
if ($i % 5 == 0) echo "Buzz<br />";
if ($i % 15 == 0) echo "FizzBuzz<br />";
echo ($i . "<br />");

I consider knowing when to use a series of if statements and when to use ifelse ifelse to be pretty fundamental, especially for a problem as simple as FizzBuzz.

I was willing to let the classic “using the assignment operator when you meant to use the equality operator” mistake slide:

if (i % 3 = 0)

I was less willing to let this mistake go unremarked:

// Written in PHP
if ($i % 3) {
  echo "Fizz<br />";
} elseif ($i % 5) {
  echo "Buzz<br />";
} elseif ($i % 15) {
  echo "FizzBuzz<br />";
} else {
  echo ($i . "<br />");
}

Even if the mistakes in the conditionals were fixed, there would still be a problem with the code. Please tell me you can spot it.

Modulo Math

Max Howell was the first of a number of commenters to write:

Is the modulus operator domain knowledge? I smirk at the concept. But if an interview asked me to do some bit operations with ~|& etc. it would take me longer than five minutes, and if I had to use ^ (XOR) I’d probably be screwed.

Good question. Our company makes mobile apps for business, and the candidates were made aware of that. I consider the modulus (%) operator to be one of those things that you need to know about in programming for business, because there are many cyclical things that you deal with: days of the week, displaying tables with lines in alternating colours and so on.

On the other hand, using XOR — I’m presuming that Max is referring to the handy-dandy trick for swapping the values in two variables without the use of a temporary variable — isn’t as applicable to the sort of apps we’re writing. However, if we were in the business of writing games or other sorts of apps where bit-twiddling is important, then knowing how to use XOR and its ilk would be important.

The Smartass Solution

Timothy asked what would’ve happened if someone had submitted this solution:

// Written in C#
Console.WriteLine(1);
Console.WriteLine(2);
Console.WriteLine(“Fizz”);
Console.WriteLine(4);
Console.WriteLine(“Buzz”);
…
Console.WriteLine(14)
Console.WriteLine(“FizzBuzz”)
Console.WriteLine(16)
…

He pointed out that not only does this solution works, it uses less CPU power than a solution involving a loop and branching.

I replied that if it were apparent to me that a candidate submitted such a solution and made it clear to me that it was submitted in the spirit of smartassery, I’d give the canddiate points for chutzpah. I’d also give the candidate points for arguing that it’s less CPU-intensive; after all, we are a mobile app company, and battery life is one of those things that our developers have to consider.

Of course, I’d then have to follow up with “Could you give me another implementation, please? Perhaps one using looping and branching?”

Why Bother Defining multiple_of_3 and multiple_of_5?

For these reasons:

  1. It’s an anti-stupid-mistake measure. I’m less likely to miswrite multiple_of_3 than (i % 3 == 0).
  2. It’s DRY.
  3. To demonstrate more than just technical competence, but also a cultural understanding of Ruby. Ruby convention favours lots of short methods. See Eloquent Ruby for details and Shopify’s ActiveMerchant library for examples.
  4. It clearly communicates my intent to the person reading the code, who just happens to be someone evaluating me for a job position.
If I’d been even more clever, I’d have named the methods fizz? and buzz? instead.

“Is This Some Kind of Trick Question?”

Mouad suggested that candidates might believe that the test is too simple and suspect that there’s some kind of trick. I assured them that it was not a trick question and should be taken at face value.

The Sample Size

E.Z. Hart asked:

Out of curiosity, how many is ‘some programmers’? I’m just wondering what the sample size is here.

We’ve promised to certain parties to keep this number vague. The best I can do is say that the total number of candidates could fit in a standard city bus.

In Which Your Humble Narrator Gets Called a D-Bag

Peter wrote:

Giving programming tests in interviews is bullying in the most pathetic passive-aggressive way possible. The programming field is full of dbags and this type of interview test is an example of what happens when said dbags are given the chore of interviewing.

D-bag? A comment as stand-out as this calls for an equally stand-out reply:

But seriously: it would’ve been a d-bag move had the purpose of the test been to reinforce my ego by trampling on candidates, to trip them up by requiring some esoteric knowledge or for some other equally malicious purpose. That’s why I used FizzBuzz; it tests basic aptitude and it’s over fairly quickly. This job is going to be stressful, and if FizzBuzz is giving you palpitations, you’re not going to like the real thing.

A far more difficult test was the one given to me when I flew down to Palo Alto this summer and interviewed at Pebble to be their developer evangelist (I didn’t get the job, but then again, no one else did). They interviewed me over two days, and on day one, they tested me by telling me to build an app — any app — for their previous smartwatch, the inPulse, just to prove that I could code. There was no spec, not much in the way of documentation, but looking at some example code and the comments in the API header files, I was able to put together a working “Magic 8-Ball” app in less than an hour. (I later turned that app into this tutorial.) I considered the test tough, but fair, because their project is a high-stakes one.

Our company doesn’t face the same level of risk as Pebble, but there’s risk involved. We’re bootstrapping the company, which means that until we get customers or funding, everyone’s salary is coming out of our pockets. I feel completely justified in taking fair measures that ensure that we’re not wasting his money.

What Else Did We Ask Candidates?

Yes, we asked them to show us projects that they worked on and saw samples of their code. Not all candidates were able to provide samples; some didn’t have code from their previous work, some of their projects were internal web apps that couldn’t be set up on a personal laptop, and some didn’t have side projects they could show me.

I also had each candidate do a quick code review with me of code written by an earlier developer for our applications. I explained what that code was supposed to do and showed them the running application in action. We looked over the code and I asked the candidates to tell me what they thought of it. While the code worked, it was a big ball of mud with plenty of room for improvement. A number of the candidates said “That looks like something I would write! It’s good!”, while others came up with a number of good suggestions for improving it.

What Purpose Did the Recruiting Company Serve?

They helped bring in a good number of candidates, and they also helped pick out people who would be a good fit for the company. They spent a fair bit of time talking to us to get a feel for the company culture and how we worked. We explained to them that we needed people who were self-starters and comfortable with the sort of risks and uncertainty that would come with the territory. We told them not to worry too much about the technical aspects of the candidate, as we’d be handling that.

The candidates who came in via the recruiter were interviewed by them first, after which those deemed to be a good match for us were then sent our way.

What About Candidates Who Were Having a “Bad Brain Day”?

I kept that in mind. That’s why we didn’t rely solely on FizzBuzz. Remember: I’ve been doing either technical evangelism or developer relations for the past ten years. I think I know a think or two about “reading” developers; in fact, at Microsoft, I took some pretty extensive training on that topic.