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.

Would you like to receive updates by email?

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.

R.id.radio_selection_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.

Would you like to receive updates by email?

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.

 

 

Would you like to receive updates by email?

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:

BB9360:
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.
Total:5

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?

Total:2

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.

Total:7

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.

australia

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: http://www.droidforums.net/gallery/droid-wallpapers/p6658-android-eats-blackberry.html

*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.

Would you like to receive updates by email?

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.

screencap

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!

Would you like to receive updates by email?

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.

abTestingDemo
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.

whoAgrees

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.

Would you like to receive updates by email?

Justifying a trip to Australia via Cochlear Implants and programming

 

Being Deaf

 

I use a cochlear implant to help me hear. The thing is amazing, and it’s changed my life. Like, it’s the difference between being a shut-in with no life and being happy, well adjusted contributing citizen. But I always like to understand the devices I use in my life, tweaking and modifying them to suit me. I’d like a phone application to control it, or use it to receive phone calls, or whatever. Make the implant itself the size of the loonie, like the magnet part currently is, and control it only remotely. In this way it could be more seamless and waterproof.

firstCI

 

Programming

 

I’m almost done my diploma in Computer Systems Technology. It’s a practical, hands-on course where you get tons of programming experience, like probably more than the average software engineering graduate gets. Last year we had a pretty amazing teacher for Java – a rather hard headed individual who was tough to get along with, however, he demanded more out of us than most teachers do, and got what he asked for. I think everyone who passed the course came away with an actual understanding of Java.

This year he’s teaching us Android programming. You can imagine how stoked I am. After this I’ll be able to build the interface for exactly the program that I want to control my CI.

pintsize

 

 

Moving to Australia

 

The company that makes my CI is located in Brisbane, Australia. I’m going to be moving there in about 6 months. I’ll  have a diploma in computer programming, 6 years of being a CI user, and the ability, unlike many deaf people, to communicate clearly in English my needs and ideas for improving the equipment, and I’ll be in the city looking for a job.

Am I not the exact person that Cochlear is looking for? I think so. My mission now is to let them know.

Goal

For  CI company that makes my CI, which is based in Australia, in Brisbane where I’m moving to anyway, to hire me to make remote controls applications for their equipment. Everything kind of… works.

So, I’ll do the online application and all that. But this is going out to the internet, in hopes of finding the engineer, now working at Cochlear in Brisbane, who might be able to make room in his budget for one more engineer who has something special to offer.

australia

 

Would you like to receive updates by email?

Screw you world, I finished a project

 

 

It is a moderately useful Android app that you are welcome to download from here. The app does some very simple math – given the size of an engine, the maximum RPM of the engine, and the volumetric efficiency of the engine, it tells you what CFM value you need when shopping for a carburetor. CFM stands for Cubic Feet per Minute.

I think I mentioned something about being frustrated with the developer tools last week, can’t remember. Anyway, it’s fine now.

 

App is  here, source code is here.

 

Would you like to receive updates by email?

Skipping School

I stayed home from school today. I thought all my classes would be cancelled because of a teacher’s strike, but it turns out that my teachers have no objection to crossing picket lines, and classes went on as usual. However, by the time I found out, I was already lost in a coding haze.

When you have a good flow going, it is very difficult to stop. As per a couple of facebook posts that some friends of mine may have seen, I am trying to start developing Android apps. This requires installing an IDE (Integrated Development Environment) and a plugin for that program, to emulate an Android phone on my laptop.

This was not an easy process. At first the emulator worked fine, and I was able to run a simple tutorial application, but then everything seemed to stop working, and I couldn’t figure out whether the problem was my code, or the tools I downloaded. I’m still not sure, to be honest. But after several days of constant googling about it, I got the emulator to work. Several hours after that, I got my code to work.

Some people are familiar with the “flow” state, where you spend hours working on something and get totally lost in it. At best, days pass unnoticed, and you end up with some minor success. I hope some of you can share my feeling of relief when my code finally worked. For the others, I hope I can encourage you to spend time doing the things you love, and get lost in them.

Sometimes you have to shut up the voices that tell you the things you’re doing are a waste of time, and that you should do homework, or chores or exercise or whatever. Ignore those voices. A good flow is never a waste of time, it is a reward on its own.

If you’re curious,  the app in question is a simple calculator for determining what size of carburetor to mount on an engine, given the size of the engine and the maximum RPM of the motor. It’s pretty crude, but you can have my code if you want. Leave your name and email.

Would you like to receive updates by email?

New Phone Time

A couple weeks ago, my Blackberry started acting up. When the battery was low – not very low, like maybe half – I would get a white screen. All the buttons stopped working, I couldn’t turn it off, just bright white screen with nothing on it, until the battery died.

So, I started thinking about Android phones. My friend Kirby told  me of the Nexus 4 that was coming out in a few days. I didn’t manage to get one before they sold out, but it was too late anyway. I had downloaded the developer tools and was enthusiastically hammering away at my first Android Hello World.

Since I don’t actually have an Android phone, I have to use an emulator to test whether stuff works  – this is a slow, painful process that causes a lot of distraction and Redditing. However, after several days of trying to get the emulator to work, I was successful. Now to get my actual code to work, yay.

Here is some useful information:

If you find this text file in /adt-bundle-mac/sdk/tools:

The command you’re looking for is this one:

 

 

Would you like to receive updates by email?