Languages & IDEs; what begets what

The tools at our disposal to punch in source code & then run it seems like topic that would have been interesting in 1990s but irrelevant in this day & age. But being someone who did start programming at the dawn of the said decade and as someone who does see new languages evolve to this day, the armchair exercise did seem worthwhile. Disclaimer: this post is quasi-autobiographical in nature;.. Read More

Type erasure misconceptions in Java

Generics were added very late in Java (J2SE 5) and one of the challenges with it was to maintain backward compatibility. Type erasureĀ is a technique that the language and runtime designers chose to overcome this problem. Here is a simple demonstration of type erasure in action. import java.util.ArrayList; import java.util.List;   public class Erasure { public static void main(String args[]) { List<String> ls = new ArrayList<String>(); System.out.println(ls.getClass().getName());   List l.. Read More

Type safety & SLoC

I believe that SLoC is inversely proportional to code maintenance costs. There are situations where bad code needs more lines of code than good code. The argument for reduced SLoC is trivial in this case. Interestingly, the same holds true in situations wherein good code needs more SLoC than bad code. The need for an increased SLoC to keep things nice & clean suggests that trying to “maintain” this requires.. Read More