" /> kasia in a nutshell: November 2004 Archives

« October 2004 | Main | December 2004 »

November 29, 2004

I'm available! (for hire)

As of this morning I am no longer employed by Tickets.com. It wasn't my decision to leave, unfortunately it was helped along by the relatively poor economy and the company losing customers to Ticketmaster left and right. (Thanks Clearchannel, hope your monopolistic endeavors go along real well! (that's sarcasm)).

I am not happy about this, I liked my job and my coworkers -- I can only hope there is another position in Connecticut that will be as challenging and diverse as this one was. In the last four years I got to work on windows, solaris, hpux, osx and linux using Java, Perl, Delphi, JSP and even a smattering of C. MySQL, Oracle, Interbase... I almost learned C#, but didn't quite get there -- maybe on the next job. No, I'm not happy.

Everyone understands that businesses need to do what they need to do to stay in business but sometimes one has to wonder if the decisions being made really do benefit the company. A nice going away present was this press release from last week. I was heavily involved in both design and implementation of Tickets@Home, Replay and The San Francisco Giants Double Play Ticket Window. (Enter Office Space analogy here).

I wasn't really sure what to put in this entry, it's not meant to be my resume and it's not meant to be a rant, I think mostly I'm just disappointed that things like these happen at all. Not just to me -- I'm not the only one who was laid off from this company (this is the fourth layoff since I've started working there) or from any other company and like all other things, this too will work out somehow.

My resume? Drop me a note and I'll forward it -- kasia@this-domain

November 23, 2004

Dealing with database portability and auto increment

It appears every relational database has its own way of dealing with automated identifiers. Most databases, for instance Oracle, allow you to create sequences which can be used in conjunction with triggers to create a sequential ID when inserting rows of data.

MySQL has its own way of dealing with this problem which stems from its lack of triggers in all but MaxDB versions. In MySQL there is a special column attribute "auto_increment" which will increment the value of the identifier upon insert. Behind the scenes, it is really quite simple, MySQL performs a special lock on the table, selects a max value on the column and adds 1. The downfall (or for some, it may be a benefit) of this implementation is that ID numbers can be reused if data is deleted after the database server has been restarted (since MySQL stores the information in memory). With the Oracle approach, the ID numbers will not be re-used unless the sequence is renumbered - not something that would be done often.. well, in most cases.

PostqreSQL somewhat combines the two approaches. It provides the ability to create sequence but there is no need to triggers (as you would use in Oracle), instead you can use nextval('sequence_name') as part of the table declaration, much like auto_increment attribute in MySQL.

For insertion purposes all these approaches work in a similar manner: you insert a row with a zero or a null ID and the database does the work for you. The difference is in how you can retrieve the ID once a row of data is created.

There are a couple of ways this can be handled:

1. Handle it in the code using abstraction and writing separate implementation for getting the identifier based on the database type.

2. Create your own implementation of incremented Identifiers: for instance a table which stores a separate value for the last id for the table/column.

The drawback of the first approach is obvious: writing more code to implement each separate supported database. On the other hand, it utilizes built-in database functionality and simplifies insertion.

