Monday, January 19, 2015

Groovy and Grails

The biggest today (19.01.2015) news in the community is probably the announcement regarding Pivotal pulling Groovy/Grails funding. And there are a lot of sad reactions on this in all channels that I have seen.

This might start a panic reaction around Groovy and Grails. IMO, there's nothing to panic about. Groovy and Grails communities are the healthiest and there's a lot of big companies that use Groovy and Grails and who would definitely be willing to sponsor the projects further. I'm pretty sure they all will be in line to get the both projects under their sponsorship just in a few weeks :)

All-in-all, it might even be very good for Groovy since Pivotal didn't seem to leverage Groovy in their ecosystem with the focus on Cloud Foundry offering. So we might even see an acceleration of Groovy/Grails development once the projects get a new sponsor.

GeekOut 2015 Registration is Open!

As of today, the registration to GeekOut Java conference in Tallinn is open!

The focus of the conference is on all-Java but not only. For instance, this year we have talks on Dart and Go programming languages. Other talks cover developer tooling, solution architecture, programming methodologies. There will be a few talks on Java concurrency that you shouldn't miss in case you're into writing multithreaded applications in Java.

And here's what the conference is in numbers:

  • 2 days
  • 400 attendees
  • 18 excellent talks
  • and 1 kick-ass party!

We're also expecting Stephen Chin to visit us with his awesome Nighthacking sessions, so one should expect a lot of fun from the event!

BTW, If you haven't been to Tallinn yet, this is a great reason to consider visiting and June is just perfect month for this travel!

Saturday, January 17, 2015

My "fluffy" reading list for 2015

In 2014 I was kind of reluctant to reading and the queue of my "to read" books has grown immensely. I could probably spend full time reading the books instead of my actual job - it still wouldn't help to clear up the queue. BTW, I keep track of my reading list at Goodreads, that's a nice website!

Why is it a "fluffy" reading list, you'd ask? Because none of the books here are technical. That's a part of my reasoning - if something is not technical, I call it "fluffy". It doesn't mean that it's a bad thing ;) So I though I'd share a few of the "fluffy" books that I'm planning to read next. Maybe someone would see that I'm planning to read a crappy book and can suggest something instead?

The book I'm currently reading is The Inmates are Running the Asylum Oh man! I wish I would have read the book 5 years ago when I just started to work at ZeroTurnaround! I could have saved so much time by now. This is a must read book for every product manager and software designer. Well written, highlights the issues with software from the usability POV.

Next on my list is Crossing the Chasm: Marketing and Selling Disruptive Products to Mainstream Customers. The author shows that in the Technology Adoption Life Cycle there is a vast chasm between the early adopters and the early majority. The challenge is to narrow this chasm and ultimately accelerate adoption across every segment. I've heard good things about the book, so I think I should give it a try. Nice cover, btw :)

How Google Works. I don't even know what to expect. The title is kind of abstract and the potential reader could assume different content depending on how the title is interpreted.

How Google Works is the sum of those experiences distilled into a fun, easy-to-read primer on corporate culture, strategy, talent, decision-making, communication, innovation, and dealing with disruption.

The Goal: A Process of Ongoing Improvement was suggested to my by colleagues. One of the reviewers wrote about this book:

The best process improvement novel I've seen, this classic work explains the all-important Theory of Constraints through real life examples and a surprisingly good story. Most books of this nature are exceptionally unrealistic, but this one manages to keep the reader engaged, which is key for an instructional text like this.

The Connected Company. The title is intriguing :) And good reviews also. I think it's worth reading.

Hooked: How to Build Habit-Forming Products is probably the last "fluffy" book on my immediate reading list. Again - suggested by colleagues. The title implies one very interesting topic for discussion "Why do some products capture widespread attention while others flop?"

Friday, January 16, 2015

Technology predictions for 2015

It is popular to announce predictions for the upcoming year. I though it would be fun to try predicting some stuff too :)

Disclaimer: my predictions are very subjective and are based on my not-so-huge awareness of the IT industry. Feel free to leave your opinions in the comments. So here it comes:

Big Data.

"How big is big?"- one would ask? I leave this question unanswered. But the term "big data" always reminds me of some data set that should be queried/calculated/analyzed etc. The thing is - enterprises are becoming data hungry. Even a small company internally generates huge amounts of data - website visits, emails, sale events, product releases, commits to version control - anything that comes up to your mind. This is all valuable data that can be analysed.

And it is a huge data lake that could be generated by data-intensive companies. Trying to keep the information structured was common just a few years ago - with data warehouse approach. Now we have technology that enables us to process so much data that the retail banking data warehouse would seem a child's play compared to the amounts of data processed today.

