Monday, August 28, 2017

Wildfly quickstarts

Wildfly Example galore here:

JBOss EAP example galore here

Latest Wildfly documentation Wildfly can be downloaded here

Excellent book here

with associated code

This book can be useful: Advanced Java EE Development with WildFly

For Eclipse Oxygen, you might want to install (EClipse Marketplace) the JBoss Tools

Interesting book Wildfly cookbook

Saturday, August 26, 2017

Getting started with OpenShift

you can try installing on your local machine: install Vagrant

install virtualbox

clone this github repo and vagrant up... good luck! On Windows the clone fails because of a filename too long issue (hello Microsoft????  ) .

Another way is to test directly on AWS: , go through the AWS guide "red-hat-openshift-on-the-aws-cloud" and discover that this quickstart is no longer available (hello, Amazon??? Why don't you tell it on the home page?? ).

Check out on for available quickstarts - there is no Openshift quickstart! This world is a chaos, a Cambrian explosion of products which end up in a total mess, fish with wings and trunks like elephants, and survive only one generation or the space of a few months.

About AWS, I discover another document but it's a bit long reading...

Anyway in the meantime I discover that the Vagrantfile VirtualBox approach has been DROPPED in favour of Minishift (one more extinct species, whose fossil debris still clutter the digital space...)... too bad that the online book "OpenShift for developers" has not been updated, and I have wasted 3 hours of my life to discover that the "all in one" approach is dead...Grant Shipley and Graham Dumpleton, how about taking care of your creation?

Wednesday, August 23, 2017

DevOps with OpenShift

reblogging the from the excellent friend and mentor Jan:

Also interesting the OpenShift for Developers:

oc project myproject

oc new-app --name='cotd' --labels name='cotd' php~ -e SELECTOR=cats

oc expose service cotd

The price of changing job

I have recently changed company. I had the opportunity to stay as permanent, moving to another department with people I already knew, but I wanted to explore new worlds and also make some more money.

The change has been devastating, essentially for social reasons.

Humans are tribal animals, and to be happy they must build a web of trust and friendship around them.

Trust can be built only in action. You work with the guy, you know that he is responsible, helpful, skilled, he stops doing his work to come to your rescue. Only then you trust him and like him.

I don't trust someone for his smiles and handshakes and how are you. I trust someone because I know he will do his best to help me. The first thing I tell a new joiner is "whatever problem you have, please don't hesitate to contact me at any time". And if he has a problem that I can't solve, then I ask around until I find someone who can help. By no means a new joiner should be left alone with a problem.

IT industry is not a happy state of nature, where people spend maybe 5 hours a day chasing food, then the rest of the day socializing and having fun. This is a tough world, with tight deadlines, rough competition, people are always under pressure to get things done and acquire new skills. It's a permanent state of semi-war, unfortunately sometimes also internal to the same team. Sadly, some people will rejoice at your failure. Being able to build a team where everyone is really sympathetic to each other, is a real miracle that happens very rarely.

Don't expect a warm welcome. Don't expect to be helped. Most of the time you are absolutely on your own, in a new environment that you don't know. Getting to know the new environment (the 1000 "how to" that are different from company to company) is alone a huuuuge stress and drain on your energies, because you must constantly ask for help and expose you as a "weak" individual. Not everybody understand that it's absolutely normal that they have to invest some of their time to make you comfortable. Many people will consider you only a nuisance and a handicap. It's painful, very painful.

So, changing job is a jump in the dark. And don't believe to those who tell you "don't worry, everything will be fine". Sorry, this is not a Disney movie, this is Planet Earth, not all will be fine, there will be a lot of terrible stress, of shocks, of pain.

So, are you really really sure you want to change job? If you feel bored at work, or you feel that your skills are not improving, start your own project in the evening and weekends. Get certified on something. If you need extra money, you can join Toptal and get an extra part-time job.

But, think twice before you leave a company where you are trusted and you know the internal process. I did, and I am suffering A LOT.

Tuesday, August 22, 2017

Imperative vs Functional programming, a simple example

Today a colleague was asking me the difference between functional and traditional programming in Java... I made a simple example to show how a FUNCTION can be used as a parameter, and the importance of Streams.... of course, in this example the traditional programming is much simpler and readable! Often functional programs can be really hard to decipher!

import java.util.Arrays;

public class HelloWorld
  static String[] theStrings = new String[] {"Pippo", "Pluto", "Paperino"};

  public static void main(String[] args) {

  static void theTraditionalWay() {
    for (int i = 0; i < theStrings.length; i++) System.out.println(theStrings[i].toUpperCase());

  static void theFunctionalWay() {;

You can run it here

Sunday, August 20, 2017

Book: Peopleware

Where it's proven - with actual statistical facts, not only theories - that in IT - like elsewhere - PEOPLE and not TECHNOLOGIES are the key to success.... and that people are most productive when they are FREE to communicate and cooperate, and HAPPY and in a natural environment and without management pressure and coercion.

Quod Erat Demonstrandum.

Docker training

Excellent training available at

associated github repo

Awesome tool to play with Docker without having to install it locally

Docker install on Windows

Docker hub and

Great tutorial on "docker run"

The Tomcat Docker Hub page

Docker-friendly CI host

OpenShift, Minishift, VirtualBox

Excellent VERY quick introduction to OpenShift:

I am following this nice introduction to OpenShift with github

Download and install VirtualBox

Install Docker

Download and unzip Minishift

If you get this error

.\minishift.exe start
-- Installing default add-ons ... OK
-- Checking if Hyper-V driver is configured ... FAIL
   Hyper-V virtual switch is not set

it means that maybe Docker is not installed

When I try to install Docker, it tells me "HyperV is not available on Home editions, please use Docker Toolbox" - which uses Oracle VirtualBox instead of HyperV

Since I have Windows 10 Home and I don't want to waste 170 USD to buy Windows Enterprise, I am installing Docker Toolbox but it still doesn't work... it seems that really only the Windows 10 PRO using Hyper-V works.... what a waste of time to try to make stuff work on Windows...

Thursday, August 17, 2017

Book: Humans need not apply

Excellent book about the impact that AI will have on our lives - at the same level as "the rise of the Robots". Read it!

Sunday, August 13, 2017

Intellij and Git

Basic introduction here, very nice:

Incidentally, at first I could not find the "New/Ignore file" menu, so I have manually created a New File .gitignore, and Idea magically prompted me to install the Gitignore plugin, which I did with great satisfaction.

I kept getting

2017-08-12 12:03:55,303 [2262815]   INFO -  #git4idea.commands.GitHandler - 
remote: Permission to pvmarmotta/pv01.git denied to vernetto. 
2017-08-12 12:03:55,303 [2262815]   INFO -  #git4idea.commands.GitHandler - 
fatal: unable to access '': The requested URL returned error: 403 

until in .git/config I changed the URL to

it's tragic that such basic things entail manual hacks... this is the state of IT in 2017... I hope driverless cars will be better engineered otherwise we are toast (we are in any case thanks to AGW)

More interesting stuff on Git:

the infamous "DETACHED HEAD" message:

The "git concepts simplified" in gitolite by Sitaram Chamarty

charismatic Jessica Kerr "Git Happens" presentation

Great presentation site Think like a Git

Michael Schwern famous "Git For Ages 4 and up"

Interesting articles on branching and workflow:

Saturday, August 12, 2017

Poll result on Global Warming

it seems that the audience is equally represented by catastrophists and "deniers/optimists"... I am afraid 10 years from now we will have MANY more catastrophists around. It's also true that IT people tend to be a bit disconnected from reality...

Friday, August 11, 2017

Spring boot Rest controller with Embedded Tomcat

really simple, and the code is available here

I just realize that I had already done this exercise here , even better explained!

Wednesday, August 9, 2017

Sire Reliability Engineering at Google

I have immensely enjoyed reading this book, some sections are highly technical - frankly beyond my level - some other anecdotal and more narrative. Particularly interesting is how Google trains his Site Reliability Engineers, reading the Post-mortem reports and making crash simulations to brainstorm the trainees.

Sunday, August 6, 2017

Kotlin essentials presentation

My first impression is that with Kotlin you can write more readable code than in Java. I am not sure how stable, refactorable and debuggable it is... surely it looks nice.

IntelliJ is really awesome

great presentation by Trisha Gee:

You can learn how to make the best of the IDE from this 1 hour video (if you can stand the speaker)

more tips available here:

but of course the official help contains all that info

and the product blog of course

Also, after you read this you definitely want to ditch Eclipse forever.

Very useful the keymap reference (menu Help/Keymap...)

and this list of features and shortcuts:

Tuesday, August 1, 2017

Book review: Production-Ready Microservices, by Susan Fowler

This is a short book who covers the essential points about service availability in production, and how to prepare for a smooth operational setup.

It's a useful book but lacking "real life" stories and technical details, most of the stuff is quite common-sense.

I am looking forward to reading "Betsy Beyer, Chris Jones, Jennifer Petoff & Niall Richard Murphy: Site Reliability Engineering", who allegedly is much more "technical"