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.

How to Stay Warm on a Motorbike for Cheap

I’ve had my bike insured and running since January, and damn if today wasn’t the first decent weather we’ve had in all that time.

Step 1:

Gloves. If you’re a responsible adult, get some that have nice, plush lining, carbon knuckles, leather shells with no perforations. Gauntlets that go all the way up to your elbow. Velcro fasteners. Spend $200.

If you’re an irresponsible adult, like me, who can’t keep track of a pair of gloves for more than one year, get whatever you can for 40 bucks and hope for the best. When you start to feel pain in your fingertips, turn back. When the pain goes away, pull over at once and thaw out.

Step 2:

Jacket… and another jacket underneath.

2013-03-22 17.50.13
That’s a textile jacket with a lining, and a leather jacket underneath.

And a hoodie under that, and a thermal tee under that, and a tshirt as well. And just to be safe, stuff some newspapers down the front to block the zipper draft. And wear a tshirt around your neck, scarf style. Or even just a scarf. But tshirts seem to be easier to wrap around your face, bandit style, to keep your chin nice and warm.

Step 3:

Long johns. I got a super fancy pair of merino ones long ago. Best thing in the world. Wear them under your usual pants, then wear Carhartts over that. Take the Carhartts off before you go into a place of business, those things are disgraceful.

Step 4:

Boots. The higher top the better. I dunno, I’ve just been wearing these, and they seem to work ok. At least, my feet aren’t any colder than the rest of me.

Air Force BootsYou can get them by joining Air Cadets, then keeping your issued uniform after you quit. Or, the army surplus store.

Step 5:

Just stay inside for god’s sake, this is ridiculous.


What is going on in my community?

I don’t know, but I’d like to.

I’ve got a team gathered, and we’re going to spend the next three months trying to answer that question. We’re making a website for people who care about Victoria. We want to know what decisions are being talked about right now, and who’s involved in making those decisions. This information is freely available online from a wide variety of sources, many of which are out of date, and of questionable reliability. City council meetings are open to the public, and take place on Monday evenings a few times a month.

Last Monday night I thumped into a City Council meeting, 10 minutes late because I couldn’t find the front door. The esteemed Councillors and the Mayor stared at me, aghast, as I burst through the emergency exit, carrying a motorcycle helmet.

After I got comfy in the front row, they continued to discuss the agenda, furtively glancing my way now and then.

They talked about garbage collection, street people, and special trees. I think. I couldn’t really hear much, as they were talking quietly and didn’t seem to be bothering with the microphones that each seat was equipped with.

I’ve got a copy of the agenda from that meeting, but it’s pretty dense, to be honest. I would have liked to hang around and chat about stuff with the councilors afterwards, but they threw me out at halftime.

So we’re making a website

It’s about Victoria and the surrounding neighborhoods, with a little bit of Wikipedia and a little bit of Reddit, with our own twist thrown in.

The Wiki

The wiki is mainly about politicians and ongoing local issues. On typical politician’s profile, you’ll see his official junior-intern-curated bio on the left half of the page.

And on the right, there’s the other side of the story. A community-edited wiki where citizens can add what they know about the pol – what they’ve voted for, what their special interests are, what core values they’ve demonstrated through words and actions over the years. If there’s a big discrepancy between the official bio and the community version, you’ll know to be suspicious.

A hypothetical politician's profile.
A hypothetical politician’s profile.

Likewise, if the pol is well-respected, hard-working, upright and honest, full credit will be given, and you’ll know that this is someone you can vote for.

The Reddit

Reddit is a great place to waste time, and also a great place to learn. Users submit links to articles, or text posts. New, controversial, and popular items float to the top and the front of the site. The content is always changing and always current.

An example of how the reddit page might work.
An example of how the reddit page might work.

On our page the first thing you’ll see is a bunch of questions. They’re going to ask things like, “Should we let Mr Clyde off the hook for his garbage collection bill this month, since he’s managed to get his annual trash down to basically nothing?”** , and other questions submitted by users.

The current administration seems a bit condescending towards Victoria youth. Let's show them how hard we're trying, despite how difficult it is to live in this city.
The current administration seems a bit condescending towards Victoria youth. Let’s show them how hard we’re trying, despite how difficult it is to live in this city.

And you can vote yes or no, or check the comments and see what everyone else thinks. The fun part is, your votes are tracked on a political compass. So if you vote like Mayor Leonard does, you move closer to him on the compass. If you always vote differently from Elizabeth May, you move away from her.

