November 2006
Monthly Archive
Thu 30 Nov 2006
In my continuing efforts to keep abreast of the latest and greatest software, I decided to evaluate switching from WordPress to Mephisto. The former is great, as it’s been around a long time, has a lot of plugins, and Just Works. However, if I want to dig into my blog at all, I have to do it in PHP, which is a bit like Spanish for me: I can read it well enough, but I can’t write it without constantly picking up a reference.
What does this have to do with SVK? Well, SVK was mentioned along with Piston as a way to manage syncing one repository with another. I already use and love Piston, so I decided that anything mentioned alongside it is probably worth checking out. And so it seems to be. SVK is apparently a client-side replacement for the normal svn command. It brings in a feature from Darcs that I’ve found myself wishing for from time to time: full local repository access with local commits.
It’s yet to be seen whether anything has to be done server-side for this to work, but from what I’ve read, I highly doubt it. If that’s the case it’ll be a godsend when I’m on vacation as I’ll be able to commit, branch, roll back, and do all those other nifty tricks that Subversion has taught us to do instead of only being allowed svn revert. It’s installing (with some difficulty) with MacPorts as I type this. I’ll post more when I know more.
UPDATE: Okay, got it synced with Attendio and tried a commit. I’m sold.
Thu 30 Nov 2006
Making something show up on a Google search result makes me feel like I felt when I first was exposed to programming. It’s the same feeling of causing something to happen in an arena that you didn’t think you could affect. Jason has recently started using Google AdWords to promote wishradar.com. Here’s one of the ads below:

Wed 29 Nov 2006
When I was in high school, I sometimes found myself in my counselor’s office when it wasn’t strictly necessary. He was a bright guy who enjoyed talking with intelligent students, and I was happy to get away from many of the other students at times. However, he was also the girls’ basketball coach, so they often hung out in there too. This combination prompted a few memorable quotations from the basketball girls, one of which was, in response to something I’d said, “You’re one of those people who knows too much for his own good, aren’t you?”. At the time I was kind of shocked by this deliciously ambiguous question.
I look back on it after having read The God Delusion, and it strikes me that perhaps this question comes from a desire not to know, not to be challenged, and to make it easier to believe what the questioner has already decided to believe. After all, one good way to protect one’s invalid beliefs is to block any evidence that might contradict them. I’ve not stumbled onto anything new here, but I find it interesting how pervasive this attitude is. The thing I should be most concerned about is heading off this tendency in myself.
Or maybe I should just turn my brain down a notch and not worry about it so much. Hah, right…
Tue 28 Nov 2006
Posted by brian under
GeneralNo Comments
In tribute to the gods of San Francisco weather and to the gods of high fashion, I’ve bought myself an early Christmas present in the form of a leather jacket (it’s black - Mom, you’d be so proud).
Sat 25 Nov 2006
As mentioned in my previous post, I decided to give the MNVO Helio a go with its new, sexy Drift phone. In this post I’ll be listing my experiences with it over the last 11 days or so. Some of my comparisons will be made against the Sony Ericsson T616. Know it. Love it.
Call Quality and Reception
I know, weird to start off a phone review with this category, especially for a phone whose company asks you “Don’t call it a phone” and “Don’t call us a phone company”. As it piggybacks on Sprint, you’ll get the same coverage as Sprint. As I write this I’m in 93306, the outskirts of Bakersfield. I have full bars on both phones (Drift on Sprint, T616 on Cingular). Call quality on the Drift seems slightly better than the T616, but this could be simply my imagination.
Google Maps
The killer app on the Drift is Google Maps. In San Francisco the device is accurate to within a few meters, though during my Thanksgiving weekend I had to opportunity to test it in Bakersfield (um, yay?) and found that it would sometimes tell me that I was several miles from where I actually was. This made me wonder - is it actually a GPS or does it triangulate based on cell tower proximity? Despite its placing me at the local raceway when I was in fact at home, I have had good experiences with this app. It helped me find the Bubble Lounge, after all.
No Mac Support
Now to bring it down a notch. Being an avid Mac user, it is important to me that a device be able to talk with my MacBook if it makes sense for it to do so, and a phone certainly falls into this category. Address Book is the master, the source, the benevolent dictator that tells me who I know. He should be able to tell my phone who I know, and to continue to update my phone with the latest news of my social goings-on. Unfortunately I can’t do this with Helio and the Drift (but where there’s a will, there’s a script - post a comment if you want instructions).
In fact, I can’t even pair the thing with my computer due to a mismatch in the number of digits expected for the PIN. I never had a problem with my T616 or my Motorola V551. What’s up with that Samsung? The included USB cable doesn’t appear to do anything when I plug it in to the Mac, so the only way I could even get files onto the thing is to get a MicroSD card reader, a card, and then hook that up to my computer. This is a big thumbs down for me.
Look and Feel
NOTE: The stickers are still on the face and back of the thing, and that’s why the display looks a little funny.
First things first: it is a sexy beast. The device itself feels solid, despite the occasional weirdness of it moving slightly when I’m on the phone due to the slider form-factor. It is a little smaller than my T616, though not by much. It is slightly heavier as well, but when it’s in my pocket I don’t notice the difference. Looking at the picture to the right at a bigger size, you may notice the time on the T616. This is a handy feature, as I don’t wear a watch. The Drift lacks this touch. The soft buttons are of a similar setup on the two, and I like some features of each. Both have a “back” button, but they’re in different places. The Drift’s button is a little too close to the “down” button, leading me to accidentally press it a few times. The two soft buttons on both are easy to hit, but directional buttons in general are easier on the T616 due to its joystick configuration. This is countered by its occasional confusion of pressing the joystick in being taken as some other direction, a problem the Drift does not share. The Drift goes along with convention by having two large buttons: the green and the red, logically used when beginning something (notably calls) and ending something (as well as power).
The number pad on the Drift is revealed by sliding the face up, revealing buttons that are large but with no margin, which in practice I find harder to hit accurately than the smaller keys on the T616. When opened, all the keys on the Drift light up, including the soft keys, which is important due to their lack of margin. The Drift is relatively smart about when to use T9 vs. Multitap, but you have to tell it to use T9 the first time. One major annoyance is typing in the web browser, as there doesn’t seem to be a way to easily type a forward slash. You have to change the input type to Symbol, press down twice, then press 7 twice. Ack.
Also, the charger seems likely to cause less damage to the phone than with my T616 (I had a previous one that eventually stopped charging because the charger had broken the contacts on the phone). The only thing that remains to be seen is whether the flap will insist on sticking out like the RAZR’s is wont to do. As for the actual feel of the Drift, the side buttons make holding it a slightly more uncomfortable experience compared to the T616.
Camera
While this isn’t that important to me, it is a nice thing to have sometimes. I hadn’t used the camera up until this test, and I must say it’s pretty darn good. Be warned though, that this is from someone who’s current camera phone was made several years ago. The picture to the left is from the Drift. It is a somewhat challenging shot because of the intensity of the background light. Yet the drift did okay with it. By contrast, the T616 fell flat on its face, as shown below. However, I had to send the picture to myself from the Drift via MMS to my email, which took a few minutes. On the T616 I just used Bluetooth file transfer, which took about 10 seconds. Two steps forward, one step back.
| Drift |
T616 |
 |
 |
