Kode Log

Change is now. Learn, unlearn & relearn.

Page 4 of 11

Generics And Parameter Type Hiding

Generics is an essential ingredient for a extensible and crafty design. When used wisely, generics make a programming language look good. Spiderman has reminded us repeatedly that with great power comes great responsibility. With all the extensibility we might toss… Continue Reading →

Validation API for Complex and Multiple Validations

I designed a very simple validation API when I was learning about Builder Pattern. Now, I have improved the code and used it in a small project. The code is now- Generic Can return return objects Has support for compound… Continue Reading →

Kth maximum element in unsorted collection

Finding the Kth maximum element in an unsorted array doesn’t seem to be a big deal. Because, we know that finding the maximum and if we keep on eliminating the largest element from the array. And this we will take… Continue Reading →

Item 15: Minimize Mutability

Confused what Item 15 is? Well, as I have already mentioned in my previous posts, ‘Items’ are 78 items mentioned in Joshua Bloch’s book ‘Effective Java’. Those, well versed with the items in Effective Java may read them as a… Continue Reading →

Item 14: In public classes, use accessor methods, not public fields

So, do you see what’s wrong with this code? Well, not much actually. Item 14 in effective java is pretty simple to understand. In fact its just a by product of using common sense while writing code. Problem with the… Continue Reading →

String Intern

  String#intern Probably you already know what it is, in case you don’t, please don’t stop unless you read and understand the whole thing.   String Interning String interning is a method where each distinct and immutable value of string… Continue Reading →

YAGNI

Introduction YAGNI is abbreviation for “You Ain’t Gonna Need It”. It is a concept of extreme programming. And I am finding it very interesting as I never came across this term before. The concept is simple, that there is no… Continue Reading →

Factory Design Pattern

People have been appreciating the effort I am putting in each post these days. Feels good. Moving on with another design pattern, we have the ‘Factory Design Pattern’. It is also known as the Simple Factory Design Pattern. There exists… Continue Reading →

« Older posts Newer posts »

© 2017 Kode Log — Powered by WordPress

Theme by Anders NorenUp ↑