Dave Thomas on what is wrong with current programming.

Dave Thomas Interview . Insights on what is wrong with current programming
http://www.drdobbs.com/architecture-and-design/dave-thomas-interview-the-corruption-of/240166688?pgno=3 

A pearl that I really recommend together with The tragedy of Craftsmanship.

and The Coming Software Apocalypse .

This last one is a podcast for the more technical oriented ones: Combating Complexity: Fad, Fashion, and Failure in Software Development

JMH alternatives : REPL time, linux perf

Expanding on previous articles about measuring with JMH

Besides using the calls to System nanoseconds and millis …
There exist some tools for a quick feedback about the performance of your java JVM code.

ON ALL JVM
You can use the time command in the REPL
class Nothing {
public static void main(String[] args) {
}
}

Compile with:
> javac Nothing.java

and run:

> time java Nothing

real 0m0.104s
user 0m0.079s
sys 0m0.019s

ON LINUX UNIX
It is better to use perf then. You can run the command several times. You can also choose among many different categories of statistics. You need to be root.This is an example which runs the program 100 times:

sudo perf stat -e cpu-clock -r50 java HeeloWorld
Hello World! # printed 100x

Performance counter stats for ‘java HeeloWorld’ (100 runs):

190.546723 cpu-clock (msec) # 0.992 CPUs utilized ( +- 0.91% )

0.265467836 seconds time elapsed ( +- 1.49% )

Architect and java developer contractor freelance rate Stockholm and Sweden

For Stockholm the rate is

  • minimum 750 sek swedish crowns per hour.
  • everything under this rate is seen as suspicious from both contractors and buyers.
  • the reality is that 850 sek is the rate if the consultant has more than 3 years experience in all required niche technologies
  • 950 if the consultant has more than 5 years experience in all required niche technologies.

The rate should be increased by one per cent for each week of delay for the payment.

You obtain 4% more if you are paid four weeks netto.

For Malmö, Gothenborg and all of Sweden:

  • everything under 700 is seen as suspicious and gives a warning signal to both buyers and contractors.
  • 750 sek is the rate if the consultant has more than 3 years experience in all required niche technologies
  • 850 if the consultant has more than 5 years experience in all required niche technologies.
  • most government agencies has 850 sek per hour .

Automatically generate java backend and rest api from existing database. Part 2

Expanding on the previous subject about the generation of a back-end and rest API from existing database .

  • Netbeans has a generate entities from database script
  • Jeddict  . This could be already be pre-installed in some Netbeans products
  • Dali persistence tools from Eclipse
  • Hibernate Tools

Jipster offers the on line tool JDL-studio: there you can visually create tables and relationships. Entities generation from database is only available with an external tool. Beware of some cumbersome issues.

 

Last and most important: your good SQL database may be able to generate the text of the most important queries towards you database. Look at PostgreSql . Their pgAdmin toll has many features like these for generating things.

 

 

Gerrit shortcomings

Yes one of the teams uses Gerrit.

They are completely stuck.

Developers are sensing this tool as a impediment to deliver code and participate in the building of the software.

It has happened that there is always only one person that is reviewing code: the least experienced one! Gerrit Code reviews are just toys  for children , there is no improvement in the code, people is afraid to work with it .

This small team also needs a person dedicated 50% of her time to fixing Gerrit , its installation and its environment.

As a temporary solution we have allowed that the most expert developer makes formal code reviews by passing Gerrit.

Gerrit is the wrong solution for truly agile software development

 

 

Autovalue and Eclipse = success

I needed to add the folder target\…\generated_sources amon the src folders..

That was all what was needed .

Neither enablig maven annotation processor in eclipse project, installing of apt plugin  or the following snippet in pom were needed:

<annotationProcessors> <annotationProcessor>com.google.auto.value.processor.AutoValueProcessor</annotationProcessor>

</annotationProcessors–>

Introduction to Java 8

Are you new to Java?
Are you coming back to programming after a long pause?
Good!
It is the best way to enjoy Java 8 .
Forget all the old Java things and jump directly to Java 8.
I was skeptical about it , but I realize that Java 8 is a great thing.

Here we come to some reading advice:

  • General book about Java SE 8

The best available book is Horstmann – Java SE 8 for the Really Impatient (2014) .

  • About error and exception handling

My advice is to read 7 Error Handling by Michael Feathers in the book “Clean Code A Handbook of Agile Software Craftsmanship”. The author as a voice interview online as well.

Bidirectional traversing with ListIterator

Do you need a bidirectional way to skip through a list?

A rewind – forward behavior?

Traversing the list in one way and then in the opposite direction?

The Java ListIterator in the java.util package is here ready made to your help.

An iterator for lists that allows the programmer to traverse the list in either direction.

The previous() and hasPrevious() methods are available in this class and will make the trick.

You can build a ‘media tape’ behaviour on top of it.

 

It has some loose relationships with the Elevator Algorithm used for seeking a disk in its most simplest implementation strategy, the FCFS, First Come First Served. I used this one before for other purposes than seeking a disk.