Monday, May 31, 2010

Androidespair

In the last year or so, I've launched maybe four legitimately-sized personal projects: The Voting Game, Dinnnner, Is It A Party?, and Whistle Weasel.

The Voting Game still exists, albeit with some big flaws (when you create a game, it's public; the workflow is unintuitive; doesn't really support people not voting for certain things; you can accidentally delete an object). Dinnnner crashed and burned due to issues with people not getting emails; plus, it was not really any better than a mailing list. (I didn't talk about it much; don't worry about it.) Is It A Party? is still rocking, for all four of its users (literally), and Whistle Weasel... has issues:

First of all, it crashes if you try to use a Motorola Droid, despite Android's attempts to be the one OS for a lot of phones. Second of all, I just found out the new version of Android (2.2, or "Froyo" as it's unfortunately known) changes something about the audio recorder calibration. So even if you whistle a very high note, you can't get more than 1/4 of the way up the screen. This makes gameplay less than fun, to say the least.

What to do?
1. I hard-coded the calibration values; I could just re-hard-code them with a value that works on Froyo. But then, if you still had the old OS (Eclair), it would not work.
2. Add a new startup flow where it shows the splash screen, then there's a screen that says "whistle as low as you can", then "whistle as high as you can", then it lets you actually start the game. This would be a lot of work.
3. Scrap it.
4. Hard-code the Froyo value so at least it's on my phone and I can demo it as a party trick, then otherwise scrap it.

I'm leaning towards #4, and here's why: I'm not interested anymore. I didn't set out to make an enterprise-grade bit of software, or even a game that's worth $1. I set out to make a silly game that you control by whistling. Also, my code is not very good; the audio recording code I could probably fix up, but I think I've made big mistakes with the UI code design, which is to say, there is not much UI code design.

So what's the big deal? I feel like I'm trying to build up a portfolio. Sure I can write servers at work, but I can also write mobile apps, see? And if it's alive and kicking, I can point to it as a legit Thing That I've Done. (why? I dunno...) Also, I've hit the UI-code-sucks snag with all four of my side projects, and while they've been mostly small enough to limp along with ugly code, I've never relished diving back in to the UI. I'd like to actually make a solid maintainable program.

But I think I should let it go. I'm learning each time, so maybe next time when I'm interested in another program, I can design it better from the start. Software is transient anyway, and any energy maintaining this would be more energy not spent doing something else exciting and useful, and either way, nobody will remember it in 5 years. Finally, I should really lighten up: writing software on the side while you already have a full-time job writing software is hard work. Sheesh, this is supposed to be fun!

Side note: pretty much all of my problems with Android have come from the AudioRecord class, which is supposed to let you record audio and fiddle with it on-the-fly (as opposed to saving it to a file). I think my next project should not involve recording audio.

Sunday, May 23, 2010

More thoughts about Thailand

I take it back about Thailand being kind of like India. In India, we had adversaries. In Thailand, we had helpers. It felt safer than lots of places in the states, walking across Chiang Mai at midnight. (okay, not Bangkok; I'll take a mulligan on that one.) Maybe I'm more confident or more naive now. Also, large parts of Chiang Mai are tourist ghettos.

Here's a story about A. how I was a hero this one time, and B. it sparked some thoughts or something; it's going to sound self-congratulatory, but I kinda want to make sure I remember it, although I probably will anyway. So I'm riding my motorbike around Doi Suthep National Park, where there is:
- a temple
- some nature
and I had already been to the temple so I went past it this time. Signs pointed to a Hmong village. Y'know, cool, so I went there, though the LP called it "touristy." Okay, it was touristy. But I wandered into the Royal Something Conservation Project HQ for the city, and a couple young folks working there sold me some coffee and discussed lychees with me. (along with what they did, where I'm from, etc.) And this guy had a crossbow-ey thing that shot bamboo arrows, and for 10 baht (30 cents) I got to take 3 shots at a papaya. So this was touristy, but still awesome. I'll come back to this later.

So then I rode on, and the road got more smaller, then more dirt-like, then more bumpy, but there were signs to another Hmong village. Might as well; I was really digging just being outside and exploring. Eventually I found it. No tourists, just people living their lives. So I felt a little out of place, wandered a little, and left. Followed another path until I met another biker who warned me that it was too bumpy ahead. Okay, so I turned around. I noticed he was pushing his bike, so I asked if it was broken. Now I think Thai was not his first language- probably Hmong or whatever he spoke in his village. But between the two of us, I found out he was out of gas. He was going to push the bike the 1/2 mile back to the village! So I offered him a ride back. Hooray, I thought, I did a Good Deed today.

Then with some broken Thai, he showed me around his village. His name was Yen. We sat at a place with a view and watched the krung-bins fly into the Chiang Mai sa-nam-bin. That was neat, thanks, Yen! But I should be going. Why don't you get some gas and I'll drive you back to your bike. Pantomime plus my broken Thai: oh, you have no money for gas. No prob, I'll buy you a liter. He didn't understand.

Then who comes along but another farang! Her name's Luna, she's from Russia by way of Vietnam, and she was not having a good day. She was not digging the northern Thailand way of life. It wasn't jingoism or Ugly-Americanism, as she lived in Vietnam for years. I think it was just that certain areas don't sit well with some people. 's fine with me, I like hills, but to each his/her own. She didn't know Thai, but she needed gas.

And my bits of Thai came through: as I interpreted between Luna and Yen, we all understood that she needed gas. And then "hai kun" came to me: "to give to you." "She'll buy some gas, and I'll buy some gas to give to you." Understanding all around! We then went to some guy's shop who sold gas in 1L liquor bottles and worked it out!

And it didn't feel unsafe, or weird at all, like I was being taken advantage of. That's nice. Tourism feels nice in Thailand. It's big (6% of their GDP; don't know what ours is) but as a result, they're totally cool with it. I didn't encounter any anti-tourist snobbery like you get in the US or Europe. If you're into traveling, I recommend Thailand.

Saturday, May 22, 2010

One of my "someday" projects:

a small keyboard, plus a tiny LCD screen. All you can do is type text files and save them. Then I guess it's got a USB key or something so you can plug it into a real computer to get the text off of there. I'm just incapable of actually writing anything these days, and phone keyboards are right out, so I have to find a little bit of internet if I want to blog while I wait for a flight.

I guess just a keyboard that plugs into a phone would work fine; then I could just use whatever notepad program. In fact, they probably make those. I should look into this.

