Saturday, January 10, 2015

το τέλος της φιλελεύθερης ελπίδας μου.

Όπως όλοι οι Έλληνες λίγο πολυ, έτσι κι εγώ ειχα και έχω τις δικές μου πολιτικές εμμονές και ελπίδες. Με αυτές τις εκλογές, αυτή την εποχή, για μένα προσωπικά τελειώνει το κεφάλαιο της ελπίδας σε ότι εχει να κάνει με πράγματα που θα ήθελα να δω εγώ στην χώρα μου και στην διακυβέρνηση της.

Δηλάδη λιγότερο κράτος,μικρότερο, δικαιότερο και αποτελεσματικότερο φορολογικό συστημα, λιγότερη κρατικοδίαιτη επιχειρηματικότητα, λιγότερες κρατικοδίαιτες τράπεζες, αποτελεσματικότερο εκπαιδευτικό συστημα, παιδεία πιο κοντά στις ανάγκες της αγοράς, κράτος που να ευνοοεί την ελευθερη αγορά και όχι μονο τα δικά του παιδιά στην και καλά ελευθερη αγορά, αξιόπιστη δικαιοσύνη και όχι συνδεδεμένη με το πολιτικό συστημα, λιγότερους βουλευετές, λιγότερες υπηρεσίες και συμβουλια. 

Νόμιζα ότι υπήρχαν έστω και λίγες φωνές σε κάποια από τα φιλελευθερα πολιτικά σχήματα των τελευταίων ετών, τους ψήφιζα επί χρόνια, ημουν λάθος. 

Με τις τελευταίες εξελίξεις, για μένα τελειώνει το ανέκδοτο (νόμιζα ότι ηταν ελπίδα) ότι μπορεί να υπάρχουν εκεί έξω φιλελευθερα σχήματα που μπορούν να με εκπροσωπίσουν. Λυπάμαι αλλά η Ελλάδα και ο Ελληνικός λαός δεν θέλει και δεν ονειρευεται τίποτα άλλο από τα μέτρια (κατ' ουσια) χρόνια του ΠΑΣΟΚ του 80 της ΝΔ του 2004 κτλ. Δηλαδή τα δικά μας δικάς μας, τα δικά σας δικα μας, ολοι βολεμένοι ολοι ευχαριστημένοι το κράτος μπουρδέλο. Δεξιοί, αριστεροί, κεντρο σε αυτό τον τόπο είναι απλά φιλόσοφοι φανφαρες, όλοι το ιδιο πρεσβευουν την γυφτιά και το καλο της τσέπης τους και των φίλων τους, αρκεί να καθίσουν στον φτηνό iron throne της εξουσίας σε ένα μικρό κράτος 10 εκατ, το οποίο εχει πτωχεύσει δεκαετίες τώρα.

Monday, November 17, 2014

Do you really want to speed up your Maven compile/packaging? Then takari lifecycle plugin is the answer. #maven #mvn #takari

Like many of you out there, I am working with a multi module Maven project. It is not a huge one comparing to many systems out there, it has 15 modules, with 3 different ear deployments, lots of parametrization with property files and around 100K lines of Java code. During peak development times, the code is heavily refactored, due it's legacy origins and so the need for continuous compiling/packaging and deployment, for every developer. 

Despite the steep learning curve all these years I have embraced Maven and it's philosophy. I am not saying that is perfect, but I truly believe that is a good tool, still relevant, especially while your project and team grows as you grow your project. (This post is not about Maven evangelism though). 

So, one of the problems we had on our team is that, despite switching the right flags, breaking and packaging our code into modules, using profiles and all the 'tools' maven provides, our build and packaging time was  slowly starting to increase, hitting the 1 minute threshold after a complete clean. Our main compiler was Sun/Oracle Javac and the time was monitored through packaging from the command line and not  through the IDE, where you can see different times depending on the 'Maven Integration' and internal compiler invoked by each tool. [My reference machine is my good old MacBookPro 2009, Core 2 Duo 2.5, with an Vertex 3 SSD (trim enabled)]

Recently while I was browsing Jason Van Zyl's (the father of Maven)  twitter account I discovered  the takari lifecycle plugin. Jason and his team are creating tools and plugins for the Maven ecosystem, that I hope to  bring  the much anticipated evolution  on the Maven ecosystem that the community of Maven seeks for a many years now. 

To cut a long story short, the takari lifecycle plugin, is an alternative Maven lifecycle implementation, that covers 5 different plugins into one. Once you activate it, it will take over, and invoke it's own implementation of the following 5  
  • resources plugin
  • compiler plugin
  • jar plugin
  • install plugin
  • deploy plugin
You can read about it here. The great thing at least in my case was the compiler plugin, that internally implements a incremental compilation strategy based on a mechanism that can detect changes on source files and resources!!

In order to understand the difference, when using the takari compiler plugin on your maven build compared with the classic compiler plugin and javac (which most probably many of you use), I am going to share a table from this blog post (explaining incremental compilation).

It is far more obvious that if you choose to invoke JDT instead of Javac, the results are going to be even better. Currently we stick with Javac, but the above diagram made me change the default compiler on my IntelliJ IDE, especially when I do refactoring and changes all around, JDT was anyway far better on incremental compilation comparing to Javac.

How to add takari to my build? Is it safe

Well in my case (and I guess for many of you out there), I just followed the proposed way here. I activated the plugin in my parent pom and then changed the packaging type for all my jar modules, into 'takari-jar'. 

  takari-jar

This is not, eventually the change is so easy that you can revert it back.

 The day that I pushed the takari lifecycle change on our git repo, after half an hour I started hearing 'wowss' and 'yeees' from my team members. Repated packaging on changes is very very cheap, changes on resources files and properties ensure that we will get a fresh package when needed. Our repacking times dropped to more than 50%-60%.

If you happen to have the same issues with your Maven build, I trully encourage you to try takari for a day - it will same you and your team some serious time.

I also want to note, that takari is free and despite the fact that is evolved and updated by the takari team for an unnamed 'big' client, the team is free to give it away for free and share it with the community. So thank you very much for this!!!The plugin is can be found on maven central.

The takari team is doing a weekly google hangout, information can be found here, I want to apologize that I have not managed yet to attend one, maybe soon enough.

So go Maven! go Takari!

Thursday, August 28, 2014

Problems with CDI in Websphere 8.5.5 during startup? the hidden solution... #websphere #ibm

This is not something I invented or discovered on my own, with this post I just want to raise the awareness of this 'major' missing point IMHO in standard Websphere 8.5.5 configuration (and it's fix) and post about it, so it can be indexed and people can find the solution easily, rather than spend countless hours trying to find why their code does not work!!!

Thanks to this IBM forum post, and the user bpaskin who actually spotted the solution in one of the many fixes on Websphere 8.5.5 update releases.(so yes make sure you follow the release fixes)

To cut a long story short, if you are developing towards Websphere 8.5.5 (or 8)  and you have resources like Startup EJB's or startup Servlet listeners and these resources are making use of CDI beans, then you will most probably have problems. Assuming that your deployable archive configuration and the classloading order of your deployed application is correct, make sure to edit your Webpshere's JVM settings and add the following.

Go to Application Application servers > serverX > Process definition > Java Virtual Machine >  
Custom properties and Add
Name: com.ibm.ws.cdi.immediate.ejb.start
Value: true

This will actually initialize the CDI engine soon enough so that CDI functionality is eventually available during startup!

IMHO again, this behavior should become standard when creating a new server /profile rather than making the application server admin, change it.