Wednesday, October 22, 2008

T-Mobile G1/Android Review

The G1 is not a phone.

Rather, the G1 is a small computer, that happens to have reasonably good phone functionality.

That pretty much sums up what you can expect if you want to be an early adopter of the first phone boasting the Android platform. But of course any prospective buyer wants to know more before they plunk down their cash, so here we go.

Almost every review of the G1 compares it to the iPhone. The main difference highlighted is that the iPhone has a more consistent experience (software and hardware by the same company) while the G1 feels less polished. This is a fair point, but being unpolished can have advantages as well.

Handling the G1 is a satisfying experience, hardware-wise. Despite the criticism of its aesthetics, it fits nicely in your hands (unless you have really small hands) and feels solidly built. Sure, the hinge could break, but any phone can break pretty easily (spill water, drop on concrete, etc.). And, while Apple is married to minimalism, HTC is all about functionality - so, you get a touchscreen, buttons, a full keyboard, *and* a trackball.

The last point is a particular delight - despite having a full touchscreen, I find myself using the trackball far more often when browsing or selecting menu options, as it is just faster and more precise. The keyboard is also quite nice, though I must admit that its not as much of an advantage over the iPhone as I initially expected. Any phone text-entry format is less than ideal and requires getting used to - a physical qwerty keyboard will be slightly nicer and have a less steep learning curve, but I don't think it's that much faster than even T9 if you have adapted to that.

The main advantage of the keyboard ties in to the point I opened with - this is actually a small computer. For regular text entry the keyboard isn't that special, but for entering symbols and numbers it's much better than any other phone I've used. This means you can have things like ConnectBot, an SSH program, and that it could actually be useful and not just a curiosity.

Already there are many Android apps out there, and I have no doubt that we'll only see more and more. The ecosystem is somewhere between the cathedral and the bazaar, and I at least think it's a pretty happy median. There's the "official" centralized market, several other stores popping up, and the fact that anybody who wants to can just make an .apk file and distribute it as they see fit.

Android is an appealing platform for developers - it's open yet able to be monetized, central yet resistant to censorship. The G1 is a capable piece of hardware to realize the aspirations of developers, but I am looking forward to when even more phones boast the Android platform. Other "smart" iPhone-esque phones may be appealing, but I think Android will really make a splash when it is on more "normal" phones in the flip and candybar form factor. Sure, it'll be more limited in some regards (probably no trackball), but the browser and other aspects just blow away other "normal" phones.

For the G1 specifically, the main limitation is that you can only install apps to the internal memory (e.g. not the SD card). This forces you to pick and choose what apps you actually want, and to go with apps that are smaller as well. This may seem annoying, but it's not that bad - if an app is really big it's probably badly written (apps can still store their data on the SD card as well). I hate to say "~40-50 phone apps ought to be enough for anyone", but really, well, 40-50 phone apps ought to be enough for anyone.

So, should you get a G1? It depends - if you're a bit of a gadget lover (and live in an area with decent T-Mobile coverage), then yes. It's good hardware, a great platform, and a lot of promise for future development. If you just want a normal phone though, you might be better off waiting for future Android phones in other form factors and perhaps on other networks.

Android is poised to make significant impact in the mobile market. What will be particular interesting to see is how its various competitors respond - we can only hope that the end result is greater openness for everyone, regardless of their phone or service provider. 

Thursday, July 24, 2008

Coinflips with Chef

You may have seen this humorous job posting regarding a supposed quantitative hedge fund position. Implementing 50 coinflips is clearly trivial in most any programming language, but I decided to give it a stab in Chef, which is an esoteric programming language where the code looks like a recipe.

Here it is:

Coinflip Lime Tofu Hot Dogs a la Sous-vide with Pickle Lemon Garnish.

This recipe returns 50 coin flips, using an auxiliary recipe for pickle garnish to pull the random draws. The edibility of the result is dubious, but apparently it's a favorite for hedge fund gurus.

Ingredients.
50 blocks of tofu

Method.
Press the blocks of tofu. Serve with pickle lemon garnish. Push the blocks of tofu until pressed. Liquify contents of the mixing bowl. Pour contents of mixing bowl into the baking dish.

Serves 1.


Pickle Lemon Garnish.

Ingredients.
84 g diced pickles
72 g diced tomatoes
1 squashed lemon

Method.
Clean the mixing bowl. Put diced pickles into mixing bowl. Put diced tomatoes into mixing bowl. Mix the mixing bowl well. Fold squashed lemon into mixing bowl.

And yes, it actually runs. Install the Acme::Chef Perl module and copy the code into a text file (e.g. coinflip.chef) and you can run it with: chef coinflip.chef

And you'll get output like: THHHTHTHTTHTTHHHTTHHHHHHHHHHTHHTTHTTTHHTHHTHTTHTTT

