Home » Author Archives: Peter Verhas (page 2)

Author Archives: Peter Verhas

Use copy paste programming!

software-development-2-logo

Copy paste is bad We hate copy paste. Why? Because the result code is unmaintainable. I get a bug reported from QA, I analyze the code, look at logs, debug, drink a lot of coffee and finally I get to the code that is the root cause of the bug. I fix it, test the use case, release new code ...

Read More »

Outsourcing, Do It Right

software-development-2-logo

Most of the times outsourcing is a nightmare. Companies outsource the activities that are not their core activity nevertheless needed for business to get the job done as cheap as possible. They look at it as some necessary evil, something that would better be not to know all about, forget the details and have it been done. Many times IT ...

Read More »

Why do we mock?

software-development-2-logo

I do Java interviews. During the interviews I ask technical question that I know the answer for. You may think this is boring. To be honest: sometimes it is. But sometimes it is interesting to learn what misconcepts there are. I happened to ask during the interview what you can read in the title: “Why do we mock?”. The answer ...

Read More »

Unit test life?

software-development-2-logo

You can not program without testing. You write unit tests first and then you write your code. (Well, I know you don’t but just let’s focus on best practice.) When there is an error in the code, first you write a new unit test that demonstrates the bug and then you fix it. After the unit test runs fine the ...

Read More »

Some Sentences about Java

java-logo

There is nothing new in this article. I just collected some trivial statements which may not be trivial for some of the junior programmers programmers. Boring old stuff. If you happen all of these things you know more about Java than the average house wife. I do not know if there is point to know all of these. You can ...

Read More »

When null checking miserably fails

java-logo

Disclaimer Before going on I have to state that the techniques described in this article serve no practical purpose when we program Java. It is like a crossword or puzzle. It main train your brain in logical thinking, may develop your Java language knowledge or even your thinking skills. It is like a trick a magician performs. At the end ...

Read More »

Why to use String

java-logo

Recently I was tutoring juniors during a training session. One of the task was to write a class that can dwarwle maps based on some string key. The result one of the juniors created contained the following method:                 void dwarwle(HashMap<String,Dwarwable> mapToDwarwle, String dwarwleKey){ for( final Entry<String, Dwarwable> entry : mapToDwarwle.entrySet()){ dwarwle(entry.getKey(),entry.getValue(),dwarwleKey); } ...

Read More »

Autoboxing

java-logo

Autoboxing is clear for all Java developers since Java 1.5 Well, I may be too optimistic. At least all developers are supposed to be ok with autoboxing. After all there is a good tutorial about it on the page of ORACLE. Autoboxing is the phenomena when the Java compiler automatically generates code creating an object from a primitive type when ...

Read More »

A classloading mystery solved

java-logo

Facing a good old problem I was struggling with some class loading issue on an application server. The libraries were defined as maven dependencies and therefore packaged into the WAR and EAR file. Some of these were also installed into the application server, unfortunately of different version. When we started the application we faced the various exceptions that were related ...

Read More »

Name of the class

java-logo

In Java every class has a name. Classes are in packages and this lets us programmers work together avoiding name collision. I can name my class A and you can also name your class A so long as long they are in different packages, they work together fine. If you looked at the API of the class Class you certainly ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close