Never Lock Your Cell Phone

I was walking out of Nautical Nellie’s, a restaurant downtown, and I guess my phone fell out of my pocket.

A passing pedicab driver saw it and picked it up. He saw that the first number on my contacts list was as rival pedicab company across town (where I worked at the time), so he took the phone to the company headquarters and left it on a table. It remained for a week until I noticed it and picked it up.

On BC day the following year, Sarah McLachlan played at the legislative buildings, and afterwards I went for a bike ride in Beacon Hill park with a friend. We stopped for a nap on a sunny patch of grass, and when I got up, my phone again fell out of my pocket.

About half an hour later, my friend’s phone rang. It was my cousin. He was the second contact on my list, and the person who found my phone had called him. The three of them arranged a meeting at the entrance of the park, where my phone was returned to me.

At a bus shelter in Oak Bay, the young man I was with insisted on tango dancing with me while we waited for the bus. Distracted, we left a bag containing his iPod Touch on the shelter bench.

3 months later, he received an email from a woman.

“I found this iPod in my mom’s knickknacks box. She said she tried to return it, but couldn’t figure out how to turn it on. Ha! I’m sorry I accidentally deleted your pictures, but before I did I noticed that there were a lot of car pictures. I took some snaps of my son’s Hot Wheels to make up for it. If you meet me at Tillicum Mall I’ll give it back to you!”

And we did, and she did.

The first year I lived in Victoria, I dropped my wallet on the bus. I called BC Transit to ask after it – they had it. I went and picked it up. Everything was still there.

2 years before that, in Campbell River, I dropped a different wallet on a different bus. When I noticed, 4 hours later, I returned to the bus terminal. The first driver I saw recognized me, and said that my wallet was on the number 3 bus. “She’ll be back in an hour or so, if you don’t mind waiting.”

I waited, but I missed my ride home. When the driver who returned my wallet learned this, she offered to drop me wherever I needed, since she was just coming off shift and on her way back to the depot.

A different phone, different bus, a different city. Someone at my school found it. He emailed me, using the phone, to meet him in the Business building. He refused my offer of a thank-you coffee, as he was in a hurry to get back to class.

People are pretty awesome.

If you lock your phone and lose it, there’s nothing anyone can do with it but wipe the data and keep it. They can turn it in to your phone company, but it’s not satisfying. More likely they’ll put it in a knickknacks box and leave it there forever.

If you make it easy for people to return your stuff, they very often will. Take a chance.

Also, invest in decent pockets.

How to Dynamically Add Radio Buttons

Haven’t seen a tutorial for this that isn’t badly spelled and hard to grok, so I’ll try it.

First, include the radio group widget and and declare one. You’ll also need LayoutParams and RadioButton, so include those as well.

Inside your onCreate method, initialize the radio group. is referring to a radio group that’s declared in your XML file, so make sure you have that as well.

Back in SomeAndroidActivity, create a method to dynamically add buttons to the radio group.

Then call that method in onCreate.

Easy pie.

A different kind of college course


Bluetooth is not an easy thing to deal with, my instructor tells me. I didn’t believe him, and spent several fruitless weeks trying to get the Morse code Bluetooth chat app to work correctly.

The nature of application development, especially when it’s for a platform other than the one you write code on, is that you constantly stumble over bugs, weirdness and strange errors that aren’t your fault at all. It’s discouraging.

Even so, the course I’m currently taking in Android application development is the most interesting one I’ve had in my two-year Computer Systems Tech diploma program.

It was supposed to be about computer graphics. But the guy meant to teach it dropped out for some reason, and another teacher, here referred to as Robocop to protect his privacy, stepped in.

Robocop had about 3 weeks to come up with a curriculum, so the normal method of curriculum development wasn’t going to work. Instead he used the considerable leeway that the college allowed, to construct an experiment.

6 projects – students proposed and voted on ideas. (Time savings for the teacher – no assignment development).

Anyone can work in any project they want. Download the source from git, decide what you want to do, and do it. Push the changes, then sit back and wait for everyone else to bawl at you for breaking the build. Marking is done by peer reviews. You get a mark out of 10 based on whatever you’ve done this week, so anyone who makes a reasonable effort and documents it can have a perfect score. (Theoretical time savings for teacher – no assignment marking.)

