Monthly archives of “September 2008

Getting Old Is A Big Problem!

Today is not the best day of my one-month-old career as a programmer.

My boss told me that he was planning on initiating a new project that was to be written in PHP. That means we have to build, test, and implement a brand new PHP-based framework. So, the big guy told me to review some of the most popular open source PHP frameworks available on the net. I looked into CakePHP, CodeIgniter, PRADO, and some other stuff. But he was more interested in the Zend Framework. “Okay… I’ll take a look into it”, I said to him.

He also told me that I was now in charge of the HP ProLiant server he had right next to his desk. I can do whatever I want with it. It already had openSUSE in it, but I was given permission to format the hard disk and put anything I want on it, anything that suits me best for the development process of our newly established project. After struggling to find where everything was in openSUSE’s desktop, I immediately found out that the postgreSQL server installation on it was flawed, mainly because it was installed twice. Once from an RPM package and once from source. What a mess. I was faced with the daunting task of finding out where the two installation’s configuration files conflict and resolve them.

But I had a better idea: format the darn disk and install Ubuntu Server!

So I did it. I installed Ubuntu Server 8.04 with LAMP and postgreSQL, added user profiles for my colleagues, put them on the sudoers list, enabled Samba and added user profiles to it, mirrored the postgreSQL documentation site and aliased it to the Apache server. Next, I tried to access the postgreSQL with pgAdmin3 from my laptop. This is the part where I say “Houston, we have a problem”.

The pgAdmin popped up a message that the server is not listening. **is it deaf?** So, I tried to tweak the settings here and there, but then I stopped cold because I couldn’t find where the postgres.conf and pg_hba.conf files were. After an extensive search using locate and a misleading googling session, my colleague told me to install postgreSQL server from source. So I did what he said: I downloaded the source tarball, installed it with him first thing this morning (I need him to guide me with all the confusing configuration parameters), and got the server up and running locally. After that, I redefined some parameters so that the server would accept incoming connections from other machines. Done.

Next, I opened up my pgAdmin again and tried to connect. Voila! It connected. But right after the connection was established, pgAdmin complained about some error that it found on the system database scheme. So I started to think: WTF???

After consulting with my colleagues, I decided to erase the source installation and installed again from source. I did this about 3 or 4 times before finally giving up. The two error messages that kept popping up were:

ERROR:  column op.oprlsortop does not exist
LINE 12:   LEFT OUTER JOIN pg_operator lso ON lso.oid=op.oprlsortop

ERROR:  column "opcamid" does not exist
LINE 3:   JOIN pg_am am ON am.oid=opcamid

So, I searched for these two errors on the net and came up with zero results. Okay, so installing from source solved the problem but introduced a new one. So I opted back to searching the Ubuntu repos for an apt-get possibility. Then I did apt-get install postgresql-8.3 postgresql-client postgresql-contrib. This did not solve the problem. I fell back to installing postgreSQL 8.2, but it didn’t do any good. Fine. I give up. This is enough troubleshooting for one day.

So, I went home without any progress whatsoever…

Just now, I looked deeper into postgreSQL.org and elsewhere searching for the word “oprlsortop” (what a funny name, can you say it without twisting your tongue and your brain?). I read the first entry that came up on Google and immediately found out that the pgAdmin version I was using was too old. Yes, too old! What a silly mistake! Some guy at Nabble was pondering about the same trouble and another guy said that pgAdmin 1.4.3 is way too old for postgreSQL 8.3. Okay, I got the source of the problem, but I’ll have to wait until next Monday to fix it. I will not risk compromising my own development environment. I’ll do it on my PC at the office.

By the way, this brings out another question: Will the JDBC driver work with postgreSQL 8.3? We’ll have to see for ourselves next Monday.

I guess getting old is a problem, especially with pgAdmin…

True Greatness

You wanna be really great? Then have the courage to fail big and stick around. Make them wonder why you’re still smiling.

Struggling to Get Out of A Three-week Overdue

Last week I took three days off to attend my graduation ceremony. It turns out that the project I’m currently assigned to isn’t making any milestones during that time. When I came back, everybody seemed so stressed out. We were already almost three weeks overdue and the pressure was eating everybody’s nerves.

This brings out a question: Where have we taken the wrong turn?

Possibility #1:
We did not take into account the absence of our System Analyst during the first two weeks of the design phase due to an illness. From the staff’s perspective, the staff was forced to continue development with very limited manpower. With only three team members at the time (one Project Manager, one System Analyst, and one Programmer), the aftermath was quite horrible. The one-and-only Programmer was given the responsibility of taking over system analysis, while he still had to do the prototyping.

Possibility #2:
The programmers assigned to this deadline-infested project is not suitable. My senior had joined not sooner than a month before me, and I was a complete noob about Java itself. Even now we are still struggling to comprehend the framework as we work, and many of the mistakes we made are actually simple and silly ones. Our performance is still way below standard, and we have a long way to go before we can work effectively using the new framework.

Possibility #3:
This project uses a new framework. Although not entirely different than the old one, it still has quite a few major differences. This made the task of building the project a daunting one, as me and my co-workers could not ask any of the staff assigned to other projects about the framework itself. The fact that the framework itself is still quite messy adds up to the already overwhelming deadlines.

Possibility #4:
The entire team is not up to it — we might just not have the correct skills and abilities to do the task at hand. The project itself is considerably smaller and very much simpler than its “sister-project”, but still we were making very little progress.

Either way, the staff is subjected to lots of pressure from the beginning. But, that still does not justify the delays. We will have to find a way to speed up development and immediately submit the beta version for User Acceptance Tests. So, what can we do?

In my opinion, the one thing that must be done immediately is get the client to understand that we are currently in desperate need of more time. A person’s illness is not something we had planned, and it is certainly not in the project budget. Nevertheless, it happened, and something has got to be done about it.

On the other hand, the entire team must be brought up to speed. This is, in my personal opinion, something futile to pursue. We are noobs, and, hard as we try, we will not be up to speed within the allotted time. A more reasonable move would be to rewrite the entire framework from scratch, defining code standards and conventions along the way. This is necessary so that in the future any one of us can look into a piece of source code and precisely tell what it does. Using a framework was meant to reduce work, not add to it.

Another personal complain from me would be about the current style of programming. We use Java, and thus we use an entirely object-oriented framework. Everything is an object. But, in my opinion, the way the existing source code looks, we are doing everything so sloppy that it looks procedural. We need to take time and rewrite most of the application logic, break down large tasks into smaller methods wrapped inside a tidy class, and make the source code easier to read. Methods should be made as independent as possible. This way, we can probably use most of our source code for future projects with minimum modification.

Well, that’s enough chatter from me. I’m just a noob anyway. This is — let me emphasize this — just an opinion from an inexperienced programmer. Any constructive criticism is welcome, as well as new ideas.