Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

 

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

 

and many more ....

 

 

Why shouldn’t I test private methods?

Newcomers to TDD ask some interesting questions, here’s one I was asked recently: testing private methods is bad, but why? How did we get here? If you’re trying to test private methods, you’re doing something wrong. You can’t get to TDD nirvana from here, you’re gonna have to go back. It all started with an innocuous little class with an innocuous ...

Read More »

Big data: when single node is better than clustered

There’s a lot of hype about “big data” and a general trend to try to apply Hadoop to almost every problem. However, sometimes it turns out that you can get much better results by writing an old-fashioned, but optimised, single-node version of your algorithm. The specific case I’m writing about is generating recommendations (what items user may like) basing on ...

Read More »

Good use of Closures

Not long ago, in a blog post, I explained what Closure were in Groovy. This blog post will explain one good example of using them. I recently found myself having to write the same exception handling logic for a bunch of back-end Controller APIs which were serving AJAX requests. It was like this:         class ApiRugbyPlayerController { ...

Read More »

XML to Avro Conversion

java-interview-questions-answers

We all know what XML is right?  Just in case not, no problem here is what it is all about.                   <root> <node>5</node> </root> Now, what the computer really needs is the number five and some context around it. In XML you (human and computer) can see how it represents context to ...

Read More »

Use KISS consciously

A while ago I wrote about few design paradigms to keep in mind when designing and implementing a certain component. Among them, the famous K.I.S.S. (Keep It Simple, Stupid) kept on appearing as a valid and reasonable one. I then realized though how dangerous KISS can be when used by junior developers or, more generally, as a religion: it is ...

Read More »

Verifying Secure Password Storage Externally

Many websites (including big ones like Adobe, Yahoo, LinkedIn, Gawker, etc.) store user passwords insecurely. Either in plain text, or encrypted (reversible), or using a broken or brute-forceable hash function. Many websites continue to be built with poor password storage mechanism. So what? Well, if the database leaks somehow (and it obviously happens, see the link above), then users are ...

Read More »

Software Version Controlling Best Practices

Always use version controlling Use version controlling/source control even if one developer exists. This issue brings change tracking and versioning of the application continuously. For multi developers, it brings more benefits like co-working on same files and fast codebase updates. Do not commit halfdone work Each commit should consist of a complete task (issue, bugfix, etc.). Partial commits may cause ...

Read More »

Java 8: Lambda Expressions vs Auto Closeable

If you used earlier versions of Neo4j via its Java API with Java 6 you probably have code similar to the following to ensure write operations happen within a transaction:                   public class StylesOfTx { public static void main( String[] args ) throws IOException { String path = "/tmp/tx-style-test"; FileUtils.deleteRecursively(new File(path)); GraphDatabaseService ...

Read More »

An open source JVM Sampling Profiler

It’s a well known deficiency of most existing sampling Java profilers that their collection of stack traces has to happen at a safe point. This is the case for profilers such as the sampling profiler, which uses the SUN/Oracle management agent to gather its stack traces. The problem with this approach is that it introduces both a sample bias since ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns