Blogbody Rotating Header Image

Uncategorized

This blog has moved

After several days of playing with Posterous and Tumblr I’ve decided to move my blog over to http://blog.lightbody.net (powered by Tumbler).

If you are one of the few RSS subscribers still watching this blog (which would surprise me since it’s been ~2 years since my last post), it should auto switch over to the new blog since I’m using FeedBurner.

However, be on the lookout if you don’t see more regular updates because I really do fully intend to blog quite a bit more starting now :)

New Book: Apache Struts 2 Web Application Development

Great Article on Advanced Selenium

I was forwarded a great article on advanced Selenium techniques. Worth a read for anyone who uses Selenium. While the article focuses on ExtJS, the lessons in there can be applied for any website. Building Java (or perl or python, etc)-based components that represent the logical page is a technique I’ve used in the past, but it’s great to see it written up so clearly!

Tip: Compact Logging in Java

One of the little touches I added to Able, which came from code originally in BrowserMob, was a nice little JDK logging formatter. It is designed to work with modern IDEs (IntelliJ IDEA being my personal favorite) and their ability to understand shorthand notation for classes.

As I was building BrowserMob, I was getting irritated by long package and class names as well as the fact that my log messages weren’t lined up nicely. For example, I’d get:

INFO 12/29 19:26:28 org.directwebremoting.impl.StartupUtil - Starting: DwrGuiceServlet v3.0.0.109.dev
INFO 12/29 19:26:31 com.browsermob.stripes.WelcomeActionBean - Some log message
INFO 12/29 19:26:37 com.browsermob.stripes.WelcomeActionBean - Some log message

I tried a simple formatter that truncated the class name, but the result wasn’t very helpful, since the class name (usually the most important part) would get cut off when the package name was too long:

INFO 12/29 19:26:28 org.directwebremotin - Starting: DwrGuiceServlet v3.0.0.109.dev
INFO 12/29 19:26:31 com.browsermob.strip - Some log message
INFO 12/29 19:26:37 com.browsermob.strip - Some log message

That was when I realized that often the package name wasn’t that useful, especially since they were often very predictable and unique even in a compact state. For example, in the past developers I have worked with would often write “n.s.s.c.StripesFilter” as a short hand for “net.sourceforge.stripes.controller.StripesFilter”. So why not use this for logging too? The result was much easier on the eyes:

INFO 12/29 19:26:28 o.d.i.StartupUtil    - Starting: DwrGuiceServlet v3.0.0.109.dev
INFO 12/29 19:26:31 c.b.s.WelcomeAction~ - Some log message
INFO 12/29 19:26:37 c.b.s.WelcomeAction~ - Some log message

Basically, the packages would get cut down to the first letter of each sub-package. If the class name pushes the whole thing beyond 20 characters, then a tilde is added to indicate the name is longer than could fit.

The nice thing about this is that it works beautifully with modern IDEs. I can copy the text “c.b.s.WelcomeAction” and locate that string in IDEA and it’ll know what I mean:

200812291142.jpg

If you want to use this formatter, you can find the code here in the Able source repository. It could probably get some performance improvements, such as some simple memoization, so feel free to send any tweaks you make my way. Do you have any neat tricks you do with logging? If so, please share in the comments!

Merb to be Merged in to Rails

Very smart move by both the Merb and Rails project leaders:

Big news in the world of Ruby web frameworks: Merb and Rails will be merged.

[From InfoQ: Merb Will Be Merged Into Rails 3.0 ]

I’ve been telling people for a while that Ruby has been following the Java path at an accelerated pace. Ruby was able to learn from many of the mistakes that Java made, but the overall path seemed very similar.

The split between Merb and Rails was no different than the split between Struts and XYZ Framework. The XYZ project leaders explained that they forked off from Merb because they wanted “more flexibility” or “more cowbell” or whatever. This sounded exactly like me circa 2003 when I was championing WebWork as a better alternative to Struts.

By 2005, some of us in the Java community got a clue and realized that joining forces may be better for the user.

Congratulations to the Ruby community for getting a clue faster than we did the Java community. But please don’t let it go to your head (*cough*DHH*cough*)… you have had the benefit of learning from previous pioneers. ;)

Tonight: Java and Beer AppFuse and Tapestry tech leads

Reposting Matt’s blog entry:

If you live in Portland, Oregon – or just happen to be in town – you might want to join us for some beers and tech talk tomorrow (Monday) night. Patrick Lightbody, Howard Lewis Ship and Matt Raible will be meeting around 6:30PM at the Rogue Distillery & Public House. With 36 taps and the delicious beer from Rogue Ales, this is sure to be a fun night.

If you’re on Facebook, you can let us know you’re coming by RSVP’ing to the Event. Otherwise, please leave a comment or just show up.

There is also a Calagator entry here.

Business-readable DSLs

I completely agree with Martin Fowler’s latest post:

The sweet spot, however is in making DSLs business-readable rather than business-writeable. If business people are able to look at the DSL code and understand it, then we can build a deep and rich communication channel between software development and the underlying domain.

[From MF Bliki: BusinessReadableDSL]

We’re getting close to a point where code can be written in a language that a non-programmer could readily understand. I’m most excited about JetBrains’ Meta Programming System. I think it has the best chance of being the first IDE that people really understand and can use for exactly the purposes that Martin describes.

