Thursday, December 6, 2007

How to become a good Java programmer

What does it take to become a good Java programmer? What makes the difference between the mediocre and the outstanding? Talent notwithstanding, even nerds born to program should consider my suggestion. The path to success might differ between people, but there is one essential ingredient that nobody can leave out.



So I recommend every Java programmer take a Sun Certification test. Sun Certification tests are rigorous tests that dig into all aspects of the Java language, from the basics, like size of primitives, to the advanced, like garbage collection. Since there are several types of tests, I advise taking at least the Sun Certified Java Programmer (SCJP) test. It'll get you acquainted with what's happening behind the IDE's window. For example, widening primitive conversion in arithmetic operations:
int i = 1;
long l = 2L;
long res = i + l;
will cause i to be widened to a long before res is calculated. Another example is the order of evaluation (left to right) and assignment (right to left) of operands. To some, this is boring, but to produce quality code, it's essential.

The knowledge gained from taking the certification test will help you prevent bugs before the code hits the monitor's pixels. I've seen some stupid bugs in my time that could very easily have been prevented with a little fundamental knowledge of Java. What about learning the material without taking the test? It's possible for the self-disciplined, but most people don't study unless there's going to be an exam.

Finally, this should be done prior to looking for work, or during the first months on the job. If you can get you employer to pay for the test, cool. If not, it's worth the investment. It's a good start to becoming a better Java programmer than the overwhelming majority Java programmers I know. Another perk - you get to put this cool icon on your resume:

Wednesday, November 21, 2007

Documentation horror

One of my first tasks at my new job was to install the company's software. The installation included setting up the database and application over several different servers in a cluster configuration. Installing software can be a good way to get acquainted with a company's product. It can also reveal weak points in the installation and configuration process. Unlike the inexperienced, veteran employees know how to install a product with their eyes closed, automatically smoothing out the wrinkles without even realizing it. Little did I know, as a freshman installing for the first time, I was poised to expose the problems in the procedure.

To perform my duty, I opened the appropriate manual and started setting up the database step by documented step. I got help from a fellow worker with the more esoteric parts, but got through it. I opened another manual and started installing the application. Before long, I stumbled upon a problem caused by a bad database installation. Apparently, I hadn't configured a variable in one of the database scripts. Why? Because it wasn't documented, of course. So I started over and set up the database from scratch. You can imagine my horror when, during the application setup, I got the same problem again. I had configured the variable, but incorrectly. Between my two attempts at installing, the format of that variable was changed and nobody updated the manual! I wasted over two days on something that should have taken a couple of hours because of bad documentation. There is a happy ending to this story, though: I finally got through the installation successfully on the third try.

The moral of the story is each and every document needs a parent. Documentation is essential in software. Nobody will remember a procedure or a design a month later, or even the next day. But it isn't enough to write the documents, they must be maintained. Once someone is responsible for it, the document is less likely to be neglected.

Tuesday, September 25, 2007

The new place

It's been more than a week since I started my new job at Starhome. Here are my impressions: First of all, I like it. The people are great. I even found that a neigbour of mine also works here. Well, he's not really a neighbour, but he doesn't live too far away. He's close enough I can get a ride in with him when my wife needs the car.

Second, the place is so much more comfortable! At Amdocs, I was cramped in a room with 3 other people. Here, I have a spacious desk and one roommate who is very quiet and genial. So I also get more control over the air conditioning.

Another HUGE benefit I get here at Starhome is - get ready, this one's a whopper - pizza and beer every Thursday. I mean, it was worth the move only for that! You know your workplace is totally cool when you get all the pizza and beer you can want. I'm sure I'll churn out some of my best code after downing a couple of brews.

On the down side, if the commute was long before, now it can be up to another 15 minutes each way. For a 45-60 minute drive, that's a lot. At least I have my huge stack of CDs to keep me company. One way takes the perfect amount of time to listen to one CD.

Sunday, September 9, 2007

JMeter - My Amdocs Legacy

On the eve of leaving my job for greener pastures, one of my babies I am leaving behind in Amdocs is automatic testing.

Testing is an inseparable part of writing software. A programmer tests code during all phases of program development, from the earliest to the final stages. What if the project is huge and there are tens of developers working together on one application, such that one team has no working knowledge about another team's part? In that case, regression testing for the entire application is needed. This is to make sure nobody ruined anything while adding, removing and changing different parts of the application. The bigger the development team, the less each programmer knows about other parts of the whole, the more likely a change will be detrimental to some part of the application.

For this purpose there are many automatic testing tools on the market. Such a tool automatically runs the application and uses it like a real person would. If a result occurs other than expected, the test fails. In making the decision which tool to use, I checked Mercury QuickTest Professional, Compuware TestPartner, IBM Rational Functional Tester, Seapine QA Wizard and Apache JMeter.

The project I worked on at Amdocs is a web application whose requirements included testing several environments concurrently, and some level of concurrency in the tests themselves. Of all the tools I checked, only one met those requirements -- Apache JMeter 2.2. JMeter is a free tool that tests a web application at the HTTP request level. It can record the requests and responses, which is a good skeleton from which to begin writing a test script. It can also be easily invoked from ANT -- I created an ANT script that ran each JMeter script concurrently. To achieve concurrency between environments, each machine can run its own JMeter instance (even UNIX, which the other tools can't). In addition, JMeter can perform tests other than HTTP -- JUnit, FTP, JDBC, JMS to name a few.

The main weakness of JMeter is its reporting capabilities. As of version 2.2, JMeter can't create reports. To get one after a test run, I had to use XSL to convert the XML result to HTML.

In short, JMeter is highly recommended.

Wednesday, August 22, 2007

Zyb

I discovered a great tool for storing cellular phone information on the web. It's called Zyb, the mobile social network. It originated from the idea of saving cell phone information online in case of destruction or loss of the phone. Now, it's become a complete network built on the phone's address book. I don't know if I'll use it for networking online, but saving contact information sounds good.

Monday, August 20, 2007

Label cloud for blogspot

Tag clouds are much nicer than tag lists. I found out how to display mine in a cloud. The solution is by phydeaux3, who explains it very clearly, step by step.

Blog's title

I think the current name of my blog, taken from my LiveJournal blog, isn't appropriate. I'm thinking of other possibilities, so it will change some time in the nearish future.

Sunday, August 19, 2007

Before all else...

Hi. This blog is in addition to my current blog from LiveJournal. Why? LJ has limitations. I will continue to post occasionally on LJ to stay in touch with friends there. This blog will consist of professional/technological material ...and other stuff.