Youth stars … elsewhere

Youth stars … elsewhere
I just read about a few Chinese youth stars and a related photo scandal, and i found it quite … fun!

I guess it’s better than reading your compatriot’s scandals 😉

Why DZone’s cross-promotional footer sucks

Why DZone’s cross-promotional footer sucks

I’ve hated their footer from the very first time, so it was quite funny when they even put up an article to describe how they did it! I mean, cmon you guys, do you ever use your site???
“So, what’s wrong with the footer?”, you might ask.
Well, it has a critical (toujours d’apres moi) usability problem… It makes your life difficult by now allowing you to use the END button.
Picture this: You find out that there are a few new comments in an article that interests you and you click to load the article, then hit END to see the comments. Imagine what that gets you: a 1280×1024 (and more) view of everything but comments… WTF!

Tapestry 5 book

Tapestry 5 book

Yeap, written by Alexander Kolesnikov, it’s been out for a while now: Tapestry 5: Building Web Applications

Here are some first comments from the mailing list:

Andy Huhn

I guess I’ll be the first to mention…my copy of the book arrived last
week! (Thursday) I’ve already read a good chunk of it, and skimmed
what I didn’t read. Excellent!

Even though I’ve been plowing my way through learning Tapestry for the
past few months, I found the book to be an excellent, rigorous treatment
of a lot of the details that I haven’t been able to find put together
all in one place so far. It’s definitely written to be simple enough
for someone who doesn’t know Tapestry at all to get started, but even
though I’m familiar with all of the basics, I still found it wonderfully
enlightening to read through it. It’s helping me pull together some of
the basics that I haven’t been able to get a handle on yet.

Alexander…excellent job!

Mahen Parera

I also received my book last week, and liked it very much. I was looking
for more sort of internals about the T5 framework tho.
Anyway, the book is great, i learned some stuff that i didnt know about.
Hopefully there will be some books coming along in the future which
explain more details about components and how the framework really
works,, more in to the internals of the framework.

Mark Shead

I will second this opinion. The book is great! I’m working through
all the examples and it is by far the fastest way (I’ve found) to get
up to speed on T5. Alexander did an excellent job of keeping things
simple enough to work through, while hi-lighting the different ways of
accomplishing the same thing.

Peter Stavrinides

Also received mine yesterday, a job well done Alexander! … it’s
simple, concise and to the point… no blabber, but as you said its a
quickstart, not so much for experienced Tapestry users.

A small tacos update

No announcements yet, just this:

 [INFO] Tacos ................................................. SUCCESS [20.973s]
 [INFO] Tacos Site Skin ....................................... SUCCESS [1:39.694s]
 [INFO] Tacos Core ............................................ SUCCESS [1:16.806s]
 [INFO] Tacos Annotations ..................................... SUCCESS [9.568s]
 [INFO] Tacos Cometd .......................................... SUCCESS [8.425s]
 [INFO] Tacos Demo ............................................ SUCCESS [25.451s]
 [INFO] BeanForm .............................................. SUCCESS [0.169s]
 [INFO] BeanForm Core ......................................... SUCCESS [25.614s]
 [INFO] BeanForm Examples ..................................... SUCCESS [17.668s]
 [INFO] Tacos Dojo ............................................ SUCCESS [2.079s]
 [INFO] Tacos jQuery .......................................... SUCCESS [2.934s]
 [INFO] Tacos-Seam ............................................ SUCCESS [0.116s]
 [INFO] Tacos-Seam Core ....................................... SUCCESS [44.754s]
 [INFO] Tacos-Seam Demo ....................................... SUCCESS [8.213s]

Crete – European Team Chess Championships 2007

Crete – European Team Chess Championships 2007
So, this week we’re at Crete, working on European Team Chess Championships 2007… here’s some photos:

POSTing with commons-httpclient

POSTing with commons-httpclient

So, commons-httpclient is quite useful and easy for programming http operations, e.t.c. As their tutorial explains, you just create an HttpClient, then a PostMethod or a GetMethod and finally you have the client execute the method.
In the particular use case i was working on, i needed to post some data to a MS ASP 6.0 Greek Server – both the request and the response should be in windows-1253. After testing a simple get request and seeing it working, I thought it wouldn’t get any easier than that… and it didn’t!
When doing post (which is a requirement due to the size of the data), i kept getting all those weird chars, e.t.c. I tried
setRequestHeader("Content-Type", "charset=windows-1253");

but somehow, the server wouldn’t get my data this time.

So, anyway, to cut a long story sort (and probably save you the hours I lost), the key is to remember you’re doing a post (!), and do

 setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=windows-1253");
 

BTW, addRequestHeader("Content-Type", "charset=windows-1253"); wouldn’t work either.