Now, where was I? Ah, yes... I you are an engineer and you still haven't learned about Hadoop, Spark, Storm, Kafka, Samza, Typesafe stack, or R, do yourself a favour pic one and start learning it! The demand in the skills for building data processing system backends will be huge in the upcoming year(s).

Want examples? How about Hortonwork's IPO? Startups being created to support Kafka? Or look at the awesome services being created for analytics!

It is just all about data now (it has always been). Business depends on it.

JavaScript and front end.

Business as usual. Every day a new batch of JS frameworks will be appearing. Nothing special. The efforts to make JavaScript better are definitely welcomed, but doesn't it bring some uncertainty - which JS framework would you pick for the new project? Angular? What do you think about Angular 2.0 then? What about Atscript? Dart?

Crazy stuff.. Don't get me wrong - the improvements and the progress are amazing in front-end tech. Compared to the time when I had to do JS coding the current work of front-end engineer is just pure pleasure! The problem that I see here: it is just never stable. Almost any front-end technology that is popular today might easily turn into unmaintainable in a few months. And it doesn't seem to get better, at least from my impressions. And this trend will continue.

JVM languages

Scala continues to grow, Java continues to decline. We will probably see more reports on Kotlin and Ceylon being used in real commercial projects. Despite all the recent efforts that have been done in Nashorn, I have lost my belief into dynamic languages, although Groovy remains my GTD programming language for JVM.


Blah, blah, microservices, blah, blah, blah... The ESB of our time :P

The reality is, there are just a few companies, like Netflix, who would really benefit of microservices approach at a big scale. Others - just use the fancy term - microservice - and isolate some functions of the silo application into a dedicated service. That's it - "so micro, much service". So it's just a SOA reinvented. The community will realize it this year, I hope.


Docker is probably the biggest hype of 2014. Even bigger than 'microservices'. Well, now there's a competing effort - Rocket. I'm almost sure that in 2015 we would see some more challengers in this space - other competitors to Docker. Given the support of big vendors, however, Docker will continue the hype in 2015. I'm still not convinced by the technology though.

Technology marketing

Haha! You didn't see that coming, did you? :) Why technology marketing? Oh, because the most effective sales are not happening during a golf match any more. Even big vendors are now more developer-oriented. Hence marketing. The problem here - developers hate marketing.

But have no fear! Marketing guys are crafty as well - the new ways to deliver the message to developers about some new cool and shiny thing are being invented every day. How? Content. A huge effort is being put into creating content for software developers. Look, Voxxed have just been launched. Why? Answer - marketing.

So in 2015 you can expect even more content being pushed by the vendors related to the technologies I've mentioned above.


OK, I think this is enough of predictions, it was a fun exercise :) Let's see how it turns out in a year.

Wednesday, December 17, 2014

XRebel 1.2

Just released XRebel 1.2. It is amazing, astonishing, splendid, beautiful, awesome, beautiful, beautiful, beautiful! :) I'm most pleased with its ability to show the relation between ORM-level events/queries and the generated SQL queries that are executed via JDBC. Like this:

Or even like this:

The cool part is that even with no special requirements to filtering, the call tree scales very well - the user could see the compact call stack with relevant branching points starting from the incoming HTTP request towards the JDBC calls, or NoSQL... or outgoing HTTP invocations.. even RMI!

/me happy! :)

Saturday, December 6, 2014

Java EE meets Kotlin

Here's an idea - what if one tries implementing Java EE application with Kotlin programming language? So I though a simple example, a servlet with an injected CDI bean, would be sufficient for a start.

Start with a build script:

And the project structure is as follows:

Here comes the servlet:

What's cool about it?

First, it is Kotlin and not Java, and it works with the Java EE APIs - that quite cool! Second, I kind of like the ability to set aliases for the imported classes: import javax.servlet.annotation.WebServlet as web, in the example.

What's ugly about it?

Safe calls everywhere. As we're working with Java APIs, we're forced to use safe calls in Kotlin code. This is kind of ugly.

In Kotlin, the field has to be initialized. So initializing the 'service' field with the null reference creates a "nullable" type. This also forces us to use either the safe call, or the !! operator later in the code.

The attempt to "fix" this by using the constructor parameter instead of the field failed for me, the CDI container could not satisfy the dependency on startup.

Alternatively, we could initialize the field with the instance of HelloService. Then, the container would re-initialize the field with the real CDI proxy and the safe call would not be required.


It is probably too early to say anything for sure, as the demo application is so small. One would definitely need to write much more code to uncover the corner cases. However, some of the outcomes are quite obvious:

  • Using Kotlin in Java web application appears to be quite seamless.
  • The use of Java APIs creates the need for safe calls in Kotlin, which doesn't look very nice.