The second approach has its drawbacks as well, which brings me to the whole point of this entry. I have seen this solution used in many open source projects to simplify database compatibility code and find that to be clunky for a few reasons:

  • A select statement must be made before each insertion.
  • The table needs to be write locked for the duration of the transaction to prevent another process from grabbing the same ID and creating duplication
  • Manually inserting data into the database becomes a hassle (you're faced with two sql statements for a row of data instead of one)
  • You're not utilizing the features of the database which are optimized for this purpose.
  • The whole process is likely slower

I find the extra effort spent on writing abstracted database persistence code to be well worth the hassle you avoid while later debugging and supporting the application.

Teaching students about their environment

Being an active contributor to technical forums I am often faced with surprisingly simple questions about basic programming environments from computer science students. Students are often lazy and why should it surprise me that so many don't bother to learn the basics, right? Maybe, but too often it is ones who are otherwise bright and not at all lazy. So what is the true problem?

Thinking back to my own basic programming classes I think I can see the problem clearly. I cannot think of one professor that explained the programming environment in class. The books tend to skip over those parts as well.

What is the number one problem students have with their Java projects?

Classpath.

Something as simple and basic as that, it's just not explained in class. Is it too simple and ought to be self-explanatory? Perhaps, but I wouldn't expect a first year CS major to grasp the concept of classpaths without at least a basic introduction, why are CS professors expecting it? Sit a student in front of a tool like eclipse and I guarantee their eyes will glaze over and a simple concept like a compiler will not occur to them on their own.. command line? Forget it.

With the development environments getting more and more complex each year and the command line being something of the past (unless you're a unix geek like me) I think CS programs should look into providing classes in basics of development environments. Using tools like source control, IDEs, etc. It would help the students understand programming better and give them a better start in the workplace.

November 22, 2004

Privacy? What privacy?

So it appears our big brothers in Washington have been able to track every color print on certain laser printers for quite some time now.

That's right folks! This is not in communist China, but here in good ol' US of A. The government makes secret deals with printer manufacturers without public disclosure.

According to experts, several printer companies quietly encode the serial number and the manufacturing code of their color laser printers and color copiers on every document those machines produce. Governments, including the United States, already use the hidden markings to track counterfeiters.


Hmm... right, counterfeiters, because after all, historically a government has never abused its power! Let's not forget this is not just the US government we're talking about here, these printers are sold worldwide.

What a horrible precedent and invasion of privacy. Thanks Xerox and Canon, you officially stink for handing over the privacy of your customers. Who exactly pays for your companies to stay in business?

So what else is going on that we have yet to hear about? Special encoding in cell phones to track key words? Let me guess.. to fight the terrorists.

November 21, 2004

Picture of the week

California coast
Hand Held, ISO200, 1/160s, f10, 42mm, no flash
Picture of the week archive
I have been pretty busy lately, but cannot reallly talk about it yet.

November 15, 2004

Congrats CCSU!

CCSU news:

Princeton Review, the college guidebook publisher, will include CCSU in its new, forthcoming publication, The Best Northeastern Colleges. Profiling 131 colleges and universities in the region, the guidebook is based on student opinion surveys, analysis of institutional data, and advice from the Review’s educational consultants. Each profile offers student opinion—and editorial commentary—about the institution’s academics, life on campus, and student characteristics. CCSU will be featured with 9 other Connecticut institutions, including Yale, Wesleyan, Trinity, the University of Connecticut, Connecticut College, Fairfield University, Quinnipiac University, U.S. Coast Guard Academy, and St. Joseph College.

It is a little strange to see my Alma Matter listed in the same sentence as Yale and Wesleyan.. but hey, not bad for a small, dinky state school!

November 13, 2004

Freedom

Baghdad Burning:

They say the people have nothing to eat. No produce is going into the city and the water has been cut off for days and days. Do you know what it's like to have no clean water??? People are drinking contaminated water and coming down with diarrhoea and other diseases. There are corpses in the street because no one can risk leaving their home to bury people. Families are burying children and parents in the gardens of their homes. WHERE IS EVERYONE???

November 11, 2004

Picture of the week

Ground view of a redwood in Northern California
Hand Held, ISO100, 1/80s, f5.6, 18mm, no flash, green filter
Picture of the week archive

November 10, 2004

Relentless consumerism

In the last two days I have purchased:

One widescreen JVC 30" tube tv. Not HDTV since I don't imagine I'll be using that anytime soon (no cable, all I watch is movies) and it is an unnecessary adition to the cost. $499 - free shipping via brother.

One Philips DVD player - $69.

I would have also purchased a new cell phone but Verizon has temporarily taken the new Motorola (with bluetooth) off the market.. It appears the camera was crooked. So that's next week, or so they tell me.

Why this sudden drive to buy electronics? To help the economy? Yah, right. To fight depression after the election? Not quite. Nope. I have a valid excuse, really , I do.

1. My tv of 11 years ($400 27" Sharp) died. It's really been dying for a year and required progressively more wacking to work.

2. My DVD player refuses to play half the DVDs I put in (it's about 7 years old) and i can't use the subtitle menu on some of the newer DVDs (what the heck did they change???).

3. My cell phone (it's only 2 years old, sadly they're made to last about that long) is having issues. The batteries (I've two that i swap) only last a few hours each which is quite annoying and the #3 key doesn't work half the time. So it's either buy new batteries and put up with the flaky key or just buy a new phone. Phone it is.

So there is an excuse for my recent relentless consumerism and I suppose I just need to justify it to someone. Hi.

PS: Purchase a new tv stand, the new tv won't fit in the old one and watching movies on the floor is only fun occasionally.

PPS: Having a widescreen tv fucking rules.

November 07, 2004

Better living through highlight adjustments

I don't normally spend a lot of time playing with photoshop, but what the hell..

November 04, 2004

Look at the bright side

  1. Four more years of great material for Jon Stewart
  2. Unhappy liberals are ranting liberals -- and they truly write the best rants.
  3. State of the union address is more entertaining when you can play the mispronunciation drinking game
  4. No more lame heinz ketchup jokes
  5. We can look forward to some great writing in the next four years -- historically, the greatest artists and writers sprouted during economically depressive times
  6. We won't have to compete with India for jobs once the value of the dollar drops to reflect our growing deficit.


.. and the best point:

  • The Internet is still ours.

November 02, 2004

Picture of the week

Birds flying over the pacific - California coastal highway (route 1)
Picture of the week archive