How I Lost My Thumbdrive

August 9, 2007 | Comments Off

Well, so as a technology, thumbdrives didn’t last long, at least not for me. I can’t exactly remember when I bought my first one, it was probably around 2001-2002 (sadly I still have it), it was a 64mb beast. My latest purchase was an impulse buy, a 1gb sandisk cruzer micro at Office Depot some time ago. Today I virtually eliminated any need to use one. I had known about this for some time, but I was too cheap to act until this past week. As previously written, I have a T-Mobile SDA (HTC Tornado) which has support for miniSD cards. This past week I bought a 2gb Sandisk Ultra II miniSD for $23 off some random vendor (Blue Proton) on Amazon. I have to say that their turn around was impressive. I ordered late Thursday morning, they shipped Friday and it arrived Monday. That’s PCMall turnaround for $5. At any rate, I wasn’t expecting for days and Leigha didn’t know I had ordered so she inadvertently kept it hidden from me until this morning.

I had done the research before placing the order and it seemed like 2gb was the largest size the phone would safely accept. I saw a lot of problems by people with 4gb cards and decided to avoid the issue, if it works I can always upgrade later. I chose the 2gb Ultra II because it seemed to perform well and when it becomes cellphone obsolete I can use the included MiniSD -> SD adapter it should continue it’s useful life in my camera.

So back to our main story, I had already installed in my phone the requisite software. It’s called WM5torage. It only works with Windows Mobile 5, I’m not sure what, if any, solutions are available for WM6. After I installed the card and ran the software I got the error 57 as mentioned. I did a quick search for “windows mobile registry editor” and came up on the simply name “Mobile Registry Editor“. I did not have .NET 1.1 installed so that was the first hurdle. I kept getting “permission denied” errors which seemed like the “access denied” errors described in the FAQ but the cause turned out to be that I was running the app off a network share which caused issues. When I copied it to the hard drive it ran fine. After I added the registry entry as described on the WM5torage page, it still did not work. Oh wait, it’s Windows, reboot. Reboot fixed and it came back up and worked. So now, as long as I have one of the ubiquitous mini USB cables, I can connect my phone to a computer in mass storage mode, and it’s one less gadget to keep on my keychain.

A Weekend with Rails

August 5, 2007 | Comments Off

Friday afternoon I started my first project with rails. Ok, technically it’s my second project. I tried doing rails for the sake of rails but I never get anywhere that way. I need a real project with a real purpose (if it succeeds) but not so important that I can’t live without. I found the right project on Friday surfing the web, and basically spent all of Friday night and the vast majority of Saturday working on it. The rest are my impressions.

As for ruby itself, I’m pretty pleased with it. It has a lot of the trappings of perl, particularly the array and hash methods behave identically. I can’t say the language ever really caused a problem. Rails itself is fairly nice. The scaffolding provides a great way to prototype without having to do a lot of coding on the un-important areas. So far I’ve also written no SQL code, at least not in ruby. I created a handful of views in the database, but that’s about it. The trouble I’ve have/had, and I imagine the limitation most people bump into has to do with the models. The expectations are rigid and I haven’t solved for certain problems yet. Like how do I get to extra data in a link table? And how do I deal with tables that have no primary key? I’m sure these are documented but I’ve only run into those troubles in the latter part of yesterday.

The documentation for ruby and rails is excellent. The rails API and the Ruby core documentation are easily navigable. The errrors seem to be less well documented. Some of my biggest frustrations have come in tracking down errors thrown by the app. The other rough spots have been when the rails table guessing regime hasn’t worked out. As an example, I had a table called passes, and a class called Pass. When I declared an association of “has_many :passes” the software guessed my foreign key as “pas_id” (the right answer was “pass_id”). The last bit I haven’t figured out yet is how to layer in authentication and authorization. Currently the app doesn’t require rigorous authentication – all of the users are trustworthy – but that’s just a coincidence.

The default scaffolding is functional but not robust, in any sense. It doesn’t allow you to navigate relationships. I was directed towards ActiveScaffold project. It’s largely a drop-in replacement for scaffolds but it exposes much more of the relationships. In some cases too much. For example, in my application suppose there are users and passes in a many-to-many relationship. A user should be selecting which passes he owns (modifying a link table) not modifying the passes themselvs. ActiveScaffold exposes both with no easy way to suppress the behavior. I’ve been using the ‘subform’ control to control which fields get displayed in the subform context, and that’s a quick middleground, but again, my users are very informal.

The ActiveScaffold recommendation came by way of the nice folks in #rubyonrails on Unlike the more popular web development platforms (perl or php), there is an unusually low frequency of stupid/easy questions and a high tolerance for such occurrences. I attribute this to lack of widespread ruby adoption, I think popularity brings in the unwashed masses, and the masses destroy the tolerance, but that’s for another day.

Overall I’m fairly impressed with Ruby. The touted ability to start see and make progress with small amounts of code is not hype. When you throw in ActiveScaffold you even have something that looks largely pretty. The real question becomes how challenging it is to replace scaffolding with real code and from what I’ve seen it’s on par with php or mod_perl. Perhaps even a little better with the built-in concept of layouts (templates basically). The application in question is no small case either. Currently I have 26 tables, 15 models, and 14 controllers. Not bad for a day and a half.

