Our blog

02 Dec 2016
by cvringer

Install Tesseract 3.04 on CentOs 7

Tesseract installation is supported beautifully with Ubuntu, but with Centos it requires effort to build. Below is a description of how to install Tesseract on CentOs.

Used versions:
Tesseract: 3.04.01 tesseract-3.04.01.tar.gz
Leptonica: 1.73 leptonica-1.73.tar.gz
Tesseract-ocr 3.02 tesseract-ocr-3.02.deu.tar.gz, tesseract-ocr-3.02.eng.tar.gz, tesseract-ocr-3.02.nld.tar.gz
GhostScript: Install Tesseract 3.04 on CentOs 7

I executed all commands as root, but if you prefer, you can use another account and ‘sudo‘ the commands

1) First update your system:
yum update

Because Tesseract-ocr is not available using yum, we need to download source and build both Tesseract-ocr and leptonica.
This requires development tools to be installed.
yum groupinstall “Development tools”
yum -y install automake autoconf libtool zlib-devel libjpeg-devel giflib libtiff-devel libwebp libwebp-devel libicu-devel openjpeg-devel cairo-devel

2) Now download and install Leptonica:
wget http://www.leptonica.com/source/leptonica-1.73.tar.gz
tar xzvf leptonica-1.73.tar.gz
cd leptonica-1.73
make install

3) Download and install Tesseract:
wget https://github.com/tesseract-ocr/tesseract/archive/3.04.01.tar.gz
mv 3.04.01.tar.gz tesseract-3.04.01.tar.gz
tar xzvf tesseract-3.04.01.tar.gz
cd tesseract-3.04.01/
make install

4) Download and install Tesseract trainer files:
wget https://sourceforge.net/projects/tesseract-ocr-alt/files/tesseract-ocr-3.02.eng.tar.gz
tar xzvf tesseract-ocr-3.02.eng.tar.gz
tar xzvf tesseract-ocr-3.02.nld.tar.gz
tar xzvf tesseract-ocr-3.02.deu.tar.gz

export TESSDATA_PREFIX=/usr/share/tesseract-ocr/tessdata

6) Last, install Ghostscript for processing png:
wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs920/ghostscript-9.20.tar.gz
tar xzvf ghostscript-9.20.tar.gz
cd ghostscript-9.20/
make install


That’s it!

20 Sep 2016
by cvringer

Scrum Training in a Scrum way

At a company i work with, i’ve facilitated several scrum trainings.
In stead of the usual (boring) ‘sit and listen’ trainings, in this training, participants can determine the content themselves. Of course there are more intersting items then there is time for, (just as in the ‘real’ world) hence they have to prioritize what they want to learn this day. From those items, we create a backlog and we choose a Product Owner. Now we start with sprints. In every Sprint we deal with the topics defined in our sprint backlog. We use live examples and excercises to explain the theory. After every sprint, there is a sprint review with Product Owner, Stakeholders and team (we, the trainers) and a retrospective. Next we all decide if adjustment of the items is needed, and we plan the next sprint.

Of course it happens that we don’t finish all items in a sprint(just as in the ‘real’ world). We then decide together what to do with the remainin items. So the whol training is given using Srcum, with all scrum elements in place. At the end of the day, the students have done 4 to 6 sprints, in which they have learned the theory, and done scrum in practice. I recieve many enthousiastic reactions from this way of teaching Scrum, and the training itself is full of energy. A very energizing and fun way to do!

24 Feb 2016
by cvringer

Be aware of those extra lanes

Scrum board

You have probably seen them when you entered a team room. Scrum boards with well defined stories and nice task descriptions under them. But then there are so many lanes… Many tasks are in one of the lanes, but only a few are in the ‘Done’ lane. I’ve seen lane names like ‘peer review’ ‘testing’, ‘investingating’ and ‘blocking’. When i ask the team about the specific use of the lanes, the answers mostly boil down to handoff.

For example, when i asked for the use of the ‘blocking lane’, a team member told me that whenever he had to call someone to discuss an item, and that person wasn’t available, he would hang the task in the ‘blocking’ lane. And then he started with another task. When i asked him when he then would resume the old task, he said that the would try again after het finished his ‘new’ task. Sometimes the person to contact wasn’t available the second time, and then the task would wait for another cycle.

Handoff was also created in the ‘peer review’ lane. Whenever a team member was ready with his or her’s code, they would move the task to ‘peer review’. Those tasks stayed in that line for almost the entire sprint. You want to know when the peer review was done?… Indeed. At the very end of the sprint. Sometimes bugs where found, or refactoring had to be done, and there was stress. This stress also applied for testing. There was a separate ‘testing’ lane. Testing tasks where mostly done by one tester, and… at the end of every sprint.

