Aug 22

“We have more dogs that an online dating service”

Personal 64 Comments »

I was driving in Utah when I saw:

“We have more dogs that an online dating service”

This was for Utah Pets :)

Aug 22

Maven javap Plugin

Builds, Java No Comments »

Javap is one of those utils that gets installed with Java, that some never find. Javap is helpful for poking around in bytecode found in the classpath.

One of the ways I use javap is to just find out if a certain class is in my CLASSPATH (as well as learning about the methods etc).

As soon as you are in a real build environment, you need to make sure that a class is in the CLASSPATH that your build is working on.

Since I spend time in Maven-land, I use a tiny little maven plugin which does the work to find out if a class is in the dependency list for a project:

maven -Dclass=java.lang.String javap

The bulk of the work looks kinda like this:

<goal name="javap:classpath:check" description="Check Classpath">
<fail message="Must set the 'class' variable. E.g. maven -Dclass=java.lang.String javap." unless="class"/>

<available property="class.found" classname="${class}" classpathref="maven.dependency.classpath"/>

<j:choose>
<j:when test="${class.found}">
<echo>Class Found: ${class}</echo>
</j:when>

<j:otherwise>
<echo>Class NOT Found: ${class}</echo>
</j:otherwise>
</j:choose>
</goal>

Download Maven Javap Plugin

Aug 18

Revenge of the Ted: Yay Servlets!

Tech 54 Comments »

Ted hit back at myself and Justin.

I know Ted wants me to quote him and respond for a bit of fun…. but I will keep it a little short on this one.

1. JSF vs. Rails

I didn’t mean to imply that these are the two choices. The point was to show the extremes of: full component UI model that hides the webness (JSF) vs. very simple wrapper (Servlets).

For some time many frameworks have been going to the JSF extreme, and Rails has come along to give a great balance.

Hacking away at JSPs, or PHP files just becomes a mess quickly. We all learned that. Then we started working with simple MVC things which was fine, and it got complicated.

Rails is rebalancing things!!!

2. Servlets is what you want

Come on dood. You really think that you would want to build a web application in pure Servlets? You will end up following the same path:

  • Hmm, my designers don’t want to do out.println(). that gets REAL old
  • Hmm, there is more HTML than code here, what can we do about that? I know I will create a templating language to call out too

Servlets are fine for some things don’t get me wrong…. but when I think about developing a web application, I don’t want to start with out.println() as my favourite friend :)

Update: wise words from Glenn, and Justin.

Aug 16

Using Word to Blog

Google, Microsoft, Tech No Comments »

Cool to see Google supporting Word as a publishing platform.

The fact is, for better or for worse, that a large % of the world uses Word for all things documents, and it is nice to have rich integration rather than reinventing the wheel.

Hopefully it will grok standard posting APIs so it can be used for non-blogger sites?

blogger-for-word.png

Aug 16

VitalSource Bookshelf: “It’s like iTunes for eBooks”

Ruby, Tech No Comments »

Good ole Mike Clark and James Duncan Davidson have been beavering away on a Rails-served application.

They finally went public.

Cool to see this different kind of application.

I am a little concerned with not having just a simple browser interface (ajaxian?), as already I feel differently changing gears from:

Cool. Will check this out quickly

to:

On man, I have to install something?

Good stuff guys.

Aug 16

Scooba: Jetsons is coming

Tech No Comments »

The Scooba has arrived from iRobot.

Now, along with the Roomba to vacuum for you, the Scooba will wash the floors for you too!

scooba.png

Aug 16

Ted doesn’t get Rails

Java, Ruby, Tech, Web Frameworks 15 Comments »

Ted doesn’t get the Rails buzz after going to Dave’s Rails talk at No Fluff Just Stuff.

Firstly, you can’t say much for Ted wrt taste… I mean he is running that .NET blog software now ;)

Secondly, I think Ted hit the nail on the head and didn’t even realise it:

We found a greater need for configuration, more flexible and powerful execution models, and so on. In essence, as web apps got more complicated, the servlet/JSP space got more complex to match it. “With power, comes complexity; with complexity, comes power.”

I think the Java world took this waaaay to far. Abstractions upon abstractions.

We forgot that web frameworks ARE FOR THE WEB!!!

Before you look around we have JavaServer Faces, which “features” that you don’t just get to write out HTML. Sounds great on paper. I still hear people talking about how they will be able to just flip on a different Renderer and they will have a mobile application. Of course, in reality a mobile application is very different. You care about different things.

