maandag 26 december 2005

JavaPolis: First day of Conference (3/5)

Third day at Javapolis was kind of strange if you ask me.
The keynotes were nothing extraordinary and then we were already halfway the day...

So at 11.30 I went to What's new in NG Mobile Java as this is a bigger market than J2SE/J2EE will ever be. Even though job demand isn't that big here in Belgium for these kind of jobs. Beside the updates to the CDC / MIDP API's one thing caught my attention. JSR-180 which allows you to connect to an SIP proxy from your mobile device. This could turn out interesting, as soon as your mobile can connect to either to a WLAN or via bluetooth to the internet, it could connect to your SIP proxy avoiding the usage of the mobile network (and reducing those pesky bills :) )



Next talk was unanimous: EJB3 by Linda DeMichiel and Mike Keith, the romm was filled to the brim. Although I didn't hear a lot of new things I was still exited about how SUN finally did the right thing (even though they are screwing up JSF). So after lunch most of the crowd still exited about EJB3 wend to Seam. That seems to integrate EJB3 and JSF. Oh my... even though expectations were set at the beginning of the presentation regarding 'fix for back button' and '2 windows to the same webapp' the end of the presentation was undermined <<completely>> by the lack of knowledge of either the English language or Http Sessions. I hope it was the first. When people asked how they'd fixed the "2 open windows" problem Thomas answered 'we handle it on the server side, with cookies'. Well, sorry, at that time I wasn't the only one leaving the presentation.



One thing I was really looking forward too was the presentations by Brian Goetz about Concurrency Utilities and the Memory Model in JDK1.5.
Among others he talked about :


  • Executors: objects that define how, when and how many concurrent Runnable tasks will be executed. Even though one may think this is trivial, it's nice that SUN made a couple of default implementations like ScheduledThreadPoolExecutor and ThreadPoolExecutor.

  • ConcurrentHashMap which allows concurrent access to a Map without throwing the notorious ConcurrentModificationException as it doesn't block concurrent access, but does impose some restrictions on modifications in terms of concurrent threads

  • Condition / Lock in order to keep your code somehow cleaner than with the wait/notify. Like this rip from the javadoc clearly shows,

    class BoundedBuffer {
    final Lock lock = new ReentrantLock();
    final Condition notFull = lock.newCondition();
    final Condition notEmpty = lock.newCondition();

    final Object[] items = new Object[100];
    int putptr, takeptr, count;

    public void put(Object x) throws InterruptedException {
    lock.lock();
    try {
    while (count == items.length)
    notFull.await();
    items[putptr] = x;
    if (++putptr == items.length) putptr = 0;
    ++count;
    notEmpty.signal();
    } finally {
    lock.unlock();
    }
    }

    public Object take() throws InterruptedException {
    lock.lock();
    try {
    while (count == 0)
    notEmpty.await();
    Object x = items[takeptr];
    if (++takeptr == items.length) takeptr = 0;
    --count;
    notFull.signal();
    return x;
    } finally {
    lock.unlock();
    }
    }
    }





About the talk of the Java Memory Model I remembered that one have to be extremely careful with assuming stuff in java. The compiler can do stuff you didn't think of initially
For example who would think that


while(!asleep)
   sheep++;

could turn by the compiler into something like

if(!asleep)
   while(true)
      sheep++;

Keeps me up at night :)

zaterdag 24 december 2005

Javapolis Day 2 - Spring 2.0 & Agile Development