The great thing is, you get as much out of it as you put in. You could do the bare minimum of testing code and maybe tossing out a toString or a small refactor once in a while, or you could rally a team, spend night and day working on, talking about, living in it, and create a commercial grade application from scratch, in three months, with adult supervision the whole time. (Now that I’m an adult I freaking loooove having adult supervision. Takes so much pressure off.)

I wouldn’t say it’s a 100% success – Robocop originally thought that we’d be able to come up with 6 commercially viable, clean, usable Android apps by the end of quarter. I think we’ll be lucky if even one of them technically does what we originally set out to do. Some people wasted a lot of time being confused, asking “What am I supposed to do? Where are the instructions?”

But as an experiment, it’s a home run. As education, it’s exactly what I wanted out of college. Preparation for working with people you don’t necessarily like, who might make brilliant decisions sometimes and really odd ones other times. The hot shame of responsibility for ruining weeks of other people’s work. The freedom to make whatever you want, if you can get the others to play along. I don’t know if the course will work long term for the college, since all the time Robocop saved before class started, he has to pay back trying to keep up with 6 open projects. I hope they keep it.

For me, personally, it’s not a success yet. Not until I can get the stupid Bluetooth connection to work right.



The agonizing process of choosing a new phone

I feel like a complete ass* for even writing this post.

Well, my beloved Blackberry is dying. The charging port is loose and the camera sucks, and these are good enough reasons for a new phone.

blackberry curve with hearts

A bunch of things went into my decision. You should know that the 3 main (only, really) contenders for the new phone were a Blackberry 9360, the new Blackberry Z10 or Q10, and the Google Nexus 4.

Here’s the score:

Familiar clicky keyboard, and I’m a keyboard diehard.
Cheap as chips at $200 or so on eBay.
Already have a BB plan set up on Fido.
Better camera (5mp) than my current phone (3.2mp).
I’ve been really happy with my old phone and this is a slight
upgrade without any real changes.

Blackberry Z10 (or maybe Q10):
New shiny
Blackberry loyal
New shiny counts twice
Really good reviews on the virtual keyboard, and I want to
give it a chance.
I would love to develop for the Blackberry platform
My classes+research have me mega-ultra-hyped about the QNX
operating system – I would also love to develop for QNX.

But they want like 600 bucks for it. Oh my god. It’s not like I can afford any of these things. Minus, I don’t  know, 4?


Google Nexus 4:
Camera is getting rave reviews – gonna go ahead and award 3 points for this.
New shiny (though only once in this case)
I’m already developing for Android.
Cheap for what you get – $363 shipped.
Factory unlocked.


The final factor is that I’m moving to Australia in June. My advance scout reports that it is impossible to do anything in Oz without a smartphone. Ask people for directions on the street, they won’t help you, they just tell you to Google it. Kind of lame, but when in Rome, right? My current BB will not be sufficient in this kind of climate, although it does technically have a web browser. Data is expensive and it won’t let you use wifi without a sim card and a plan.

The Nexus can be used without a plan and is unlocked so I can get onto an Australian network without doing nerd stuff.

Not to mention, AUSTRALIA. I’m going to need pictures. I’m not a good enough photog to justify a nice camera, but I do need pictures.


The price on the Blackberry rules it out – at least for now. I’ll get one when I’m wealthy(er). My Nexus is in the mail.


android eating blackberry
Photo found here:

*Is “ass” the right word? I’m thinking of some combination of tech nerd, hipster, tech hipster, first-world-problem-having, latte-sipping metrosexual. Also, girls can be metrosexual, right? I think I’m going to change my gender to “no comment” just in case.

Android Thing for Saving Money on Springs and Avoiding Math

So, my race car is slow, and I cannot afford a new motor because I spend all my money on race cars. Another way to make it faster is to throw in some springs (and shocks) that are a little bit harder than the stock ones.

I flip through the parts catalogue and find some springs that ought to do the trick.Then I look at the price and have a stroke, because they cost like 10 bajillion dollars. Might as well get the new motor – might as well get a new car!

Hmm, maybe there’s a better way. I’m gonna go to the junk yard, where there are tons of perfectly good springs just sitting there in rotten old cars, where I can haul them away for scrap metal money. Dope! Only how do I know which ones are going to be just a little bit harder than my current springs, and also maybe an inch or so lower?

Hey, what. There’s an app for that. Here you go, linky. It is free but feel free to mail me money or whatever, just out of love and sympathy for the fact that I’m broke, and don’t even have a race car.


Put in some numbers that you can find or measure – the modulus of rigidity has to do with the quality of the steel in your spring – if you don’t know it and can’t find it, 14,947,500 is a reasonable number for Moog springs. Get out your calipers and measure the diameter of the wire. Get out your ruler and measure the diameter of the spring. Count up the number of active coils, you don’t even need a tool for that (just the one in your…head). Whang all the numbers in, and the calculator will tell you the spring return rate. Compare those numbers against the ones for your buddy’s cool blue springs, and find out if the 3 coils in a Ford pickup are equivalent to the 6 coils in your Corolla. And if they are, get those springs, get low, and hold on to your money.

If you want to get super scientific, you can calculate any of the five values, calculating your modulos of rigidity for various springs, averaging them up and so on. I leave it to the nerds to figure that out. I may later add the ability to save spring specs for easier comparing, but this is an MVP. That’s Minimum Viable Product, cause holy cow, I am so new at this game.

Things I learned

First of all, I found an easier way of wiring up an OnClick listener. It turns out you can make one OnClick listener for several buttons that do similar things, rather than creating a new OnClick object for each one. Not that it was relevant in this project anyway, since there’s only the one button.

Another good lesson was How To Avoid Doing Math. I got the formula from a website for shed engineers, as directed by DiscoQuinn (my first customer, lol). I then had a couple of helpful friends (Serge)(Matt) do the basic algebra to convert the formula to solve for the other 4 variables. Then I fed the calculator on the shed engineer’s page 5’s for every value, noted the spring return rate, and used those numbers to write JUnit tests for all the variables. AssertTrue(k == 2.605) and assertTrue(n == 5) for everything else, like so:

I’m really pleased about that.

Overall, I’m happy cause I learned a little bit and made something kind of useful. My code this time around is much more beautiful than what I did in the CFM calculator. One con is that I got so wrapped up in coding this, and enjoyed it so thoroughly, that I let my school work slide a bit. Hopefully by posting this, feature-poor as it is, I can put it to bed and focus on my C homework!

Who am I supposed to vote for?

I have no idea, but I’d like to. Let’s make a website that asks you bunch of questions about issues that are currently under debate in your area. Answer yea or nay, and the program begins grouping you with other people who answer similarly. The more questions you answer, the more you can see how many people feel the same as you do, where they differ, and so on.

If you want, you can choose to reveal your identity (name, age, race, occupation, neighbourhood, race, religious affiliation, political affiliation… as much or as little as you want to share). Then the program can match you up in even more detail. Politicians will find it in their interest to reveal their identities so that people can see the name of the person they align with, and maybe decide to vote for them.


This is a win for voters and for politicians

The advantage to voters – they can see what politicians are on their side, rather than just hoping that the guy for their usual party is going to do the right things this time around.

The advantage to politicians – they can see whether people actually agree with them, or if they need to change their minds.

Issues should be user submitted but strongly curated and moderated, to stay on topic and avoid flaming.

Use Cases

It would be super interesting to pass around a tablet with the website on it at PTA meetings, town halls, out front of voting places for last minute sanity checks, at public debates, in grade 10 social studies classes, and so on.

Show me money

Here some ways to monetize it, some better than others.

  •  The usual ad banner at the bottom of the page
  •  Make people pay to add their identities
  •  Make politicians pay to add their identities
  •  Sell it to municipalities, tailored for their location, charge for the license, then for moderation/curation.
  •  Just a tip jar
  •  Make it an app and p2p (I have no idea if this is possible but cool if it is).


For my capstone project at college, we’re working with a local municipality on a website to help voters get informed about local issues. The idea I’ve just sketched out was what I originally wanted the project to be, but our sponsors and my team had a slightly different vision, so I’ve had to compromise a bit. What we’re going to end up with is more of a reddit/wiki about local politics. It should be interesting and super useful, but I’m still sad that my original vision won’t come to fruition, at least not this year.

So the idea is available for anyone who wants to take it and run with it. I hope they do, because I actually do want to know what’s going on in my community, and I don’t really know how to find out without actually volunteering for a local party to get into the action. There is certainly value in doing that, but I’m not ready to make that time commitment – I’d rather just be able to read about the candidates, get a name, vote for them, and know when to lean on them for action.