Aug 10

LipoEnergy: Fueling Development from developers fat cells

Tech No Comments »

Dave has done it again. This time has has found the perfecy synergy between developers sitting on their arse, and battery power.

Developers have excess fat: they should use it to feed the fuel cells in their laptops. When you sit down to code on a long plane trip, plumb a thin tube into an area of unwanted adipose tissue, and let the battery suck power from you while you lose weight. For home-based developers, special chairs could have small needles built into the seat: just sit down and your computer bursts into life. The longer you code, the more weight you lose. It

Aug 10

Open Source and Jobs

Open Source, Tech No Comments »

Oleg Dulin has an interesting view point in: The New Methodology: Agile can take advantage of open-source.

The rise of open-source commoditized components freely available on the Internet minimizes the construction cost by effectively automating it. The job of the

Aug 09

Being a home owner

Personal 2 Comments »

Today was my first day at my new home. Already the “oh shoot, I am a home owner” has set it :)

Gas Mower

I needed to mow the lawn, and have a new gas mower. I am only used to electric ones (from England), and had a nightmate getting it to start.

My father in law came over after work, and I went through the “I did this, and it didn’t… er why did that just start?”

I am such a wally. I was starting it ON the grass, and that was why it didn’t work!

Broadband

Getting broadband is meant to be simple these days, no? Well, 5 hours later, and it wasn’t working. The cable guy was trying hard, but didn’t seem to really have a clue. He was on tech support, and they kept telling me that I had to “reinstall my computer”. Come on.

As something obviously wasn’t right, I asked him to try a new cable modem. “That isn’t the problem”, “Just humour me”. You can guess the rest.

Finally, back up and at ‘em.

TiVo

I plugged in TiVo (via my wireless phone system), and it can’t dial out correctly. I have tried multiple numbers and to no avail. Luckily I found that I can use a USB wireless card, and will join my wireless network. First, I have to haul my TiVo to a real phone, get the update, and then setup the network!

Aug 09

When is a download a download?

Tech No Comments »

Have you ever done a Right-Click => Save As on something that you were sure was a download (e.g. a .zip, .exe, .pdf, etc) and then ended up saving an HTML document which was fronting the download?

This always happens to me when I am on a project site which has downloads via SourceForge.

If we HAVE to go through these steps, maybe it would be nice to have some UI element that says “hey, this isn’t the actual download now… don’t save as!”.

Maybe a different link color? an icon/text next to the download? Or maybe something in the HTML so our browsers can be smart about things. “Although you said save as, I am going to ask, and display this html in the browser itself”

Aug 09

Raible gets into JSF

Java, Tech, Web Frameworks No Comments »

It is fun to watch Matt go through his application, porting it to every web framework out there (reminds me of when Kris was doing this to the Wafer web log software).

Now he gets into JSF.

Of all the MVC Frameworks I’ve developed with in the last few weeks (Struts, Spring MVC, WebWork and Tapestry) – JSF was by far the worst. And it’s not the implementations that are the problem, it’s the spec itself (as far as I can tell). Plain and simple, it does not simplify web development.

I spent 3 days developing a simple JSF app – most of it which I had done in the first day. The last 2 days have been spent migrating to MyFaces and trying to find clean ways to do things. My perspective on JSF after this experience? Run away. Run far, far away. All of the above mentioned frameworks are MUCH superior to this technology. Let’s get on with the things I learned.

Painful. I have run into the same problems. It seems that the only reason to use JSF is: “Well, it is a standard, a bunch of big companies are behind it, and the tools will come which make it simple”.

Does that give you warm fuzzies? :)

These days my choice of framework is normally:

  • Event driven: I want a large event driven system, that makes a good use of components, and lets me develop in Java, and my designers design in HTML…. Tapestry (not JSF)
  • Simple Request/Response: I want something simple, which sits on top of the request/response system….WebWork 2 (not Struts)

This assumes that there are no politics, that I am not working with a team of experts in another framework, etc etc…

I hope JSF 2.0 thinks about bringing in other good framework guys this time (e.g. Howard, the Swinglet guys etc).

Let’s make WEB stuff easy. How often are you going to deploy the same application magically in different ways. It just isn’t that simple!

Aug 06

JDK 1.5: Arrays.asList(”Rod”, “James”, “Chris”)

Tech 4 Comments »

J Yu pointed out that, thanks to JDK 1.5, generics, and varargs, we now have a really nice way to simply create a List of stuff:

Was:

List list = new java.util.ArrayList();

list.add( “Rod” ); list.add( “James” ); list.add( “Chris” );

1.5:

List list = Arrays.asList(”Rod”, “James”, “Chris”);

or, with generics:

List list = Arrays.asList(”Rod”, “James”, “Chris”);

Arrays.asList(..) was always around, but it changed from:

public static List asList(Object a)

to the nicer, if more cryptic:

public static <T> List<T> asList(T… a)

Aug 06

Oh no. Dr. Java thinks AOP is B.S. :)

Tech No Comments »

Dr. Java has gone on a rant about AOP (watch out Hani!).

His main contention is that AOP doesn’t save the developer time or increase productivity.

How are you measuring that?

Does it make sense to start a small web application project and use AOP all over? Probably not (at least yet).

Can it increase productivity for large projects? I would argue that it can under certain scenarios.

For example, when you modularise the cross-cutting concerns there is LESS for a developer to worry about in their business logic. So, you are much more productive.

Take persistence with Hibernate for example. In aTrack and with Spring, you setup a persistence policy, and then the framework will automatically setup sessions, flush correctly, commit, rollback, you name it. Much more productive, and it is guaranteed to be correct. A new developer can’t come onto a project and miss step 4, and suddenly screw things up.

AOP isn’t for everyone. It is still new. But the core ideas make a lot of sense!

Aug 06

Wearing a “Real Name” badge

Tech No Comments »

Amazon.com now has a badge: Real Name.

Amazon.com strives to provide customers with the highest quality customer-contributed content. In order to do so, we attempt to determine the quality of individual pieces of content and then we display the highest quality content most prominently.

A Real Name is a signature based on the name entered by the author as the cardholder name on his or her credit card, i.e. the author represents this name as his/her identity in the “real world.” An author willing to sign his or her real-world name on a piece of content is essentially saying “With my real-world identity, I stand by what I have written here.”

This is great. We were thinking about how we could do something like this on TSS. Since on Amazon you normally have a credit card in the system, this is a good way to do it. We have been talking about using digital certificates in the web tier… I am always surprised at how underused digital certs are. We should get them at birth ;)

Aug 06

IDE Feature: Show me a pared down view of staticly typed code

Tech 2 Comments »

I love IntelliJ IDEA, and Eclipse is good too. Tools such as these are so good that I often here:

My IDE takes care of the verbosity of Java

This sounds great. However, it is only really helping in the WRITE stage of your development. Sure, it is great that you can say “Give me a New Foo Pattern” and a tool can then create 2 interfaces and 3 implementation classes that make up that pattern.

The problem is that we aren’t getting as much help in READING the application, and it makes it complicated to understand.

Java has a lot of noise that is muddled into the meat of the logic.

Take the examples from James and Rod’s Groovy presentation at JavaOne:

Java

public class Filter {
public static void main( String[] args ) {
List list = new java.util.ArrayList();
list.add( "Rod" ); list.add( "James" ); list.add( "Chris" );
Filter filter = new Filter();
List shorts = filter.filterLongerThan( list, 4 )
for ( String item : shorts )  { System.out.println( item ); }
}
public List filterLongerThan( List list, int length )  {
List result = new ArrayList();
for ( String item : list )  {
if ( item.length() <= length ) { result.add( item ); }
}
return result;
}
}

Groovy

list = ["Rod", "James", "Chris"]
shorts = list.findAll { it.size() <= 4 }
shorts.each { println it }

I find it a lot easier to grok what is going on in the second example.

One IDE feature that could potentially help, is if I could click on an icon/hit a keystroke which ran the function: "Hide Fluff"

This would hide a lot of the modifiers (public/private/etc) and the static typing. It would all of course be there, and the IDE can make use of that, but it would enable a view on your code which is more of the meat.

Aug 06

Varargs: Java is finally giving some conveniences

Tech 1 Comment »

Brett McLaughlin and David Flanagan are working on Java 1.5 Tiger developers notebook.

They have offered up chapter 5, which is on the new varargs support.

As well as explaining the simple behind the scenes (e.g. the compiler makes String… == String[]), they also show you some of the work arounds.

Although varargs can be nice (especially for methods such as the new sprintf(”…”, …)) I do sometimes wish that we would have more innovative items to be excited about. In the past Sun was all about telling us that “you don’t NEED that” for various features, and now (thanks to C#) we are getting them.

I liked being able to have @_ in Perl to take in anything… and often had the input come in as a hash, which would enable a kinda named parameters:

ageCheck(name => ‘Bob’, age => ‘30′);

I always liked multiple lvalue’s too:

($x, $y) = ($y, $x);

Thanks for the new features, now lets get on to some really cool stuff in JDK 1.6 or whatever it will be numbered.