I want a web framework that lets me work with web technology (HTML is one of them ;), but gives me a nice clean way to do this.

Rails has a nice balance:

  • MVC is there. No model 1 JSP here.
  • Although MVC is here, you don’t have to learn struts html tags :)
  • All Ruby. Learn it, move on. No EL/JSTL/JSF-EL/OGNL/XML
  • Smart defaults, with the simple ability to plugin whenever you want (thanks Ruby)
  • Helpful wrappers on top of behaviour such as Ajax if you want it
  • Well thought out helpful code, such as flash

WebWork 2 does a good job of this on the Java side IMO. It gives you things that you need… but doesn’t make you have to learn a whole new world. Want components? Simple. Create some templates and you are done.

After spending time debugging a JSF application where JavaScript wasn’t output if your </f:view> was after the body tag…. it makes you really want to be Railing.

However, Rails is just a web framework. It has its issues like everything else, and isn’t a silver bullet. Often after learning about something fairly simple to get into like Rails you will be “huh that is it?”. In my opinion this is a very GOOD thing. Although, I do miss my IDE goodies :)

In my experience, I like to have simple tools which just work, but if the hardest part of your application is the web framework, you are lucky!

Aug 15

Distributed Computing: Amazon.mars

Tech No Comments »

Werner Vogels, CTO of Amazon.com, gave a really fun talk: E-Commerce at Interplanetary Scale.

It is interesting to see the current gap between the average joes view of distributed computing, and what amazon.com needs for the future.

Modelling the system like life to gain benefits from evolution sounds smart and complicated. Werner is spot on when he notes how a living organism is continously regenerating. Getting rid of cells here, and replacing them with cells from there.

I definitely feel that we need to do that even on the small scale. I shudder at the thought of a single machine running an application these days. Haven’t we all felt how apps get cruddier over time (and we all know about rebooting Windows)?

The “cluster” that we built for TheServerSide’s nicest feature was the structure that we had around it for giving it a nice clean. We could easily bring up and down nodes without users knowing what was going on behind the scenes. The interface of http:// allows for many abstractions. Our caching framework (on Tangosol Coherence) made the unit of life seperate from a running server process.

If we take it to the next level, the computer unit that has been up for longest is probably the web itself. The latest Wired talks about how each URL is like a neuron, and how the links are the connections between. In fact, the web is so large these days that it is getting close to the complexity of the brain itself.

How long until we dump our memories into this global machine? Wait. We do right now (google, email, flickr, podcasts, …).

It is quite staggering to look at how fast it is growing too. Are we building the Terminator? :)

Aug 11

The popularity of Java and scripting languages

Tech No Comments »

As soon as I saw the Evans Data: Perl, PHP, and Python use drops off in EMEA study, I thought it smelled bad.

I can’t say that I have studied their methodology for running this survey, but it goes against all of the evidence that I see in my world.

My current thoughts are:

  • Java is on solid ground. There is a lot of work on this platform and it is growing.
  • PHP is productive, and I am seeing more and more applications using it (in the enterprise, not just script kiddies)
  • Rails: We all know the buzz that has come around Rails. Although everyone hasn’t quit their day job, and that it is still in early adopt mode, you can’t argue that it isn’t growing at a huge rate. I know many projects where we are able to be guinea pigs showing them what Rails can do in a real application.
  • .NET is very strong on that platform and is growing

Partly it sometimes feels like the job surveys. “Bush creates 5 new jobs!” (subtext: we imported 500k workers into the economy, and more people are working 2 jobs these days).

A lot of these worlds are growing, and we are better for it.

Scripting languages in general are doing really well right now, ESPECIALLY when you can run some on platforms such as the JVM and CLR :)

Aug 09

Dependency Injection: Vitally Important or Totally Irrelevant?

Ruby, Tech No Comments »

Jim Weirich talked about the experiences that various people have had in the Ruby world, at migrating the popular IoC craze that started in Java-land via Spring/Pico/HiveMind.

It has been interesting to see Ruby frameworks such as Needle and co. jump into Ruby, to have a lot of people ponder if it REALLY makes sense.

I think the heart of it comes from his comparison:

Java Classes are “Hard”

  • Not Objects
  • (mostly) Source Code Constructs
  • Unchangable at Runtime
  • Class name directly identifies the class.

Ruby Classes are “Soft”

  • Just Objects
  • Runtime live
  • Changable at Runtime
  • Class name is just a label pasted on an object

… and that in general factories aren’t a pain in Ruby, and classes are open so you can sneak in and add mock behaviour whenever you want… ON that class/object.