a sql quiz + is a lower hourly rate cheaper?

Suppose you have a task to write some JDBC code and you need to do so in the cheapest way possible.  Having your people grow should not be considered here, just the rate.

Person A

Charges 3X per hour and can write working code on the first shot, test it and complete it within an hour

Person B

Charges X per hour, but needs to multiple cycles to fix once the code is typed.  (This includes the time to identify what the problem is for each, build cycles and fix time.) For the SQL quiz , see how many errors you can find in the following code. I’ll post the answers as a comment. See if you can spot any I didn’t insert on purpose.

PreparedStatement stmt = null;
ResultSet rs = null;
try {
  String sql = "select count(*) from table" + "where column = ?";
  stmt = conn.prepareStatement(sql);
  stmt.setString(1, "test");
  rs = stmt.executeQuery();
  System.out.println(rs.getInt(1));
  sql = "select count(*) from table2" + "where column = ?";
  stmt = conn.prepareStatement(sql2);
  stmt.setString(1, "test");
  rs = stmt.executeQuery();
  System.out.println(rs.getInt(1));
} finally {
  stmt.close();
  rs.close();
}

Which is better

In today’s economy, driving down costs is a hot topic.  One phrase service providers consider is “how can we lower the rate.”  This is the wrong question.  The question should be how to lower costs overall.  Person A is going to be cheaper overall even though the hourly rate is three times as high.  We’ve all heard the comment that a good developer is many times more productive than an average one.

Granted, my example is extreme.  It shows the difference between an experienced person and an someone new to JDBC.  The point is to use the extreme to emphasize that it’s not all about the hourly rate.  In the real world, training the entry level person has value too of course.

Another view

This reminds me of the methodologies that ask you to estimate how many hours/days/weeks a task will take without saying who will do the work.  Well, if I do it, the work will take a week.  If an entry level person is doing it, it may take four.  If someone experienced is doing it who doesn’t know the system, it may take two.  How do we balance the differences in people when estimating?

TSS Symposium Preview – GWT Roundup

I'm Speaking at TheServerSide Java Symposium Google Web Toolkit As previously mentioned, Jeanne and I will both be presenting talks at TheServerSide Java Symposium exactly one month from now. Here is a preview of two of the topics I will be discussing at my talk “GWT Roundup: An Overview of Google’s Web Toolkit and Hybrid Integration” : GWT Image Bundles and Speed Tracer.

1. GWT Image Bundles

One of the more interesting features that GWT offers, beyond what most developers using indirect Ajax frameworks could build on their own, is the concept of Image Bundles. Even GWT developers who use Image Bundles may not have any notion of what is going on under the covers because the implementation details are so well abstracted. The idea is to take a large group of images and combine them into a single image with an interface for accessing each image. This may sound like a strange notion, but the performance advantages of doing so are manyfold:

  • More responsive UI since all images are downloaded together
  • Faster than downloading them individually since they are not downloaded in serial (HTTP 1.1 limits number of outgoing connections to 2 per domain)
  • Bundles use less bandwidth than separate images since multiple image headers are reduced to a single header

2. Speed Tracer

New to GWT 2.0 is the ability to validate such non-functional requirements as user interface performance, using the Speed Tracer tool, a Google Chrome extension. For example, if a particular asynchronous RPC call is causing delays in the user experience, Speed Tracer will help you identify it. Speed Tracer provides two graphs that show user response information and offers “hints” of spikes in response time that could be causing problems in your application.

  • Sluggishness Graph: Shows UI responsiveness
    GWT Speed Tracer - Sluggishness Graph
  • Network Graph: Network activity and latency
    GWT Speed Tracer - Network Graph

See you in Las Vegas!

I hope you enjoyed this preview of the talk I will giving next month. I will also be taking part in a panel hosted by Cameron McKenzie called “Client Side Development Smackdown” . Oh, and it’s not too late to register for TheServerSide Java Symposium 2011. We hope to see you there!

TheServerSide Java Symposium – Preview Week

TheServerSide Java Symposium 2011 Jeanne and I will both be presenting talks at TheServerSide Java Symposium in March. In preparation for the conference, we will be providing sneak peaks of talks this week on the blog.

I’m giving a lecture entitled “GWT Roundup: An Overview of Google’s Web Toolkit and Hybrid Integration” which provides a review of GWT for old and new GWT developers alike. It also covers many of the new features released in GWT 2.0 and 2.1. I will also be speaking as part of a panel hosted by Cameron McKenzie called “Client Side Development Smackdown” .

Jeanne’s presentation is called “Throw Away All The Rules. Now What Process Do You Follow?” and is about what processes are important if you aren’t being forced to follow any. It uses the CodeRanch forum conversion project as an example.

It’s not too late to register for TheServerSide Java Symposium 2011. We hope to see you there!