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 ....

Scala: Collections 1

scala-logo

This post contains some info on Scala’s collections. Problem? We want a function that will take an List of Rugby players as input and return those players names that play for Leinster and can run the 100 meters from the fastest to the slowest. Step 1: Have a representation for a Rugby player. Ok so it’s obvious we want something ...

Read More »

Structural (or) Type Safe Duck Typing in Scala

scala-logo

Structural typing as defined by Wikipedia “A structural type system (or property-based type system) is a major classof type system, in which type compatibility and equivalence are determined by the type’s structure, and not by other characteristics such as its name or place of declaration “ Strutural types in scala allows code modularity for some specific situations.For instance, if a ...

Read More »

Loan pattern in Java (a.k.a lender lendee pattern)

java-logo

This post is about implementing loan pattern in Java. Use Case Implement separation between the code that holds resource from that of accessing it such that the accessing code doesn’t need to manage the resources. The use case mentioned holds true when we write code to read/write to a file or querying SQL / NOSQL dbs. There are certainly API’s ...

Read More »

SpiderMonkey to V8 for MongoDB and mongometer

mongodb-logo

With 10gen switching the default JavaScript engine for MongoDB 2.3/2.4 from SpiderMonkey to V8 I thought I’d take the opportunity to compare the relative performances of the releases using mongometer. Being a Security bod, I really should have looked at the Additional Authentication Features first… Hey ho. I’ll document the steps taken during the comparison, including the set up, so ...

Read More »

Spring MVC 3: Upload multiple files

spring-interview-questions-answers

It was just another long day at office with the database not available and one of the team members lagging by a week now. So, we had to work as a team to get it delivered. In Spring 3, it looked straight forward to upload a file. However, there was little help on offer, to upload multiple files from a ...

Read More »

Spring Data JDBC generic DAO implementation – most lightweight ORM ever

spring-interview-questions-answers

I am thrilled to announce first version of my Spring Data JDBC repository project. The purpose of this open source library is to provide generic, lightweight and easy to use DAO implementation for relational databases based on JdbcTemplate from Spring framework, compatible with Spring Data umbrella of projects.               Design objectives Lightweight, fast and ...

Read More »

Effective Logging in Java/JEE – Mapped Diagnostic Context

java-interview-questions-answers

It all started when i was sitting with a colleague to resolve some application issue, when i noticed something interesting. He was merging the code and my eyes caught the attention of this class “org.apache.log4j.MDC”. This led to few discoveries on the way which  follow here: What is MDC? MDC stands for Mapped Diagnostic Context. It helps you to distinguish ...

Read More »

Android TextView with custom fonts

android-logo

While developing an android app I found that everytime I was trying to use a custom font on a TextView I copied the same lines:                   TextView textview = (TextView) findViewById(R.id.text); textview.setTypeface(...) Obviously, that’s unnecessary and repetitive. Why not just create a custom view? And more, why not adding the font through ...

Read More »

Probability distribution for programmers

scala-logo

This is one of these very simple programming puzzles I came across recently: given a function returning random integers from 0 to 4 inclusive with equal probability, write a function returning random integers from 0 to 6 inclusive. Of course the solution should also return equally distributed numbers. So let’s start from an input function sample definition:       ...

Read More »

OAuth 2.0 Bearer Token Profile Vs MAC Token Profile

oauth-logo

Almost all the implementation I see today are based on OAuth 2.0 Bearer Token Profile. Of course its an RFC proposed standard today. OAuth 2.0 Bearer Token profile brings a simplified scheme for authentication. This specification describes how to use bearer tokens in HTTP requests to access OAuth 2.0 protected resources. Any party in possession of a bearer token (a ...

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