Apr 26

Howard boils the ocean. Use GroovyMarkup! :)

Groovy, Tech 1 Comment »

Howard is trying to boil the ocean :)

Mate, I think that going with YAML is a good idea…. or GroovyMarkup

Your markup:

module (id=foo.bar.baz version=”1.0.0″)
service-point (id=Startup interface=java.lang.Runnable)
create-object (class=foo.bar.baz.StartupImpl);

looks a lot like the following GroovyMarkup:

someBuilder.module (id:’foo.bar.baz’, version:’1.0.0′) {
service-point (id:’Startup’ interface:’java.lang.Runnable’) {
create-object (class:’foo.bar.baz.StartupImpl’)


Apr 26

RE: Jon Tirsen’s “Undo in AspectJ”, and Compensating Transactions

Tech 1 Comment »

Jon Tirsen has written up a really nice example of how to Undo in AspectJ.

This Undo framework could be perfect for the Transaction Aspects that we have in aTrack. I bet there would be a place to create a Compensating Transaction system which would allow you to use AspectJ to cleanly setup your compensating transactions.

Great stuff Jon!

Apr 26

Google Zeitgeist: Learning from Google

Google, Tech 7 Comments »

It is really interesting to learn from Google.

The Google Zeitgeist page gives us search patterns, trends, and surprises, based on analysis at Google. This is great stuff, and I wonder how much Google does (or could) charge to do analysis for particular companies.

When you survey people, X% will always lie. Here Google has access to raw results. Gold. If I was Google I would be trying to get more and more knowledge on “who” is doing the searching… which would make the data even greater.

Apr 26

How to make a print friendly page, browser friendly

Tech 2 Comments »

When I visit a “Print friendly” page on the web, I normally find that either:

  • The page has a bunch of navigation and links that I don’t actually want printed, but allow me to move on after the print.
  • The page has no navigation at all, so it prints nicely…. but the back button is needed to move on from there.

To get around this minor issue, you can use CSS to allow navigation info in the browser, yet ignore that info when printing.

Here is an example:

Sample Html Page

This page includes two CSS style-sheets…. for the “screen” and for “print”.

<title>Printer and Browser Friendly</title>
<link href=”printfriendly-page.css” rel=”stylesheet” type=”text/css” media=”screen” />
<link href=”printfriendly-print.css” rel=”stylesheet” type=”text/css” media=”print” />



<div class=”browser-ui”>
<a href=”/”>&lt;&lt; – Click here to get back to where you were</a>

<h1>Main Content Title</h2>

Hi there. How are you. This is the main content of the page.

<p> and more and more and more </p>


Screen CSS

The screen-oriented CSS file makes the ui area pretty:

.browser-ui {
border: 1px dotted #888;
margin: 10px;
padding: 5px;
background-color: #BBB;

.browser-ui a {
color: #000;

Nothing special, and here is the page viewed in a browser:

browser view

Printable CSS

The print-oriented CSS file makes the ui area disappear:

.browser-ui { display: none; }

Here is a view of the page “printed”, and not showing any navigation.

printed view

Apr 24

Meta-Programming: Listening to Stu

Tech No Comments »

I am having fun at the No Fluff Just Stuff New England Symposium this weekend.

As always it is a pleasure to hang out with the fellow speakers, and the crowd. The “expert panels” are less and less focuses on technology itself, and more and more on process, and politics (e.g. outsourcing, JCP, etc).

I attended a talk on meta programming by Stu Halloway. It is one of the best talks I have been to for a long time. I always enjoy Stu’s talks as his style is top notch. There must have been 4 or 5 slides max. Instead of being a slide-reader, he cracks open his IDE of choice (IntelliJ IDEA for Java, Interface Builder/XCode for Objective C, emacs for aspectj? ;) ) and just goes for it. He codes as he goes a long, and you can’t help but sit there with a smile on your face, genuinely interested in what is going on.

The talk went through a myriad of meta-programming techniques, and how they solve particular problems. He had many gems in there like:

“Good design patterns get promoted to language features / Design patterns often exist to get around the lack of a language feature”

It was also great to see him show AspectJ as a tool. People have been doing the rounds giving AOP talks, but now I am seeing AOP discussed not as “A New Technology”, but just as part of another talk here and there. E.g. “This is a problem… oh by the way I used AOP to solve it like this”. This is a great trend for AOP.

Stu also gave me a demo of Near time Flow, which is fantastic. I can’t wait to get my hands on it, as a way to share, organize, and collaborate. I know that, although my Mac PowerBook will be happy, my DELL will be bummed out, as the initial support for Flow is Mac only… but that will hopefully change as time goes on.

Apr 22

No Child Left Behind: Listening to the Secretary of Education. What a shame.

Personal No Comments »

Tonight I was at the JFK School of Government listening to a keynote from the secretary of education, Rod Paige.

Secretary of Education Speech

It was really dissapointing. The reason is that it felt like the Bush speechwritters had written everything for Rod to say. I am sure he is a caring, learned man… but if you did a search and replace on education for terrorism it would be the same as the Bush speeches.

The reason for the keynote was the fact that it is the 50th anniversary of Brown vs. Board of Education (as I have mentioned in an earlier blog).

The secretary harped on about how No Child Left Behind (ingenious name, got to give them that) was THE issue of today. The speech had no content. OF COURSE we all want equal education rights in the USA. Noone is disputing that, yet he was making it seem like “you are either with us (NCLB), or against us”. Sound familiar?

These forums always allow for questions to be asked. Some were good, and some were not so good…. yet no real answer was given to any of them. It really is amazing how a good politician can leave you thinking “huh?” when you try to work out how that “answer” had anything to do with the question.

- Is vouchers really going to help?
- Does testing every 5 minutes do anything for us (other than have us teach to the test?)
- You keep mentioning the funding increases, yet most of it goes to administrating the damn tests!
- What happens to all of these “failing” schools?
- Houston had a 20% increase? Based on what! How is it possible to keep up with that?
- Isn’t it obvious that schools will lower standards to allow for this increase in growth?
- What about the math: If you are a top school, how the hell can you keep increasing your performance by 20%!
- What about all of the studies that show this is a load of cock and bull?
- How come you have a lot of demands, yet the states have the burden. If there is a success it is due to NCLB, if there is a failure it is due to the fact that the states have all of the power. Come on. If this is the #1 civil rights issue, lets have a revolution!

We all want better schools. We all know that education is key to freedom and to the future of this country (we need to stay at the top of the wave guys). We are behind the theory of a lot of what you say, but as one person asking a question said “the devil is in the details”, and NCLB’s details suck.

Standards good. Testing every 3 seconds bad.
Statistics/Data can be good. Lies are bad (and it is easy not to get lies with statistics!).

Apr 22

JSR 243: JDO 2.0 has a number

Tech 10 Comments »

There has been a lot of ground-work leading up to the JSR for JDO 2.0 getting put up to the JCP. I had no idea that this amount of work went into a JSR even before it was officially a JSR!

Due to this effort, I think people will be pleasantly surprised at how fast the group moves from here on out, as a lot of agreements have already taken place.

Hopefully JDO 2.0 will offer a nice standardized world for transparent persistence, which is what a lot of people want.

Sun renews its commitment to JDO with version 2.0

Apr 22

Pragmatic NUnit, and JUnit improved?

Tech No Comments »

The pragmatic fellows are back with Unit Testing in C#.

It’s the first book (and only, so far) to cover the new NUnit 2.2 features. Special thanks go to Charlie Poole on the NUnit development team for working so closely with us. That’s the joy of Agile publishing: we were able to describe features in the book as Charlie was adding them to the product, in real time.

/\ndy’s Weblog

What is the ,v at the end of the URL. Surely it isn’t a CVS checkout directly to the web root is it? :)

Also today, ONJava has a nice article on Declarative Programming in Java. In the article they discuss how with JSR 175 maybe we can join the world of NUnit with an updated JUnit, which is annotation aware. Sounds good to me!

Apr 21

Jakarta Struts for Dummies

Tech 1 Comment »

I know there are a lot of Struts books out there…. and I know that this is because Struts books have been among the best Java sellers… but Jakarta Struts for Dummies???


Apr 20

Re: Re: Maintenance matters

Groovy, Tech 1 Comment »

I got a lot of interest comments to my post Maintenance matters: How should we change our designs to show we care?.

Anthony Eden replied, and had some good comments.

The posting wasn’t meant to discuss the pro’s and con’s of using new technologies.

Even if the newest technology makes you a little more productive, that doesn’t mean that it actually makes sense to go ahead and use it, if you take the other considerations into account:

  • Price
  • Developer knowledge and skill set
  • Your History
  • Business decisions (e.g. who your VP plays golf with)
  • and many more

Skill set is always a big one. I was working on a project where the team were TOP NOTCH when it came to the database tier. For them, throwing an abstraction of the DB in front of them that made it hard to get in there and make the tweaks was painful. So in that case, we didn’t care so much about making that abstraction, but simply hid the implementation behind interfaces, and let them do their magic. If they were doing wacky PL/SQL behind that object that you got back, so be it (as long as that skill set remains).

I love the idea of using scripting languages combined with Java, in the same project. I find that there is a place for nice static interfaces, and a place where it is nicer to just be dynamic and let it flow.

However, even here, I have to stop myself on some projects. What if the team doesn’t know a Groovy/Jython/[insert other scripting language]. Does it really make sense to train everyone? Especially for the maintenence cycle too?

There is no right and wrong to all of these questions…. just interesting to think about, and to know that “bleeding-edge and cool != the best solution all the time”.