Ouch

Mar 31 ‘07

Spring Cleaning: One Man's Junk is a Teacher's Treasure

Mar 4 ‘07
Computer Stuff Grab-Bag!
Cable-rama
a bunch of computer cables

Why do I have all of this stuff? Those pictures are just a portion of it! Years worth of computer cables, user's manuals, routers, defunct RAM, web cams, blue cold-cathode-ray-tubes to light up the inside of an old Plexiglas-sided machine (seriously?) Well, it's spring cleaning time, and Craigslist, here I come! I'm selling all kinds of old crap, but I'm giving away the old computer, which I've done a couple of times before, most recently about a year ago.

I was taking a load of garbage out when my geek-sonar pinged a computer next to the dumpster. I cracked it open and found that it was missing a hard drive, so I raided my computer-stuff box for an old one, loaded a (completely unused!) version of Windows 2K and found it to be a perfectly fine mid-range PC. Now, what to do with it?

Well, if I was a few years younger and a little bit bolder I would have stacked it next to my two OTHER computers and called myself a co-lo. But, knowing that I really had no use (read: no time) for yet another computer, I decided that I'd give it way on Craigslist. I posted a classified add reading something like this:

Free Computer for a Good Cause

I found a computer next to the dumpster, fixed it up, and am giving it away. So, if you are need of a perfectly fine computer and have a good cause, please let me know.

And to my surprise I got not just a few responses, but over 50. As expected, a handful were "gimme a free computer, dude!" responses, but the overwhelming majority were heart-wrenching pleas for help. Tutors in poor neighborhoods trying to teach underprivileged kids about computers. School teachers trolling craigslist for cheap computers for their classrooms, because their school can't afford them (note: California is the 5th largest economy in the world.) Parents desperately trying to afford a computer so their kids didn't have to stay late at school or the library in order to do their homework. Adults going back go college. Artists looking for projects. And many, many other stories.

Sure, we've all heard stories like this before: one man's junk is someone else's treasure, but I was shocked at the response and desperate need for something as seemingly ubiquitous (to the privileged like myself) as a computer. It was sobering. It is always eye-opening to witness these situations of need.

I ended up giving the computer to a woman who tutored kids after school in Vallejo; it was a tough decision. My hope was that by giving the computer to a teacher or tutor that the maximum number of people would benefit, not that it made me feel any better about saying 'no' to the laid-off father of 3 who wanted it for his kids.

Street cred? No: Geek cred (Part 2 of 2)

Feb 18 ‘07
Installing Ruby on Rails on Ubuntu and Windows XP at the same time under Parallels
Installing Rails on Ubuntu and Windows XP at the same time under Parallels

Now that I have my Ubuntu Linux and Windows XP virtual machines running in Parallels (see Street cred? No: Geek cred (Part 1 of 2)), it's time to set them up to run Ruby on Rails. Why? You know... because.

Again, I'm not going to go into excruciating detail, but instead reference the sites that helped me with this and the problems I faced. Luckily there were only a few.

Windows XP + Ruby on Rails == Easy

Here I pretty much followed the instructions on the main Ruby on Rails site. As much as the Rails community loooooooooves their Macs, getting Rails up and running on Windows is much, much easier and faster than any other OS. No ports, no compiling, no apt-get install voodoo. It's just double-click and next-next-next-next-next...

  • download and install using the ruby windows .exe installer. Make sure you select "enable gems" when asked!
  • download and install mysql
  • gem install rails -y
  • gem install mysql -y
  • gem install mongrel_cluster -y

Ubuntu Linux + Rails = Funkadillio

The guide to installing Ruby on Rails on Ubuntu Dapper Drake at Urban Puddle was a very good guide, but I still had troubles. The issues had the same theme: I needed development/compilation tools, which I had not installed as part of the Ubuntu install process. Here are the other things I needed to do:

Ruby Dev Library

I got the following error when trying to gem install mysql -y and gem install mongrel_cluster -y:

extconf.rb:1:in 'require': no such file to load - - mkmf (LoadError)

Solution: install ruby1.8-dev:

sudo apt-get install ruby1.8-dev

make And gcc

The mysql and mongrel gems also complained about make and gcc not being found:

make
sh: make: command not found

and

make: gcc: Command not found

If you get this, install them both:

sudo apt-get install make
sudo apt-get install gcc

Mysql Client Dev Library

I ended up installing this, too, but I'm not sure if it actually fixed anything.

sudo apt-get install libmysqlclient12-dev

