Thursday, November 21, 2013

Software: To eat and get eaten…

FoodChain

It has been declared:

Software is eating the world!

 

But lately it seems like:

Management is eating software development!

(Or at least it's sucking out all the innovation and creativity which used to be a major part in software development)

 

Some public indications of this trend are:


Is this a bad thing or is it just a sign that the software industry is growing up? Does this boil down to the old question whether software development is craftsmanship or manufacturing?


Tuesday, November 12, 2013

Quotes of the Week: Meetings

Meetings are toxic: They usually convey an abysmally small amount of information per minute.
What exactly is wrong with meetings and managers (or M&Ms, as we call them)? Well there is nothing intrinsically wrong with them. What's wrong is how often they're applied in office situations.
If you are in a room with five people for an hour, it's a five-hour meeting.
Meetings procreate: One meeting leads to another meeting leads to another...
By rationing in-person meetings, their stature is elevated to that of a rare treat.
We lead people not machines, we embrace spending more time with our team than in meetings.

Meetings
Meeting

Last but not least: Never forget to run the awesome Meeting-Ticker…

Tuesday, October 22, 2013

Bookreview: Instant Vert.x

2913OS Last Year at the SBB Developer Day I was presenting a talk about Vert.x: asynchronous event-driven web-applications on the JVM.

Vert.x is a very interesting project that brings some fresh concepts to the JVM platform. At first glance Vert.x looks like a Node.js clone for the JVM. But there are differences: Vert.x can not (yet) offer the gigantic ecosystem of modules of Node.js, but it is certainly attractive for bringing a "Node.js-like" programming model to the proven and scalable JVM platform. With its distributed event bus and the concept of "worker verticles" Vert.x offers concepts that go beyond Node.js.

Packt Publishing sent me the Book "Instant Vert.x" for review.

Instant Vert.x is a short book (54 pages). As the name suggests, you can read it in "an instant" and it gets you bootstrapped into the world of Vert.x.

I liked the style of the book: it is short and concise and after reading it, you have a good overview over Vert.x as an application platform and the programming model that comes along with Vert.x.

However I have to note that the Vert.x project has a very nice online documentation. In my opinion the book goes not beyond the information that is also available online.

The advantage of the book is, that it structures the information in an easily digestible way that you can read in chunks offline. However I would have hoped for more "in-depth" information or some "best practices" how to use Vert.x in real projects.

If you have never heard of Vert.x, I can fully recommend "Instant Vert.x". If you have already played with Vert.x the book is probably not for you.

Thursday, October 10, 2013

Myco 1.1.0 for iPhone

Icon170x170

This week I released Myco 1.1.0 for the iPhone.

So far the App was more successful than we expected: In the last three months we had about 30'000 downloads of which about 5% were paid versions.

In the latest version we updated the library content. We have now 229 mushrooms in the library and we added two new classification attributes: 'edibility' and 'spore print'.

 

Edibility and Spore print

 

As a new feature we added a quiz that allows you to learn to identify mushrooms in a playful way:

IOS Simulator Screen shot Jul 13 2013 1 29 02 AMIOS Simulator Screen shot Jul 13 2013 1 29 15 AM

This will be the last version for iOS6 the next version will support iOS7 only.

The Windows Phone edition of Myco supports the same features. Please tell us which additional features you would like to see in the future.

Tuesday, September 17, 2013

Paradise Lost: SAFe banned from the Agile Heaven?

Pl

The Scaled Agile Framework (SAFe) recently seems to have fallen from grace in the agile community.

Most of us noticed that something went wrong with Agile. The Scaled Agile Framework now gets stigmatized into the role of the traitor of the True Agile Mindset™, it serves as the negative showcase how the original Agile ideas are corrupted by The Enterprise.

I almost get the impression that nowadays every Agile guru has to pick on SAFe, to prove that he stays truly Agile:

 

The boys from RUP (Rational Unified Process) are back […] They would be at a waterfall conference, but they are no longer.

A core premise of agile is that the people doing the work are the people who can best figure out how to do it. The job of management is to do anything to help them do so, not suffocate them with SAFe.

 

This seems awfully similar to Rational Unified Process (RUP) from the 1990s but updated to include Agile practices from the 2000s

 [The SAFe] approach is the antithesis of the Kanban Method!

 

I did not encounter a single person who had successfully implemented SAFE.

Someone just shot the Agile brand in the back of the head.

 

This means that we are back to the good old days where there was a chasm between product management and development rather than working hand-in-hand as it is intended in Scrum.

Teams are not allowed to self-organize their alignment and predictability is the goal rather than maximization of value

SAFe accepts the status quo in many enterprises and distinguishes between Product Owner and Product Management. [] This does not help collaboration but is a tayloristic division-of-labor approach.

People don’t have to change with SAFe – they can just go on as they always did and call themselves Agile now.

SAFe believes that the world is good as it is [...] so the status quo has to be accommodated. Agile believes that the world is not a good place (at least for people working in software development) and should be improved. The status quo – especially the tayloristic thinking - has to be changed. This doesn’t fit together. SAFe isn’t Agile.

 

Update 2014-03-03:

SAFe wraps those ideas [of Lean and Agile] in a package that is designed — intentionally in my opinion — to appeal to today’s managers and executives who do not understand Agile, but who know they have a problem to which Agile may be the solution.
If everyone in the organization were to read the fine print in SAFe, then the organization might very slowly evolve to the level of effectiveness that real Agile provides. That’s not going to happen. Managers and executives are too busy to read the fine print. They are too busy doing their job to study how to do their job. They will too easily fall into old patterns of management behavior, and when they do, SAFe will be installed in a fashion that won’t just fail to support Agile, but that will suppress it.

 SAFe assumes that you need a big “solution” and then provides it. More than likely you don’t need a big solution. 

Saturday, September 14, 2013

/ch/open Workshop Tage: JavaScript Bootcamp for Java Developers

Last week Marc and I held a workshop at the /ch/open Workshoptage:

JavaScript for Real Developers: A Survival-Bootcamp

JSWS

 

The goal of the full-day workshop was to give typical Java enterprise developers an overview over the current landscape and ecosystem of JavaScript development. Typical undifferentiated prejudices that exist towards JavaScript should be refuted (or confirmed with facts).

The topic we focused on were:

  • JavaScript as a language (concepts, patterns, parallels to other OO languages …)
  • jQuery as a de-facto standard library for client-side JavaScript development
  • The JavaScript toolchain (setting up a professional development and build toolchain)
  • Integration of a JavaScript project into a Java project (using Maven and/or Node.js)
  • Modern Web Architectures (JavaScript for the frontend, Java for the backend)
  • Client Side MVC

The exercises and demos can be found in our Github repository.

I had the idea for this workshop some time ago, when I was working in several enterprise web projects, and I realised that JavaScript is getting more and more important for any kind of (web) projects, but typical enterprise developers (like me) try to avoid the topic at any price. Usually all abstractions (like JSF or GWT) break at some point and JavaScript leaks through. But then it is mostly too late to start dealing with JavaScript professionally, because the project has already progressed into a phase where it's not possible to lay the necessary groundwork for serious JavaScript development. 

The workshop seemed to hit a nerve in the current Java enterprise community: It was fully booked within a few days after the program for the workshop days was published (because there are hands-on exercises in the workshop, we limited the maximal number of attendees to 20).

Thanks to the organisers of the workshop days, we could schedule the workshop a second time at the same workshop days. Also this second workshop was booked out within several days.

I enjoyed the two days of teaching very much and working with Marc was great fun. From both workshops we also got quite good feedback (the official feedback is published here), so we guess that it was also a good experience for the attendees.

I hope there will be the possibility to repeat the workshops in the future. We are open for any suggestions...

Wednesday, August 21, 2013

JBoss Remote EJB Invocation: An Unexpected Journey

Complexity sign6

The amount of complexity I'm willing to tolerate is proportional to the size of the problem being solved. There will come a point where the accumulated complexity of our existing systems is greater than the complexity of creating a new one.

- Ryan Dahl on Software

Es könnte alles so einfach sein, ist es aber nicht.

- Die Fantastischen Vier

 

Getting EJB Remoting to work in JBoss 7 was probably the most pitfall-ridden path I have travelled so far on my journeys through the swamp of frameworks…

Note: The example and discussion in this post is based on JBoss EAP 6.1.

It all started out well with a simple quick-start: ejb-remote.

But the pitfalls lured …

TL;DR: Finally I got an illustrative example running, which will be the base for the following discussion. The example can be found on my Github repo.

The EJB is simple: [Gist]

It's in the client where we find the pitfalls: [Gist]

 

Let's discuss the pitfalls:

Pitfall 1: Determining the JNDI-name for the EJB lookup

When you deploy the EJB into JBoss you get a nice output in the server-log:

[0m23:18:42,226 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-12) JNDI bindings for session bean named HelloWorldBean in deployment unit subdeployment "ejbremote-ejb.jar" of deployment "ejbremote-ear.ear" are as follows:
 
	java:global/ejbremote-ear/ejbremote-ejb/HelloWorldBean!net.jonasbandi.ejbremote.server.HelloWorld
	java:app/ejbremote-ejb/HelloWorldBean!net.jonasbandi.ejbremote.server.HelloWorld
	java:module/HelloWorldBean!net.jonasbandi.ejbremote.server.HelloWorld
	java:jboss/exported/ejbremote-ear/ejbremote-ejb/HelloWorldBean!net.jonasbandi.ejbremote.server.HelloWorld
	java:global/ejbremote-ear/ejbremote-ejb/HelloWorldBean
	java:app/ejbremote-ejb/HelloWorldBean
	java:module/HelloWorldBean

It looks easy … but actually none of those JNDI bindings work for remote lookup!

 

Pitfall 2: There are two approaches for accessing a remote EJB

You can use the "standard" JNDI lookup (which uses the "remote-naming project") or the the (proprietary) EJB Client API. Both approaches differ in the initialisation properties (key-value pairs) that have to be configured and in the JNDI lookup name that must be used for a given bean.

The EJB Client API is recommended. Loadbalancing, clustering and client interceptors are only available with the EJB Client API. Also it is performance optimised. [see here]

Pitfall 3: The initialisation properties are cryptic

I do not understand the following properties (except that they all have something to do with client, context and naming):

jndiProperties.put("jboss.naming.client.ejb.context", true);
ejbProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
ejbProperties.put("org.jboss.ejb.client.scoped.context", "true");

Yet you have to use the correct ones for the correct lookup approach, else it won't work…
There are also a lot of other properties floating around in different documentations, wikis, forums and JIRA issues … I did not find a authoritative documentation about them.

Pitfall 4: Use the correct runtime dependencies

Runtime dependencies are tricky. You can get you code compiling, but it will not work unless you have the correct runtime dependencies configure. Getting the EJB client API running, you need:

      <dependency>
           <groupId>org.jboss</groupId>
           <artifactId>jboss-ejb-client</artifactId>
           <scope>runtime</scope>
       </dependency>

Getting the "standard" JNDI lookup running (including JNDI tree traversal) you need:

       <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>jboss-remote-naming</artifactId>
            <scope>runtime</scope>
        </dependency>

In both cases you need some more runtime dependencies which are listed in the client pom.xml of the example.

 

Pitfall 5: Error messages are mostly not helpful or even misleading

Example 1: If you configure the wrong version of the ejb-client dependency like:

       <dependency>
           <groupId>org.jboss</groupId>
           <artifactId>jboss-ejb-client</artifactId>
           <scope>runtime</scope>
           <version>1.0.5.Final</version>
       </dependency>

Then you get an exception that makes you beleave you have made a mistake somewhere in the security-configuration:

javax.ejb.EJBAccessException: JBAS014502: Invocation on method: [] is not allowed


Example 2: If you pass a number instead of a string for the port configuration like this:

ejbProperties.put("remote.connection.1.port", 4447);

Then you get the same exception as when you use a wrong JNDI lookup name:

java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:ejbremote-ear, moduleName:ejbremote-ejb, distinctName:]

 

Pitfall 6: Client interceptor registration does not work with scoped context

Since JBoss 7.2 you can use scoped contexts and then you would not need do programmatic initialisation of the EJBClientContext.
So if you do this:

ejbProperties.put("org.jboss.ejb.client.scoped.context", "true");

… then you do not need to do the following:

final EJBClientConfiguration ejbClientConfiguration = new PropertiesBasedEJBClientConfiguration(ejbProperties);
final ConfigBasedEJBClientContextSelector selector = new ConfigBasedEJBClientContextSelector(ejbClientConfiguration);
EJBClientContext.setSelector(selector);

However if you do the above, then the programmatic registration of a client interceptor does not work any more. I suspect this is a bug?

In a later post I plan to elaborate on how to get the above example running with a custom login module and with a cluster setup… be prepared for more complexity and more magic strings!

Related Posts Plugin for WordPress, Blogger...