Wednesday, January 24, 2007

Windows Subversion Troubles?

Cygwin Suvbersion + Tortoise may be the cause of your problem, read this.

Tuesday, January 23, 2007

Interesting Visualization of the State of the Union

The New York Times presents this visualization of the State of the Union. Interesting use of Flash, and I'm impressed with the immediacy with which the application was deployed.

What Happened to Maven Registry?

Alright, mvnregistry.com, it was once an index of the Maven 2 repository. It was a Rails application, it was something I put together in my own spare time, and it was a tool that filled a personal requirement. It was also an attempt to prove to myself that the idea was worth pursuing. It was a simple Ruby script that traversed all of the POM files and populated a MySQL database. It worked well for a while, but the downfall came when I tried to put a comment form on the front page. Conclusion, don't home comment forms unless it is you full time job to maintain them. There are solutions like Akismet, but because it was a super part-time effort, I just didn't have the time or patience to bother playing catch up with Romanian porn spammers. In the end, someone hijacked the site via the comments, putting a JS redirect to a really terrible porn site. I had no choice but to turn that particular application off. Parsing Repository was a PITA To me, it pointed to some problems with the Maven Repository, for starters, POM interpolation might be an interesting fancy feature in Maven 2, but it made parsing metadata a chore. The decision to allow for variable substitution in a pom.xml file reduces the portability of the format, it becomes less of a description and more a descriptive templating language. The pom.xml should be complete, and the interpolation should be a convenience. A variable reference should never show up in the repository. Maybe they've addressed this, I'm not sure because I haven't really paid too much attention to Maven in the past few months - I've had other priorities (and that was another reason for shutting down mvnregistry.com) The other reason that parsing was problematic was because there were a lot of projects with such a bare minimum of information in the pom.xml it wasn't useful. There were more than a few projects out there that didn't even bother with a description. To me, this is a failure to really deliver on the promise of the technology. Maven could be creating this interesting semantic picture of software as components, it is and it isn't. Maven's a mixed bag in many respects. Two years on from the Dev Notebook, and I'm still very much on the fence about the quality of the tool. Lastly, there were a large number of duplicated groups - a mixture of approaches. Some groups continue to not use group ids that follow domain names, others do. maybe later... Maven registry.com might come back shortly, but it's low on my priority list. In the meantime go check out http://www.mvnrepository.com

Intelligent Analysis of Vilsack's Web Site

:-) Jim Turner calls me a geek and writes:
"Finally a note to the camp at Tom Vilsack’s site. I’m not sure it’s the colors, the design or what my eye falls upon but I have to say in my opinion, this could be put into my Presidential Spam folder. It looks like your nephew designed the site using Stevie Wonder as a consultant. I left there feeling like I had just suffered a seizure of sorts. It needs a little work, but I bet you could cover a few costs by inserting that script for Google Adsense."
Now that's very, very cruel, but also funny and entirely accurate. I nominate Vilsack08.com and kucinich.us as presidential spam web sites.

Presidential Tech Update #5: Richardson's New Site

Presidential Technology Milestone: First Presidential Candidate with Bilingual Streaming Video, here is Richardson's Announcement Video in Spanish and in English. Richardson is working with "Articulated Man" the same company that developed JoeBiden.com. This site is well design, it seems to have a more authentic design that he Joe Biden presence. But, it also appears to use the same back-end. PHP The Video is not hosted on YouTube, it seems to be self-hosted....why? Richardson is already using YouTube, why not just embed. It must be about quality - if you use YouTube, use it for everything, if you are worried about quality use Brightcove, but know that Brightcove may not have the reach. Note to candidates, it's not about control: Encourage Reuse All of your videos need to be hosted, embeddable, and shareable. Every message must be ready to be remixed or put into a mashup. There is no ultimate control over your message, and you should be developing small snippets of information and encouraging people to reuse your content. To this end, you should host video on Brightcove or YouTube or another provider, hosting it yourself it costly and it does nothing to encourage linking. Richardson's Social Networking Links

Presidential Tech Update #4: Edwards Does Live Chat First