The Mac Zeitgeist

August 3, 2007 | 2 Comments

This isn’t particularly new, but a recent event reminded me I haven’t posted about it yet. My computer usage is schizophrenic in a sense. I’ve been using Linux for over a decade now, but I abandoned it on my desktop around 2000 in favor of Windows 2000. I’ve felt for a long time that Linux is not ready for the desktop. Ubuntu is probably the best attempt I’ve seen to date, but they all the distributions suffer from the same shortcomings: fonts suck, app developers suck at UI, lack of useful applications, and even the window managers are fairly ugly. Now it’s  been improving, certainly since 2000, but at a crawl. And all along, despite the abuses suffered at the hands of Windows, I’ve stuck with it because even that was better than Linux on the desktop.

Back in 2000, or even a few years back,  I never would have guessed that I’d be running Mac OS as my desktop OS, and not even slightly begrudgingly. I’ve had a Mac now for 5 or 6 months, I actually lovingly adopted Mike’s when he left AOL. I was expecting a long adjustment period but it turned out to be ridiculously easy. The primary thing to get used to is where the hotkeys are and for what they are used. For example. in Firefox I was used to Ctrl-T now it’s Apple-T. That took less than a week to get acclimate. The lack of a second mouse button on the laptop is also fairly frustrating and I don’t really understand the resistance. Everything else was cake, which was in part due to the Unix underpinnings of the OS.

I was not a trailblazer by any means. Lots and lots of my co-workers were using Macs before me, and I was among those poking fun at them. In particular, I mocked the “Mac walk of shame” wherein you walk through the halls with the lid open because there isn’t, by default, any method to tell Mac OS not to go to sleep when you shut the lid. (This is in contrast to Windows where you can define specific behaviors for when you close the lid and when you hit the power button. This is another area in which I find the OS lacking).

Vlad in particular likes to deride Mac users and owners, and it’s not anything I take offense at, but much in the way he changed his mind about iPhone (I also thought/think it’s hype) I think with actual use he’d change his mind about Mac OS as well, but I digress.

The primary reason for writing about this is that there seems to be a clear change in preference for an interesting selection of users in favor of Mac OS. I was in an architecture council meeting and I looked around the room, all but 2 laptops were Macs. The 2 PC’s belonged to the facilities guys who manage power and space for the datacenters. Every other architect used a Mac. My last 3 bosses have used Macs. Most of our operations team uses Macs. A significant number of our developers use Macs primarily (they keep PC’s for software testing).  This is the trend that I find so encouraging, that I bring to your attention.

Finally, the event that reminded me to write this post. My brother was in the process of replacing his PC laptop and was asking me about Vista. I suggested he stick with XP for the time being. He ordered a laptop from Dell (I believe it came with Vista, no choice), and realized that he could actually buy a MacBook for less. Last I talked to him he was still deciding whether to cancel his Dell order and get a Mac instead, which was my suggestion to him. If he really hates it, he can just install XP instead.


August 2, 2007 | Comments Off

For over two years now I’ve had the wireless network configured in a reasonably satisfying way: The main wrt54g has a public IP (wan), segments the lan and the wireless lan (wlan), provides dhcp to both, and provides pptp (vpn) on the wlan. The wlan was wide open, no encryption, broadcast ssid. You could connect but you couldn’t get anywhere until you VPN’d. This is very similar to the way we ran the wlan at work.

Eventually I got a second wrt54g, and I set it up in the living room. Frankly, at this point the configuration got too complicated to explain in a blog entry. Suffice it to say, lan was, wlan was and devices connected to the lan segment of the wrt in the livingroom were on Routing hilarity ensues.

When we moved in January the office also splintered off the wired lan which introduced it’s own issues. I broke out the ancient powerline ethernet bridge giving the office a whopping 10mbps. Yesterday I bought Doug’s old wrt54g (v1.1!) for $5. After 10 minutes of thinking about routing tables it was clear that starting a segment was not going to make my life happier. After some consultation, I decided to use wpa2/aes to secure all traffic, and run the client wrt’s in bridge mode.  Commence slamming head into desk.  The difficulties of doing wpa2 in combination with bridged (wet) mode are reasonably well documented. You have to break the  bridge (separate the wlan from the lan) and then run software to do the traffic routing. Very lame.

After a few hours of banging my head into that wall I decided that wpa2 wasn’t buying me enough to justify the annoyance (you also lose multicast) and I dropped all three devices down to wpa/aes. I just finished reconfiguring the last of the devices and everything is at least talking to each other.

Along the way I tried HyperWRT (including various flavors thereof: tofu, tomato, thibor) and they generally seem abandoned and less featureful than OpenWRT, so I went back.

The real question is whether this will improve network performance or not. Earlier on I did some speed testing with the encryption and it was at least on par, if not slightly better than the powerline. It feels like a lot of effort just to come out even, but I’m happy to have only 1 subnet for the entire house.