Note that to get it to work with the Perl module I actually had to use the "liquify" keyword while the official specs say it's deprecated in favor of "liquefy." I also used an auxiliary recipe rather than multiple bowls as referring to the 1st/2nd bowl didn't seem to work according to specs either.

As for how it works, I'll let you figure that out, but Chef is basically a verbose version of Brainf*ck where you have to work everything out in terms of manipulating the stack. It was fun to do though, and I might try to throw together a more serious Chef program at some point. I also was thinking of implementing the coinflips in Shakespeare but there doesn't seem to be an adequate randomizing function for it...

Tuesday, July 15, 2008

Relearning Java

Many moons ago I studied computer science. I made it through all three "gateway" classes - the ones intended fail half the students and scare people off from majoring in the subject. I'm likely the only person who did this and then decided to major in something else.

But I digress - the first two of these classes used Java. I did well in the classes and even mostly enjoyed them, but I have since forgotten most of what I learned (both about Java and computer science). Java has also changed a bit in the interim, although not as much as I expected.

Since apparently Java is the most popular programming language, and since I remember it being a pretty safe playground, I decided to go ahead and dive back in. I haven't done anything major yet - a few simple classes and applets - but I do find that what I have learned in other languages (particularly R) has helped me better understand both the strengths and weaknesses of Java.

I won't go into too many details as I'm sure the Internet is full of people with more knowledge than me opining about the qualities of programming languages. I will say that, apart from the verbosity, I am enjoying Java. It does enforce a great deal of structure but I am sympathetic to its mindset, and I absolutely love working in Eclipse.

I've been toying with ideas for more significant projects - a Java rendition of Devil Bunny Needs a Ham, perhaps. Of course applets are evil (we are far too impatient to wait 5 seconds for the JVM to load) so if I actually wanted to make a popular game I should use something else. Maybe I'll write it in Java and use the Google Web Toolkit to make it all Ajaxy...

So anyway, stay tuned for potential Java-related updates, and if you have fun project ideas (or if you, yaknow, exist) feel free to comment.

Monday, June 30, 2008

Naming Soy Statistics

Though I realize that literally nobody is reading this at the moment, I thought I'd put this out there - I need to come up with a better/different name for Soy Statistics.

It's called Soy Statistics simply because the site is soycode.com, which itself was chosen because it's mildly catchy and was available. It is thankfully the only real result for "soy code", but unfortunately "soy statistics" is not this lucky (it's currently on the second page, result #11).

Even if I didn't rename it I wouldn't be surprised if it moved up in rankings and maybe eventually was first, but nonetheless it's silly and potentially legally contentious to pick a name that conflicts with some soybean farming journal thing (apparently the U.S. exported $12.9 billion in soybeans in 2007, $4.1 billion of which were purchased by China).

Anyway, I'm not really sure what else to call it at the moment. If you, the hypothetical reader, have a suggestion, please feel free to speak up. I'll keep developing it under this name for convenience and because it doesn't really matter at this stage, but if I want to do anything "real" with it I'll probably need to figure something else out.

Thursday, June 26, 2008

"Mission Statement"

As is true of many people out there, I have had multiple less-than-successful forays into "blogging." The embarrassing part is that I don't even like the word "blog" - however, that is the word that has stuck, and so I will use it. But whatever it is called I've generally not been consistent about it - my posts are haphazard and generally pointless, even for me.

So why am I trying again? Simple - this time I'm going to actually write about my interests. That way, if nothing else, *I'll* enjoy coming back and reading it. And hey, if a few other folks stumble across it, that's great too.

What did I write about in the past, if not my interests? I'll let that mystery be for the time being, suffice it to say that my focus now is on two rather functional matters - statistics and computer programming. My goal will be not merely to express my opinion (which is inevitable but ultimately not terribly valuable), but rather to work through actual concepts and make falsifiable statements. There's no way to be right if there is no possibility of being wrong.

Anyway, this all sounds pretty high-minded, and maybe I should delete it and keep things simple. However the other aspect of this is I do want it to be conversational - it is a blog, after all. I apologize if my stream of consciousness is not to your liking though, and will get to the point.

I have a smattering of experience in a variety of programming languages - the only one I would consider myself relatively fluent in is R, but I have am learning more about others all the time. I have written Soy Statistics, a crude imitation of R using JavaScript. I intend to flesh it out using Google App Engine and Python.

Most of my writing here will be about this experience, and as I continue to learn and play with these tools I hope to post helpful tidbits here. Who knows, if people actually start reading this, maybe we can even have discussions about things. I'm not particularly expecting that though - as I said, my only goal is to write something I find interesting. I may end up being my only reader, but hey, at least then I won't be making the signal-to-noise ratio of the Internet worse than it is already.

Wednesday, March 19, 2008

Welcome to Soy Code!

This site will hopefully soon have bits of interesting code in computer languages such as R, Ruby, and Python. For the time being it's pretty boring, but stay tuned for fun and useful tools.