Archive for November, 2006
My eight passions: #7, #6, #5: Midway Atoll
I’ve been lax about rolling out the remainder of my eight passions which I started going on about here. Why such a slackard? Mostly, I wasn’t sure I could come up with seven more items about which I could claim to be truly passionate.
A story in the news the other day however set me straight. Here’s the story:
HONOLULU — Isolated from most of the world, Midway Atoll could open to visitors next year on a limited basis.
[…]
Midway, located 1,250 miles northwest of Honolulu, is at the tip of the Northwestern Hawaiian Islands Marine National Monument, which was established in June.
So, where’s the passion? Oh baby, here it is:
Hawaii
I am mad about Hawaii. I’ve been several times. As mentioned above, Midway Atoll is part of the Hawaiian Islands. And though not a tropical paradise, I do hope to get to Midway some day.
Hawaii is easily one of my top-three passions. I love the sun, the land, the sea, the people, and it’s history. Forever I’ll remember my wife and I walking around the giant heiau by the Wailua River on the island of Kauai; fascinated by the massive structure, frightened by the noises coming from the tall grass, awed by the aura of the place.
History
I love history and the Battle of Midway was really my introduction to that subject outside of school. I remember repeatedly reading a paperback history about the battle. I believe I was 11 or 12 at the time. I still read quite a bit of history mostly WW II and the American Revolution.
But, let there be no doubt: I want to know the history of everything. I can’t get down half a city block without wanting to know the past of some building or street. Nevermind when I find an unexplained artifact in the woods. My behavior is downright compulsive.
Maps
I am also compulsive about maps and anytime I see one of the Northwestern Hawaiian Islands mentioned I need to consult a map to see just where in the chain the island lies. Here’s a map now!
Almost any map will hold my attention for 30 minutes. Especially if it is someplace I’ve lived or visited or read about or want to visit. Especially if it is out of date or old. Especially if it is some combination of the previous. You get the point.
In Closing
Okay, so there are three more passions. I realize that I am not presenting them in rank order. In fact, these three are probably very near the top of my list!
Hmm!
3 commentsInstalling SUSE 10.1 as a guest OS on Windows XP using VMware Player
I’ve spent too much of my day installing SUSE Linux 10.1 as a guest OS using VMware Player on my Dell Latitude D620 running Windows XP. It’s not rocket science, but having never used VMWare before I sent myself down a couple of long, meandering dead-ends. Should you want to do this, hopefully, this will keep you from making the same wrong turns.
But first, a side note! I can hear you asking now “Why do you want to do this?” Well, I do. I hate developing under Windows, hate Cygwin even more (call it personal preference), but still prefer using a text editor (emacs) and a unix command line. Yeah, I should have bought a Mac instead. That’s another story. Anyway, here is the process.
Preliminaries
First, go get all the stuff you’re going to need:
- Download the SUSE Linux 10.1 ISOs and burn them onto CDs. I used Roxio Creator Plus which came with my machine to do the burning.
- Download VMware Player. Install.
- Download this zip file (courtesy of this fine post which was quite helpful.) Unzip this into a directory on a disk with plenty of space. Rename all of the files from “OS” to “sl10-1″.
Modify the VMware configuration file
Make this series of edits to “sl10-1.vmx”.
First, we need to tell VMware that we do not have a floppy drive. Remove this line:
floppy0.fileName = "A:"
Replace it with:
floppy0.present "FALSE"
Now we need to tell VMware to load the operating system from the CDs we will put in the CD drive. Change these lines:
ide1:0.fileName = "c:\image.iso"
ide1:0.deviceType = "cdrom-image"
to:
ide1:0.fileName = "auto detect"
ide1:0.deviceType = "cdrom-raw"
Finally, change this line:
ide0:0.fileName = "OS.vmdk"
to:
ide0:0.fileName = "sl10-1.vmdk"
Run VMware and install SUSE
Put the first first SUSE CD in the CD drive. Run VMware and load the “sl10-1.vmx”. At this point in time, you should be able to install SUSE as normal. When I did this, almost everything worked, except my wireless network.
Getting the wireless network to work
After you’ve installed SUSE if you type “lspci” you will see that SUSE knows about an AMD networking card, but not your actual wired or wireless network card. THIS IS CORRECT.
What is happening is that VMware shows this dummy network card to SUSE, and patches it through to an actual network device on the host machine. If you have more than one active network connection, VMware will pick which one of those network connections for you. In my case, it chose the wired network connection, which gave the impression that the wireless network connection was not working.
You can tell VMware which networking connection to use by running the Virtual Network Editor:
<Program Directory> > VMware > VMware Player > vmnetcfg.exe
Go to the “Host Virtual Network Mapping” tab. Change the value of VMnet0 from “Bridged to an automatically chosen adapter” to your wireless card (in my case a Dell 1490). Hit “Okay” and everything should be okay!
Have fun
Now you should be able to have all sorts of wireless unixy fun. Good luck!
paginating_find
I’m just starting to use Alex Wolfe’s paginating plugin. It works for my simple examples, but I’ve run into this case:
Image.find(:all,
:joins=>"left join votes on
votes.voteable_id = images.id and
votes.voteable_type = 'Image'",
:page=>{:first=>1, :size=>2, :current=>1},
:select=>"images.*, ifnull(sum(case
when votes.vote=TRUE then 1
when votes.vote=FALSE then -1 end),0) as vote_tally",
:group=>"images.id",
:order=>"vote_tally DESC"})
I’m using acts_as_voteable to implement simple voting. This query is determining the score for each image (votes for - votes against). I’m not in love with needing to dynamically calculate this information, but that’s the default configuration for the plugin.
At any rate, the generated count SQL query is:
SELECT count(images.id, ifnull(sum(case when votes.vote=TRUE then 1 when votes.vote=FALSE then -1 end),0) as vote_tally) AS count_images_id_ifnull_sum_case_when_votes_vote_true_then_1_when_votes_vote_false_then_1_end_0_as_vote_tally FROM images left join votes on votes.voteable_id = images.id and votes.voteable_type = ‘Image’
Sorta ugly.
I’m working around this by altering the :page option, since I can easily determine the total number of images:
:page => { ... :count => Image.count, ... }
23 comments
HeyLetsGo Revolution Recap
Two days later and we have finally caught up on our sleep. The HeyLetsGo Revolution Night was lots of fun. Matthew and I caught up with former coworkers (now with HLG) and met the rest of the HLG team. An uncountable number of soda waters later (I’m the *real* party animal), I staggered home, took the dog for a midnight stroll, and crashed.
I had never been to the Revolution Rock Club before, and was only marginally aware that so many bars and clubs even existed in that part of Boston (High Street, close to Rowes Wharf).
Be sure to check out the rest of the event photo album.
No commentsItsy, bitsy spider climbs up the water spout
Google now accepts that we exist. The spotstory.com domain has been spidered and is now included in Google search results.
It appears that this weblog is not yet included, but searches do expose that our update pings are seen by sites like Technorati and Web Worker Daily.
We should be better-covered as Google continues to update their index.
No commentsMore love for notebooks
Anne Zelenka over at Web Worker Daily makes the case for pen and paper as the ultimate solution for to-do lists. It sounds like she might be a Moleskine fan.
I’ve often looked for the holy-grail of to-do list software, but always return to paper in one form or another. As I’ve written before: a blank page is full of possibilities. Likewise, crossing out an item on paper gives a sense of satisfaction unmatched by all electronic substitues.
No commentsUpcoming: HeyLetsGo Revolution Night
Just a heads up that Aron and I will be attending HeyLetsGo’s Revolution Night this Saturday and so should you! We’ll be “chillaxin’” in a reserved booth in the back sipping Kristal and surrounded by the ladies. (Translation: the tall thin guy in the corner nursing the ginger ale is Aron and the regular sized stocky guy in the corner spilling the martini on himself is Matthew).
Stop by and say hello to us because god knows we won’t come over and talk to you!
1 commentRecap: MIT Enterprise Forum’s “Software 2.0: Turn and Burn on a Dime”
Aron and I attended the MIT Enterprise Forum’s “Software 2.0: Turn and Burn on a Dime” event last night to see and be seen. We ran into some old friends and got introduced to a few new. Which is a something of a feat given our miserable networking/schmoozing skills. (Maybe I shouldn’t be so quick to lump Aron in with me. He’s a real charmer and a pleasant young man.)
I’ve attended these events sporadically over the past several years. I usually come away with a few valuable pieces of knowledge, and cruising through Kendall Square always gives me a little warm, resonant technology buzz. I feel like I’m in the right place at the right time.
One thing we learned last night was that we need to hone our pitch. We’ve been heads down coding for the past little bit. It is probably about time we give our marketing a little love. (Still, the few words we stammered out were well received. So we have that going for us.)
The main take away from the panel was that there is actually a place in the world for small companies using minimal capital and leveraging open source, the internet, and offshoring in every way you can.
The bad news, according to the panel, is that capital markets haven’t quite figured out how to deal with these sorts of companies. However, with Charles River Ventures’ recently announced QuickStart Seed Funding Program, I think they’re probably just about to figure it out. (I bet another handful of top tier firms launch similar programs in the next six months.)
The companies on the board got to market in a year or so working nights and weekends. This is good info for us which we’re using to gauge the sanity of our own schedules.
Okay, this has gotten far too long. So, I will wrap up suddenly and without further fanfare!
No commentsUsing acts_as_attachment without filenames
The Rails plugin, acts_as_attachment, has recently been improved to not require a filename column in the database. This is useful to anyone who does not want to expose your user’s original filename.
Using acts_as_attachment without filenames is actually very simple. First, your database schema cannot contain a filename column. Second, enhance your class to contain a method to return an appropriate filename. I am using:
def filename
if parent_id
"#{parent_id}_#{thumbnail}.file"
else
"#{id}.file"
end
end
As mentioned in my previous post about acts_as_attachment, I am also altering the default directory structure. Putting it all together, here is my attachment model if we were working with the DVD Cover tutorial.
class DvdCover < ActiveRecord::Base
acts_as_attachment :storage => :file_system,
:content_type => :image,
:thumbnails => { :normal => ‘640×480′, :thumb => ‘100×75′ }
validates_as_attachment
def filename
if parent_id
“#{parent_id}_#{thumbnail}.file”
else
“#{id}.file”
end
end
@@HierarchyLevels = 2
def full_filename(thumbnail = nil)
object = (thumbnail ? thumbnail_class : self)
file_system_path = object.attachment_options[:file_system_path]
parts = [RAILS_ROOT, file_system_path] +
(1..@@HierarchyLevels).map { |i| partial_path(i) } +
[ thumbnail_name_for(thumbnail)]
File.join(parts)
end
protected
# Given i, extract the ith 8-bit hex representation from our primary id.
def partial_path(i)
the_id = (respond_to?(:parent_id) && parent_id) || id
“%02X” % ((the_id >> (8*i)) % 256)
end
end
No comments
Notebook fixation (pt. 2)
Ah, yes, the notebook. So simple in concept, yet so hard to find one that really satisfies. My standby notebook for several years has been the A5 Easybook by Oxford.
The A5 has a project/small grid layout on perforated, holed pages (for later binding), a flexible poly cover, a relocatable divider, and an internal pocket. This small package is perfect for taking notes, sketching ideas, etc.
A number of stores in the Boston area sell the Easybook series, but the A5 size seems to be much more rare. Luckily, Signature Stationers has an excellent notebook selection, including the A5 Easybook. Signature Stationers is on Mass Ave in lovely Lexington, MA.
No comments


