Aug 12

Why I hate the phrase “Long Running Transactions”…

Tech No Comments »

Pat Helland hates the phrase “Long Running Transactions”….

He wants Transaction to mean ONLY the ACID kind. He gives an example of why he uses terms such as “Long Running Work”:

1) I decide to take a trip to Europe so I book some airline and hotel reservations.
2) The hotel in London hits a threshold of occupancy and decides to increase staffing and food for the restaurant.
3) The hotel orders more food from the Green Grocer.
4) The Green Grocer hits a threshold and orders another delivery from its shipper.
5) The shipping company hits a thresold and orders more diesel fuel for its trucks…
6) Two weeks later, I cancel my trip.

So, if I believe in long-running-transactions, the shipping company doesn’t need any more diesel fuel! I don’t think so!

He then goes on to discuss how services talk together. He loves contracts, dialogs, and so forth.

We can slap on these transactions in deployment descriptors, in annotations, and in cross cutting concerns, but are we spending enough time Thinking in Transactions.

As a jazz musician would say:

When I was working with an old school mainframe guy, they planned out their transactions as a #1 priority. It was all about the transactional flow. Are we losing this art?

Aug 12

James Says: Why Mac OS X is Better

Tech No Comments »

Which James? Not Strachan this time ;)

James Duncan Davidson has proclaimed Why Mac OS X is Better.

I am the owner of both platforms, and understand where James is coming from. I have really enjoyed the Mac experience. HOWEVER, it has not be pain free. You have to enjoy some tinkering to get some things working. Your Mom wouldn’t have to… but if you are a developer you will want to. Things are getting better and better though. The issues I had with SAMBA printing are fine now in 10.3 for example. But it isn’t perfect.

And if you want to do .NET development….. ;)

Aug 12

Hacking the language versus the VM

Tech No Comments »

Brother Ted has written about the dangers of language-level trickery.

I think he is spot on. Although I understand that Sun is really anal when it comes to changing the VM in any way (I mean god forbid we add an opcode), it is short sited in many ways.

It shows that Sun thinks there is The One True Language. With that mentality, they can put more intelligence into the javac side of the house. They probably laugh about how sneaky this is.

However, not only can other languages on top of the Java Platform (it is a platform!) do whatever they damn want… but what about other java compilers? Will jikes run all of the same checks?

Generics is definitely one of the poster children here. We have ended up with erasure. There is no way to know that the code was using Generics as soon as you compile them. List looks like a List in the class file. What a shame.

Aug 12

The Foosball Wizard

Tech 113 Comments »

Back in the dot-com days, I worked for a consulting company that was known for their foos-playing. It was an addiction for some of these people, I am sure.

A former co-worker wrote an Ode to that time, and those people in:

The Foosball Wizard
(dedicated to XOR programmers everywhere)

Ever since he was a new hire,
He used to roam the halls.
From top floor to the break room,
His orbit saw them all.
Ask him what he’s workin’ on
He’ll say you have some gall.
That overpaid programmer
Sure plays a mean foosball.

From the start of morning coffee,
To the end of Beer Friday.
Always in the breakroom,
Furious foosball play.
Does he have a supervisor?
What’s he do all day?
That overpaid programmer
Sure plays a mean foosball.
He’s a Perl programmer,
There has to be a catch.
That overpaid programmer,
Really makes some scratch!

[HR DIRECTOR]

Who does he really work for?

[GREG JACOBSON (CEO)]

I don’t know!

[HR DIRECTOR]

I’ll look into it.

[FOOSBALL WIZARD]

Well, he ain’t got no distractions,
Doesn’t fill out a timesheet.
Who cares about utilization,
He’s the foosball guy to beat.
Always wins the tourney,
Even when he has to cheat,
That overpaid programmer
Sure plays a mean foosball.

Aug 12

Giving away attributes without all of your source

Tech No Comments »

Joe Walnes has talked about an interesting tactic to allowing people to grab attributes (via QDox, or whatever you want), without having to give away the entire source code.

This has been a problem, as (until Java 5), the attribute data is not available in the bytecode. Instead of doing something wacky like parsing the attributes into some other form which you can distribute, how about just taking out the body of the methods and turn:

package stuff;

public class CheeseSlicer {

/** @transaction mode=isolated */
public Slice feedMe() {
// some implementation specific stuff here.. don't waste your time reading it.
if (System.currentTimeMillisMillis() % 2 == 0) {
return new CheddarSlice();
} else {
return new BrieSlice();
}
}
}
package stuff;

public class CheeseSlicer {

/** @transaction mode=isolated */
public Slice feedMe();

}