So you can see how many other people around Vic kind of agree with you on stuff, and go meet up with them, or try to convince them to see things differently, or maybe find out why a lot of people think different from you (maybe you’re wrong??). And you can also see whether a politician is going to vote for the same things you’d vote for, so that will help you when it’s time to cast ballots.

People claim they don’t vote because they don’t know enough about what’s going on. Let’s take that excuse away. Also, let’s make election day a paid stat hol, that should help as well. Do you agree? Well, you’ll be able to let me know on the site soon enough.

An example of something that young Victorians feel strongly about. The author made their feelings known on St Pat's during the 20 minutes I was inside a McDonald's. Let's give people like them a better place to be heard.
An example of something that young Victorians feel strongly about. The author made their feelings known on St Pat’s during the 20 minutes I was inside a McDonald’s. Let’s give people like them a better place to be heard.


** Actual agenda meeting discussed in council chambers. Is this question too trivial for you to care about? Tell them.

Goats are cool

Today I found a blog written by a seven year old named Yefet. It’s pretty good.


Baby Goats
Baby Goats

What makes it good:

  • His posts are very short.
  • He writes about stuff he does and enjoys, like raising his goats (he lives on a farm).
  • He is very lucky to have parents that take him to do interesting things.
  • The pictures are great.

I’m going to take a lesson from Yefet and end this post here. But go over and read his stuff!

Awkward. …Pause.

Have you ever been ignored?

People are chatting about something, you interject. In a loud clear voice, a comment that you think is funny, or smart, or at least worthy of acknowledgement. Just a grunt. Just a glance. But they ignore you.


No? Just me, huh?

(Don’t mind the beautiful people, they’re just here to make reading a little easier).

I want to understand why this happens, cause it does happen, a lot. The more I become aware of how other people interact, the more sensitive I am to it. Some people say it is because my voice is different. The hard-of-hearing accent is odd-sounding L’s and R’s, missing T’s, K’s and S’s, and a lower pitch overall. Maybe this voice is so unexpected that people miss it, the way drivers sometimes miss seeing a motorcyclist. They expect 2 headlights, not one, so they don’t see the one headlight at all. Splat.

Other people say it’s a problem of timing. Even with the best mechanical ears money can buy, I only hear a small percentage of the words in a conversation. My brain fills the rest in based on context. It’s hard work, and sometimes there’s a millisecond processing delay. You know how when you’re Skyping, and the connection is a bit slow? There’s a delay, and you keep accidentally talking over the other person. Even if it’s your friend that you normally have great conversations with, the delay causes awkwardness because the timing is off.

So, I’ve got a little of that going on, but in real life.

Any other ideas?



Weekly Report #2

107 days remain til June 25. Not that I’m counting. But that’s the day I’m leaving for Australia, and anything that doesn’t fit in my carry on luggage ain’t coming.

Today’s a day of purging. I just went through my clothes and found 35 lbs of stuff I don’t care enough to keep.

That’s a lie.

Some of that stuff hurts to get rid of. Purging is a time of introspection – you think about how you spend your time, and you have to justify your choices based on that.

How much time do you spend in nightclubs, nice restaurants, places with dim lighting and dress codes? For me,  not much. That gets rid of about 15 lbs on its own – and it’s not like I had anything really fancy for those occasions anyway. How much time do you spend on your back in the mud, at the racetrack, or in the garage? Quite a bit more. But how many crappy pairs of jeans do you really need? Just one should do it, I think. There goes another 15 lbs. How much time do you spend at the river, the beach, riding my bike, tramping in the woods? Probably not enough. I kept a lot of that stuff, ambitiously. Dress for the life you want, right?

I ended up with a lot of jeans, short pants, purple, green and black T-shirts  and soft materials. Hopefully this’ll help me shop properly in the future.

Clearly, I know what I like.
Clearly, I know what I like.

This is hard. It really underscores the fact that I don’t know what the hell I’m doing with my life. If I was living the life I wanted, I’d have a lot of cycling jerseys, shorts and really hip jeans, for alleycat races and road rides.

I’d have tactical clothing full of pockets for helicoptering into the forest and getting really up close and personal about environmental data collection. I’d have a T-shirt with my own company’s logo on it, one of dozens that are tossed around at tech conferences. What I’ve got instead is a lot of black T-shirts and cheap jeans, for looking presentable and unremarkable in generic company. It’s like a blank slate that just keeps on being blank.

That’s what I have left after I get rid of all the stuff that isn’t me.