In the first update, I predicted that Live Online chats are a risky endeavour. These candidates are used to performing in the controlled environment of TV, or in interacting with real human beings at campaign events. It will be interesting to see how candidates handle the akwardness of "live online internet" video chats. I have a suspicion that the format will be just as controlled as TV, there will be a studio and a set of questions from phone callers. This or there will be a moderator who is reading questions from an Instant Messaging medium. To rely on the internet for bi-directional audio /video interaction in a setting where first impressions are everything is dagerous. If these candidates try anything too bold, they risk wasting precious seconds of first impression time with "we are experiencing technical difficulties". Hillary Clinton promised to engage in "live online video chats" on Saturday, but it looks like Edwards has beaten her to the punch.
From johnedwards.com: Also on Wednesday evening at 9:30 p.m. EST, join John Edwards and thousands of other members of our community for a live online video discussion of the real State of our Union — and to share with Senator Edwards your vision for a strong and just America in the 21st century.
This is all interesting from a technology perspective, but I wonder if this is money squandered. We know that the average citizen pays attention to online video, but live online video is another medium altogether. The advantage of streaming on-demand video is that it can be delivered when it is needed - YouTube isn't about live television as much as it is about having an on-demand video library. We'll see how effective these interactions are. If traditional TV covers these chats, they will have been a roaring success, if they are ignored by traditional TV then they will be irrelevant to the average citizen. This brings up an interesting question for C-SPAN. If a candidate holds an online live meeting, isn't this worthy of coverage on the C-SPAN channel (or the C-SPAN web site). Does anyone know if C-SPAN has any plans on covering these events?

Presidential Tech Update #3: Hillary Goes Open Source with Drupal

From a comment left on the first presidential site survey, I was notified that Hillary's "Official" site is http://www.votehillary.org, and that this site is deploy using Drupal. Hmmm...not so fast, this site is "This Site Is Not Paid For Or Authorized By Hillary Rodham Clinton. Paid For By The Hillary Clinton For President Committee", but on the web it doesn't matter who pays for it, and the legal distinctions are lost on most. This site is using Drupal - an Open Source CMS written in PHP. The Netcraft report on votehillary.org lists Linux + Apache 2.0 as a server technology. While HillaryClinton.com still runs ASP.NET, it appears that votehillary.org has embraced open source. This site's design leaves much to be desired, the design is a little quirky (but better than the Kucinich site). Al of the videos are hosted on YouTube, which is a strategic win for building a stronger network (people know YouTube, people will more easily embed and share YouTube at this point).

Presidential Tech Update #2: Brownback Catches Up

This is an update to the previous post focused on presidential web site technologies: Brownback Scrambles the Web Developers + Brightcove Leads the Way Senator Brownback has scrambled the jets and deployed a much more polished site. Technology is ASP.NET, and his domain http://www.brownback.com is now a redirect to a http://www.t-worx.com hosted solution. T-worx looks to be hosted out of Florida, and it is a hosted DotNetNuke specialist. This site is an improvement, but everyone is playing catch up to John Edwards. Brownback selected BrightCove for his video hosting provider following in the footsteps of Barack Obama. His video is better than Dodd and McCain, it seems more personal than Romney. I continue to believe that Brightcove has the best client technology for video hosting, but I'm also convinced that John Edwards has the advantage by using YouTube. (People are familiar with YouTube it has the community.) My unsolicied advice is to lose the HTTP 302 redirect. It looks weak t redeploy to t-worx.com, this might seem like an unimportant technical detail, but compared to Romney, the site still seems like it is following, not leading.

Second-order Linkbacks: Presidential Web Sites #1

Interesting sites related to the previous post:

  • By way of Planblog - Tim B. linked to a very limited effort to create a citizen legislature for Utah. Politicopia aims to create a venue for online legislation, "Users create summaries of bills, pro and con arguments, comments, links, and more." Interesting idea, i've thought about something similar, there should be some sort of Fantasy US Congress that follows the same procedures as the real thing. In other words, it would be valuable if you could register you own vote on real legislation even if your vote wasn't binding.
  • By way of Blog the Campaign in '08 - This is a really informative site Tris Hussey links to a Business Week article about Edwards dominating the web race, although I think Edwards is a long shot, I'd have to agree he has the smartest web presence. Tris writes: "While I think Edwards has a huge lead in the social media race, it is too early to say others can’t innovate and push the bar higher."
  • By way of 901am.com - David Krug links to Chris P.'s Analysis of BrightCove in Uncut: The State of Online Video.

