Archive for December, 2008

Another great reason to use a GPS when cycling

Saturday, December 27th, 2008

Back in the summer of 2007, I was riding my bike every day from John Muir Health to my home in Livermore. I am a fairly cautious rider, so I would take the the Iron Horse Trail to keep my interaction with automobiles limited to cross walks as much as possible.

One day (June 18th, 2007), I was riding home, and I got hit in a crosswalk crossing with the green light. (more…)

EJB or not JB? That is the question (sort of) …

Friday, December 26th, 2008

I recently read a post on LinkedIn on the WAFUG group by Andrew Hedges:

Frameworks or libraries?

“Frameworks are larger abstractions than libraries. Abstractions leak, cost performance and take up mental resources.” … http://tr.im/20fm

Is the whole framework craze overkill for most projects? At what point does it make sense to use a framework over libraries that just do what you minimally need? Is it better to start with a large, leaky abstraction or only impose it if/when the project gets big enough to need it?

The answer to this for me is “it depends”, and it’s what keeps architects up at night. Frameworks are usually attempts to encapsulate some best practice or design patterns in a way that will help the developer achieve some gain in productivity, scalability or reliability.

During the dotBomb era, I worked for a small boutique consulting company designing web sites for a lot of startups. All of them were convinced they would be the next big thing, and most of them had extremely aggressive targets for scalability.

Because of this, we spent quite a bit of time with various frameworks trying to understand the balance between the complexity introduced and the scalability that the framework would give us. At the time, Sun was busy pushing the EJB framework, which was a study in how to over-engineer software. The big benefit promised by EJB was that you could theoretically scale your application to infinity and beyond. The downside was that it basically took a huge team of rocket scientists to get off the ground (this was not the nice simple POJO based EJB of today).

What we found was that in most cases, we could get the same sort of scalability for our clients out of simple Model 2 JSP based applications (MVC approach) by taking care to design the application from the database forward. By using the database for what it is really good at (caching, storing and reading data), building DAOs to interact with the database, and factoring the business logic out of the JSP’s, we were able to build a reliable MVC framework that we used with many clients. The framework was very similar to Struts, which didn’t yet exist, and which we started using once Struts2 was released.

Turns out that the amount of traffic that you have to experience to require the overhead of a complex framework like EJBs is not realistic for any but a handful of web sites.

Fundamentally as an architect, it’s my job to figure out what the real problem is, to solve that in a way that will answer the business need (immediately),  and to build it in a way that will allow for some level of deviation from today’s needs (future scalability and flexibility). So for almost every case that we came across, there was too much complexity and overhead in the EJB framework to make adoption a valid choice back then. Not only did an EJB design require significantly more developer work than the alternatives (making it more costly and harder to change), the initial application wouldn’t perform as well (since it was burdened with all the code that was required to make it scale seamlessly).

All of that said, EJB is also a great study in how a framework can be improved. With the current value proposition of EJB3, the objections that were so clear before have gone away: it no longer takes a rocket scientist to engineer EJBs, and in fact any complexity is fairly well hidden from the developer. Most of the overhead of the framework has been moved into the run-time, so it scales much more appropriately.

As an architect, my decision becomes much easier to include a framework like EJBs when it both saves development time, and gives me a clean and simple path to change. There’s always a balancing act between the time to market, and anticipated change in the application too. I worked on some applications that used MS Access or Domino to get off the ground quickly because when used as a framework those applications are great RAD tools. You can prototype and get to the 95% level of usability for an application very quickly, and for many apps this is better than good enough.

The problem with these (as with almost any framework) is when you get to the point you need to do something that the framework wasn’t designed for. You built a killer app in Access, and now you want to roll it out to the entire company. Well, even though Access claims to work for multiple users, turns out it is a pain, and uses some very archaic methods for things like sharing the database. And even if you reengineer it to store your data in an enterprise DB, it still has the problem of needing to be deployed somewhere or being shared (which again runs you into the locking and corruption problems).

Every problem requires thought and some knowledge of the limitations of the tools in your tool box. By understanding the business problem, and coming to a reasonable understanding of what sorts of changes you can anticipate (including unanticipated ones), you can choose the right level of complexity to solve the problem for today and tomorrow.

Content that’s too dynamic …

