Skip to main content

· One min read

For better Java programming

Google I/O 2008 - Effective Java Reloaded - Joshua Bloch

Effective Java - Still Effective After All These Years - Joshua Bloch

For better API / language design

Growing a Language, by Guy Steele

How To Design A Good API and Why it Matters - Joshua Bloch

Evolving the Java Language - Neal Gafter

http://www.infoq.com/presentations/neal-gafter-evolving-java    

Advanced Topics In Programming Languages: Closures For Java - Neal Gafter

· 10 min read

Look and say sequence is the sequence of numbers generated from the previous number by reading off the digits of which the number consists.

So the first number is 1 then there is one "1". one 1 -> 11
Now use the number "11" and there are two 1s. two 1s -> 21
21: one 2 and one 1 -> 1211
1211: one 1, one 2 and two 1s -> 111221
111221: three 1s, two 2s and one 1 -> 312211
312211: one 3, one 1, two 2s and two 1 -> 13112221
13112221: one 1, one 3, two 1s, three 2s and one 1 -> 1113213211
----------------------------------------------------------------
1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211 ...

The Java programme code which reads off the given number can be written like

· 6 min read

I've been developing mQlicker for approximately two years. Dr. Raban, Sverre and I co-founded a startup about two year ago and we started developing it. The first official release happened last February, and now we are about to release a new version of mQlicker. Before we do, I'd like to point out the new features and changes in the new one.

mQlicker is a audience response system (audience interaction system / classroom interaction system) which can give a voice to the audience. It can be used for classroom, presentation, lecture, survey, quiz, etc. It consists of two main UIs which are the user UI for those who want to get the responses from people and the respondent UI for those who respond.

· 2 min read

Java:

System.out.println("client " + authorized ? "authorized" : "unauthorized");

JavaScript:

alert('client ' + authorized ? 'authorized' : 'unauthorized');

(Let's assume that the authorized is a parameter variable)

In Java, if you write code like this, you definitely get a compile time error, since String concatenation gets higher precedence than conditional operator whereas in JavaScript, you don't get any error although String concatenation has higher precedence just like Java.

· 6 min read

Java.next

http://www.infoq.com/presentations/Java-next

I quite agree with him.

What mistake most people make when they compare Java with other programming languages and talk about how bad Java is is that they only talk about the Java programming language but not Java platform. It is not really fair to talk about Java without thinking its ecosystem including the platform, frameworks, libraries, tools, etc. As Erik says in the talk above, if you use vim to programme Java code, it's like pounding a nail with your head. People complain about static typing but with help from proper IDEs, it can actually increase programming productivity not to mention of easier debugging.

· 26 min read

I can still see many tutorials of JDBC that are not really talking about how JDBC programming can be done easily and more practically & efficiently. I can understand that those tutorials are to give a very basic level of knowledge of JDBC. Besides, we do often not use JDBC directly any more these days. There are easier and simpler solutions like Object Relational Mapping (ORM) and other persistence frameworks. I use Java Persistence API (JPA) with Hibernate and QueryDSL (Personally, I think QueryDSL is great. I cannot imagine life without QueryDSL anymore when using JPA. 🙂). There are also other choices. For instance, EclipseLink and OpenJPA both of which are JPA implementations, Java Data Objects (JDO), MyBatis, the successor of iBATIS, and so on.

However, there may come a time when you need to directly use JDBC. It can be developing an application which requires accessing and using database or for developing your own Java persistence framework. One way or another it is good to learn this very fundamental Java persistence technology to get some good things from it as well as its drawback in order to avoid it. I am not going to talk about what JDBC is or how to use it as there are plenty of other tutorials explaining these on the Internet. What I am going to do is talking about better and easier way to use JDBC. I will not cover every single detail about it though, as my point here is giving some idea to use it better and there are already known solutions that provide what I am going to explain.

There are four steps to take to explain the better way of using JDBC. First of all, I will show a typical way to use JDBC then point out problems in it. After that analyse it to find a better way. Finally, I will implement it.

· 10 min read

Yesterday (the 5th of May) was the children's day, which is an official holiday, in South Korea, (by the way, the day before yesterday was Star Wars Day 🙂) and I found that Xeraph, who is the CEO of the IT security company named Nchovy, as well as the creator & core programmer of the OSGi based opensource security platform, Kraken, posted some quiz for kids. 🙂 His blog also has other quizzes for the primary schoolchildren.

· 16 min read

Some part of [3. Bug in Java compiler?Shadowing Declarations?](#3. Shadowing Declarations?) is updated twice on the 10th of May in 2010.

I have been very busy and am still busy so haven't written anything for quite a while on my blog except for those entries with only one or two sentences. So I'm quickly writing what I do these days and some issues I have dealt with.