Monday
Feb232009

missing out on flex?

Last week I finally started using an AIR application, TweetDeck, because my brother said it was cool. Now I'm reading about Flex and AIR, and I have to say, I might have been missing out on a good thing. It looks to me like Flex and AIR are together a powerful front-end platform for building nice applications... where by nice I mean the things that Ben Shine traditionally loves: smooth, swoopy, delicate, rounded, subtle, surprising, shiny.
This bears investigation.

Thursday
Feb192009

what's running on port 8080?

I learned an important new unix command today: lsof. The name seems to stand for "list open files." The purpose of the command is to list information about the process who has opened a file. In unix-y OS's, sockets are file-ish, so lsof -i :8080 lists the process who opened the file named port 8080 on localhost, where ":8080" is interpreted as the address of a network file.
In my case, I traced the rogue 8080 to an instance of tomcat being started up by ~/Library/Caches/IntelliJIDEA70/tomcat_Unnamed_adomainahexid. I could tell from the domain name that this was a tomcat that I was developing with four months ago. Ouch.
I don't know why it was starting at system startup, but I'm not in the mood to dork around (anymore than I have already), so I rm -rf'd the cache directory and moved the tomcat install to apache-tomcat-6.0.18-hideme. It's gone now.

Friday
Feb062009

something else to hate about outlook 2003

When I reply to an email in Outlook 2003, the display of the original email in my inbox updates with the helpful annotation, "You replied on 2/6/2009 at 2:41 PM." That's fine.
What sucks, though, is that Outlook applies that annotation before I've actually sent the reply. There's a time period when I'm composing the reply during which Outlook claims that I've sent a reply to a message, but I I haven't actually replied yet.
Ways in which this might be disastrous are left as an exercise to the reader.

Tuesday
Jan062009

o glorious patterns (of enterprise application architecture)

Two years ago, I started reading Martin Fowler's book, Patterns of Enterprise Application Architecture, on the recommendation of Adam Wolff, whose technical acumen I respect deeply. My first few times attempting the the book, the pages seemed to be made of a soporific variety of lead. I understood the words and the sentences and the paragraphs, but couldn't summon any interest in them.
Today at work, I somehow signed up to give an introductory talk on design patterns, so I went looking for my copy of the Gang of Four. I couldn't find it, but I did find PEAA. I opened the cover and found a list of The Most Amazing Things Ever. Four patterns describing ways to represent complex class hierarchies in databases! Two different patterns for storing session state! Query objects! Remote facade! Value object! Service stub! Finally, here was a vocabulary for the architectural problems that have challenged and puzzled me for the last two years! O glorious book! Just reading the inside front cover has crystallized hours of design discussions and a comparative analysis of a dozen web application frameworks. This is beautiful stuff!
Now I see why Adam was so excited about PEAA two years ago, and why I wasn't, and why I am now. If you're not building enterprise applications, there's no reason to care about the patterns. Studying them is dry and, joyless. If you are building enterprise applications, you spend your best moments thinking about the issues addressed by these patterns. If you're lucky enough to work with other people -- and really, who builds an enterprise app alone? -- then you spend hours each day talking about these issues. Beautiful, beautiful, glorious book!

Thursday
Dec252008

SOLUTION for "Rails requires RubyGems >= 1.3.1" problem

If you don't care about running Rails 2.2, you can safely ignore this post. If you ran into the same problem I did, this post will help you solve it.
I'm running Aptana Studio 1.2.1 with RadRails 1.0.0, and I'm creating a new Rails project using Rails 2.2.2. The wizard for a new RadRails project seemed to basically work, but it failed on starting the rails server with this error message: "Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update --system` and try again." I tried that several times and it didn't work. Some googling revealed a solution, but the solution isn't quite spelled out in n00b-friendly language. (cwilliams on the aptana support site does the best job yet, though) So here we go.
Prologue: A lecture from your friendly sysadmin. Never run commands that start with "su" if you don't know what they mean.
Body: (much cribbed from cwilliams again)

[ben@pro ~]$ sudo gem update rails   # get the latest version of rails
[ben@pro ~]$ sudo gem update --system # update the RubyGems system software
[ben@pro ~]$ gem install linecache # install the "linecache" gem

linecache is a requirement of RadRails that isn't listed in the requirements.
[ben@pro ~]$ ruby -S gem --version
1.2.0

That tells me that I've got version 1.2.0 of gem installed. Gem is ruby's package manager. So let's install a gem whose purpose is to update the gem system. This is a little complicated, but it works:
[ben@pro ~]$ sudo ruby -S gem install rubygems-update 
Password:
Successfully installed rubygems-update-1.3.1
1 gem installed

Good. Now run the script that updates rubygems...

[ben@pro ~]$ sudo ruby -S update_rubygems
Installing RubyGems 1.3.1
mkdir -p /Library/Ruby/Site/1.8
mkdir -p /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin
...

At the end of the output of the update_rubygems command, you'll see a long message from the RubyGems team. I'm pretty sure you can safely ignore it. Make sure you have the right version of gem installed now:
[ben@pro ~]$ ruby -S gem --version
1.3.1

Good. Now go back to Aptana and start your Rails server again: Window -> Show Views -> Servers. Right-click on the server named <project>Server. Select "Start server in debug mode" from the context menu. The status of the server should switch to "Starting." Right click on the server name again; select "Open Console/Shell." This should show a lovely shell whose output ends with
** Mongrel 1.1.4 available at 127.0.0.1:3001
** Use CTRL-C to stop.

Don't be frightened that all that text is in red. You're good, you're golden; rails is up and running.

Page 1 ... 2 3 4 5 6 ... 51 Next 5 Entries »