To do this is simple. First, QDox can be used to parse the source of a class into a JavaClass. Calling JavaClass.toString() will print out the class without the body implementations (as above). This is something done at development time and the result should be written to a file that is available at runtime.

At runtime, QDox can read this file just as if it were a full-blown Java source file, making the attributes available.

Simple! Lovely! :)

Aug 11

The Programming Apprentice

Tech No Comments »

No, the title isn’t about another new reality T.V. show :)

An Object Mentor chap has talked about his experience as an apprentice at the company.

This is good to see. Since we are working in a craft, we should have more time as an apprentice. Why does it seem that there are more mentors than there are apprentices?

This brings me back to Christian’s point that we could be a bit more like jazz musicians, and talk about what we learned from the people that we got to work with.

Aug 11

J2ME: Blackberry and beyond

Tech 5 Comments »

Javanicus is talking about his shiny new Blackberry.

I hope that it really has grown as a Java J2ME platform. Back in the day I saw a blackberry project with Java which was painful. The support was weak, and only a subset of APIs were available.

Are people having a good time with J2ME on the Blackberry?

Aug 11

PostgreSQL 8.0

Tech 2 Comments »

I am a big fan of PostgreSQL. One of the pain points, however, is using it on Windows. You can try to build the damn thing with cygwin installed (which is painful), or you can download an old build for use.

Native Windows support was going to be in 7.4, but got pushed out to 8.0. Now we see the beginings of the labours:

After almost 9 months of development, the PostgreSQL Global Development Group is proud to announce that development on PostgreSQL 8.0.0 has now finished, and is ready for some serious testing.

For those wondering about the 8.0.0 designation on this release, there have been several *very* large features included in this release that we felt warranted the jump. As with all of our releases, we aim to have this one as rock solid as possible, but *at least* one of the features added to this release involved such changes that may warrant a bit extra testing post-release before deploying it in production.

Although the list of new features in 8.0.0 is extensive, with both SMB (Win32 Native Support) and Enterprise (Nested Transactions and Point in
Time Recory) features being added, there is one thing that hasn’t been included as part of the core distribution, and that is a Windows Installer, which can be found at:

http://pgfoundry.org/projects/pginstaller

For a complete list of changes/improvements since 7.4.0 was released, please see:

http://developer.postgresql.org/beta-history.txt

That said, and without further ado, Beta 1 is currently available for download on all mirrors (look under source/v8.0.0beta):

http://www.postgresql.org/mirrors-ftp.html

And, thanks to David Fetter, the Beta is also available via BitTorrent at:

http://bt.postgresql.org

Aug 10

JDocs.com: A community of javadocs

Tech 3 Comments »

Rick Ross and Matt, IM’d me awhile back. They sent me www.jdocs.com.

I checked it out, and at first wondered why they were sending me a link to a page of JavaDocs :)

They then explained that the site is 100% dynamic, and it allows you to comment on parts of the documentation. This is quite cool. Normally javadoc is such a static beast, yet now someone can say “Hey, although it says to do this, I always do Y”. If the community gets behind it then it can grow and become a great wealth of knowledge.

As it is, we are seeing just the beginning. More and more features will be added, such as rich personalization…. and the ability to download a snapshot (so you can use the docs locally when on a plane!).

This is interesting stuff, and I hope it grows. The JavaLobby guys definitely have their hearts in the right place, so this should go well for them!

Check out: jdocs.com, and let them know what cool features they should implement :)

Aug 10

Freedom to work

Personal 3 Comments »

As you mow the lawn you get time to think (and now I have the mower working I can!).

I was thinking about how I am excited to have started my own company, Adigio. I get the freedom to do my own thing. Make my own mistakes. And only have one idiot boss (me!).

Then I remembered back in time, when I was over here on various VISAs (student VISA, then company sponsored). At that point I didn’t have any flexibility. As a student I could only work for a short period of time per week. When sponsored by a company, I was tied to them. As I think about it now, that seems really painful and risky. What if the company had tanked? What if I really wanted to move on?

The idea of freedom is an interesting one. As an “alien” in “someone elses” country, I definitely felt “different” at first. It was quite upsetting to realise that I had NO RIGHTS to be on this piece of land, on this part of a moving sphere. That felt so strange to me. How can someone NOT let me be in this space!

I understand that you need some laws (”I don’t want everyone moving [insert where I live here!”), but now I empathize a lot with any immigrant wanted to get to a better life…. especially if they aren’t allowed.

I am thankful for now having all of the freedoms that I am allowed.

Maybe I will discuss the craziness that I went through to get my green card, and get past the “protectors of our soil” :/