Writing your pom files in Groovy – a sneek preview of Maven 3′s polyglot features

Maybe,  i´m really getting conservative with age. :)

Writing your pom files in Groovy – a sneek preview of Maven 3′s polyglot features.

InfoQ: IntelliJ Goes Open Source

…Starting with the upcoming version 9.0, IntelliJ IDEA will be offered in two editions: Community Edition, free and open-source, and Ultimate Edition, which until today has been referred to as simply IntelliJ IDEA.

via InfoQ: IntelliJ Goes Open Source.

Unfortunately, without html/css and refactoring support in the community version, i´d not even consider installing it to take a look. if they try to hook me up, they´d have to extend the bundled features a little. maybe when i have time for scala, i´d look into it, for the eclipse scala plug sucks.

OpenOffice.org development switches to Mercurial – GullFOSS

via OpenOffice.org development switches to Mercurial – GullFOSS.

I’m very pleased to announce, that after five months of piloting, implementation and and testing, we are finally ready to switch OpenOffice.org development to Mercurial (hg) as our SCM (Source Code Management) tool.

Mercurial is a modern and flexible distributed SCM tool with the fast and convenient merging capability which is so required for OOo development.

We have chosen Mercurial out of the three major open source DSCM tools available (Git, Bazaar and Mercurial) because we believe that its combination of ease of use, flexibility and performance fits best with the overall OOo needs. We are well aware that a slightly different emphasis on the selection criteria might well have led to a choice of Git or Bazaar, which are both very capable DSCMs as well.

Book review : Scrum and Xp from the Trenches

At work, we’re currently reviewing our Agile process. So I thought it was a nice occasion to read again Scrum and Xp from the trenches, esp. since we have a paper edition of it.

Simply put, this book is why I started to be so much interested in Agile software development : the process it described is really compelling. The author hardly presents what is an Agile process (from a theoretical point of view), rather it dives immediately on how they did it. Still, he provides the different choices they faced and explains why they went for such or such solutions, all in order to accomplish the various “agile steps” which are to be done. It really enlightens the reader, helping to grasp properly what it’s all about. Furthermore, it gives ground to the author’s claim that it’s just how they did it : one gets easily that’s adaptation is the key, that Agility is not a stone graved process. This helps to consider it’s own environment with a fresh eye.

At the end of the book, I had the feeling I had a proper overview of the whole process, on how these teams worked. Added to the explanations on why they choose such solutions, it makes it all reasonable, sound and efficient. Attractive and, hosnestly, a real breakthrough compared to all these RUP, ITIL and others crappy acronyms. What else could we expect from a process ? It actually seemed like helping and being efficient ! Crazy ! The only question I had left was “when can I start ?” (which is part of the reason I moved to Thomas Daily by the way lol).

In retrospective, now that I’ve been working in a Agile shop for now 7 months, the book didn’t answer all the questions I had since. Furthermore, more theoretical books have helped me really grasp why such a process was working, that it was all about the empiric nature of each IT project. Still, when coming back to this book, it was once again compelling. Going through the experience and writing of Henrik Knibberg has helped me once again, spotting points where we didn’t get it all.

As such, I really advice this book (which comes as well as a free ebook, both having been updated since publication) for all people interested in getting Agile, how it works, what it provides or even to improve one’s own way of applying it. So don’t hesitate : read it !

++

Side note : Henrik speaks of other “from the trenches” stories in his book. I never found any, so if anyone knows some other, I’m interested !

Another nice online UML Diagram creator

can be found here and creates images like this:
sample

And wave goodbye….

although technically quite impressive, this article reveals the shortcomings of google wave nicely.

Hibernate default fetching strategy…

hi

We all know that the default fetching strategy for hibernate is lazy. But, wait, is it, really ?

As you might have guessed by now, it’s not. Indeed, for @OneToOne and @ManyToOne annotations (and only theses annotations), the default is eager. Funny no ? Oh, I forgot : don’t ask me why, I can just tell it’s the case (from one issue at work, some digging into the topic and this nice topic – which includes links to the doc for the non believers - on the hibernate forum).

Time to think at some way to always ask for explicit fetching strategy for ManyToOne annotations… Maven plugin to the rescue ? We shall see ! :)

++

Is Spring still lightweight?

Nice article speaking out loudly, what has to be said.

http://azeditech.com/spring/is-it-still-lightweight.html