Title says it all


  • Spring Business tier gave me quite a surprise as finally we can create those dreaded XML files by the use of schema's so validation won't have to be done at runtime anymore. Also something like custom tags will be in the next version of spring allowing some commonly classes to be used without the FQ package name. Among others, tags for properties and transactions.Can't wait to get my hands on this release...


  • The afternoon I didn't know what to choose at first. OK Spring Web and Ajax were kinda appealing, but since it was more of the same, I decided to listen to Scott W. Ambler on Agile Model Driven Development. Not with much hope as at that time I didn't know he was such a big shot. He did mention some pain points in development. Like traditional development cycles taking too long and losing touch with customer and requirements. Or how to handle burocratic managers requiring an overload of documentation.


    He also made the case against requirements up front. As most customers will then try to come up with as much requirements as they can think of at the time loosing touch with the actual requirements. Hence applications can be made were two thirds of the functionalities aren't used at all, causing these projects to go over-time and budget. We should therefor allow our customers to change their minds.


    However, most of the customers expect projects to go over-time and budget, so they endorse fixed-price projects. This forces us then back to the old style where we need the requirements back up front since otherwise we can't make our estimates about the application. sigh...




vrijdag 23 december 2005

Old Year's Photos

Reuters Year in Photos

MSNBC



Thunderstorm




Israel: Settler pleads to stay in Gaza




War in Iraq: Honoring a fallen father

Javapolis 1/5

OK I admit, probably way late to write something about Javapolis which I attended last week. But well, since then I had so much new things to discover that I decided that it's better to be burried under work than to appear alive :).
I'll split this up in seperate days so you don't have to read it as one big chunk.

But first a picture...



If you're looking for me (for some strange and obscene reason) I'm way off to the right and probably fell of the picture.


Ok first day, since it was university one 2 speakers a day, which made it kinda interesting as when you made your pick it was for half a day. My choices the first day were Apache MyFaces and Using the EJB 3.0 Reference Implementation. Although I have to admit that I was tempted to go to Desktop Java In Action by Romain Guy from Sun Microsystems. But since I'm a frequent reader of his blog, I thought go for something you know less about.





  • MyFaces by Jonas Jacobi,Martin Marinschek and John Fallows: I've been using JSF to do the SCEA assignment last year and I found it a bit limited and full of quircks. But since a year has passed and things tend to change I wanted to see how things hopefully improved. Event though I didn't see any actual improvements (but more on that later), the announcement & demo (and actually rest of the talk) was made by Oracle that was going to open source it's ADF component suite.
    I've been looking to this and found it quite impressive but I've avoided it like the plague since I didn't want to be locked in. But now...
    This announcement was made in the MyFaces talk because of its future name MyFaces Cherokee although I haven't been able to find it on the incubator site of apache, it should be there next year (2006).


  • Using the EJB3.0 RI seemed to appeal to me as Sun finally understood that developers don't just take anything (like the M$ guys from technet sometimes seems to think) although when you look at JSF...
    Anyway, when you look at EJB3 the JSR members really seem to have done their homework. Finally no more blunted XML files (that everyone created through XDoclet anyway), simple POJO's, even the cmp's. Ahhh, what a relief to see that the most common options are now defaulted in the annotations (yes, java5 is required). Anyway the talk was really good filled with lot's of examples. Mike Keith really explained the persistence part very well. Things like the difference between EntityManagers and persistence contexts and how you can do queries now in EJB3. (Dynamic and static ones). As soon as can get my hands on this one, more of this





woensdag 2 november 2005

Combining the best of breed

Nice tutorial on how to integrate Lucene with spring and hibernate.

Flock

Just encountered a firefox fork that enhances the browsing experience even more that firefox does. (Didn't think this was possible) It easily integrates Flickr and Deli.cio.us. Great just what I've been looking for.

vrijdag 14 oktober 2005

Python assimilated

Just as I was getting into python, I've hear that Microsoft is releasing IronPython as well.
This may not have come as a surprise since Microsoft had hired the guy who started Python, but history repeats itself!

woensdag 21 september 2005

QRCode

Finally something really innovative in the world of cellphones. Like an FM-tuner or an mp3 player, a digital camera on a cellphone didn't make sense to me besides the generation of traffic for youngsters. That was until now. If combined with something called QRCode which is a 2D barcode easely recognised by software (don't know yet how easy) it could allow people to have an easy lookup information on the net.