That's it so far. I'm planning on setting up the Ubuntu image as a Capistrano deploy target and treating it as a test server.

Street cred? No: Geek cred (Part 1 of 2)

Feb 17 ‘07

OS X running Windows XP and Ubuntu Linux virtual machines in ParallelsI'm finally getting around to playing with Parallels Desktop for Mac, specifically the free release candidates for the next version. My geek-meter is rising with every moment. Here are some of the cool things and problems I found along the way. I'm not going to detail a complete install guide, but I will reference the ones I used and give credit where credit is due.

Windows XP on Parallels

The Parallels Release Candidate includes this nice feature: if you already have a Windows installation on your Mac from using Boot Camp, Parallels will let you run it in a virtual machine. This gives you the best of both worlds: a true hardware-accelerated Windows install for games (why else?) that you can also fire up in Parallels when you want to see if your CSS works in IE6 how badly your CSS is broken in IE6.

Problems with Windows XP on Parallels

Parallels wouldn't start my Boot Camp image immediately, instead giving me this error:

Parallels Desktop cannot find necessary drivers to configure your Boot Camp partition. Please refer to Help> Parallels Desktop Help>Using Boot Camp Windows XP Installation for troubleshooting*

... and so I did. Help> Parallels Desktop Help>Using Boot Camp Windows XP Installation suggested the following:

  1. Boot into Windows XP via Boot Camp
  2. Insert Microsoft Windows XP installation disc which was used for this Windows XP installation.
  3. Locate the folder i368 on the disc and open it. Copy the following files: driver.cab and any of spN.cab files (sp1.cab or sp2.cab, etc depending on service package installed) to the folder: C:\WIndows\Driver Cache\i386.*

... and so I did. The virtual machine worked fine the next time I ran it, no problems.

Ubuntu Linux on Parallels

Nothing very exciting here. When creating the virtual machine, I created a "custom" installation of "Linux/Other Linux kernel 2.6"; this worked fine (mostly... keep reading.) Download yourself an ISO disk image from Ubuntu's download site or bittorrent one. I'm using Dapper Drake (6.06 with Long Term Support). When prompted to "Insert Linux Kernel 2.6 installation CD," choose "More Options" and specify the location of your downloaded ISO.

Problems with Ubuntu Linux on Parallels

I had to install it twice for some reason, which means that I had to delete the first virtual machine I crated and start from scratch. There was some kind of fatal error that I didn't pay attention to at the time, and thus I cannot tell you what it was; now unhelpful of me.

Next up: setting up the virtual machines for Ruby on Rails development.

*Text is most likely © Parallels. Hopefully they will be nice and let me help people help themselves and also sell more of their product.

NEW! The Super-Fancy Digital Whiteboard!

Feb 16 ‘07

Does you're company have one of these?

digital whiteboard

It's a super fancy digital whiteboard/printer! I've worked for 2 companies with these things. It was supposed to be a killer app, so to speak, since many of us have had the same thought: wouldn't it be great if we could get a print-out or digital copy of our whiteboard diagrams? Imagine that! So some company invented this contraption with a printer built right in, which could also scan the drawings and save them as digital images. And guess what?

Nobody used it. Not even as a regular whiteboard. Why? Several reasons:

  • It was never plugged in.
  • Nobody knew how to use it.
  • It was small: about 1/4 the size of a "real" whiteboard around which several people could gather around.
  • Dry-erase markers acted more like semi-permanent markers, smearing and marring the writing service.
  • There was something scary about it. I can't explain it.
  • Did I mention that it was never plugged in and nobody knew how to use it?

Note that while I am bashing the digital whiteboard, I'm not bashing the plotter, printer plotter which does rock, though occasionally print The World's Largest Email when you forget to change your target printer.

Don't Erase That!