And I can’t even work out what each Spring Source product does and whether it makes sense for me to even consider spending the cash, I quickly get bogged down by solution-speak every time I try to get a quick understanding. Then I saw a notice about Discovery Days, and hey! a day-long seminar which goes over the various Spring Source solution offerings and explains what the hell they are, sounds perfect. Oh, wait, it costs £400. They want me to pay to go to their sales presentation.

Bleh.

Redis vs MySQL comparison

http://www.mysqlperformanceblog.com/2009/08/27/looking-at-redis/

Interesting read, even though possibly biased ;)

UML Sequence Diagram Generation

fun to use and good results, at least for simple sequence diagrams:
Example

http://www.websequencediagrams.com/

Another review of Cassandra et al.

i almost missed Redis, but it sounds interesting:

It also has atomic operations. This is honestly the only reason I find this project interesting, because the atomic operation support that it has means that it can be turned into a best-of-breed tally server. If you are building a server to keep real-time counts of various things, you would be remiss to overlook Redis as a very viable option.


read full article

nice article about G1

can be found here.

interesting insight into google

if you´re interested in google (or even thinking about working there :) ), this looks like a must-read.

The heart of Google is code and all code there is peer reviewed TO DEATH. The result is absolutely the cleanest code in the digital world, forced into that condition by what can be a torturous process of line-by-comment-by punctuation mark analysis sometimes over-driven by people who take their work WAY too seriously. You know the type. Peer review wars have apparently been known to break out at Google, though rarely. Usually the pedants are accommodated and, in fact, they for the most part win. The code is clean as a result, but the process is s-l-o-w, or so I’ve been told.

And the code had better be clean, because at Google developers outnumber testers by 50-to-1.

But peer review at Google goes way beyond looking at the code. Hiring requires peer review. Promotion requires peer review. Presumably even firing requires peer review, though I didn’t have anyone actually tell me that. All the technical workers at Google are involved in peer review activities a LOT of the time — up to 20 percent, in fact.

Which brings us to the vaunted 20 percent time Google engineers are supposed to get to work on anything they like. Most of them apparently use that time for corporate housekeeping — for doing all that peer reviewing. It makes sense: if you want to appear productive in your main job yet are still required to do all this work that would normally be handled by managers, when else can you do it but during time you don’t have to account for?

read full article

Cassandra review

keeping my eye open for data storage alternatives, i ran into this nice, thorough discussion of cassandra.

Wanted : book/resources on Java certifications !

I’m currently looking seriously at some Java certifications. As such, Uwe kindly gave me lots of Java certification books, but they are about Java 1.2 (whaou, prehistory ;) ) and 1.4.

Since Java 5 introduced quite some new stuff, extra resources/books would be welcome, as such feel free to comment. I’ll as well update this post with my own findings, even if I already have enough to learn with all these funky bit operators and the like… Funny how little I saw them used BTW… “Wondering about the use case am I !” (yes I played Stars War Lego recently :) )

++

EDIT : For some mock tests, Javaranch is the way to go, as they provide some lists of mock test sites.
For books, uwe sent me this very usefull link (thanks by the way !): Javabooks timeline. But in the end, I settled for SCJP Sun Certified Programmer for Java 6 Exam 310-065 which I didn’t find in the Javabooks site.

Anyway, I’m eager to get the book, since certification looks like more useful than I previously thought, in terms of Java mastering and understanding. It really helps to go deeper into it.

EDIT – follow up some interesting links for certifications wanna be :
- JavaRanch SCJP faq
- Java keywords… special mention for true, false and null !
- regex quantifiers…
- explanations on the String pool

Digging in !
++ (re)

EDIT : this quest is now over. Thanks all :)

How we have the development specific code safely out of the way

Quite frequently, one has to write some development specific code. For example, at work, we have, when needed, an “application launcher” (named with the application name) and a dev web page, mounted under /dev. This page in turn allows to write shortcuts in the application work flow, in order to access specific page with an ad hoc environment (profile, data…).

However, one quickly wonders how to be sure these classes won’t get in production.

Our solution is linked to m2eclipse. This maven plugin for eclipse has the following behavior : it puts both the main and test source paths in the class path. As such, one can access both the production and test code when running the application from eclipse. This is normally not done by Maven. More precisely, Maven build jars don’t include the test code.

The solution is then really easy : we put our dev. specific code under the test branch, and we are perfectly able to run it all from eclipse. But Maven makes sure none of it will make it into the production jar/code. Double with this application launcher + dev page conventions, it really makes it simple to dig into an application/project. Nice and easy no ?

Why is “Agile” planning better than the traditional Gantt approach ?

Last sunday, I’ve been discussing with a friend about planning. In his company, they’re doing it the “traditional” way, with a Gantt like approach. The example was of an excel sheet containing two tasks, coding and testing, one after the other. Quite to my disappointment, I was at pain to express clearly the advantages of an “Agile” planning. So, in order to be clearer next time, here is my homework :)

Users care for features and nothing else !
Thinking back on this discussion, I think the key point I didn’t express at that time was, as Mary Poppendieck would put it : “These days we do not program software module by module; we program software feature by feature”. It really goes to the fundamental differences between a Gantt like planning and an “Agile” one.

When planning modules by modules, and can have buffers before/after, reorganize your plan, but basically you’re at risk of delivering nothing or something that the users don’t really care about (if you go for partial delivery). And all that, maybe, just because some corner issues (either in terms of functionality or technical) aren’t resolved.

With features planning, you put what the user wants first, meaning there is a high probability of pleasing him. Furthermore, a feature doesn’t dictate a technical scope : even if the technical aspects are not all perfect, you can still release the feature if possible/needed. The full database schema hasn’t to be known/implemented/optimized for having some functionality working…

Finally, an Agile team commits itself for a set of features. Sorting out the difficulties encountered is part of this commitment. When committing to fit to a Gantt planning, it can be done perfectly and still having nothing working or of interest for the users…

Software development tasks cannot be accomplished in isolation
On a more general scope, separating activities in software development is a risky business. What you do on the data base level has impact on the software. DBA and developers have to speak together, they don’t work in isolation. Furthermore, if during testing some feature is missing, the odds are high that both the code and the database will be affected. What do you do if you’re now in the “testing” phase of your gantt planning ? In which cell does it fit ?

Software development is full of uncertainties
Last but not least, a Gantt planning looks horribly deterministic. It looks like all is sorted out, that we know exactly where we go. But software isn’t like mass production : each project is different. What if some functionality isn’t properly described ? What about technical uncertainties ? What if priorities change ? Agile planning – and agile software development – is all about taking these uncertainties in account. The exact tasks to achieve for a functionality aren’t figured out months before working on it (as if anyone could ever do so). The iterations and daily scrum are all about, as well, resolving uncertainties when they appear and when we have the required knowledge.

As usual, all feedback welcome !

++

Thoughts and questions on Pragmatic Unit Testing

2 points stroke me when reading this “Pragmatic Unit Testing” book :

- in order to easily test some class, they suggest to open the required methods by making them protected. I had first to check that protected included package readability (it does) but still I think it’s going a bit too far : if the method was supposed to be private, package private is the nearest visibility which would fit. I would only make it protected if I intent to override it. Do I miss something ?

- the last paragraph is called “Testing invalid parameters”, and speaks of where to test the validity of the parameters. Their answer is “we find the easiest rule to adopt is the ‘keep the barbarians out at the gate” approach’, meaning internal components can trust the data they get. At work, we do it differently : every non private method has to check for the validity of its input (for which we have a dedicated assertion lib.). Would you suggest otherwise ?

++

facebook profile removed…

i just removed that profile of mine on that massive mutliplayer-roleplay-game called facebook. if you really want to keep contact, i´m sure you may find a better way :)

even though it was created just to get to know the featureset of facebook without any info than my name, friendrequests keep coming in like rain… yukk…

apropos facebook… listen to this.

fun on twitter

<p>@ptrthomas

can ruby on rails scale? find out at http://canrailsscale.com
oh, and I have to mention the informative http://doesjsfsuck.com

Weird Ads…

Sometimes ads get weird.

just faced this one....

just faced this one….

AMF Serialization (followup Faster Serialization)

While i was looking for the fastest possible way to serialize Java Objects to byte-streams, i was comparing some serialization libs. With the help of Adobe Evangelist Cornel Creanga, i added AMF3 Serialization to the test.

Good things first: for my test-case, AMF3 turns out to be slightly faster and a little more compact than plain JDK6.

PlainSerializer: 999ms (Size: 639241 bytes) 
PlainSerializer: 862ms (Size: 639241 bytes) 
PlainSerializer: 779ms (Size: 639241 bytes) 
PlainSerializer: 781ms (Size: 639241 bytes) 

AMFSerializer: 775ms (Size: 554323 bytes) 
AMFSerializer: 680ms (Size: 554323 bytes) 
AMFSerializer: 661ms (Size: 554323 bytes) 
AMFSerializer: 656ms (Size: 554323 bytes) 

This would be a good reason to use it if it was not for the following disadvantages:

  • You need the to be serialized classes to be public.
  • They need to have a no-arg Constructor being public as well.
  • You have to expose the complete State of the Object by Getters/Setters

While the first two might be bearable, the third is a no-go. As AMF3 does not seem to look at the fields, a transient field will be serialized as well and if you missed a getter… well you know…
If you have dedicated Transfer Objects, that were just made for AMF3 Serialization, this might be fine. For me, the price to pay is way too high in comparison to about 10% performance improvement.

I am wondering, why the heck they tried to focus on properties instead of fields. As they call it Serialization, it´d be reasonable, to reflect the object´s complete state instead of its published properties. In fact, it would be even easier to reflect the Type-info etc. from fields instead of properties.

Book review : Pragmatic Unit Testing

During my holidays, I notably read Pragmatic Unit Testing In Java with JUnit.

Basically, this book might be nice for beginners and new comers to unit test. If you’ve never done any and are fearful of starting on your own, then consider it. Otherwise, it doesn’t bring much. It’s an easy book to read but the noise/info ratio is too much in favour of noise : I sometime had the feeling the authors were trying to fill the space.

In fact, I do like the Summary Card offered, it sums up nicely what is to be known, and what I could say is of interest in the book.

Furthermore, the book shows its age : late 2003 is like prehistory ;) . So the code samples are a bit outdated and, worst, maven wasn’t popular at the time : lost of lines are lost explaining out to setup the tests’ folders, which is pointless with maven.

In case of questions/comments, do not hesitate.

++

Developers, Be Warned: Apple Has Apparently Trademarked Those Glossy Chat Bubbles

Can it get possibly worse?

This time it was well known developer Joe Stump, who had an important bug-fix for his company’s game Chess Wars sit in App Store limbo for six weeks. Finally, this morning an Apple representative named Richard called Stump to inform him why Chess Wars was being rejected after the six week wait: the bubbles in its chat rooms are too shiny, and Apple has trademarked that bubbly design. Yes, the App Store has reached a new low.

via techcrunch.

Defining JavaScript variables…

hi

Do you know the difference in JavaScript between these variables declarations :

- myVar = “foo”

- var myVarVar = “foo”

In fact, the first one will have an unlimited scope, and thus accessible from the outer world, whereas the second one will only be accessible at this level and below.

As such, this is why the line “$.fn.myFunction = function(){bla}; ” is used to declare new function to the jQuery object.

Similarly, make sure you use “var” in front of your own JavaScript variables to avoid name collisions !

Hope it helps !

++

PS : funny how I’ve plenty of long posts in mind but not yet written (out of laziness/lack of time) while at the same time I’m eager to write small ones on stuff I’ve just discovered… May be I should consider twitter more closely !

PPS : the (french) source of this post : developpez.com

Breaching Fort Apache.org

hi

Quick post about this breaching of apache.org.

In fact, it highights a point I was discussing quite recently : OS diversity. Indeed, speaking about Apache security strengths, we can read :
For example, core servers on the network employed a variety of hardened operating systems, including CentOS, FreeBSD-7, and Solaris 10, creating a diverse target that made it hard to attackers to escalate privileges.

The matter is about visualization and the diversity of underlying OS : when security matters, diversity does as well. Something which is sometime forgotten, I fear, because of willingness to standardize everything on some technology stack… So, admins : beware ! ;)

++

Coins, coins, coins…

As the List for project coin is finalizing, it looks like, we wont get Multi-catch, which is pretty sad.

 Java |  copy |? 
} catch (Exception1 | Exception2 ex) {
        LOGGER.log(Level.SEVERE, ex);
        throw ex;
    }

That being said, i really like the Collection Literals stuff, that´ll bring

 Java |  copy |? 
final List< Integer > piDigits = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9];
final Set< Integer > primes = { 2, 7, 31, 127, 8191, 131071, 524287 };
// and even
final Map< Integer , String> platonicSolids = { 4 : "tetrahedron",  6 : "cube", 8 : "octahedron", 12 : "dodecahedron", 20 : "icosahedron" };