Even better? JetBrains released their first beta of MPS just a few days ago! If you’re tried it out, please let me know what you think. I’ve been watching MPS for a while now and am really excited, but I just don’t have the time yet to take an in-depth look.

Pictures of my dog

I’m loving the fact that FriendFeed is now showing pictures in my posts. To celebrate, here’s some pictures of my dog:


200812040856.jpg


200812040857.jpg


200812040857.jpg


200812040857.jpg


200812040858.jpg

Testing FriendFeed-compatible MediaRSS WordPress plugin

Found out that FriendFeed supports showing images in your blog posts as long as your blog emits MediaRSS. This is a test of that feature by using a tweaked version of the MediaRSS plugin for WordPress. It has supposedly been modified to be compatible with FriendFeed.

Here’s a nice picture of where I stayed during my first visit to Italy. I hope to take my wife there sometime too. Can you guess what city this is?


Rio.png

Organizing My Online Habits (Part 1)

The Challenge

Three or four years ago it was easy to track friends, news, topics, blogs, etc. You used an RSS reader. It was simple – you organized your feeds in to folders and you were done.

Then Twitter, FriendFeed, and Facebook came along and changed the entire concept of how you behave online. No longer did you just get a feed of content to follow, but now there were tweets and comments and photos and “likes” to follow.

In fact, many people I used to follow via RSS stopped blogging (me included, but that’s changing). Over the last few years the structure I once had around tracking online activity and content fell completely apart: I stopped using an RSS reader entirely. I’ve relied on a mix of Twitter and FriendFeed and iGoogle to get by for a while, but never really invested in organizing any of them.

Today I began to take the advice put forward in the Balsamiq Blog (great read for small software startups). I streamlined Google Reader, shuffled iGoogle around, and cleaned up my FriendFeed account.

The Solution

The first thing I did was delete all RSS feeds that were for personal blogs from Google Reader.

I decided that from this day on, personal blogs will be handled entirely in FriendFeed. My reader would be used for market research, following online “magazines” (TechCrunch, political blogs, etc), and data-focussed RSS feeds (search feeds, Woot.com sales, etc).

But even then I felt (and still feel) a bit conflicted: what about iGoogle? Should I follow some blogs and newspapers there? What about the NY Times and the DrudgeReport? I can get RSS feeds, but those didn’t feel right in an RSS reader.

I’ve decided that the RSS reader should be for things I don’t want to miss and want to use real read-tracking for. For all other stuff (NYT, Drudge, some blogs) I can have a panel in iGoogle, along with my weather, stocks, and a FriendFeed widget.

Making the Most out of FriendFeed

I took all the personal blogs I was following and found that of them, only nine were not already FriendFeed members. For those nine I created “Imaginary Friends” in FriendFeed. While only I can see imaginary friends, it’s still a great way to track those people until they sign up for FriendFeed.

Then I created some new “lists”. I decided that everyone will stay in the Home feed until I get annoyed with them, after wish I will hide the annoying parts (ie: Tweets or some blog), take them off of Home and only in Other, or unsubscribe entirely.

To get started, I created several lists that mapped to my interests. These interests were a mix of groups, companies, and places. I expect this list to evolve, but the main thing I decided is that it’s “OK” for it to be semi-unstructured.

200811261415.jpg

BrowserMob is for people who I think relate or otherwise overlap with what I’m doing. This includes all my Selenium friends, as well as other folks who are in the QA and cloud computing space. This allows me to get simple market research done and see what individuals are up to.

Developers is for all my open source friends, as well as fellow Java developers and QA gurus. I know I can click here and get a full stream of techno-babble, or musings from tech-heads.

Friends is for people I consider personal friends. This list is likely to only contain people that I know I can respond to with very personal comments.

Interesting People is basically where I put folks like Louis Gray, Robert Scoble, the FriendFeed founders, etc. These are folks I don’t know that well or at all, but I like reading what they are up to and what they recommend.

Jive is where I can track all things Jive-related. Since I used to work at Jive, I know a lot of folks who work there or have worked there. This list is also where I put Jive-related folks (customers, clients, contractors, etc). I like to track Jive separately because I’m very interested in the space (collaboration software) and because some very good friends work there.

Other is my bucket for when I can’t classify someone. I rarely expect to click this, but people in here are ones I find are interesting but don’t fit in to a specific interest in my life. They might eventually get unsubscribed entirely, or they might be moved in to a different bucket as I learn more about them.

Portland is for friends, acquaintances, and bloggers who physically live in the Portland, OR area. I try to stay plugged in to the tech scene here, so this is where I’d go to follow it.

Silicon Valley is the same as the Portland list, but for my other home: the San Francisco bay area. This list includes more VC types and entrepreneurs than the Portland list.

Coming Soon: Part 2

For my part 2 I’ll discuss how I organized Google Reader and iGoogle. They are much less complicated, though I’m experimenting with Yahoo Pipes, so there might be some tips to share. Perhaps a few weeks after that I’ll also post a part 3 that reports how successful it’s been.

For additional tips on how to maximize your use of FriendFeed, check out a recent post on Louis Gray’s blog.