It’s nice that JDK 7 includes new ”try (…) { … }” construct, but *WHY*, oh, *WHY*, they managed to fail on implementing it in usable manner. To put it shortly, problem is described here: Detect exception in AutoCloseable close() Thus they implemented logic which allows doing automatic close(), but API doesn’t this logic anyway…
Read moreIs it possible to do O-O in java
So question is: Is it possible to do Object Oriented Programming in java? This presentation gave some insights into issue. Jumping into conclusion fast: yes, it’s possible if being careful, and always using interfaces. This part ”always using interfaces” is interesting, since that’s anyway something what I’ve always considered to be good way of doing…
Read moreGit as nosql DB?
I’ve been pondering if Git could be used as versioned, distributed, concurrently edited at multiple locations,bi-directionally replicated, robust, etc. DB for nosql DB, which would allow baselines and some relationships between elements. Clearly I’m not alone in this world, since question has been asked already by others: Is Git a NoSQL Database?. And there seems…
Read moreVaadin
Why should consider Vaadin for web framework, Why Vaadin – line of argument Whenever I hear someone saying that GWT is way to go, since logic is in client side. I start immediately wondering what these people have been drinking. (1) Data, if application is handling any larger amounts of data, then processing of it…
Read moreJDK 6 vs JDK 7
What are incompatibilities: Java SE 7 and JDK 7 Compatibility And especially list of JVM/API incompatibilities is important to look at. Also see Henrik on Java: Java 7 Questions & Answers
Read moreLogging
Interesting: High Performance And Smarter Logging References: Log4J Logback – successor of Log4J
Read moreSSL with server socket
Netty Need to investigate this a bit further, based into FAQ, it may have some support for SSL with server socket. Btw, one really irritating fact of standard SSLServerSocket implementation of java is that API launches new handler thread everytime when new SSL socket is created. It’s pretty clear that when having server with thousands…
Read moreSpeculate, but don’t guess, measure to see
How synchronized keyword behaves in methods. I’ve heard speculation that doFoo1() would result into more compact byte code, but I don’t buy that. Assumption: Byte code in both cases, is same. So we have this sample, [code lang=”java”] class SyncMe { synchronized void doFoo1() { int x = 0; } void doFoo2() { synchronized (this)…
Read moreEeny, weeny, nitpicking, peeny
Todays lesson is: What javac does with following methods, when compiled. Assumptions: Iterating over ArrayList vs. List generates optimized code, not creating Iterator (i.e. would optimize memory usage using RandomAccessList API), but using int index Itearating over Object[] is faster than List/ArrayList foreach loop for Object[] is as tight code as manual iteration [code lang=”java”]…
Read moreTime to prepare for Java 7
It’s time to prepare for compatibility with Java 7. Release date is supposed to be around 28.7.2011, so there is’ still roughly 2 months to prepare for compatibility.
Read more