Browser
The browser seems like a good idea, but it’s pretty restricted. I could sign into GMail, but not actually see my messages. I couldn’t install the GMail app. As mentioned earlier, typing in URLs manually is a pain. Some sites are suggested for you (like Digg, MySpace, etc), but I find browsing on them reminiscent of a squinting contest. I wouldn’t use this phone if you plan to use the web a lot. As I don’t plan to use the web a lot on it, the jury is still out as to whether this will affect my final decision.
IM
Despite the crappy browser, it is still pretty usable as an IM client. It supports AIM, MSN, and Yahoo!, though Jabber is conspicuously missing. I’ve tried it with AIM and found it usable, but not terribly useful. Who wants to be reachable all the time like that? SMS and calling is enough of a distraction.
Email
Sending just a regular ol’ email seems to be done through the browser at Helio’s webmail site. This is pretty annoying as you must navigate to the site, log in, then send a message. This is not usable, though it could be useful if it were. I already mentioned that GMail is not supported, so look elsewhere for that functionality.
Baked-in Offline Apps
Apps such as the calendar, alarms, contact list etc. feel pretty good compared to the T616 and have more options, such as a recurrent alarm that happens only on weekdays (no more setting the alarm every night!). The ability to have a summary of your Todos and Calendar on the phone’s home screen is nice, though there’s no interactivity (which is probably for the best, as the confusion introduced by that would just be too much). Unfortunately, as mentioned before, there’s no sync here with the Mac. There may be with Windows, but that doesn’t matter to me.
Battery Life
My phone usage is maybe 15 minutes a day talk-time. I also have played around with the Google Maps thing for a few minutes at a time. So far the Drift seems to last about 2-3 days with this usage. This is worse than the T616, which goes about 3-4 days with this usage. The battery indicator on the Drift is also a discrete thing with four bars, whereas the T616 is more granular (and colored too!).
User Interface
The main user interface it pretty easy to get used to, but the Java apps don’t obey the same rules, nor do some of the built-in apps (like the MMS client). This is kinda weird, and stands in strong contrast to the T616 where all the built-in stuff has the same UI (of course the Java apps don’t, but there’s not much call to use them). But damn, isn’t that dialing screen nice?
Summary
The Drift is a nice sexy slider, but the jury is leaning toward canceling the Helio service, mainly because of the lack of Mac support. More on it in 10 days or so, when I’ll discuss the iPhone’s impact on my decision among other things.
Wed 15 Nov 2006
Posted by brian under
Rails ,
RubyNo Comments
We’re using FK constraints at Attendio. As you all know, this means we must be careful about the order we load fixtures in our tests when calling fixtures. But what if you can’t control the order of the fixture load as when using the FixtureSets or FixtureScenarios plugins? Or maybe you simply don’t want to have to worry about the order?
One solution is to disable FK constraints before loading the fixtures, then enable them afterward. This is liable to be a vendor-specific solution, however, and it just feels bad. Another solution is to determine the correct order and ensure that the fixtures you want to load are loaded according to that order (which would require a modification to the plugins, but at least they could then work without the user needing to specify an order). Let’s say you have a few models:
class User < ActiveRecord::Base
has_many :memberships
has_many :groups, :through => :memberships
has_many :taggings, :as => :taggable
end
class Group < ActiveRecord::Base
has_many :memberships
has_many :users, :through => :memberships
has_many :taggings, :as => :taggable
end
class Membership < ActiveRecord::Base
belongs_to :user
belongs_to :group
end
class Tag < ActiveRecord::Base
has_many :taggings
end
class Tagging < ActiveRecord::Base
belongs_to :tag
belongs_to :taggable, :polymorphic => true
end
One correct order for loading the fixtures is users, groups, memberships, tags, taggings (there are four correct ways to load them). All we really have to do is look at the non-polymorphic belongs_to associations, and we’re set. Here’s some code that does just that.
Update: the code is cleaner now, and probably faster since it doesn’t build up an entire dependency tree.
def load_order
models = Dir[RAILS_ROOT + ‘/app/models/**/*.rb‘]
models.each { |file| require(file) }
klasses = models.map { |file| File.basename(file, ‘.rb‘).camelize.constantize }
klasses.reject! { |klass| !klass.ancestors.include?(ActiveRecord::Base) }
deps = klasses.inject({}) do |h,klass|
h[klass] = klass.reflect_on_all_associations.select { |a| a.macro == :belongs_to && !a.options[:polymorphic] }
h[klass] = h[klass].map { |a| a.class_name.constantize }
h
end
order = []
until deps.empty?
free = deps.keys.select { |k| deps[k] == [] }
deps = deps.without(*free)
deps.each { |k,v| deps[k] = v - free }
order += free
end
order.map(&:table_name)
end
The code is rough and not yet integrated in a useful fashion, but it gives you an idea and will let you integrate it into your fixture solution as I have. It won’t work with HABTM relationships since there’s no model for the join table. Other than that it seems decent, if a bit on the ugly side. If anyone wants to clean it up I’d be obliged. Oh and by the way it’s under the Creative Commons Share-Alike license.
Tue 14 Nov 2006
I have a problem. Getting Things Done is a book by David Allen, and I enjoyed it greatly. I would love to put his ideas about stress-free time management into practice but, as I said, I have a problem. The problem is that I am lazy — I can’t be bothered to remember anything. What I’ve found from a practical standpoint is this:
- irrelevant projects and distractions never last very long
- useful projects have to repeatedly break into my consciousness
- it’s easy to temporarily give distractions free reign
- keeping a list of things to do is only useful if I actually look at the list
Of all the reasons my ventures into GTD have failed, the last one is the biggest. The things I’ve been successful at are the ones that required very little motivation from me. A good example is paying my credit card bills. I get reminders a week before they’re due, and I go right then to schedule my payment. I could set this up to happen automatically, and I probably should, but either way it works and I don’t really worry about it.
Make it Automatic
This is the world according to The Automatic Millionaire: set up your system once, and make it automatic. I’ve been looking for a way to apply this to GTD with minimal success. It seems that I must either make my system electronic and pervasive, or make it live on paper and carry it with me at all times. The problem with the former is synchronization. The problem with the latter is notification.
Electronic
For the electronic solution it seems clear that it must live on the web, and that the phone is the only logical place for me to interface with it on the go. I am in the habit of carrying a phone, but I cannot bring myself to carry any other devices — the bulk is just too much. Such a system would have to make it very easy for me to enter new todos, view existing ones relevant to my context, and to set reminders from anywhere.
Paper
The paper system would live with me, carried on my person. It’d most likely be a pen and some index cards (in fact, that’s what it is right now). This system doesn’t work for me because it has no way of notifying me about what’s going on and has no way of reminding me to look at the lists to see what needs to be done when context switching. The only thing I can think to do is to set a periodic alarm that makes me review the lists.
The Solution
I’m not sure what the final answer is, but I may have a preview in the form of my latest revision of my perpetually-under-development personal finance app. For years I tried the track-all-expenses route, complete with tagging. This required far more work than I was willing to put into managing my money. My new approach is based on a series of spiders. They crawl my banking sites and report on how things are going. At the moment it is not automatic: I must start the server, then click Refresh, and then it’ll show me my latest account balances. It’s certainly much easier than logging into each system separately and taking note, adding them up, etc.
But it could be better — it could be automatic. The next feature I’m going to add is that of Goals. I might set up a goal that says I’d like to net $1000 this month, and then my script will automatically let me know how that goal is going. That way, I analyze things only occasionally, then I get feedback as time goes on. The feedback will tell me whether I can eat out, or whether I should pack a lunch.
Is it possible to apply this methodology to GTD? Or am I trying to shove a square peg into a round hole?
Sun 12 Nov 2006
We all have things that we want for ourselves: traits, skills, experiences — just look at 43things.com — and yet most of us fall short of these goals. Why? Thinking about this today, I discovered that the reason I’m not doing certain things I’d like to do — buy property, get regular exercise, learn a new programming language, etc. — is due to my being stuck in certain local extrema — I’m living in a cheap place that is good enough and close to BART, my bike is in Santa Barbara and I walk a bit every day, and I’ve gotten really good at Ruby.
To envision what I’m talking about, think about a surface with some hills and valleys. Then imagine dropping a ball on that surface. If you do it enough, it’ll settle in different spots. These spots are called minima, and the lowest one is the absolute minimum. All others are local minima. To envision local and absolute maxima, imagine Mount Everest (the absolute maximum) and all the other mountains surrounding it (local maxima).
The trick is determining whether these things are local or absolute extrema. Whether buying or renting is the absolute extremum is yet to be determined, but my semi-unhealthy state vs. regular exercise is more clear. If you think about the example with the ball, it won’t move out of its spot without some sort of disturbance, and even so small disturbances won’t do it. You really need to shake things up to get it out of its current position. Interestingly, this is the same method used by simulated annealing to solve constraint-satisfaction problems.
So what lessons can we take from the world of math into the world of the real? If we’re to take it literally, it tells us that we need to devise ways to knock ourselves out of local minima, try new ones, and go back if the new situation is much worse than the old. This threshold of tolerance for worse situations should decrease as time goes on, and so we should be led to expect that, by using this approach, we’ll spend a fair amount of time trying to find the absolute minimum. Keep in mind that, like with math, simulated annealing isn’t guaranteed to find the absolute minimum.
The other approach is to use logic to try to solve the problem. This approach is often used with things that are expensive (either money, time, or both) to try, and so do not lend themselves to simulated annealing. An example might be the process of buying a car. As much as we might like to, we can’t just buy a car, try it out for a while, then return if if it’s not as good as our old one.
What other things keep you from becoming the person you’d like to be?
Sat 11 Nov 2006
Posted by brian under
Helio ,
Phone1 Comment
Helio is a virtual carrier that piggybacks on Sprint. It appeals to the MySpace crowd, allowing users to access MySpace on the phone. I looked at them a few weeks ago, but decided against it solely on the basis of their lack of a Bluetooth-enabled phone. Sometime in the last week they came out with a new phone, the Drift, which has Bluetooth. Well then, I guess I need to take another look.
I generally like what I see, and here’s what I’ve found:
Pros
- They have good coverage (or so it seems from their coverage checker)
- They offer all-you-can-use data, SMS, MMS, etc starting at $65/mo
- The Drift has a GPS with built-in Google Maps support
- The Drift is attractive
- The company is new (est. June 2006)
- They offer a 30-day guarantee
Cons
- They’re a CDMA network, so the phones cannot be used on other services, and vice-versa
- Their phones are locked down software-wise
- The company is new (est. June 2006)
- Address Book support for Mac OS X involves a workaround
I intend to take full advantage of the 30-day guarantee. I opted for a new number, as I didn’t want to port my number. I figure that it’s about time to recycle my contacts. So here’s to 415!
Fri 10 Nov 2006
Posted by brian under
Rails ,
Ruby[2] Comments
“Putting Rails to Work” - November Ruby Meetup
Begins:
Tue, 14 Nov 2006 at 6:00 PM
Ends:
Tue, 14 Nov 2006 at 7:00 PM
Entry fee: Free
Location: Odeo
164 South Park St.
San Francisco, CA 94107
Although Bosco will be away, Josh Susser is organizing this baby and he has something up his sleeve. It’s going be real good. Stay tuned…
Tags: ruby rails