Trip to Corfu – Bourlis wedding

Trip to Corfu – Bourlis wedding

Emily and I went to Corfu last weekend for a friend’s wedding – G. Bourlis!
I’ve known George a.k.a. Giozis and / or karaGiozis for the last 9 years, though he’s been living in Patra for some years now and we haven’t been able to keep in touch… But it’s always nice to see him.
So, the wedding was at 18:30, we started by car from Athens at 8:15 in the morning. Less than two hours later, we were near Patra, at the Rio-Antirio bridge. After a while, it really started raining + we took a wrong turn + we missed the ferry for Corfy for 3 mins… but we were just in time for the wedding.
There where so many people crammed inside that small village church, all waiting for the bride to arrive – and she was at least a half hour late… the happy groom didn’t mind waiting in the rain : )
Well, everything went as planned + the after-party was nice (live greek music included)! On the way back, we had the chance to see one of the bigest rainbows in our lives ( i’m mostly sleeping at day and it’s difficult to see those at night!!!)… it only lasted for 3 mins due to heavy clouds, but it was awesome.
All in all, it was a nice escape. I’ve made a flickr slideshow with all these – check it out.
Oh, and i’ve almost forgot, here’s a short video of the groom waiting:

More Tapestry sites

Here’s 3 more public Tapestry sites (using Dojo for ajax + javascript):

  • http://www.sourcekibitzer.org/ is … sourcekibitzer! It provides detailed programming metrics into the relevant code quality, member activity, individual developer know-how, and scope of open source projects. It’s using Tapestry 4.0.2 and Tacos and it has recently been open-sourced. You can have it running locally in 5 mins!
  • http://freebookie.org is a free internet bookmaker that uses the js effects and ajax that Tapestry 4.1.2 provides (via Dojo 0.4.3). The complete project is open-source, available from http://code.google.com/p/bookie and quite easy to setup and play with locally.
  • http://news247.gr is a high volume greek news site that’s constantly updated. It’s on Tapestry 4.1.3 and does persistence with iBatis

So, if you’re interesting in having a look at Tapestry, why not grab the source of freebookie or sourcekibitzer and hack’em around?

Cleaning a maven repo

Cleaning a maven repo

Just saw the size of my local maven repo… and it isn’t nice

So, I’m wondering, is there a maven goal that cleans up ‘obsolete’ files? I want files like old snapshot jars deleted … cause, if you depend on SNAPSHOT versions of projects that update often, you do end up with LOTS of them!

Using Groovy for Tacos-Demo & Tapestry

So, since groovy compiles down to bytecode, it can be used anywhere… That’s how i did a test tapestry page a month ago.

But this time i took some time off to play with groovy and the tacos demo app (Shing is hosting it for us right now) and the JetGroovy plugin of IntelliJ Idea 7.0M2. My findings are really nothing new and mostly deal with java vs. groovy … things!

So, the ajax tree demo uses a TreeData bean for its data… here it is in java:

 public class TreeData {
  private String name;
     private List<TreeData> children;
 
     public TreeData() {this(null);}
 
     public TreeData(String name) {
         this.name = name;
         children = new ArrayList<TreeData> ();
     }
 
     public String getName() { return name; }
 
     public void setName(String name) { this.name = name; }
 
     public List getChildren() { return children; }
 
     public void setChildren(List<TreeData> children) { this.children = children; }
 
     public void addChild(TreeData value) {
         String name = value.getName();
         for (int i = 0; i < children.size(); i++) {
             TreeData treeData = children.get(i);
             if (name.compareTo(treeData.getName()) < 0) {
                 children.add(i, value);
                 return;
             }
         }
         children.add(value);
     }
 
     public TreeData getOrCreateChild(String value) {
         for (TreeData treeData : children) {
             if (treeData.getName().equals(value))
                 return treeData;
         }
         TreeData data = new TreeData(value);
         addChild(data);
         return data;
     }
 }

and here it is in groovy:

 class TreeDataGroovy {
     String name
     List<TreeDataGroovy> children
 
     def addChild(TreeDataGroovy value) {
         if (children==null) children = [];
         int pos = children.findIndexOf { value.name < it.name }
         children.add(pos, value)
     }
 
     TreeDataGroovy getOrCreateChild(String value) {
         TreeDataGroovy data = children.find {it.name==value};
         if (data==null) {
             data = new TreeDataGroovy(name:value)
             addChild(data)
         }
         return data;
     }
 }

On the other hand, I ended up dealing with exceptions and errors quite more often that i do in java (perhaps due to my lack of knowledge for groovy) so it did force me in more unit tests, which some say is a good thing and others the opposite.