TextMate + QuickSilver = Fun

July 27, 2007 | 4 Comments

Like I’ve mentioned previously, I’m not fond of changing my tools, but when work replaced my laptop it was a good time to revisit text editors on the Mac. I’ve been using TextEdit to take random notes, but Mike was pleased enough with TextMate to pay for it so I figured it was worth a look.

One of the first things I noticed and read in their documentation was regarding their philosophy which was a good read and encouraging. What didn’t seem to jive is the fact that the menus are so extensive, it seems almost impossible to use without a mouse. Unless you’re using QuickSilver. I previously read (I believe on LifeHacker) a trick with QuickSilver that lets you type in menu commands.

So for example, when I finish writing this post, I would normally have to do the following with the mouse:
Bundles -> Blogging -> Post To Blog.

Now, it just so happens that there’s a short-cut, but I have near 0 chance of remembering this. Instead with QuickSilver I do the following:
Alt-<Space>, “post b”

By that point “Post to Blog” is highlighted. I hit “Return” and I’m done. Maybe it’s not for you, but for me it’s significantly more efficient.

Google Reader feed swap

July 27, 2007 | 1 Comment

I had previously been sharing my “starred” items from Google Reader and I was using it to share things I found interesting from the various sites I keep up with. Embarrassingly, only today did I discover that there’s a “share” feed as well, that’s better suited for what I’m trying to do. So I’ve made my “starred” items feed private, if you’re curious, I intend to use it for “things I want to read again later”. I will use “shared items” for, uh, sharing. I’ve updated the sidebar on the site with the new code, I’m posting this in case someone who reads this subscribes to my starred items (I believe at least one person does, hi Alex!). This is the URL for my shared items: which you can add to your feed reader.

Comment spam followup

July 21, 2007 | Comments Off

Regarding my rambling on December 30th about a spam attribute to the <a> tag already exists, it’s an attribute called “nofollow”. WordPress already uses it for comment links. So why am I still getting comment spam? What purpose does it serve? Are the readers of this blog going click on one of the casino links? Wait, people read this blog?!

Tonight’s WordPress Rabbit Hole

July 21, 2007 | Comments Off

So here’s how I got sucked into spending way too much time working on WordPress tonight.

  1. Hey, I really want to use feedburner, but my ajax-y search (that I’m sure nobody uses) broke last time I used the feedburner plug-in. (1 minute)
  2. I’ll just set up a Google Custom Search (20 minutes, mostly messing around with it).
  3. Now that I think about it, I was just looking at the Google AJAX API and Google Custom Search, I bet those two things could work… (2 hours)
  4. Neat, but my search results are crap because everything is under “index.php”. I should turn on permalinks (15 minutes)
  5. Well, now it’s going to take Google for ever to index my site, I should submit a sitemap…
  6. Here’s a neat sitemap plugin! (15 minutes)
  7. Crap it wasn’t really designed for sites that have multiple blogs in a single directory structure, I’ll just put it in /sitemap/sitemap.xml (10 minutes)
  8. Crap Google wants sitemaps in the root directory. I guess I’ll fix it with a mod_rewrite rule (30 minutes, most of it editing wrong file)
  9. Ok, fixed now submit the sitemap to Google and wait for it to update (5 minutes)
  10. Wait, all of the search results are prefixed with “Pablo Averbuj” I should fix that. (30 minutes, taking over UI from Google)
  11. Ok, now I’m ready to install my feedburner plugin!

At the conclusion of which I’ve spent more than a couple of hours and learned a few things along the way. The Google Custom Search Engine stuff is pretty neat, and it ties into the Ajax API nicely. The Ajax API takes a lot of fiddling to make it behave the way i wanted (ie, seamlessly fit in with my previous look and feel). The sitemap plugin I linked to above is very nicely done, especially the management page. And soon I’ll learn how many people read this site via feeds. I’m sure it will be almost as exciting as Christmas.

ReadyNAS conclusion

July 14, 2007 | Comments Off

After various failed attempts to resuscitate the NAS, Infrant decided it was a more serious hardware problem. I asked in jest whether they had an advanced replacement arrangement (they’re small so I didn’t figure they would). It turns out they did but that was a challenge of its own. I faxed over the RMA form twice and had to nag the support guy several times until they actually shipped it. They shipped it DHL ground from California and it got here much faster than anticipated.

I was a little nervous about moving the drives from one chassis to the other even though the instructions seemed simple but there was no deception. With both chassis turned off (duh) I moved the trays from one chassis to another and powered up the new unit. Everything was back, settings, accounts, permissions, IP address, etc. Completely 0 effort, so kudos for that. The new one has been humming along and it even sounds quieter than the old one for some reason.

Meet the master

July 14, 2007 | 1 Comment

Vlad makes a valiant effort.Victory!Nobody I’ve ever met has surpassed my ability to look unintentionally completely creepy in pictures. But where others have failed, Vlad has made a valiant attempt to challenge my position. Look for yourself and compare. Has the master been bested? I think not.