So sometimes these extra lanes keep the team from getting stories done. There is ‘handoff’ in the team itself. If a team member starts a task, he should never let go of that task until it is finished. Every lane that releases the task from the responsibility of the team member is handoff, and will delay the execution of the task. Yes, i acknowledge the fact that sometimes it will include a lot of effort for the team to remove an impediment. But the focus should be on delivering the task as fast as possible. Starting another task without finishing your previous one, is ‘local optimalization’.

Introducing lanes is not bad by default. (After all, the team can decide to introduce lanes). But if a team introduces a new lane, it has to agree on keeping in touch with the task.

So be aware of those extra lanes.

25 Jun 2015
by cvringer

Relative mass estimating

Why relative mass estimating?

Scrum teams are often asked to quickly estimate new stories without knowing much details. How do you roughly estimate those “high level” stories fast, in let’s say, one hour?

Enter “Relative Mass Estimating”, also known as T-Shirt size estimation.

These roughly defined stories (or epics, or what you want to call them) can, for example come from a roadmap defined by the business. A high level description is provided, such as ‘Customer can view his invoices’, or ‘Customer can change his contract’, but no details are available yet. So the team should quickly decide were the data could come from, and which systems could be involved. Usually teams are very good at this, especially when they are long lived (feature) teams.

Relative mass estimating is done by the Product Owner, Scrum Master en the entire devteam.

The following rules apply:

  • We divide only in Large, Medium, Small. No stories in between;
  • As always: Estimates are estimates;
  • We estimate with the knowledge we have at this time;
  • We do not ask for detailed information;

The Scrummaster creates 3 area’s, which are called ‘Large’, ‘Medium’ and ‘Small’. I use just 3 labelled A4 papers, and put them on the floor.

Now the estimating begins. The Product owner explains the story shortly, and hands the story over to the team. The team has a short time to common understand what is asked. (If needed, a timer can be set). Then the team decides where to put the story. (L, M or S). The first story will probably the most difficult, but after that it will go faster. If the team cannot decide, you can use thumb-voting to force a decision. Sometimes the team can decide to re-arrange stories, because they got better insights or a story was estimated with wrong assumptions. There must be time for that. We did this workshop for one hour, and we relatively estimated more then 60 stories.

So what is the value of relative estimating, and what can we do with the results?

Our end goal is to estimate the number of sprints the story would take to build. This allows us to look further into the future and very roughly tells us when items from our backlog can be build. (We could use this in a burn-up for example). It also provides the Product Owner earlier insights about the realization of the roadmap, so he can shift priorities. After the relative mass workshop, the team can estimate one or two stories of which it is pretty clear what to build in ‘number of sprints’. Other stories in the same category will be assigned the same number of sprints. Another possibility is to T-shirt size each L, M and S again, to get more refined story estimates, and then pick one ore two stories to estimate in sprints.

29 Apr 2015
by cvringer

Creating virtual hosted apps with Apache

When you develop webapps, most often you don’t want users to type in complex urls like: http://ipaddress:8080/my-webapp/, but you want to use a nice DNS url like: http://www.myserver-DOT-com/ or: http://admin.myserver-DOT-com.

So, how do you do that? It’s actually not that hard. Using Apache’s virtual host module, you can easily ‘map’ web applications to an url. Here’s how:
Software: Apache 2.2, and a servlet container

Using Apache webserver and Tomcat or Glassfish or any servlet container, this is how you do it:

First, register you DNS names! Depending on your provider, you can do this yourself. In this example, you register two domains: www.myserver.com and admin.myserver.com. It could take some time for these names to be known at all DNS servers.

In apaches conf/httpd.conf make share these lines are enabled:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module modules/mod_rewrite.so

# Virtual hosts
NameVirtualHost *:80


#Here are the .conf files of your sites)
Include conf/sites/*.conf

Create one ore more virtual host file:
Here are two examples

Restart Apache, go to http://helloworld.com/ and you will see the webapp. Go to http://admin.helloworld.com/, and you will see your admin console.
Thats it! you are all done.

29 Apr 2015
by cvringer

Mocking a service with GMock

Here is a short example of a Grails unit test using Gmock. I published this example because it took me too long to figure out
how to do this. Gmock is very nice to work with, but poorly documented. Maybe it safes you an hour. This example mocks a Solr search service.

29 Apr 2015
by cvringer

Grails: Multiple logins per user

Sometimes you would create multiple logins for the same user in an application. You might want to login as administrator or as regular user, without entering all your personal data again, or without creating yet another email address. Here is how you do it.

– Setup a secured Grails application.(there are multiple ways of doing that)

– Create a relations between your regular user object (where you store firstname, lastname, email and so) and the Login object.

class Login {
     String username
     String passwordHash
     static belongsTo = [user:User]

and in the User class:

static hasMany = [logins: Login]

That’s it. You can create multiple logins for the same user,and you can even assign different roles per login, so the same user can login as administrator, and use another login with another role.


© Keienberg Consultants