What is a Second-order Linkback? I check the link backs from Technorati, I see who links to my stories, and then I find an interesting link on that site. I call this gathering "Second-order Linkbacks". The reasoning here is that if someone linked to me (first-order relationship), there's a good chance that they also linked to other relevant material (second-order relationship). In other words, I'm linking to sites which are linked to from sites that linked back to me (uh...confused yet?) So, if you link to my posts, I'll usually click on your blog via Technorati, if it is interesting, I'll list your blog entry and then I'll look for something interesting. It is a reliable method for finding relevant content, and I'm surprised that no one has created a good tool to farm and aggregate second and third order links.

Monday, January 22, 2007

Adding a Reference to a CSS or Javascript Page in Wicket 2.0

Assume that you were developing a site in Wicket that made heavy use of both the Protoype and the Scriptaculous libraries. Sometimes you'll be using Prototype scripts directly in your HTML files, and at other times, you'll be using prepackaged functionality like wicket-contrib-scriptaculous. You want to add a reference to the Prototype and Scriptaculous scripts to every single page on your site, how would you do that? Page Inheritance When you create a Wicket application you usually make liberal use of inheritance to give every page in your application a common set of components. You may also make use of abstract Section pages which are the super classe for every page in a given section. These section pages would take care of adding common sectional navigation and the top-most page would be responsible for setting up all common elemenets. Since Prototype and Scriptaculous are going to be universal elements, you will add IHeaderContributors somewhere in the AppPage class from the diagram below: From the diagram: your application extends Wicket's WebPage class with an AppPage class. This AppPage class adds a universal border to all pages on the site. A concrete HomePage class extends the AppPage class and, lastly, there are two sections (A and B) which each maintain a separate abtract section class to add section-specific navigation and components. Where do we Add Prototype and Scriptaculous? If you were going to add a reference to prototype.js and scriptaculous.js, you would do so in one of two places. A.) In the section of the AppPage.html. OR, B.) In the constructor of the AppPage.java class. Let's look at both options. Adding these references to the constructor of AppPage means that the references will be available to every page which extends AppPage. Adding a Reference to the AppPage.html If you were going to add a reference to the AppPage.html file, you would add the following:
<script type="text/javascript" src="resource/js/prototype.js"></script>
In this scenario, you will need to make sure that "prototype.js" is available under the resource/js/prototype.js path in the web application. Wicket will take care of prepending the content path to this reference. Adding a Reference to the AppPage Class To add a reference to the AppPage class, add some HeaderContributors. A HeaderContriburor is an implementation of IBehavior and can be added with the add() command
public AppPage() { new AppBorder(this, "border"); new FeedbackPanel(this, "status"); add( HeaderContributor.forJavaScript(ScriptaculousAjaxHandler.class,"prototype.js") ); add( HeaderContributor.forJavaScript(ScriptaculousAjaxHandler.class,"scriptaculous.js") ); }
There are two convenience methods provided by HeaderContributor - forJavascript and forCss. Boh functions take a Class and the name of a resource. When using this method, the Javascript resources is stored on the classpath as a resource in the same package as the ScriptaculousAjaxHandler. The ScriptaculousAjaxHandler is a class that is bundled with wicket-contrib-scriptaculous.

Chad Fowler: The Big Rewrite

I've seen a number of organizations over the years contemplate "The Big Rewrite" From Chad's "The Big Rewrite":
"You’ve got an existing, successful software product. You’ve hit the ceiling on extensibility and maintainability. Your project platform is inflexible, and your application is a software house of cards that can’t support another new feature."
And from, Software As Spec:
Based on my own experiences and conversations with thousands of software developers around the planet, I unscientifically conclude that almost all production software is in such bad shape that it would be nearly useless as a guide to re-implementing itself. Now take this already bad picture, and extract only those products that are big, complex, and fragile enough to need a major rewrite, and the odds of success with this approach are significantly worse.