Point is, can we talk for a minute about Thai food? And where has it been all my life? I've fancied myself a bit of an Indonesian chef (despite the fact that the closest I've ever been to the place was its colonial oppressor), a Japanese chef (despite the fact that I'm not really okay with buying a lot of fish) and an Indian chef (despite the fact that Indian food is so heavy the beatles should have written "I Want You/Indian Food Is So Heavy")

I sort of wrote it off kinda like I've written off China and Africa for now: I'm sure it's great, but it's a whole vast world that I haven't even started to explore, and I have a lot of other interests to check out first. I didn't know what I was missing, and here's maybe why: our culture has really uneven food experiences. Your day-to-day Western food might be pretty mediocre, and then once a month you go out to a fancy restaurant and it's awesome. So great Italian or French restaurants really exude confidence. They say "you are having a special meal right now!" On the other hand, great Thai restaurants cost $8-12, have some pretty average decor, and the food tastes very good. They don't aim to be the best meal you've had all year. And the thing is, they don't have to. In Thailand, I had pretty consistently great food, every meal, every day. It's all fresh, it's all cooked by experts, and it's all cheap. If you live in a world like that, you don't need to have occasional splurges. It's like fresh air: living in Seattle, the idea of an oxygen bar seems absurd, but if you lived in Shanghai, it'd probably seem like a nice indulgence. Needless to say, having pretty great food/air all the time is probably healthier than these things being mostly crummy but occasionally awesome.

Here are some reasons that Thai food is great:
- most dishes use only one pot.
- Thai food all uses mostly the same ingredients.
- it's cheap; even if you eat meat, you just buy a little and cut it up. You're not serving steaks.
- it's healthy. Probably the unhealthiest thing in it is the white rice/noodles. (note that "coconut milk has saturated fat therefore it's bad" is false.)
- it's easily vegetarianable by just not using meat. (most dishes still hold up well without it.)
- there are pretty well-defined Thai flavors and dishes.
- so many fruits!

Here are some reasons it's not so great:
- there are a lot of ingredients.
- kaffir lime leaves and galangal are still not in your local mega-grocery, and often not in your local Chinese grocery.
- it's not really fit for Seattle's climate; here you don't get all the nice fruits.

So that's where my cooking interests are going to be heading these days. Any of you enjoy Thai cooking, and have any recommendations?

Friday, May 21, 2010

Let's start unpacking this trip now

while it's still fresh in my mind. Also I have an evening with nothing to do, and really, typing up some things about this trip sounds like a fun thing.

(I'm really quite rubbish at having fun. I always feel like there's someone over my shoulder saying "you're not having enough fun!" or "you're not having the right kind of fun!" So that's kind of annoying. But the thing is, the voice is usually right. Often it gets me to do things that I wouldn't otherwise have done, and I'm usually glad when I do things. How to benefit from this go-get-em voice while not going crazy? Good question.)

Enough about me! Some thoughts about Thailand:

- Thailand at first seems like India. It's hot and there are elephants. Everything is cheap. A lot of people are poor. But Thailand is at least kind of reasonable. You shouldn't drink the water from the tap, but you can trust a glass of water in a restaurant. You should haggle a little, but most people aren't trying to rip you off hardcore. Buses and trucks are overfull, but like "dog carrying two bags" full, not like "hamster carrying a credenza" overfull. And yeah, it's not a super rich country, but there's not so much suffering all over the place.

- That said, the government is a mess right now. I guess there's an uneasy peace where the main protesting in Bangkok has stopped. But still, the internet cafe where I'm typing this (in Chiang Mai) will close in 1/2 hour (2 1/2 hours early) because there's a curfew in effect. Whoa! From what I understand, the country has a case of urban-vs-rural, where Bangkok has the money and power and everyone else is not too pleased. Plus they want democracy or something, and they see that "their man" Thaksin Shinawatra got ousted from power a few years ago and they want him back. I guess? But also, Thaksin is super corrupt. Good idealism! Bad particular choice of hero.
But what do I know, I'm just a kid. Wikipedia knows more, as it always does, although the neutrality of this article is disputed.

- Geez oh man, don't come to Thailand in May! What are you thinking?! It's about a trillion degrees. Note that "35" means "95", and "40" means "104". Plus it's humid.

- Memo to my future self, if I am ninety years old or living in a city where biking is infeasible: get a Vespa! Oh yeah, Mom and Dad stop reading now. I rented a little scooter over the last couple of days and had a really splendid time zipping along the hills and valleys of northern Thailand. You get a lot of the benefits of a bike (wind in your face, easy to park, fun to ride) and some partial benefits of a bike (doesn't use a ton of gas, is relatively cheap) and a couple other ones (you can go long distances, even if it's suffocatingly hot and humid out; you can carry a passenger). What a good deal! Mom and Dad you can start reading again now. It was totally safe, the roads here are great and pretty empty, the bike went like 35mph, I had a super helmet, and did I mention how totally safe I am?
(plus how it was totally the greatest for serious?)

- Prices of things, in case you're considering a trip:
a guest house room with A/C in Chiang Mai: $12
overnight sleeper train with A/C: $28
daytime train for a few hours, 3rd class: like a dollar
meal at a night markety stall which is guaranteed delicious: also like a dollar
meal at a restaurant: $2-3
coffee (this is getting popular, especially up north. that is cool.): $1-2
the best fruit ever, in a bag: under $1
1hr massage: maybe $6
cross-town taxi in Bangkok: $5
you get the idea, things are super cheap. Which does change your life: certain things become non-decisions. I didn't have to decide whether I really wanted to rent a bicycle for a day, because it cost $1.50. I used it for a couple hours and returned it. This sort of non-decision is nice.

Okay, so about that curfew. Shop's closing up. More juicy details later.

Wednesday, May 19, 2010

Bangkok is stained, and it's not my fault

No, seriously, it's a mess. I'm safe, thankfully, and so is everyone else I know in Thailand, which means that violence is happening to strangers, which I guess is better than violence happening to people I know, weird as that is to say. It's a mess in the way that I was never even near any danger but, y'know, last week I was in a city that featured an army shooting its own citizens.

This week I'm in Chiang Mai, having a grand old time on vacation. Woo hoo!

Trip report to follow, and maybe I'll spout about the whole protest situation a bit or maybe not. But also to follow: we are about to celebrate the birthday of the one and only Mr. T on Friday, and if you'd like to receive the 2nd annual Mr. T's Birthday Letter (that is actually entirely about me and not about Mr. T), then send me an email or comment here or send me a facebook twitter foursquare digg twerp snit gropple and I'll put you on the list.

EDIT: I mean, if you want to be on the list, and you weren't last year, then send me a Buzz or something. If you got it last year, you'll get it again this year, like it or not!