Wednesday, December 24th, 2008

Recently I’ve been noticing that ad content is being served up much more dynamically than I’d expect. When I’m looking at the menu on TiVO, or surfing Facebook, there are always little ads displayed that don’t immediately catch my attention. In fact most of the time, the ad doesn’t even register until I’ve clicked something and am waiting for the next page to load.

(more…)

They don’t shoot Eagles do They ?

Monday, December 22nd, 2008

When I was a boy, we lived in south eastern Alaska in the small chain of islands north of Ketchikan, first on the island of Wrangell, then the island of Petersburg. This was one of the most amazing places to be as a boy, the perfect place to learn about nature, and beauty.In Petersburg, we lived a couple miles out of town along this road that ran to the other end of the island, in this house that sat on stilts hanging over a cliff that looked out on the strait (almost all the islands there are so close together that if the water wasn’t 35 degrees you could swim to the next one). The house was nestled in the pine trees, and always looked like one of those postcards of a green forest with wisps of fog floating around the trees. It rained constantly, which was incredibly fun for us, since we got to play in the mud every day. We could always spot the tourists because they would be the ones trying to walk around the mud puddles.The house on the cliff was separated far enough from the neighbors that it felt remote, and we were surrounded by nature. We’d often see the bald eagles circling and once in a while see one flying home to their nest with a fish in their talons, or skimming the glass like surface of the water. All in all a very peaceful place to be.One day we had a very different experience with the bald eagles. It was a quiet morning and we heard a commotion out on the deck (the top story of the house had a deck that hung out over the hill), so we all hurried to see what was going on. When we got to the window, we were amazed to see a bald eagle flapping about on the deck, banging into the window and trying to find his balance. It’s hard to imagine the sheer size of this bird when you see them flying high up in the air. But with six feet of wings he didn’t fit too well on the narrow deck, and after a moment he fell to the ground below.He had been shot. He flapped around for a bit more on the ground below the deck, and eventually died. None of us could understand why anybody would shoot at such a beautiful and protected creature, symbol of our nation, but we could definitely understand why his mate was circling overhead. I don’t know how long she circled overhead, although I’m pretty certain it was over a week. They mate for life and she wasn’t about to give up easily. Her mournful cries echoed overhead as she circled, and it made us all sad and mad.The Forest Service came and collected the body, and I remember my Dad asking them questions about what they would do, and if they would catch the person responsible.  I also remember he wrote a very moving piece about the insanity of the killing in his column called Weaver’s Loom.As a boy in Alaska, I fished almost every day. And most days, I could simply look down in the water, and pick which fish I wanted to catch. So what sort of insanity would make a hunter think that an eagle could even make a dent in schools of fish that number in the thousands. And if the hunter wasn’t just stupid? What if he was a poacher, thinking that he’d get a bald eagle and sell it to some collector for thousands of dollars? Well, at least then we could take some comfort in the fact he didn’t get his prize.

Using LinkedIn to generate a PDF “resume

Monday, December 22nd, 2008

I ran across a post on one of my LinkedIn groups from a fellow member named Mike Smith, the text of this post is on his blog at http://dominoconsultant.blogspot.com/2008/12/export-pdf-resume-from-linkedin-without.html

Basically the trick is to make sure your profile on LinkedIn is up to date with all of your best resume information in the career section, then use the magic icon on your profile to produce a PDF. My friend Walt Feigenson posted an entry on his blog that takes this idea one step further by introducing a web site that allows you to pick and choose which pages to include in the PDF before you send it. Walt’s post can be found at http://feigenson.us/blog/?p=163

While this isn’t an ideal resume, it does get to the “good enough” level for recruiters (assuming you’ve actually updated your profile with all the salient information), and as Walt points out, you can extend the idea by splitting out information like your references to send along to a hiring manager.

A couple of people suggested to me that perhaps using a PDF printer would be an easier way to accomplish this same task. The advantage that using the PDF button on LinkedIn has over this approach is that it produces a nicely formatted version of your profile, which doesn’t include all of the buttons and other things that are displayed on your profile. By downloading the PDF in the format that LinkedIn produces, you get a relatively simple resume that you can send out (either with the technique that Walt talks about, or printing to a PDF printer the pages you want to keep).