Grails, Trails, Sails, Slingshot

April 22nd, 2007

There is a sponsored listing for Java BOF session comparing Grails, Rails, Sails, and Trails.

Its all a bit much for me, but there is a real need for these frameworks. Lots of companies are using Java (although Charles Shwab is moving to Microsoft .NET). Lots of online media companies are using Java. If your are an online media company with a Java Architect you might be in for a rough ride. Java Architects create a build it inhouse, meritocracy of java code. That in turn creates a confusing jumble of choices. Much better to have a small well worn tool kit, with an emphasis of picking up new tools at the expense of older ones. Listed below are 4 java frameworks, if your java stack is in need of repair rule take a look at each of the following.

Rails Routing by David Black

April 20th, 2007

I round a nice rails
routing roundup by David Black. The slides don’t have much in the way of text which is good ’cause they are easy to scan. Thats also bad if you started reading expecting an introduction.

For those of you who don’t know Rails take a peak and compare it to something you do know like Apache mod_rewrirte

Kettle the original opensource ETL

April 19th, 2007

Pentaho aquired Kettle ETL tool. I never used Kettle myself. I only saw it in action. It was pretty nice. Much better than something I would have developed myself. Kettle is all java, which makes it easy to extend.

There are other open source ETL tools out there. Maybe there is a diamond in the rough there, not much activity in the last year or two on all the ones I checked out.

In addition to batch ETL actively I would love to see an ETL tool to pump data in small batches or as a constant stream of messages. That would be a useful feature for populating search collections, populating aggregates grouped on slowly changing dimensions, or keeping legacy/new systems in-sync before a cutover.

Open Source ETL

April 18th, 2007

I discovered an open-source ETL tool Talend Who knew?

I remember having to write my own ETL tool, because my company didn’t want to pay for an extra license on a tool they already had (Informatica). I have had plenty of conversations with developers who had no idea what I was talking about when I asked if they considered an ETL tool for their crawler, transformer, loader thingy.

A solid opensource ETL tool, marks the end of software development and the beginning of component integration. Time to dust off you systems integrator hat.

10 reasons not to use rails

April 18th, 2007

Well I posted this before, but it disappeared . Here are 10 reasons you may not want to use rails

1) The learning curve is huge. Just the other day I wrote my own version of cycle I also learned how to inject javascript from a controller.
2) SDLC is broken for teams. Yes Rails is great for a team of one, but version control and deployment is monolithic. For example if two developers independently work on two different controllers with two different views there is no way to version and deploy these components separately.
3) Yet another deployment system. Rails has gems and plugins. The rest of the world uses rpms, debs, wars, and whatever windows uses.
4) Ruby is green threaded. One server is slow you’ll need many-many servers to handle the load. Good thing virtulization is taking off.
5) ActiveRecord breaks down when you want to pivot rows into columns. This use case comes up with catalogs with many topics, each topic containing its own fields. Luckily there is RBatis.
6) The code base is unstable. The main code line and the gems are constantly evolving with little consideration for backwards compatibility. Combine this with poor deployment managment
7) Multi-lingual support is broken. Multi-byte characters aren’t supported, so stick to one language!
8) Rails web containers are unstable. There are many choices for a web container webbrick, mongrel, and lighthttp to name a few. None of them work as well as Apache. The servers get wedged. Apache with Fast CGI doens’t seem to work and those who start using it move on to something else.
9) The code is obtuse and you’ll need to read it. If you want to understands how to do things you’ll need to read the code.
10) The conceptual documentation is missing. Its a framework, yet the concepts go unanswered. For example, what exactly are restfully resources for and why isn’t there a client library?

Amazon Prime 4% penetration

March 15th, 2007

According to this Forrester’s Blog Amazon Prime is only used by 4% of Amazon customers. About half of those customers order a lot the other half don’t order that much (and they’ve forgotten to turn it off).

A 4% conversion is pretty bad for a loyalty program. If I started a loyalty program I would want a least 20% conversion.

I’d like to know what Peet’s Coffe & Tea has for adoption of their debit card. I checked their 10K’s, but didn’t find anything. Top secrete I guess.

What Happened To Those Entries

March 6th, 2007

My service provider changed hosts on my. The old posts are lost on some machine sitting in another datacenter. Sure they sent two emails, but under the title and description our DNS servers are moving. I don’t care if the DNS server changes, I run my own DNS.

My hosting provider didn’t mention they would be changing machines and ip addresses. I swear they are idiots. Hosting providers are free to do whats best for their customers and owners, and providing their actions were clearly communicated I would be fine.

Communications is the key.

Google Maps is Easy

March 3rd, 2007

Turns out that Google maps is really easy to use. First you need a key, just sing up and get one. Then you can start showing maps.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<script src=”http://maps.google.com/maps?file=api&v=2&key=!!MYKEY!!” type=”text/javascript”></script>
<script type=”text/javascript”>
//<![CDATA[
function showmap(geocode) {
if (GBrowserIsCompatible()) {
if ( null == geocode )
geocode = new GLatLng(37.4419, -122.1419)
var map = new GMap2(document.getElementById(”map”));
map.setCenter(geocode, 13);
}
}
//]]>
</script>
</head>
<body onload=”showmap()” onunload=”GUnload()”>
<div id=”map” style=”width: 500px; height: 300px”></div>
</body>
</html>

Now if you like, you can add two more js functions to lookup new addresses, get their lat & lng and show the new map. The function getLatLng will execute the callback function workongeocode with a geocode as the arg.


function lookupaddr(address) {
var geocoder = new GClientGeocoder();
return geocoder.getLatLng(address,workongeocode)
}
function workongeocode(geocode) {
if ( null == geocode )
return
var divReplace = document.getElementById("latlng");
newLi = document.createElement("li");
newLi.innerHTML = geocode.lat() + " " + geocode.lng();
if ( null == divReplace.childNodes[1] ) {
divReplace.childNodes[0].appendChild(newLi);
} else {
divReplace.childNodes[1].appendChild(newLi);
}
showmap(geocode)
}

Now just add this html/js after the <div id=map …. >


<div id="myaddr">
<input type="text" name="thisaddr" size="50" />
</div>
<button onclick="lookupaddr(document.getElementById('myaddr').childNodes[1].value)">Get Lat/Lng
<div id=”latlng” >
<ul>
<li> first!</li>
</ul>
</div>

There you go, easy right?

My Logo

December 14th, 2006

Calder Group Logo

Ruby Highlighting in Emacs

October 30th, 2006

If you want to turn on syntax highlighting for Ruby in emacs, first download ruby-elisp, then add the following to your .emacs file.


(autoload 'ruby-mode "ruby-mode" "Load ruby-mode")
(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
;; uncomment the next line if you want syntax highlighting
(add-hook 'ruby-mode-hook 'turn-on-font-lock)

I like a darker color, with the possible to escape if the colors don’t work out


(autoload 'ruby-mode "ruby-mode" "Load ruby-mode")
(add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
;; uncomment the next line if you want syntax highlighting
(add-hook 'ruby-mode-hook '(lambda ()
(set-background-color "slate grey")
(set-foreground-color "almond")
turn-on-font-lock))

(add-hook 'text-mode-hook '(lambda ()
(set-background-color "white")
(set-foreground-color "black")))

when ruby-mode is loaded the background is slate grey, to get a white back ground just start using text-mode