Everyone is welcome to join. Currently we are setup on Google Group. Follow this link to check it out.
Sunday, March 9, 2008
Singapore Language Study Group is born
Everyone is welcome to join. Currently we are setup on Google Group. Follow this link to check it out.
Thursday, February 21, 2008
About books
We only brought the bare essential to Singapore. The rest of our belongings were left in Jakarta. We still have gazillion of boxes at my brother's basement in Westminster, Colorado. There was once that his basement was flooded from a burst pipe. We have no idea what is the status of our belonging there, especially the twenty something boxes of book. We definitely need to go there and sort out our stuffs.
At least I know some of the treasured books, like the signed copy of Object Oriented Analysis and Design by Grady Booch and Knuth's The Art of Programming, are safe in Jakarta.
Talking about book, I finally start reading Peopleware after a long time of sitting in my to-read list. I am also currently reading Living Proof by Jim Petterson. On the fiction side I am re-reading A Song of Ice and Fire series by George RR Martin. I love the series and can't wait for the next book to come out. And yes, I do read all three at th moment...just not at the exact same time :P.
What books are you reading now?
Enjoying Singapore
This week we have the Singapore Air Show 2008. Last week there was Chingay Parade, which I missed and I still don't know what it was about. F1 Grand Prix is taking place very soon.
On lifestyle, there are tons of things to do and participate in all year rounds. Musicals, operas, dances, theatres, recitals, art shows, etc. My wife and I had been to a couple of shows at the Esplanade.
Next month we are going to watch Disney on Ice show called Mickey's Amazing Journey. I was enticed to watch it because the ads was using Fantasmic's theme song. It brought back sweet memory when I watched the Fantasmic premiere at DisneyLand in 1992. That was when I first found out about Disney's Imagineer because there are a bunch of them around with their Imagineering jacket. Because I didn't know about them then, I thought the jacket was so cool and I asked one of them where I can get one. That's how I found out that Imagineering is a division of Disney, so the jacket is for employee only.
I have to say those wonderful people really live up to their title as Imagineer.
Well, enough of the trips down the memory lane. In conclusion, I am enjoying my life in Singapore right now.
Tuesday, February 19, 2008
Ben Alex @ Singapore Java MeetUp
This month Singapore Java MeetUp was graciously hosted by Ivan from Standard Chartered. And as usual it was organized by Chris, despite his busy schedule and having 5 months old baby at home.
Ben Alex of SpringSource (previously Interface21) gave a talk on Spring Security 2.0 (currently Milestone 1). Which is not surprising as he is the creator of Spring Security aka Acegi. For those who do not know, Spring Security / Acegi is a security framework for Java application which provides powerful and configurable authentication and authorization functions. It makes our life as developer much easier, as security is one of the tough problems in application development. Of course by using Spring Security alone does not make our application secure, it just help us to secure it easier. It is still up to us to design and configure it properly.
Ben started with the basic introduction on authentication and authorization mechanism. Along the way he did a few demos that show a few different ways of access authorization, from URL filtering, programmatic role checking, to use of annotation on methods or class; and it all took only one or two line changes in the configuration files or source codes.
I believe the most welcome update from version 1.0 to 2.0 is the changes on how the xml configuration is done. Version 1.0 is already quite powerful and has most of the features needed for developing an application, but the configuration file is quite verbose where most of the times we need to declare every single configuration to the lowest level. With version 2.0 of Spring Security, in line with the rest of 2.x Spring portfolios, the configuration is simplified and allows convention over configuration. From the demonstration Ben showed a similarly configured application will have only 16 lines of configuration with Spring Security 2.0 and requires around 130 lines of configuration with Spring Security 1.0.
After the presentation, a bunch of us retired to Penny Black at Clarke Quay. We had a great time discussing different issues from open source licensing and business models to managing and running a company. Ben is such a fun person and very passionate about the issues that were thrown around the tables. I'm looking forward for another opportunity to hear him talk again.
Wednesday, September 12, 2007
Nick Carroll @ Singapore Java Meetup
Nick gave overview of Agile & Lean development practice. He also explained some practices that ThoughtWorks does religiously, such as Continuous Integration. The highlight for me was Mingle demonstration; which is something that I have wanted to try but haven't get around to.
Unfortunately there wasn't enough time for Nick to go more in depth on the topics that he presented. Nick, I hope you find Singapore is charming enough to come back and speak again here.
Monday, March 5, 2007
Java Performance Myth
In the beginning I started replying with the standard answer of how java requires jvm startup time which shouldn't be counted and how empty for-loop is not a good measurement, etc. By the time I finished typing the response, there are plenty of other posters responding already. So I did not even bother to send my email.
But it makes me wonder about the jvm startup time, since I heard that it has improved a lot with JSE 5 and 6 (aka 1.5 and 1.6). So I set out to do the experiment with the given parameters of doing a billion iteration of empty loop.
I decided to give the java, C, and C++ a try. My testing environment is Ubuntu 6.10 running in vmware (see my previous post). Details of the environment I used for testing are:
- JSE JDK 5 from Sun
- JSE JDK 6 from Sun
- gcc & g++ 4.1 that came with the Ubuntu
I tested the following source code.
Java:
public class Loop1 {
public static void main(String[] args) {
for (int i = 0; i < 1000000000; i++) ;
}
}
public class Loop2 {
public static void main(String[] args) {
long start = System.currentTimeMillis();
for (int i = 0; i < 1000000000; i++) ;
long end = System.currentTimeMillis();
System.out.println("Time: " + (end - start)/1000.0 + "s");
}
}
C:
int main() {
int i;
for (i = 0; i < 1000000000; i++) ;
return 0;
}
C++:
I used the following commands to compiled those codes:
int main() {
for (int i = 0; i < 1000000000; i++) ;
return 0;
}
- javac Loop1.java
- javac Loop2.java
- gcc loop.c -o loopc
- gcc -O3 loop.c -o loopcO3
- g++ loop.cpp -o loopcpp
- g++ -O3 loop.cpp -o loopcppO3
and I run them with time command 3 times and take the average of the real time output from the time command, in the case of Loop2 I took the average from the output result.
And the result are:
Loop1 (Java5) - 1.793s
Loop2 (Java5) - 1.538s
Loop1 (Java6) - 1.468s
Loop2 (Java6) - 1.233s
loopc - 2.357s
loopcO3 - 0.008s
loopcpp - 2.384s
loopcppO3 - 0.011s
Draw your own conclusion ;P
P.S.: I also tried an empty java program, to see the startup time and to compare it with the removed for-loop for gcc/g++ compiler with -O3 flag. The average result was 0.139 seconds.
Trying Ubuntu 6.10 on VMWare
I recently gave Ubuntu a try because I want to explore more on using linux as my daily working environment. I know..I know a lot of people has been using it daily,..I just been away too long, okay? The reason I chose Ubuntu because I just need something simple and I don't want to spend to much time tweaking and configuring the system. I just need something that will let me do what I want to do, which is mostly coding and browsing. I did not do a fresh installation of Ubuntu yet, instead I am giving it a try running on VMWare. I grabbed Ubuntu version 6.10 vmware from here.
I am quite happy with the default vmware image I had downloaded; it have most of the stuff I need. I do not need any specific stuff, since I am using it mostly for development ruby stuff. The only packages that I installed outside the default are: ruby, irb, rdoc, mysql, and full vim support.
Running Ubuntu under VMWare is pretty smooth, the only extra configuration that I have to do are the XOrg configuration for the video card and mouse driver. The video card configuration to allow higher resolution and the mouse driver change is for fixing the slow and jerky mouse response when running under vmware. I wanted to post the links to the information on how to do the video and mouse configuration, but I had lost the links and too lazy to find them again. I can tell you that I found the information from vmware's forum and ubuntu's forum.