The people at semapedia.org allow people to generate such a QRCode with the url to whatever (they take wikipedia, but it's non specific) that they can print out and put it onto/next to an item. This way if you encounter something which you don't know what it is (but like to find out), just scan it with your cellphone and see what page it brings you.


I'm pretty sure those spam-criminals will find some use in this pretty soon...

vrijdag 26 augustus 2005

Wicket vs. Tapestry4

Last couple of days I've been tossed between Tapestry 4b3 and Wicket 1.1b3. Both of which integration with Spring is quite problematic.


Things I like about Tapestry(4):

       
  • Full control over pages/components

  •    
  • Once Spring is integrated, full IOC is possible.

  •    
  • Nice components available (eg. Tacos)


Things I don't like about Tapestry:

       
  • Quite a lot of dependencies (Here less is beter)

  •    
  • Hivemind.. (way to beta to do some actual work). Try integrating it with hibernate for example..

  •    
  • Directory structure. HTML pages fload around in the classpath without the possibility to have them



But comparing them with Wicket...

Good things:

       
  • Strong typed

  •    
  • Real components (class+html) possible (just drag a jar in the lib folder)

  •    
  • Good I18n possibilities

  •    
  • Good templating possibilities (both HTML and class)

  •    
  • very few dependencies

  •    
  • Spring can be integrated by encapsulating it in the Application class


Things I don't like about Wicket

       
  • Everything needs to be defined in java, no pull possible

  •    
  • Getting the HTML right is hell, tags aren't replaced they are filled

  •    
  • Components require the right tags

  •    
  • No real IOC

vrijdag 5 augustus 2005

Israeli technology

I just found a whole lot of interesting new technology articles on the Isracast site. Really quite interesting. Some samples:

  • PEN-LIKE INSTRUMENT WILL SNIFF OUT EXPLOSIVES

  • ISRAELI COMPANY DRIVES THE LARGEST SOLAR PLANT IN THE WORLD

  • LIKE A FISH - REVOLUTIONARY UNDERWATER BREATHING SYSTEM

  • CELL PHONE RADIATION MAY CAUSE VISUAL DAMAGE

woensdag 3 augustus 2005

Boycott IE7

Paul Thurrott, a journalist that usually writes about all things windows related (and sometimes about Apple affairs too), made a call in a recent article to boycott Internet Explorer, due to Microsoft's approach (continued in IE7) of not supporting web standards

It's a cancer on the Web that must be stopped. IE isn't secure and isn't standards-compliant, which makes it unworkable both for end users and Web content creators. Because of their user bases, however, Web developers are hamstrung into developing for IE at the expense of established standards that work well in all other browsers. You can turn the tide by demanding more from Microsoft and by using a better alternative Web browser. I recommend and use Mozilla Firefox, but Apple Safari (Macintosh only) and Opera 8 are both worth considering as well.


Read the complete article

maandag 1 augustus 2005

Stupid servlet problems

Been chasing my tail here for half an hour. Got a 404 when trying to format an EDI message through my EdiFormatter application which helps me reading those formats. No matter what I did it gave me a 404 till I tried it locally and saw it couldn't find the class. Ahhrrrr.....changed package but forgot to update the web.xml. Ok well, if you've searched long enough for a stupid problem then you'll figure them out easier and faster next time you'll encounter them.

vrijdag 15 juli 2005

Passed SCEA

Yesterday I've finally gotten the result back from the final (3rd) part of my SCEA (Sun Certified Enterprise Architect) exam. And the results of the sun jury are .... passed with 90% Yahoo


Split down results are

  • Class Diagram 44/44

  • Component Diagram 34/44

  • Sequence Diagrams 12/12



The result on the Component diagram was kind of expected as there's a number of ways to organise these (by tier, by package,...) since there's no one way of doing it I guess there's where I lost points.
But well I'm happy, petty however that you don't receive any feedback on the test, like this is how you should do it. But well if you come to think of it, that the same way when we were in school. I hated that system then already. Ok you've done the exam, but the actual purpuse is to LEARN something. By doing the exam, they only TEST you've learned something.
Maybe they've should have something like a detailed evaluation, but by then the money is already payed so I guess it doesn't matter for them anyway.


donderdag 7 juli 2005

VRT doing PODCasting

Through the Wouter.net Blog I heard that VRT is doing PODCasting. Hmm seems kinda strange with music industry trying to ban downloaded mp3's from the internet. Of course you could just as well tape it and encode it. But to actually make it public... Well at least they have the rights to broadcast music. So it must be legal.

In any case here's the podCast url for De Afrekening

Here you can find the url to other podCasts from the VRT

woensdag 15 juni 2005

[Dutch] Te gekke opnamen...

Lelystad

En nog eentje om het af te leren...

Middelvinger

donderdag 9 juni 2005

Working on patio

Been working with my father on the patio last 2 days... Hard work, almost halfway... We're getting there..


zondag 10 april 2005

A whole new meaning to VOIP ....

Besides installing and trying out Ubuntu last couple of days' for the interested ones docs can be found here) I just read an article on slashdot where it appears that they've found something to know what you're about to say. What they appear to be doing is put some chip on the back of your neck. Finally some privacy for those mobile calls or even VOIP calls... Read here all about it

dinsdag 5 april 2005

maandag 21 maart 2005

To open source or not too open source

Quite often I encounter a (java) project and while using it I download the source to see how it does things. When looking into the source I often see usage of things like jakarta-oro, xerces, xalan, jdom, dom4j to name a few. As the current jdk1.5 contains an xml parser/xsl transformer/regex I often see myself getting rid of these dependencies as the native JDK ones are much faster. Only problem is, when I talk to the people developing it, they either don't answer at all (ok an old project) or they don't like the license of it (GPL or LGPL). The latter I can understand (well kinda) but the first put's me in some kind of dillema as it would be so much nicer to put an updated version back online to allow other people to use it. But since I'm not a lawyer and don't intend of becoming one, I'm kind of reluctant too.


So maybe someone has some other ideas regarding this.

Long live courier

Phew, turned kind of hot yesterday as I was upgrading my mail server (Courier .47 to .49). After a recursive configure and make, things got messy when I started to optimise permissions (and hence increasing security). Issues I've encountered so far:

       
  • Public folders need the sticky bit, otherwise it's difficult to keep track who's done what.

  •    
  • Personal folders can remain under 1 account provided they have permissions 0700.(so no sticky bit there)

  •    
  • If you've tried your own email account long enough bashing it to pieces, Courier marks it as Temporarely Unavailable. Only thing to do then is just go into /var/track/ and remove your account in there.

  •    
  • The file respawnlo, can be modified to restart once every x days (finally found that)

  •    
  • maildirshared contains the public folders for everybody



besides those discoveries, I've never had a mailserver that good. I've tried qmail/courier-imap and sendmail/wu-imap and hopefully I don't start a religeous war here but much too difficult to install and to administer.

maandag 7 maart 2005

Pretty outrageous

Although I normally don't post anything even remotely related to politics in here, I couldn't resist now.
Check this out:

Nice DHTML calendar

can be found here.

vrijdag 4 maart 2005

Labels

Never been much of a spec guys anyway. But this is kind of neat.

the Html tag "label" allows you to use a larger region to select checkboxes or radiobuttons. How?


Try out a couple of check boxes:

Without a label



To operate the first check box you have to check on that little box. To use the second all you have to do is click on the text that applies to it. A much
larger target and much easier to use. And of course they are not just
for check boxes, but everything (radio buttons, text fields / areas,
drop downs, select boxes, ...)

maandag 31 januari 2005

How automotic proxy discovery works...

Always found it intriguing how browsers have this new feature called Auto-detect proxy settings for this network. Now I just found how easy it actually is to implement.




The only thing you have to do is:

  • add an A record called wpad and let it point to a webserver running on port 80

  • On the root of that webserver you locate a file that contains actually the same thing as the well-known proxy.pac file.


That's it. Your network is configured!!

maandag 24 januari 2005

Continuous Integration in motion

If you want to see what continuous integration is all about check this out

vrijdag 21 januari 2005

Person Looks

Just found a site where you can simulate how you will look like if you were a old person.
Nice to see how babies and young children will turn out.


Just tried it with my nephew to see what it gives below the
output. In my opinion besides the fact that he looks like he's been
playing in the mud the whole day, it could very well be like this.
It's actually quite easy just upload a picture mention where the eyes and mounth are and there you go.


If you want to try for yourself

donderdag 20 januari 2005

Why George Bush isn't always as dumb as it seems

Here's why

Some nice tools

Over the last days I've found a couple of nice things :

  • Picasa2: a nice image viewer/editor (from Google) that allows you to quickly fix organise your photos. One minor thing is that they require you to export your photos when you actually want to save them. Positive points are that its freeware and doesn't contain any spyware.

  • Javascript session timeout preventer : (Can always come in handy)

    <script>

    function expireSession()

    {

    window.location = "index.jsp";

    }

    setTimeout('expireSession()', <%= request.getSession().getMaxInactiveInterval() * 1000 %>);

    </script>



  • Google ignoring spam put onto a weblog. Since lots of spammers now use blogs to get their website higher in the ranking of Google (number of links you know), Google now announce a good initiative to ignore these kinds of links. Provided that the blog engines add an attribute (rel="nofollow") that actually informs the search engine to ignore that link altogether. Now eat this spammer!!

vrijdag 7 januari 2005

Google Images over the years

Just found a linkregarding the images Google uses over the years when (inter)national events occur.

Here it is

dinsdag 4 januari 2005

Nice Quote

“I love my friends and family. I hate their computers.”

[found on 7seconden.be]

JSF vs. Tapestry

While doing the assignment for the architect exam (SCEA) I'm taking, I was challenged to try out the new JSF web framework.
While doing the first screen everything went amazing, editboxes mapping to a string in a 'managed bean' worked like a charm.


But then the fun only had to start, checkboxes...


One of the more commenly used controls on a webpage is without a doubt a checkbox/radiobutton. When you have to map a collection onto a some checkboxes to make a selection, you have to have make a subclass of your original class of your businessmodel in order to let the facesServlet set the item as being selected. Needless to say is that this kind of plumbing annoys developers to the full extend, since it requires having n more classes (n being the number of business model classes).

If you compare this to tapestry, you enter a complete new ballgame. Tapestry allows developers to iterate over a collection and set the instance of the current iteration in the backing bean. The isSelected property of the backing bean can use this item and remove it from the collection of move it to a collection of selected items. This is a huge advantage if you ask me. The number of lines needed to implement it is really limited to the max. Furthermore, once you get used to this twist of mind, you get to use it for other items too.


Second serious malpractice of JSF is the use of Lists!!!, yes java.util.List instead of generic java.util.Collection. Meaning if you use a Set in your domain model, you have to convert it into List in order to be useful into JSF. Here goes the plumber again.....BTW, you can use arrays, but unless you have a good reason, I wouldn't use them in a serious model.

Comparing it to the great product Tapesty is, quite simply it allows arrays/collections AND iterators...what can I say more.




Voila, so far my humble experience with both products. Most probably I won't have to tell you which product I'll choose If given the opportunity to choose one out of 2. If both problems could be solved JSF could be nice, certainly if you take the renderkits into account, since this could be the killer item for JSF. Renderkits would allow you to create an application for the web and use the same application on a linux console via a telnet renderkit;..
Mmmmm, wouldn't that be nice..

zaterdag 1 januari 2005

Happy NewYear!!


Been sick like a dog yesterday (seems to be some kind of bug that goes around every year). Of course you couldn't wish for a better day, well hopefully the new year is better.
Happy New Year and a good health to all of you.