Thursday, October 30, 2014

Deploying Spring Petclinic demo application to JBoss/WildFly

Spring Petclinic is a very good demo application to experiment with - it is simple enough, yet demonstrates quite a good number of features. Usually I deploy it to Tomcat and obviously don't have any issues with it - it just deploys, runs, and works as expected.

Recently, however, for demonstration purposes, I needed to deploy this application to JBoss (or WildFly). And this is not as straightforward as one might expect.

First I tried with JBossAS 7.1.1.Final. The deployment fails with the following exception:

11:42:38,247 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/petclinic]] (MSC service thread 1-3) Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [spring/business-config.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.JoinColumn.foreignKey()Ljavax/persistence/ForeignKey;
  at [spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]
  at [spring-beans-4.1.1.RELEASE.jar:4.1.1.RELEASE]

The latest Petclinic application (as of October 2014) uses JPA 2.1 and JBoss 7.1.1 bundles JPA 2.0 APIs. So I decided that it should probably work out of the box on WildFly since it comes with JPA 2.1 jars. And it did - the application deployed just fine, but then there's another library that prevents the application from operating properly - Dandelion:

Exception starting filter dandelionFilter: com.github.dandelion.core.DandelionException: The protocol vfs is not supported. 
        at com.github.dandelion.core.utils.ResourceScanner.scanForResourcePaths( [classes:] 
        at com.github.dandelion.core.utils.ResourceScanner.findResourcePaths( [classes:] 
        at com.github.dandelion.core.bundle.loader.spi.AbstractBundleLoader.loadBundles( [dandelion-core-0.10.0.jar:] 

The issue was reported but at the time of writing this post the fix wasn't published yet. So hopefully Dandelion v0.11.0 will be capable to be deployed on WildFly.

So to overcome this and deploy Spring Petclinic (at the state of October 2014) to WildFly 8.1 one would have to get rid of the dependency on Dandelion, and rewrite some of the JSPs not to use Dandelion taglibs. Then the application deploys and works just fine.

So after making all the fixes I got Spring Petclinic running deployed to WildFly and could monitor it with XRebel:

Saturday, September 6, 2014

JCrete 2014

I had a honor to take part of the discussions at the JCrete unconference.

JCrete 2014 - The Hottest Java Conference in the World (literally) from Heinz Kabutz on Vimeo.

Geerjan Wielenga has written a good overview of the event in his blog, and so did Yakov Fain. I'd like to second their opinion on the fact that JCrete is awesome.

The event is invite only, and this makes sure that the crowd that gets together has a very good motivation to collaborate on ideas, discuss various topics - all the attendees contribute to the event, everyone is a speaker!

I have attended many discussions in the official part - at the scheduled sessions. But there was also "unofficial part" - the discussions were happening everywhere: in the car while driving to Falassarna, at the beach after lunch, at the dinner. So the density of useful information and ideas you get at this event is very high!

I have attended the discussions about Gralde, developer tooling, profilers, JIT & JITWatch, Java 8 lambdas, sun.misc.Unsafe, Asciidoctor, hardware performance counters, GC- and lock-free programming, and maybe some more. There's a wiki page that includes notes for the various sessions, contributed by the attendees.

The dates for JCrete 2015 are already announced, so if you like geeky discussions, Mediterranean sea and olive oil - I definitely recommend to attend the event.

Friday, August 22, 2014

MVC in Java EE

Java EE is getting MVC. And the crowd is going wild! :)

I'm actually quite positive about this move, although this came a little too late, in my opinion. Java EE has been criticised for not having MVC support, but it stayed opinionated and sticked with JSF. Apparently, MVC is actually a part of JAX-RS, so to speak. Not in the same spec though, it it will have integration points with JAX-RS. And there's also some sort of MVC support in Jersey already.

It is actually cool that it happened, just surprising that it took so long.

Friday, July 18, 2014

IntelliJ IDEA: Have you tried Search Everywhere yet?

The Search Everywhere action, invoked with double Shift key press, was added in IntelliJ IDEA version 13. I guess, most of the IDEA users/fans know about this feature and are enjoying it. At first glance, it just provides the means for search. You can search "everything": classes, files, symbols, actions, settings, etc. However, Search Everywhere widget is full of easter eggs.

Try using to jump between the search result groups. Or try left arrow to navigate in the history of search entries. But also, depending on the nature of the item that was found, the widget can provide some extra actions, like in the screenshot below: the "Show Navigation Bar" entry has an extra switch - on/off - showing that you can actually invoke this action.

Search Everywhere is a little gem in IntelliJ IDEA and all its features are yet to be discovered ;)

Disqus for Code Impossible