Saturday, January 20, 2007

2008 Presidential Technology Race: Urchin, Online Video, Linux, Apache

The web site is the new campaign handshake, and I was curious to see what technologies were powering candidate web sites. Whoever puts these sites together has to choose a site that can be developed quickly and can handle intense bursts of traffic, so while you might think this is irrelevant, it tells you a little bit about what technology that the experts trust. And, it is also interesting, because this is one of the only statements that a candidate makes without even knowing about it. McCain doesn't know ASP.NET from Dodd's J2EE, but to us it's interesting. Read on for a table of results... What's the breakdown? I compiled the following table by looking at the source for each site and using Netcraft. Here are the results (in no particular order, and I'm sure I left someone off) from my unscientific study:

Candidate

Party

Technology

Tracking

OS/Server

(via Netcraft)

Site

Who built?

Barack Obama

Democratic

PHP

Urchin

Linux/SWS

BarackObama.com

?

John McCain

Republican

ASP.NET

?

Win 2003/IIS6

ExploreMcCain.com

?

Chris Dodd

Democratic

J2EE

Site Meter

?

ChrisDodd.com

?

Joe Biden

Democratic

Zope (Python)

Site Meter, Urchin

IRIX / Apache 1.3

JoeBiden.com

Articulated Man

John Edwards

Democratic

LAMP (not sure)

Urchin

Linux/Apache

JohnEdwards.com

Plus Three

Dennis Kucinich

Democratic

PHP (Drupal)

?

Linux/Apache 2.2

Kucinich.us

?

Hillary Clinton

Democratic

ASP.NET

Urchin

Win 2003/IIS6

HillaryClinton.com

?

Mitt Romney

Republican

JSP

Site Catalyst

Linux/Apache 2.0

MittRomney.com

?

Tom Vilsack

Republican

PHP 5

Urchin

Linux/Apache 2.0

tomvilsack08.com

/

Sam Brownback

Republican

ASP.NET

Urchin

? (not indexed yet)

brownback.com

/

Linux and Apache are Presidential Material The first thing to notice is that a majority of the field is using Open Source - Linux and Apache are presidential technologies. It's also interesting that the agreed upon front-runners are both using ASP.NET, what does that say about the relative cost of implementing ASP.NET (both McCain and Clinton are ahead in fundraising, but you wouldn't necessarily say that the Brownback campaign is flush with funds). Obama wins the award for Web 2.0 simplicity, Edwards wins the prize for compelling design and innovation, and Vilsack and Kucinich are tied for the least polish. I was surprised, I wouldn't have thought that Biden was a Zope kind of guy, but I also wouldn't have guessed that the most conservative candidate to date (Romney) would be running a J2EE site. I didn't get a sense of excitement from the Dodd, Biden, or Brownback sites even though they all appear to be professionally designed. Urchin for President in 2008 Google is victorious when it comes to traffic analysis. There is one site using Site Catalyst and a few using Site Meter, but it looks like there is a good chance that our next leader is being shown reports from Urchin (or Google Analytics). Who's Hip to Video? Barack and Hillary are all about video. In fact, CNN just engaged in media fusion by playing the Clinton video on the TV. Think about this, a Cable Television channel just declared "Breaking News", loaded up a browser and streamed the video over live television. Online video is critical differentiator between winners and losers in this race. If your presidential web site isn't hip to video now, you might as well drop out - this is the first presidential campaign where the web is the primary delivery channel. Clinton's video was homey, set in a living room, and I couldn't help but think that it was something of a copy cat move. It is telling that they both resorted to the same online announcement strategy - both announcements hit the web before any other media channel. At the end of the Hillary message she says that she's going to be engaging in online "video chats". We'll see what happens; online video is here, live online video not so much; I'll be surprised if that doesn't go badly. My money is on Hillary getting technology wrong, her site is a little too slick compared to Obama's very grassroots feel. Video Delivery Technology Obama is using a very interesting video player - Brightcove. Go to the Obama site, and watch a video, click on "menu" in the flash player and you'll see a fluid interface where you can bookmark or get to an RSS feed. If you are doing online video, bookmark Brightcove, it looks like a promising product. Hillary hosts her own video (from panther.www.hillaryclinton.com), there is a reference to a Flash player. One thing to notice about both sites is that both Barack and Hillary deliver high resolution, crisp video clips. Edwards is using YouTube. And, even though the video quality is a little less than both Barack and Hillary, this is a really smart move. People know YouTube, people can share YouTube easily, and it asssociated Edwards with the market leader in online video. So, while Barack's selection of brightcove is interesting from a technology standpoint, Edward's video strategy is going to have a larger reach. Most important thing about the Edwards site is that he doesn't have one or two videos, he has a few, and he keeps his blog very busy. This makes sense as you get the sense that Edwards is really puting a lot of energy into his early campaign. Edwards is one of the only candidates who isn't afraid to campaign at this very early stage - his site has the same feel. Romney has video, Mitt TV, and it is very well done. Very professional, documentary feel. Whoever is doing Romney's video is doing a great job. Romney has the video advantage in the Republican field. Best Video on the Democratic Side: Tie between Edwards and Obama. Clinton and Dodd in second place. Best Video on the Republican Side: Romney, by a landslide. Who Fails the Video Test? McCain has a link to a Video, but it's not featured, and it is not well produced. It has very bad sound, and it is simply footage of his GOPAC speech. There is some music in the background, but it is bad. McCain fails the online video test - badly. Dodd fails in the same way. The Republican field is much smaller, and McCain has a substantial advantage, we'll see what happens. Dodd uses YouTube, his video introduction has very very bad sound, it is a face to face format (ala Hillary), it makes him look like an amateur. Dodd also has this seemingly desperate DIV on his site that has icons for MySpace, Flick, YouTube, and Facebook. Dodd's site doesn't work in comparison with the leaders - Clinton, Obama, and Edwards. Biden has no video. Vilsack has some videos, but he's using blip.tv and it is not very slick. Kucinich has a "vlog", but it took me three page clicks to play a video, and when I finally got to it, it was just an appearance from Lou Dobbs. In other words, it is more of a passive video strategy as oppossed to actively creating video content. He's using YouTube, but he has no cohesive strategy, video is not an organic part of his message. Waiting for a Rails candidate? Who will be America's first Ruby on Rails candidate? Where's Ruby on Rails? I'm not surprised that no one is using Rails, Rails is going to take a few years to percolate through the market, I'd be surprised if we don't see some 2010 congressional sites that are powered by Ruby on Rails.