which is pretty nice. Well we´d have to get used to the [ and { difference, but it´ll be worth it.
Details here.

The automatic resource management, while certainly attractive, still is a little foggy to me.

The big OSS sellout continues…

via Intalio, The Private Cloud Company » Intalio Acquires Webtide, Developer of the Jetty Application Server.

32 css files!?

oh boy…

… which reminded me of a less known limitation in Internet Explorer….

The max number of external CSS files that can be loaded in a single webpage via the tag, or included via the @import url directive is 32. Any css file beyond this limit will not be parsed.

full article here.

i did not know that. certainly an issue, when compiling complex pages from components that package scripts and css.

jQuery cheat sheet

jQuery Cheat Sheet.

Ubuntu to go

need a quick ubuntu on your (32bit) windows box? i recently installed portable ubuntu which turns out to be much more exciting than i thought:
technically, it is just an application running on top of win instead of your vbox/vmware virtualization solution. that means: it boots quicker, needs less ram and most importantly, integrates nicely into your desktop.

bonus: it comes as one-click-install and after booting, has your ntfs partition already mounted. of course, it still is a ubuntu, so “apt-get install mysql” still is your friend.

awesome!

unfortunately, due to driver signing restrictions it wont run on 64bit.

portable_ubuntu

Fun with Debian…

oh my god…


myserver:~# apt-get moo
         (__)
         (oo)
   /------\/
  / |    ||
 *  /\---/\
    ~~   ~~
...."Have you mooed today?"...

“Faster” Serialization

as i´m gonna be involved in building a System that has some significantly complex aggregated Data Objects to serialize frequently, i came across http://jboss.org/serialization/.
this one actually promises some kind of performance gain over plain java serialization …

Recently we discovered that most of the problems in JavaSerialization are related to static synchronized caching, what causes CPU spikes and also diminishes scaling capabilities.
With JBossSerialization we have done internal benchmarks and we have realized at least 2 times faster serialization with this library.

Mum has taught us well to never believe the man offering candy, so let´s have a closer look:

 Java |  copy |? 
class BigComplexObject implements Serializable
{
    String foo;
    transient String bar;
    int x = 1;
    Map m = new HashMap();
    List l = new ArrayList();
    List l2 = new ArrayList();
    List l3 = new ArrayList();
}

prepared like:
 Java |  copy |? 
    b = new BigComplexObject();
    b.foo = "foo";
    b.bar = "bar";
    b.x = 17;
    for (int i = 0; i < 10000; i++)
    {
        StringIdentifier si = new StringIdentifier(UUID.randomUUID().toString());
        b.m.put("key" + i, si);
        b.l.add(si);
        b.l2.add(si);
        b.l3.add(si);
    }
 
// note: StringIdentifier is just a Wrapper holding a String.

being serialized through JBossObjectOutputStream or ObjectOutputStream respectively to a preconfigured byte-array, looks like in fact the JBoss variant is about 50% slower than the current jdk. i tried hard to change the object (adding/removing multiple references etc) but it did not change anything. Ok, my setup could be wrong, but as this is quite near to my actual usecase, this is it.
for the record, this lib is from 2006. it might have been good back then. if you have any suggestion, where/how jboss ser might still rock against the regular one: i´m listening…

setup: jdk1.6, win32, jboss ser 1.1.beta

mum was right, no candy today…

Vista, IPv6 and Security…

these guys really know how to screw it up…

If you want to disable IPv6 in vista (you really want to, unless you particularly need it), here is the deal. (Last subheadline)

Video: Douglas Crockford — The JSON Saga

via Video: Douglas Crockford — The JSON Saga.

that was fun ;)

But this was late in 2002, we’d just started the War On Terror, and we were going after the evil-doers with the President, and the Vice-President, and I felt like I need to do my part.

[laughter]

So I added one more line to my license, which was: “The Software should be used for Good, not Evil.” I thought I’d done my job. About once a year I’ll get a letter from a crank who says: “I should have a right to use it for evil!”

[laughter]

“I’m not going to use it until you change your license!” Or they’ll write to me and say: “How do I know if it’s evil or not? I don’t think it’s evil, but someone else might think it’s evil, so I’m not going to use it.” Great, it’s working. My license works, I’m stopping the evil doers!

Audience member: If you ask for a separate license, can you use it for evil?

Douglas: That’s an interesting point. Also about once a year, I get a letter from a lawyer, every year a different lawyer, at a company – I don’t want to embarrass the company by saying their name, so I’ll just say their initials – IBM…

[laughter]

…saying that they want to use something I wrote. Because I put this on everything I write, now. They want to use something that I wrote in something that they wrote, and they were pretty sure they weren’t going to use it for evil, but they couldn’t say for sure about their customers. So could I give them a special license for that?

Of course. So I wrote back – this happened literally two weeks ago – “I give permission for IBM, its customers, partners, and minions, to use JSLint for evil.”

[laughter and applause]

And the attorney wrote back and said: “Thanks very much, Douglas!”