Book Review : Effective Java 2nd Edition

I recently bought Effective Java Second Edition by Joshua Bloch. When I started to read it, I was shocked. How come I had NOT read this book before?

The book presents 78 items. Each of them prescribes a best practice. For example  :Item 21 : Use enums instead of int constants. Then a clear explanation demonstrates why this is a best practice. It also contains some examples of  good and bad code to convince the skeptics.

There are certain basic concepts in Java that are misunderstood by some developers. For example there are coders that don’t know how to write equals() and hashCode() methods correctly. Joshua tackles this point in items 8 and 9. He explains in details the contract of the equals() method and gives a simple recipe to write good hashCode() methods.

The chapters added since the first edition are targeting the novelties that came with the releases of Java 1.5 and 1.6. The ones that are covering enums and generics are very interesting, especially if you started to learn Java with an older release.

The thing I liked the most about this book was  the constant feeling of learning something while reading it. This is not something that happens a lot with books about a familiar programming language.

This book is not intended for people who are starting using Java. But if you are feeling that you have grasped the language enough, it will definitely help you to improve your way of coding.

And for those who think that they master Java, they will surely learn invaluable lessons in this book.

If there is a book that a Java developer should read, it’s definitely this one.


Book Review : Land the Tech Job You Love

Is your résumé is ready and updated? Are your skills up to date? Do you keep things you achieve in a logbook? You never know when an opportunity will show up, you need to be ready to take it.

Does your current job give you enough challenge to be able to add skills or experience to your résumé every three to six months?

If not, you might be in a career rut and maybe it's time to look elsewhere.

I recently read Land the Tech Job You Love by Andy Lester. The book explains the process of getting a good job ( a job you are going to enjoy ) in IT. I decided to buy the book after listening to Andy's podcast. I will try to summarize what I’ve learned from that book.

Andy describes the whole cycle of getting a job, from the résumé writing process to the resignation letter. There's a good part of the book that is about getting ready for an interview.

Get a good job network, since most of the jobs offers are not on publicly posted. You will most likely to get a job opportunity by knowing someone, either a friend, a former workmate or someone inside the organisation you are seeking a job in. Do not forget to maintain your network.

When you consider a job, do you only look at the salary? You should really ask yourself what are the criteria that make you enjoy the job. Don’t forget that you are spending most of your time at work. Sometimes new challenges worth more than a salary rise. You should know what you like and what you don’t. Make a list, and prioritize it. That will help you to select a job that will fit your interests and your values.

The book gives very good tips on how to write a good résumé, and how to avoid clichés. As you may know when it's time for a job interview, everyone is very professional, hard worker and great at teamwork! I think that this book shows some tricks on how to get above those traditional clichés and really distinguish yourself from the mass.

When you write a résumé or you go to an interview you need to show to your next manager that you are the one that can solve his problems, and not the opposite.You have to focus on how you can help the company to achieve their goals. Put yourself in the manager's shoes, why they would pick you up?

During an interview, you need to know how to handle tough questions and how to behave correctly. Never say bad things about former managers or former teammates, even indirectly. Nobody likes to work with gripers and whiners, they are the #1 team spirit killers. Managers will do everything they can to avoid choosing those ones.

Another very important chapter is about staying up to date with your skills. Except if you are going to retire soon, you are most likely to seek for a new job. You just don’t know when yet. Even if you really like your current job, you never know. An organization shift might force you to quit, or worst make your job unbearable. Don’t forget that in the end, you are working for yourself, so invest in your skills.

Even if you like the company you are working for, you need to understand that there is no such thing as company loyalty, as Andy wrote :
People can be loyal, but organizations cannot. The best someone could promise you is “You’ll have a job here as long as I’m around,” but what happens when that person leaves or is fired?
 I recommend the book, even if you aren't looking for a job... for now...


ICA Citrix Client & plugin on Ubuntu 10.04 64 bits

Here are the steps to install  Xen App Citrix Client aka ICA Client and the browser plugin on Ubuntu 10.04 64bit

ICA Client

Make a temporary directory
mkdir /tmp/citrix

