The above is something that I realized only after a long time of experimenting with PostGreSQL. You see, when you want the default value of a column to be the next val of a sequence you need write:

nextval('"seq_prodOrganizerPk"')

The single quotes seem to mean that it’s an relation somewhere in the schema (not a column in the table). The double quotes mean don’t convert to lower case. Straight forward, right? Yeah, right :p.

I did some PHP coding as well. The Product Organizer Manager now is actually able to do stuff with Product Organizer’s (or as I’ll soon be calling them “Categories” :) ). I still haven’t found a good way of implementing the Singleton pattern and I’m dodging the the thought of how to implement a Materialization (perferably Lazy) into “A Cow, B Cow”. Considering that it took me most of the day to implement two use cases (add P.O. and get P.O), you’d think that I could remember more of my problems?

One recurring problem that I have, esspecially with Scripting languages, is that I rename a variable in some places but not in others. This is a huge problem in Scripting languages which, usually, let you pull variables out of thin air. While that may seem like a good idea, it causes me all sorts of head aches. Or rather the same headache again, and again, and again (but with a different instance name every time ;) ). Basically, since I change the name of a variable in one place and don’t change it everywhere else my code, inevitably, fails somewhere along the line because $foobar1 is now sometimes called $foobar and has a bad/old/NULL value in some places because foo() wasn’t called with it as an argument. A real programming language would throw a fit if I tried to just decide, no I’m going to use a new variable. It has a nice (don’t quote me) compiler to tell me, “Ahem, you forgot to rename the variable on line X, Y, and Z”. I really need to become more disciplined in how I make changes in my code (SVN is helping a lot with this).

Tommorrow, I’m going to see how hard it is to make a Gecko-based “Hello World” program. Depending on how well it goes tommorrow, I will either do the second BTP assignment in with Gecko or with QT. I’m hoping for Gecko.

 
By Tom Aratyn, 28. January 2006, 19:31 o'clock

You may add your comment at any time with the help of the form at the page bottom.

Currently no comments

  1. No comment yet

Add your own comment



Follow comments according to this article through a RSS 2.0 feed

Syndication

Categories

January 2006
M T W T F S S
    Feb »
 1
2345678
9101112131415
16171819202122
23242526272829
3031