Will you continue to use Sun projects ?

January 24th, 2010 CertPal 9 comments

A few days ago the EU had approved the takeover of Sun microsystems by Oracle. This brings to an end the long awaited acquisition. There have been several blog entries about the fate of the open source projects that Sun currently supports. I have read some of the arguments put forward about why developers should move away from / use certain projects.

However I also find myself in a dilemma. I installed GlassFish and deployed a few apps on it recently. I found it interesting and was impressed with it within a few minutes of using it. MySql is also a great open source project. There are many tools built around the database and it competes well with PostGresql. Netbeans is also a great IDE and supports glassfish.

Categories: General Tags: , , ,

Problems in production

January 14th, 2010 CertPal No comments

prod-burnI have been a tad busy fixing some weird little bugs lately. They helped me appreciate the multitude of things that can go wrong in a live environment and served as a gentle reminder that you should always be on your heels.

Here they are

1. LDAP and the user

A web application product was configured to use an LDAP directory structure. The directory was segregated into roles / groups / OUs, the usual. One of the users had trouble logging into the product. This was weird because this person was a valid user and Outlook seemed to recognize him. Outlook uses the same LDAP tree. So I dug into it. The easiest way to check what is going on is to use a LDAP directory browser. I use the one provided by Novell for free. The LDAPs support is not great but it will do for basic lookups.

Categories: General Tags: ,

Debugging HTTPS traffic

December 21st, 2009 CertPal 2 comments

security_lockThere are times when you work with SSL traffic. Your website might be protected with a certificate so that traffic between you and the client is secure. At times like this, being a developer is troublesome. Browser cache settings need to be analyzed by looking at the HTTP headers. Encoding / Content type may need to be analyzed to ensure that a particular page is displayed correctly. These things cannot be looked into if the traffic is secure. There are situations under which the environment is secure but you must still sniff the data. So how do you manage this ?

Tools like Charles (A debugging proxy) help you do this. Charles allows you to proxy to a secure connection over a protocol like HTTPS and still read the traffic. So how does it do this ? Lets have a look.

Your environment probably has a self signed certificate like the one issued below, using keytool.

Categories: Web Tags: , ,

Do you really need that design pattern ?

December 2nd, 2009 CertPal No comments

I chanced upon a post a while back about how a switch statement should be replaced with the strategy pattern. If you have not had a chance to go through it, please do. The post is not very long.  I found myself disagreeing very strongly with the author of the post and I was surprised to find that people thought this was a good idea.

The gist of the post was that using the Strategy pattern was better than using switch statements to determine which logic to execute. Here is why I think the idea used there was bad

  1. The introduction of the Strategy pattern, in the example, introduces three new classes. So for every case in a switch statement, we should go about replacing the corresponding code with a new class ? This could easily lead to an explosion in the number of classes.
Categories: General Tags:

Wave needs a decent client

November 23rd, 2009 CertPal 2 comments

I successfully installed a wave (google) server on a windows box a few days earlier. It was a great feeling. Here are the components that made up the server

  • Open fire XMPP server
  • Postgres database to be used by XFire.
  • Wave related server jar which runs the server
  • Wave command line client that runs the simplistic console client.

I started the console client and typed in a few commands to go through the waves. New, open, view waves were some commands that the command line console allowed you to execute. This client was a simple RI provided by google. If you would like to install a server on your own, take a look at the installation instructions.

Wave console client:

wave-console-client

Categories: java Tags: , ,