At Pivotal Labs we make high-tech digital copies of our whiteboard drawing and notes all the time: we use a digital camera. Before erasing a whiteboard that I want to use, I fetch my Canon PowerShot SD450 Digital Elph, a teeny-tiny 5-megapixel camera, which I have in my backpack at all times (please don't jump me if you see me on the street.)Canon PowerShot SD450 Digital Elph camera Then, after taking the pic, I run over to the HP all-in-one color printer we have, pop the Elph's SD card into the memory card slot, and print the pic right then and there. When it's done, I tape the print next to the whiteboard and write the date on it. There. Documented. High tech, yet simple. This also works great for marathon UI mockup sessions and you want to reuse the whiteboard: snap a pic, print it right away, and tape it up. And digital copies? 5MP worth!

Macification

Feb 8 ‘07

My Macbook Pro is almost all set up, thanks in mostly to the large Cult of Mac contingent in the office. After asking for many suggestions and doing a bit of digging myself, here's what I'm running:

  • Quicksilver: My God, it's full of stars. QS actually reminds me of developing with a powerful IDE: who cares where stuff is when you can search? Just find it. For me, it's Command+Space and start typing. Wonderful app. Much faster than the build-in Searchlight.

  • MenuMeters: Displays CPU, memory, and other system status information discretely in the menu bar. I display memory and CPU, but skip the disk and network info.

  • Witch: Allows you to ALT/OPTION+Tab through all of your application windows, not just the main application itself. For example, I have 3 Mail windows open and I can ALT+Tab to all of them.

  • XTorrent: Free (for now) bittorrent client that also includes searching for torrents. Great for finding all of the that wonderful Creative Commons content.

  • Cog: ... and now that you have torrented all of that CC'ed .flac and .shn audio, play it with Cog. Actually I don't like it much, since I can't seem to sort by file name, which is annoying. I'm looking for an alternative.

  • NeoOffice Pretty free office applications. Gotta have at least one.

  • VirtuDesktops: Multi-desktops. I feel like I'm supposed to like this, and I sorta do, but I don't use them much yet.

  • Eclipse: Yeah yeah, I know there are many Eclipse haters out there, but it's a free IDE with lots of handy plugins. Maybe I'll buy TextMate, but free is free is free.

Other Handy Stuff I've Done

  • Windows/Mac hard drive sharing: I followed one of many many many instructions on the net to share my Windows hard drive with my Mac, and visa-versa. Rather handy for harvesting all of that stuff I've been collecting for the last forever.

  • NAS Enclusure: Fry's has a great selection of NAS (network-attached storage) hard drive enclusures, so I picked up a NexStar LX which seems to be working fine. Same theme as above: now I can more easily share content between my Mac and Windows machine, plus this will be a good place to park backups.

Dashboard Widgets

Holy crap these suck a lot of memory. But, if they are worth the RAM, then install like mad. The only one I keep up is iStat Pro widget which shows lots and lots of system info in a pretty interface. I checked out the Wikipedia widget and Rdoc widget widgets but didn't find them so useful when you can just open Firefox and hit the sites themselves.

Check Out the Pivotal Labs Blog

Feb 6 ‘07

... because it's where I work. We're still working on content.

http://blog.pivotalsf.com

Smilies, Quizzicals, and Frownies

Feb 2 ‘07

Today, as we do every 3rd Thursday, Pivotal Labs has our Retrospective, a beer-aided romp though the last 3 weeks of Smilies, Quizzicals, and Frownies: that is, the Good, the Questionable, and the Bad.

Retrospectives are a core practice of many Agile teams, since they represent a dedicated time and place to discuss those exact topics: core practices. We try (and often fail) to stick to non-technical issues, but hey, we're geeks, and discussions often dissolve into passionate PC vs. Mac vs. Linux debates and the virtues of specific keyboard mappings. But, I digress. Here's a quick narrative about our Retrospectives and what we try to accomplish.

On day 1, the day after the last Retrospective, we place a large, sticky-backed sheet of paper against the Whoo-Ha wall (don't ask). This sheet has 3 columns: one marked with a large Smiley face, one with a quizzical/not-happy-but-not-sad face, and the last column topped with a frowning face. Over the next 3 weeks, as various successes, happy events, questionable activities, and frustrations arise, we write them down in the appropriate column. For us, perfectionists that we are, the Frownie column fills up fast and occasionally requires extra paper. Quizzical is close behind, also filling its space. The Smiley column usually has a sorry few examples of good events, and not because they don't happen, but because we are so self-critical that we feel the need to fix any problem that arises. On retrospective day, folks tend to dredge their memories for those happy bits, say, for example, the launch of our largest customer project in history; oh yeah, that was kinda nice!

And now, finally, it's Thursday, at 4:00pm, and 3 weeks since the last Retrospective... beer run! The nearest Tenderloin liquor store owner loves us.

Upon returning with several cases of brewskies, the Moderator, whom was usually reluctantly elected at that day's stand-up meeting, is trying to get the show on the road. Tops are popped and we're under way. The Moderator reads through the list of ToDo items resulting from the last Retrospective: have those assigned specific tasks followed up on them? Have items assigned to the group as whole been addressed? Discussion enssues.

Now, on to the Big Retrospective Paper: do we start with the Smilies or the Frownies? The Moderator decides. Either way, the Smiley topics go fast, with clapping and laughing involved. Everyone's happy!

Now, the Frownies and Quizzicals. In a company of elite geeks, everyone has an opinion, even if they don't voice it loudly. When I moderate, I try to call on folks that I notice do not speak up much, but it's hard -- assertive and opinionated attendants can dominate the conversation. We've made a lot of progress in this area lately and the results are promising: more voices heard. We spend a lot of time on the Frownie and Quizzical topics: when should we hold stand-up, and what should happen when people are late? What is the best way to roll clients out of our continuous integration environment after they spread their wings and fly off with their own development teams? What's the best way to deal with the fact that developers with laptops "pillage" workstations of monitors, keyboard, mice, etc.? And how about stand-up again? Oh yeah, and about the stand-up meeting...

It's both an science and an art to figure out how much time to spend on each issue, especially those that affect the entire group. Some people just want to move on, while others are far more invested in the same issue and wish to really hash it out. For the most part the group and Moderator combine to decide when to finish a discussion (at least for the time being) and address the next. In the end, every issue raised has a ToDo item directly addressing it, with someone assigned.

After the last item is addressed, everyone feels great on several fronts: We talked about a lot of deep topics! The meeting is over! Beer! It's definitely a group-hug moment.

Now, if we can just figure out a way to get everyone to show up at the stand-up meeting on time...

We Have Been Macssimilated

Feb 1 ‘07

And another one joins the Borg -- I bought a MacBook Pro. Though using a Mac is rather slow for me at this point since my keyboard navigation is hard-wired into my nerves system, I see to many advantages to avoid it any longer. Speed, the fact that it's a hard-core Unix system, stability, cool-kid factor... the list goes on and on. But this was the real ringer: a coworker of mine is working at a client with several hard-core sysadmin hackers, and guess what they have switch to? No, not a Dell or ThinkPad with some crazy, hand-compiled version of Linux, but Macs.

On a non-techie note, buying this thing was a wonderful experience. I have been watching the Apple Refurbished Store for the latest Core 2 Duo MacBook Pros and they started appearing a few weeks ago. Same warentee, so why not save a few bucks? Anyway, I dropped the hammer on one yesterday morning, it shipped that same afternoon, and was delivered the next day, all for free shipping. Good service!

Now I have to install Ruby, Ruby on Rails, MySQL... oh boy.

Subversion How To: Replace Trunk or HEAD with an Older Revision

Jan 23 ‘07

Today I was pairing with another developer and we got a little ahead of ourselves and committed some rather drastic changes to the trunk/HEAD of our project. After a few more commits it became obvious that we were stepping on several other developer's toes, so we decided to revert trunk back to the revision just before we nuked the codebase.

Unfortunately, nobody knew how to do this, though it seemed like this should be a pretty common task, since just about everyone has wanted to erase the past for one reason or another. It didn't take much Google'ing to find the answer but the syntax was weird enough that I decided to show it here. Thanks Python Software Foundation's How-To for the tips.

The command:

svn merge -r NEW:OLD PATH

Example:

svn merge -r HEAD:101 http://subversion.example.com/project/trunk

Let's say you committed a real stinker at repository revision 20, and, since you've kept committing, the repository is now at revision 22. Here's how to revert HEAD back to the fresh-smelling revision 19. Here's the story:

[~/40withegg]# svn rm test/
D         test/unit/asset_test.rb
D         test/unit/core_filters_test.rb
D         test/unit/tagging_test.rb
...
D         test

Commit it!

[~/40withegg]# svn ci -m'JLM: deleting tests because I am crazy!'
Committed revision 20.

And, after some other craziness, we committed a few more things:

...
Committed revision 22.

Let's undo all of that. First, revert, just to make sure your working directory is clean:

[~/40withegg]# svn revert *

Next, perform the (horribly named for this purpose) svn merge, which will add the clean revision's code to your working directory as changes:

[~/40withegg]# svn merge -r HEAD:19 svn+ssh://joe@example.com/svn/trunk
A    test
A    test/unit
A    test/unit/user_test.rb
...
A    test/referenced_caching_test_helper.rb

Finally, commit the fix:

[~/40withegg]# svn ci -m"JLM: adding the tests back... man that was dumb."
Adding         test
Adding         test/actor.rb
Adding         test/fixtures
...
Adding         test/unit/user_test.rb
Transmitting file data .
Committed revision 23.
[~/40withegg]#

Hope that helps!

Powered by aintablog