Go to : 
(don't use wget, it wont work)

Fetch the tgz and save it to this directory : /tmp/citrix/

Setup this variable

TAR_FILE=`ls /tmp/citrix/linuxx86*.tar.gz | tail -1`

Extract the file
cd /tmp/citrix
tar xzf $TAR_FILE
sudo ./setupwfc

Press "1" (Install Citrix Receiver for Linux 11.100)
Press "enter" ("/usr/lib/ICAClient" for destination)
Press "y"  (Do you want to proceed?)
Press "y" (Proceed with installation?)
Read the disclaimer and press 1 (I accept)
Select defaults options. And quit when installation is done.

After this, /usr/lib/mozilla/plugins/npica.so should exists

Now it's time to get /usr/lib/ICAClient/wfcmgr work with your 64 bit installation.

For this you need to install ia32-libs
sudo apt-get install ia32-libs

There still one library missing (libXm.so.4)
If you do :
ldd /usr/lib/ICAClient/wfcmgr  | grep not

Fetch libmotif3 32bits and make it look like libmotif4... (I know it's bad)

You will see that libXm is in fact missing. Unfortunately this library is not available for Ubuntu 10.04
You will need to fetch libmotif3 from a 32bit distribution and install it by hand in /usr/lib32, and make it look like the version 4 of openmotif using a symlink this is far from ideal... But it works.

mkdir -p /tmp/libmotif3/libmotif
cd /tmp/libmotif3/
dpkg -x  libmotif3_2.2.3-2_i386.deb libmotif
sudo cp -rv  /tmp/libmotif3/libmotif/usr/lib/* /usr/lib32/
cd /usr/lib32/
sudo ln -s libXm.so.3.0.2 libXm.so.4

From now on this should not output anything :
ldd /usr/lib/ICAClient/wfcmgr  | grep not

Browser Plugin

To install the plugin, you must fist stop firefox, and install nspluginwrapper

sudo apt-get install nspluginwrapper

"wrap" the npica.so plugin
nspluginwrapper -i /usr/lib/mozilla/plugins/npica.so

check with :
nspluginwrapper -l

Start firefox check about:plugins you should see ICA client.


Scrum and XP from the Trenches

I've just completed the reading of "Scrum and XP from the Trenches" by Henrik Kniberg.
The book is availiable for free as a pdf  at http://www.infoq.com/minibooks/scrum-xp-from-the-trenches (registration required).

I've got the paper version from The Book Depository.com

This is a very straightforward book about Scrum. I would say that it is a very good starter for learning the basics of Scrum. This excerpt from the foreword by Mike Cohn describes pretty well the spirit of the book :
"Instead, Henrik jumps right in and immediately begins describing how his team manages and works with the product backlog."
It gets down to the point, with many practical examples from his experiences with scrum. The book is pretty quick to read, only 125 pages. No "I've got no time to read" excuse for this one!

I really enjoyed the reading, and I suggest it to everybody that wants to know more about how to use Scrum on a daily basis.

I will probably add to my pile of "to read" books the other title from Henrik Kniberg : "Kanban and Scrum - Making the Most of Both".


The Pomodoro Technique

I've just finished to read  The Pomodoro Technique Illustrated. And I'll try to do a mini review of the technique described in the book.

This book explains a time management technique called The Pomodoro Technique.

This technique was developed by Francesco Cirillo in 1992. It basically helps to focus on one task only and getting things done.

The quick basics, from what I understood in the book, are :

Build an inventory list (a classical todo list). Then first thing in the morning, make up a "today todo list" from the inventory list. This list must contain only what you think that can be completed today, with time you should be able to estimate better the number of activities you can do every day. If an activity is too long to complete within 3 hours, try to split the activity in more tasks.

Establish a priority for the tasks. Select one task, highlight it, or put it on a paper in front of you, wind up a timer to 25 minutes. And work that task out, until it rings.

When you finish the pomodoro (25 min of focused work)  write an X beside the task. If you get interrupted and you cannot concentrate for 25 min straight and you fail to finish the pomodoro, just write a box or a different symbol beside the task on the today todo list. When you get interrupted, for long enough that you lose the focus, you need to start a new pomodoro from the start, and mark the one you were doing as failed.

After the 25 mins, take a 5 minutes break. After the break, check if the priority of the tasks have changed (for example in case you added unplanned activities during the last iteration), and decide if you continue with the previous activity or continue with another one. Then select a task, and wind up the clock for another 25 minutes of focused work.

Every 4 iterations, take a longer break (15 to 30 minutes)

At the end of the day, wind up the clock for 15 minutes and do the retrospective of the day.

Record on a different sheet of paper the outcome of the day. What was your velocity (number of completed iteration) ? How many iteration you haven't completed today. What was the number of interruption per task. How many unplanned activities you've added today. Try to draw a mind map of what you did today what was the "Theme" of the day.

After two weeks or so,  you can review your record, and do an average of your velocity, it will help you to evaluate how many pomodori you can do per day. You can also re-adjust the technique to make it suits you better.

This technique is very similar to Agile methodologies, but it is applied at the personal level with very very small iterations. It sure look very interesting. I definitely think that it can help to stay focused, and it helps to get things done. However I still have a lot of interrogations on how to deal with some situations at work.

You don't need a lot of tools to implements this technique : pencil, paper, and a timer.

If you are a geek, you might want to try some applications, here are some suggestions :

It's a web based timer, it has a very simple interface and if you are using Chrome, you can enable Desktop Notification. I'm using it right now to write this blog.

It's a stand-alone application written in Java (swing).
I use it at work. I plan to contribute to this project after finishing my coffee pod ordering system.

Doing! is a J2ME application that can run on Java enabled phone.
I've downloaded it, but I didn't try it.

If you want to lean more about this technique, you can download Francesco Cirillo's book  for free from Scribd. The cheat sheet can be found here.

P.S. Writing this blog took 4 pomodori and I had two interruptions (received 2 quick phone calls).


What is the next project?

I've got a problem, I always have many ideas that I could turn into small projects,
But I just don't know how to get started... Recently I had a couple of projects ideas that I could work on.

Here they are :

Desktop Pomodoro Technique Tool
I'm currently reading Pomodoro Technique Illustrated from The Pragmatic Bookshelf.
Reading the book, made me think of a tool that could be running on my (Linux & Windows) desktops at work to help me use the Pomodoro Technique.

Here is an interesting post that discuss the use of Pomodoro Technique at work

The tool could manage the activity list, the "to do today" list, the timers, the interruptions and the time tracking.

Coffee Pod Ordering System
We have a plan at work to buy a fancy coffee machine that will use coffee pods. However all the management of the pod ordering could be quite complicated, and I will not volunteer to keep track of all the orders with a spreadsheet or a piece of paper :)

The system would consist of :

  • A simple order entry system for the people to order the number of pods they want.
  • An interface to create a consolidated order with all the pods for the team.
  • An interface that provides an easy way to split the pod boxes when the shipping arrive. It should manage partially filled orders as well.
  • A management interface to enter prices, quantity per box and types of pods available.
  • User management + login window.
I want to learn Rails, so it might be a good project to start with it.

Standalone WYSIWYG blog
I really enjoy butor.com wiki  it might be a bit old, but the wiki editing is still quite amazing, (especially for publishing code). Since I decided to write a blog, I think that I could reuse the editor, and fork butor wiki into "butor blog".

An interesting feature to be added would be the possibility to paste images from clipboard directly to the blog editor.

Since the editor is pretty much "pure" javascript, I can use any back-end. Would it be a good opportunity to look into Scala & the Lift framework ?  However, for now Blogger.com is doing the job...

Multiple / "snoozable" / "mp3 enabled" alarm application for cell phones
I've always wanted to do an app for my phone (a Blackberry Bold 9000). I need an alarm application where I can set a lot of different alarm, I must be able to "snooze" and I want the alarm to be sorted by time. I've bought SwooshAlarm which is very good, but has too many features that I don't use.

An alarm application would be a nice little project to learn how to program on JavaME.


The coffee pod ordering system seems to me to be the most interesting to do. So, even if things aren't settled  at work yet and I still don't know for sure if we will use the coffee pod machine, this is the project I will start to do.


"Your life is gonna be changed forever!"

I had the dream to go to Russia for a year, to live there and to learn Russian. I was so passionate about the idea... A friend and I were determined to go there, whatever the price or sacrifice would be.

Five years ago, we actually decided to quit our jobs and the comfort of our daily life to go for a year in Siberia. The officer at the Russian consulate, blew his stamp, and then told us with a thick Russian accent : "Your life is gonna be changed forever!". The stamp did a big SLAM! when it fell on the visa.

That trip, indeed, changed my life in a lot of ways. 

I put a lot of energy and passion into that trip, and after that year I felt that I was missing something. I had finally done what I really wanted to do. So I drifted without a clear goal for few years. I had a couple of passions, but no one with the same kind of intensity.

Few months ago, I was looking at the Linkedin  profile of one of my college's friend, he is doing a job that I was envying, the kind of job I always dreamed to do back then : a very technical, low level  code kind of job.

In college I was the C guy,  playing with kernel code, feeling good about reading memory dumps, eventually, my career took a very different path than his. I don't regret the choices I made, I have learned a lot of good things and had the chance to work with a lot of very professional and skilled programmers, business analysts and managers.

However, I felt that I really need to do something to put me back on track. I felt the need to improve myself and refresh my skills, to keep pushing up and aiming high. I felt the Passion coming back. I relearned to love what I do. 

I started to read a lot of IT books (many from The Pragmatic Bookshelf). From that moment I have read at least a book every week. At the same time I started to read a lot of IT related feeds using Google Reader, and share posts to my friends. I enjoy it! 

But I have the feeling that it's a lot of reading with not enough of doing...

This weekend I have read The Passionate Programmer by Chad Fowler : Creating a remarkable career in software development. I read through pages like crazy. Every chapter was flying by. The book is focused on software development, but I really think it could be applied to other fields. It was really motivating for me. 

After reading the second part (Marketing... Not Just for Suits),  I just went online and bought a domain name, codingtony.com. 

Today I started to write this blog. It will move me out of my comfort zone.  I hope it will help me to start to do stuff!

On this blog, I will share links, thoughts on software development, tricks and other stuff from /dev/random

Keep motivated! May the Passion be with you :)