Categories
code development programming quickfix

Rabbit Hole Code

In an attempt to steer my referrer logs away from the HTC Hero, I wanted to get back to something I mentioned on Twitter a while back. I want to talk about rabbit holes in your code.

After a while, all code will have at least one rabbit hole in it. You know you’ve found one when a simple looking change starts you scratching a little deeper because the fix isn’t working or there’s a code smell you can’t quite figure out. You peek, you dig, and suddenly you realise that a 5 minute job has taken half a day.

It’s time to step back and evaluate. Take the red pill or the blue pill. Do you paper over the cracks as best as you can or do you find out how deep the rabbit hole goes? Take the first option and you’re taking the technical debt deeper in to the red, but take the second and you run the risk of not fixing bug zero : shipping.

There’s no magic answer to the question. I can’t tell you which pill to take, but please watch out for rabbit holes in your code. Be prepared to deal with them. And be prepared to live with them. Every architecture has pain points that lead to rabbit holes, but some have more than others.

How have you dealt with your rabbit holes?

Advertisement
Categories
code development

HTML5 Survey results

After my HTML5 talk, I issued a survey asking people about their expectations for HTML5. There were 11 responses, so I won’t make any claims for any statistical significance, but there were a few interesting results. I will leave the survey open, for anyone who wishes to spread the word, and I’ll post a follow up if I get an order of magnitude more responses.

I’ll step through each question in turn and discuss the results.

What features of HTML5 do you anticipate using the most?

New structural elements e.g. <section> <nav> 8 73%
Inlining of SVG and MathML 1 9%
New forms Input types (E-mail, Tel, date) 0 0%
Form validation 6 55%
Canvas drawing 1 9%
CSS Transforms 5 45%
Video / audio 4 36%
Content Handlers 1 9%
Geolocation (Where am I?) 5 45%
Microformats 1 9%
Javascript worker processes 4 36%
Javascript Cross site messaging 2 18%
Javascript undo 1 9%
Javascript drag and drop 1 9%
SQL offline storage 2 18%
Web storage (key/value pars) 2 18%
Offline application cache 0 0%
Web Sockets 2 18%
People may select more than one checkbox, so percentages may add up to more than 100%.
What interests me most about this question is the features with the most hype : canvas, form input and offline cache, have the lowest projected take up, and the feature with the worst browser support : structural elements, is the one with most developer support. Of course, ie6 (via a javascript hack) and Google both support structural elements so all is not lost there.

Are you concerned about the costs or patents covering videos in the browser?

Yes 8 73%
No 3 27%
Only one response came in after Google’s WebM video codec was announced, and that was a no, so the HTML5 format war is playing on a lot of respondant’s minds. Maybe they all still remember the dark old days of GIF.

Which format do you anticipate using the most?

HTML5 4 36%
XHTML 0 0%
Mixture of both 6 55%
No one looking for an XHTML-exclusive output, so worries I’ve heard about the difficulties of producing XHTML content may not be a long term concern.

What platforms are you hoping to target?

iPhone 7 64%
Android 5 45%
Palm 1 9%
Other Smartphones 3 27%
Non-smartphone mobile devices 1 9%
Desktop 10 91%
iPad 2 18%
People may select more than one checkbox, so percentages may add up to more than 100%.

Desktop still has the most love out there, but lots of iPhone developers out there looking at HTML5 (I didn’t ask if this was as well as or instead of the app store), interesting to see the iPhone share completely outstrips its market share.

I’ll leave the rest of the analysis to you.

Sounds like I’ll be giving the HTML5 talk again for those of you who missed it. If anyone else wants to hear it, give me a shout and a bus fare and I’ll see what I can do.

UPDATE: Sorry, the chart URLs ended up pointing to the wrong site overnight. Not sure what happened there. Fixed now.

Categories
programming

HTC Hero Update problems

Update: I managed to get the update working after a few teething problems. Would have been much nicer if the upgrade had told me about the disk space issue before the update or on the warning screen. I hope HTC and Google can fix that for future updates.

I’m repeating this information here in case anyone else gets this problem. This morning I received the Android 2.1 update for my HTC Hero.

The appeared to complete successfully, but left my phone on 1.5 Firmware. The install message appeared again and I asked it to try again. The screen stuck with a warning triangle on the installing update screen. Pressing the reboot buttons (phone + home + end call) gave me a menu, and the following error:

Finding update package...
Opening update package...
Verifying update package...
Installing update...
Copying files...
E:Error in checkspace
(Status 64768)
E:Failure at line 11:
run_program PACKAGE:checkspace -f /data 26214400 "ro.build.fingerprint=htc_wwe/htc_hero/hero/hero:1.5/CUPCAKE" FOTAERRORMESSAGES

Installation aborted.

I was able to reboot from that menu, but I am still on 1.5. I will trying clearing space on my phone and see if I can upgrade then.

Update: A few minutes after rebooting, a message came up confirming it’s a disk size problem:

Upgrade Error !

Phone storage space is 21.79MB. Please reserve at least 25Mb.
Not enough memory in the phone. Please remove unused applications and files then try again

That’s fair enough, but the user experience of hanging on the warning screen could be improved – Maybe put the message there?

Update: Cleared 12Mb of GMail storage. Trying again…

Update: Looks like the htc hero update has taken – new htc logo with the “quietly brilliant” tagline has appeared 😀 I’ll describe my experience of the new OS in a later post – this one’s really about the update process. Unfortunately it reminds my of Linux updates around 10 years ago, but if Ubuntu and others can fix that, I’m sure Google and HTC can fix theirs.

Update: Looks like the update’s working. New unlock screen, new USB options (tethering from the notification menu 😀 ) and all the apps appear to be intact.