Defacement of a Defacement Mirror Site

O'Reilly's Anton Chuvakin has an interesting blog post from early January about forensic evidence of a sysem compromise that lead to a site defacement. Anton's blog is always a good read, it will remind you that you really should leave system administration to the pros.

Friday, January 19, 2007

Retrieving Typed Configuration with Commons Configuration

Typed configuration is very straightfoward with Commons Configuration. One of my pet peeves is having to translate numeric configuration parameters from String instances to the corresponding primitive type. The following example loads configuration from the test.properties file:

       // import the necessary classes...
      import java.net.URL;
      import org.apache.commons.configuration.Configuration;
      import org.apache.commons.configuration.ConfigurationFactory;

      // Load your configuration from the classpath...
      Configuration config = new PropertiesConfiguration( "test.properties" );
   
      // Retrieve configuration parameters
      float timeout = config.getFloat("timeout"));
      String region = config.getString("region"));
      String name = config.getString("name"));
      int speed = config.getInt("speed"));

The test.properties file has the format of a standard Java properties file, with a key and value on each new line:

       timeout=12000.22
      region=Paris
      name=This is an Example
      speed=55

If you need to convert to an Object instead of a primitive, you'll need to supply a default value to be used if the configuration parameters is not available. For example, the following code would set timeout to Float.NaN and speed to 0 if these parameters were not present in the specified properties file.

       Float timeout = config.getFloat( "timeout", Float.NaN );
      Integer speed = config.getInteger( "speed", new Integer( 0 ) );

Tuesday, January 16, 2007

Give What You Can, Now.

Click here, and give what you can. This guy is a refreshing alternative to the pack of politicians. He speaks of a reasoned debate that both sides will appreciate. This man will be the next President.