Thursday, June 26, 2008

How would you do that?

Wow!  When was the last time you needed to kill a bunch of rampant processes on a unix server?

I needed to do that today this is how I did it:

processes=`ps -ef | grep -i glassfish | awk '{print $2}'`

for a in $processes
  if [ $a -gt 5000 ]
      if [ $a -lt 10000 ]
          sudo kill -9 $a


How would you do it?  Notice the nested if statements - this is a much more verbose but yet clearer way to code the if (x > 5000 && x < 10000) which isn't too bad but if you need another &&or an || or two it gets nasty quick.



Wednesday, June 04, 2008

View From San Francisco

So, while in San Francisco at Google I/O we had to stop at the Cheese Cake Factory. Here is a shot from the baclony.


Monday, June 02, 2008

Whims of a school girl?!

So coming back from the glamour and glitz of Google I/O was far less than exciting.  I came back all fired up and excited about GWT.  If you haven't worked with GWT yet I can't encourage you enough to check it out.  It is without a doubt the best framework/methodology for web development I have used to date.

The initial version of LifeAware was done in Ice Faces (the current LifeAware link is to the PHP version of the site).  I chose IceFaces for three reasons:

  1. JSF was my framework of choice
  2. IceFaces has a nice push model
  3. IceFaces has a decent GMap component

So my experience with Ice Faces wasn't bad. In fact I would say they probably have the best implementation of JSF out there (comparing to Rich Faces and Suns RI).

There were things about all of these implementations that drive me crazy though... styling them is a pain in the butt! 

When the ADC Results were announced our web site started getting a ton of hits and even a couple of registrations.  Although it was completely functional it didn't seem to be a good idea to have people poking around out there.   So we threw up a quick re-skin and disabled the app.  This took about 4-5 hours and it should have taken all of 5 minutes.

Why so long?  Well I was trying to redo it with facelets and Ice Faces.  When I went to bed that night (about 3:00 AM) it turned out that the pages rendered fine in Safari, FireFox and Opera but not IE. 

There were lots of things going on that contributed to the problem but part of the drama was the extra help the themes and skins from Ice Faces gave us.  I'm sure I could have disabled them very easily had I known how, but given the time crunch I wasn't terribly interested in figuring it out the ice faces way.  I ended up taking a compromise on the layout and threw it out there, temporarily until the PHP site could be assembled.  How sucky is that?

So there I was reeling from being burned by the styles and somewhat irritated that the GMap component I had initially liked so much ended up limiting my ability to interact with the extremely powerful GMap API.  Google's Map API can do just about anything you can think of - but the JSF wrapper's seem to leave a developer wanting and waiting for future releases...

So (finally we get to GWT), I went out looking about for a new solution that would give me easy AJAX capabilities with full GMap support.  And GWT is what turned up.  I spent a couple of weeks prior to the conference playing with GWT, trying to understand if it would solve the problems I needed it to. 

Indeed it does.  And after the conference I am totally convinced that GWT is going to be a major player on the web.

I have learned a ton just from working with GWT they use well proven Java techniques like anonymous inner classes - I now understand why and how to use those.

I'm going to stop the tech talk about GWT for now - again if you haven't played with it go and download it now, RIGH NOW!  Here is the link!

So why the title "Whims of a school girl" for this post?

<sigh> I am an evangelist by nature I know that about myself - I try to keep it reigned in, but every once in awhile it gets out.  So, I talked to my boss about GWT and jokingly said that we would have to re-write the Reference Architecture Standards document and he just rolled his eyes and said "the only thing that comes to mind is the whims of a school girl"  basically calling me fickle (at least I think).  I suppose he may have meant I am overly dramatic and extremely talkative though...

I have been working with JSF for about a year and a half and although I'm not sure I would say I have mastered it, I am very comfortable in it and know how to make it do what I want (except use css effectively).  It kind of irritated me to hear someone say that I am fickle. 

I suppose to be fair that is part of the game of being an early adopter but every frame work I have used has solved some problems and created others.  I'm still looking for the problems that GWT creates though, I'm only about a month into it I may find them yet.

I told one of my co-workers today that JSF was 100 times better than Struts, but GWT is 1,000 times better than JSF. I think that is a pretty decent estimate.