Jan 25

Cω (Comega) Programming Introduction

Tech No Comments »

Dare has published a nice introduction to the Microsoft language Cω.

The most interesting parts of Cω are the extensions which give you native XML support, and SQL builtins.

One really interesting thing to see was:

public void PrintTrilogyTitles(){


This looks really Groovy too (blockish, ‘it’, etc… kinda like LoTR().each { }).

It is also interesting to see SQL as a first class citizen:

rows = select ContactName, Phone from DB.Customers;

foreach( row in rows ) {
Console.WriteLine("{0}", row.ContactName);

It will be very interesting to see how much of this gets put into C# 3.0, since Anders has expressed interest in these issues in the past. Maybe Java 6 will have some of it too? :)

Jan 24

Spring AOP using AspectJ 5

AOP, Tech No Comments »

Now AspectJ 5 has been announced, it seems to me a bit of a no-brainer for Spring to have full on support for the more advanced point-cuts of AspectJ/AspectWerkz.

There has been various integration in the past, and I am sure there will be more in the future.

To start with, Alex (of AspectWerkz/AspectJ 5) has written a new AspectWerkzPointcutAdvisor.

So, take a look at before:

<bean id="theMethodExecutionGetTargetAndArgsAroundAdvisor1"
<property name="advice">
<ref local="theMethodExecutionGetTargetAndArgsAroundAdvice"/>
<property name="pattern">

and now see how you can use the expressive pointcuts:

<bean id="theMethodExecutionAfterThrowingAdvisor"
<property name="advice">
<ref local="theMethodExecutionAfterThrowingAdvice"/>
<property name="expression">
<value>execution(* *..*.afterThrowingRTE(..))</value>

In fact, my guess is that, as time goes on and more people get into the power of AOP… the standard Spring AOP will be displaced by the more powerful Spring-AspectJ style.

However, Spring AOP has its uses, and it is great that you can chop and change so easily with Spring!

Jan 24

FileParser.eachLine: Learning from other languages

Tech No Comments »

At one time, if I had to write some code which was to loop through a file and do something with the contents, I would have thought:

- open the file
- while (there is a line)
- get line
- do something with line
- close up resources

And, I would make sure that all of the IO exceptions are handled correctly, that the resources are closed nicely in a finally { } etc etc.

However, since I get to code in other environments (Ruby, Groovy, etc) I now use a simple utility to do this kind of task. Here is the most simple test case which uses the FileParser utility:

public void testSimpleCommand() {
FileParser.eachLine(sampleFileLineReader, new LineCommand() {
public void useLine(String lineContents) {
assertEquals(sampleFileLine, lineContents);

Now the code that handles file IO is in one place (FileParser) and my application code doesn’t have to worry about it!

Compare this to the Groovy:

new File(inputFile).eachLine { | line | ……. }

Jan 24

New Ruby on Rails Tutorial

Ruby, Tech, UI / UX, Web Frameworks No Comments »

Rolling with Ruby on Rails is a new tutorial that goes through building a sample application from start (installing all software [rails, db, etc]) to finish (a running application).

Rails is really getting a lot of attention, and could be the tipping point for Ruby itself this year.

Parting Thoughts

Ruby on Rails has taken web application development to a whole new level. You no longer need to do the parts that used to be tedious work, because Rails does them for you. Even if you have to use a legacy database that does not use the Rails naming conventions, you don’t have to give up the productivity advantages of using Rails–there is still a way to tell Rails explicitly what table and column names to use.

Now that you’ve seen firsthand how easy it can be to create a web application, why would you want to do it any other way?

Perhaps your employer has mandated a particular framework or language. You can still take a few days to prototype it in Rails, then go to your boss and say, “I’ve already finished writing our entire application in Ruby on Rails! If you prefer, we can still take the next few months to write it as we originally planned.”

Jan 24

CruiseControl Action Movie

Tech No Comments »

Mike Clark is cool :) Now he has moved on from lava lamps, and put together an ‘Action Movie’ which shows CruiseControl in action.

Even since seeing the Ruby on Rails videos, I have thought that for some items, this is a nice way to get across some information. The problem is finding something which only take a few minutes, so people don’t have to sit there for ever :)

I am still waiting for Matt Raible to do an AppFuse startup video, and it could also be cool to have a split pane video of:

- Someone setting up a project with Ant
- Someone setting up a project with maven genapp


Jan 23

Aspect Concurrency Library

AOP, Tech No Comments »

Adrian has taken ideas from Herb Sutter, java.util.conrrency, and run with it.

He put together a small proof of concept which shows how aspects can really help you deal with concurrency issues. This also sits well with Futures (which Brian has been talking a lot about recently).

In theory you can @ParallelExecution on a method and nice things will happen. With Futures setup the threads can be kicked off, and .get(..) will be called to grab the return value.

Another great example for the AJSE library :)

Jan 23

Opensource Code versus Open Access to Data

Tech No Comments »

My first posting on OpenXource was concerning open interfaces compared to opensource.

Mike Cannon Brookes had an interesting post on the wiki wars, and he discusses the notion of open data access being very important. He has an interesting piece on the evolution of people and how they think about opensource.

Read more: Opensource Code versus Open Access to Data: What matters when, and the power of plugins and open interfaces

I am looking forward to writing some other pieces on opensource and community!

Jan 20

IBM ordered to show all of its versions of AIX and Dynix and documentation of any changes made to the software

Tech No Comments »

SCO has a bit of a win in that IBM ordered to show all of its versions of AIX and Dynix and documentation of any changes made to the software.

While SCO was granted this crucial part of its request, it lost out in a bid to see IBM’s Configuration Management Version Control (CMVC) and Revision Controls System (RCS) – both of which are used to track alterations to IBM’s software. Should IBM fail to provide all versions of AIX and Dynix by March 18, it will be forced to give SCO access to CMVC and RCS, said US Magistrate Judge Brooke Wells.

“SCO has much to gain by showing that any so called homegrown code allegedly within the purview of the contract ended up in Linux,” the judge wrote. “In equal respect, IBM’s case will be strengthened tenfold if IBM can show that notwithstanding possible contract protections, homegrown code provided no basis for the code that IBM eventually contributed to Linux.”

The judge also gave IBM a break with regard to the amount of programmer’s notes it must provide to SCO. Instead of interviewing a whopping 7,200 individuals, IBM will only have to query the 3,000 people who made the most contributions and changes to AIX and Dynix. IBM must turn over all of the programmer’s notes, design documents and white papers, along with contact information for these individuals.

The judge also postponed a decision on whether or not IBM will have to turn over documents from its top executives relating to the case.

Both SCO and IBM were warned to improve their behavior in this case.

“There have been abundant accusations of stonewalling in this case by both parties,” the judge wrote. “While the court assumes the good faith of all litigants before it, the court, nevertheless, urges both sides to renew their efforts in cooperating with each other.”

In a rather odd twist, the judge drifted off into a football history lesson. The judge, in a footnote, compared both SCO and IBM to “two-way” football players that used to work on both offense and defense.

“Although some modern players are considered ‘two-way’ players, few can match the legendary ironmen from football’s past who often played on both offense and defense the entire game. Hall of Famer Mel Hein is the perfect example. This New York Giants’ star was one of the most durable players in NFL history. He played 15 seasons going for 60 minutes a game without nearly any rest. Amazingly, he called for a timeout just once in his career. The timeout was used to repair his broken nose.”

We’re sure SCO and IBM will take that important lesson to heart.

Here’s rootin’ for IBM :) There are some interesting times here, especially in Europe.

Jan 20

Richard Monson-Haefel proclaims JDOs death, but it is premature!

JDO, ORM, Tech No Comments »

RMH has proclaimed: The death knell: The JCP EC rejects JDO 2.0.

Although JDO 2 may not get voted through. It isn’t dead yet. All you have to do is look at the TSS thread to see how people feel about it.

I still have hope that some of the guys that voted ‘No’ (those who don’t have a real political motivation to kill JDO) will come around. I think there has been a mixup in the process, and people need to communicate better. It also didn’t help that this all happened over a winter holiday so, some people feel like they didn’t have the required time to feel like they could say ‘Yes’ (although I would prefer an abstain like Google).

I also think that RMH is wrong when he says:

I believe that the EJB 3.0 POJO persistence model will become pluggable so that you can choose your persistence provider separate from your J2EE vendor.

Take a look at the EJB 3 early draft. This is NOT in scope! The vendors claim that ‘users have not asked for this’ in EJB. I agree with RMH 100% that we SHOULD have a pluggable implementation of the persistence manager / entity manager / whatever it ends up being called in the final EJB 3. Without it we get the same lockin that we have now. JDO has allowed us the freedom to change implementations, and NOT be locked in like this, and it will be a sad day if we lose it. Sad enough to make some nice folks say ’screw it’ and pick up Ruby even more :)

Jan 20

Internal Amazon Developer Conference

Tech No Comments »

Amazon has invited some top speakers to come in and talk to their developers over the last couple of days.

Not only is that cool, they also have had writeups on the talks on the Amazon Web Services Blog, so we can all see what they talked about :)

Check out: