" /> kasia in a nutshell: July 2002 Archives

Main | August 2002 »

July 31, 2002

Another strike against the DMCA

In case someone didn't think there were enough reasons to fight the DMCA, here's a new one..

Brought to you by The Register.

Hewlett Packard has threatened to use computer crime laws and the controversial Digital Millennium Copyright Act to muzzle a group of security researchers who unearthed a flaw in its Tru64 operating system.

The threat comes in a letter to SnoSoft from HP Veep Kent Ferson warning that the security researchers "could be fined up to $500,000 and imprisoned for up to five years" for its role in publishing code that demonstrated the vulnerability, CNET's Declan McCullagh reports.

Why do software companies seem to think that their customers ought not have the knowledge of dangerous exploits? Who is that protecting? Certainly not the customers.... Image is not *that* important.. just look at Microsoft..

I suppose if HP's intent is to alienate the technical community[0], congratulations, mission accomplished.

Makes me ill to think I used to recommend people buy HP printers..

More info on BugTraq

HP is just being plain stupid..

[0] - ugh, what kind of stupid term is that anyway.

July 30, 2002

Too funny..

I've forgotten about it's existance.. but pornolize.com is quite possibly the world's greatest invention.. I know, crude and rude, but funny as hell :)

Here's one of my recent entries pornolized..

Jerking in the motherfucking rain is cool!

I know.. I know.. being on trails when it's wet is bad karma since it helps in trail deterioration.. but I spewed since I do help out with them the deep throating good karma from that should balance it out..

Anyway, I had a point here somewhere.. oh right.. biking in the ballbusting rain is unclefucked very cool.. No people *at all*... no people means smoochs aren't as deep throated.. There were deer *everywhere*. The only sounds: wad pulls and my squeaky raunchs.

What an awesome day for a aardvarking ride..

Now I'll go do something good for humanity to balance out the bad karma of riding wet balls.. mea culpa, mea culpa..

Apache compile tips...

The things you learn when working on other peoples boxes...


  1. Make sure there is only one version of perl installed (remove that /usr/bin/perl5.01)

  2. If you want mod_so (you most likely do) don't even attempt to compile mod_perl into apache, it will seg-fault when running

  3. If your perl is compiled for large file support, disable it in mod_perl, (PERL_USELARGEFILES=0 when running perl Makefile.PL) otherwise it won't work when installed with apxs - it will seg-fault.

  4. If you want large file support, you need to compile mod_perl into apache, and that isn't very happy with mod_so
  5. .

I'm tired :)

July 29, 2002

Funny..

Steve pointed me to this funny image.

weblogic

Let me just say.. migrating from weblogic 4.5.1 to weblogic 6.1 is pure and complete and utter hell.

Thank you for listening.

Lesson of the day..

Don't drink and post kids!

True Porn Clerk Stories

Stole the link from Jeremy, sorry, just too good to not pass on :)

This is simply classic!

July 28, 2002

Trash on trails..

These pictures were taken in an obscure parking lot on top of the trails (route 44) at the MDC in West Hartford.. Most people use the main lot (I usually do as well, since it's a lot closer to my house). This lot is mostly just used by bikers since it provides immediate access to the best trails. This way don't have to go through the crowds and posers in the beginnings of the trail from the main parking lot.

I really hate what people are doing there.. I should have brought a trash bag and picked these up, so I'm not so innocent either (actually I meant to, forgot).. but just took some pictures instead.. assholes..

Picture 1
Picture 2
Picture 3

Biking in the rain is cool!

I know.. I know.. being on trails when it's wet is bad karma since it helps in trail deterioration.. but I figured since I do help out with them the good karma from that should balance it out..

Anyway, I had a point here somewhere.. oh right.. biking in the rain is indeed very cool.. No people *at all*... no people means animals aren't as scared.. There were deer *everywhere*. The only sounds: birds and my squeaky brakes.

What an awesome day for a ride..

Now I'll go do something good for humanity to balance out the bad karma of riding wet trails.. mea culpa, mea culpa..

Learning C after Java..

(Think John Lennon)

Imagine there's no classes,
It isn't hard to do.
No objects to send messages
No references too
Imagine all the methods
Static and you've got C.
O-ho you might say that that's a nightmare
And you're not the only one
But the language has its uses
And like Java can be fun.

by David Arnow (arnow@sci.brooklyn.cuny.edu) (I think, that's the only reference I found)

Shooting the messenger?

Edit: Found more information.

The Register writes in this story:

A Houston computer security analyst has been charged with hacking after demonstrating the insecurity of a county courts wireless LAN.

He's accused of accessing the system March 8 in an alleged intrusion that cost the county a reported $5,000 to clean up.

This type of case could set a very dangerous precedent. Based on the content of the article, this "hacker" didn't actually do anything other than show the insecurity in their wireless lan.. Why is he being charged at all? Why *can* he be charged? Isn't that a bit like charging someone with murder after they showed you how easily you could be choked?

I must be missing something in this story....If all he did was show insecurity.. where did the $5000 cost come from? This? :

District Clerk Charles Bacarisse told the paper that no confidential information was disclosed but the alleged intrusion eventually resulted in the county closing its wireless LAN only a month after it was activated.

.. and this is not the fault of the incompetent admin who set this up for them but the fault of the guy who showed them they have a problem.. They should have taken that $5000 and invested in a decent security expert.. perhaps the one that showed their vulnerabilities in the first place.

Further proof: government and computers don't mix.. they should just stick to using a pad and pencil, we'll all be better off..

July 27, 2002

Interesting email

I've received the most interesting e-mail message tonight.. The actual message content was just a very illuminating "fuck u".. Generated by Microsoft Outlook.. I cannot quite figure out who this person is or why they would send me this particular message? Have the rumours of my love-life spread as far as what appears to be Portugal? Honestly,.. I am not *this* desperate for some male-female relationships.. Thanks for the offer.. whoever you are..


Anyway.. here's the whole lovely thing, headers and all.. (I took the liberty of dumbing HTML down to simple text)


Return-Path: <avitor@sapo.pt>
Received: from sapo.pt (mail2.ptm.pt [194.65.79.73])
by geddy.pslashg.org (8.11.6/8.11.6) with SMTP id g6S29Ur31338
for <kasia@pslashg.org>; Sat, 27 Jul 2002 22:09:30 -0400
Received: (qmail 4192 invoked by uid 0); 28 Jul 2002 02:15:57 -0000
Received: from unknown (HELO 0) (avitor@sapo.pt@[213.13.8.145]) (envelope-sender <avitor@sapo.pt>)
by mail2.ptm.pt (qmail-ldap-1.03) with SMTP
for <kasia@pslashg.org>; 28 Jul 2002 02:15:57 -0000
Message-ID: <000b01c235dc$8dbac4e0$91080dd5@0>
From: "vitor alves" <avitor@sapo.pt>
To: <kasia@pslashg.org>
Subject:
Date: Sun, 28 Jul 2002 02:52:19 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0005_01C235E1.CA19D700"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C235E1.CA19D700
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

fuck u

------=_NextPart_000_0005_01C235E1.CA19D700
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>fuck u</FONT></DIV></BODY></HTML>

------=_NextPart_000_0005_01C235E1.CA19D700--

Today's crop of bad pictures..

Brought to you by a log in the woods on which I sat for a few minutes scaring off other bikers.. "What's that weird chick with a camera doing there??"

It was a nice log. The surface was a tad chewed up and there was a cute hole in it. Unfortunately nothing came out of it.. I was hoping for something interesting, a chipmunk maybe.. So instead I took pictures of a little bush that was growing next to it and some branches.

I only fell off the bike once today! Should have a nice crop of new bruises ready for tomorrow. Maybe I'll take a picture of them.

July 26, 2002

Few random things..

I was bored today and created a Yahoo profile.

Today is Sys Admin appreciation day. Did you hug your sysadmin today? I used to be one before I sold my talents to the dark side and became a programmer, so I know sysadmins just adore hugging and general touching from their users. Go do it now!

Jeffrey published the thank you notes from his book on his website. I'm mentioned somewhere down the middle with a whole bunch of other people that were probably 10 times the help I was. It's shameless self-promotion on my part.. I just think it's really cool :)

I'm thinking of adding the ability to create footnotes (see the brace style entry below for example of what I want to do) with some easy codes in Movable Type, I love footnotes! I don't use perl often enough, this should be a good exercise.

July 25, 2002

Some childish humour

The ultimate in Bush-monkey montages

Too funny :)

I caved in..

.. and signed up for Yahoo IM, ah well, those who know me, it's the same nick as I have on aim, those who don't know me phhhhlbbbttt (or ask, I may just give it to you).

July 24, 2002

Hacking made legal!

Of course, not for everyone, just those that have pockets deep enough to buy themselves representation in the wonderful legislative branch of our government.

According to this story at The Register, representative Berman from California (go figure) is preparing a bill that will allow copyright holders to hack computers and networks if they feel their "property" is being ilegally distributed!

In Berman's words:
"a safe harbor from liability for copyright owners that use technological means to prevent the unauthorized distribution of their copyrighted works."

This is just further proof that not only does our government keep on introducing laws (see the DMCA) that deal with technology and issues they have absolutely no clue about, but also that they're out there to protect and serve the businesses (that have money) not their constituents.

Well, if this isn't one huge middle finger to the citizens of this country (and really, the rest of the world, since the Internet has no borders) then I don't know what is.

July 23, 2002

Coding and brace styles..

I have a co-worker that drives me insane with his brace style[0] and unfortunately I get to work with his code quite a bit[1], so today's rant is about that.
I subscribe to the good old Kernighan & Ritchie style of putting the opening brace last on line and the closing brace first.. In other words this:

if (foo == 0) {
    do something;
} else if (foo == 1) {
    do something else;
} else {
    barf;
}

Simple and easy right? I've been asked[2] to justify this usage many times before in middle of heated debates. It's simple..

  1. Clearly identifies the beginning of enclosed code.
  2. No need to waste a line just for one brace, hence code can be more compact without sacrificing readability.
  3. My favourite CS professor in college used it![3]

Then there is the other quite popular style (some of my co-workers use this, I've no big issues with that).

if (foo == 0) 
{
    do something;
} 
else if (foo == 1) 
{
    do something else;
}
else 
{
    barf;
}

It's still pretty clean and rather readable, even with nested code. It wastes a lot more space, but hey, we're in the 21st century, we have large monitors now.

Then there's this..

if (foo == 0)
    {
    do something;
    }
else if (foo == 1)
    {
    do something else;
    }
else 
    {
    barf;
    }

Can anyone tell me where this style came from? I've never seen it before and it's driving me literally insane (literally). I think it makes nested code hard to read, particularly when I see it mixed in with one of the other styles[4]. It's just.. well.. weird!

Additionally, every time I edit code formatted like this I need to load a different .emacs file or indent the code by hand using the spacebar. That's a big pain...


[0] - hi Burt! ^
[1] - it's actually (usually) *really good* code, just *really weird* bracing. ^
[2] - hi Burt! ^
[3] - ok, so that's not a real reason. ^
[4] - I realize this is a fault of the horrible programmers that edit someone else's code and just mix in brace styles. Either re-style the entire code, or just use the existing! ^

July 22, 2002

Geek mating rituals

I'm a (*gasp*) computer geek, tough one to figure out no? I mean I have a blog and a domain unix-girl.com.. but I digress.. tonight, being Sunday night, I was going through some logs for my server. Yes, I realize it's not normal, but I'm a geek, it's what I do for fun and general amusement. (Oh, that guy reloaded entry number 31459 *giggle*[0]).
This made me think (*gasp*[1]).

Someone should at some point write up an article about "geek mating rituals", no, really it would be amusing to at least some part of the population (read: me)..

How many of you have ever exchanged blog urls.. then searched through the logs with burning cheeks and heaving beasts[2].. "did he look?" "did she log in?".. How bloody sad for us.. I mean, what is it that normal people do in these situations? My theory is, this is the geek equivalent of waiting by the phone, just not quite as obvious.

Surely it progresses from there.. I'm a little new to the blogging world (I'm certain most of you readers realized my archives only go back a couple of weeks, oh the horror).. but I'm awaiting my first breathless realization "oh!!... he made an anti-microsoft entry!".. this would be about my chosen other whose blog i read, of course (actually, there's more than one, teehee).. I can't help but wonder how far this geek mating will take me.. surely I won't at any point reload someone's blog more than 10 times a day? That's .. so.. slutty...

[0] - okay, so that's an exageration
[1] - no I'm not asthmatic, I do this for emphasis of certain parts
[2] - couldn't resist, sorry..

July 20, 2002

Selling out the customers

My internet provider (AT&T) whom I pay $45 a month for my service seems to want to sell me out to spammers and telemarketers.. I am pretty mad..

Read more about this in the post I made on dslreports.com

If the business model is not viable to survive at current subscription rates.. raise the rate.. don't sell out the customers!

July 19, 2002

Content!

No, really, I actually have an index page now! With design shamelessly stolen from one of movable-type's templates (well, I did change the colors and some other things a bit..).

I also did a write up about configuring virtual hosts in apache.

I'll create my own design for this site soon, for now this shall do, it's not bad, is it?

New server

My blog is now on a new server with much faster connection.. This was a *lot* of work.. perl module dependency hell (tip: if you don't have bzip devel installed, many modules are *very* unhappy), moving files around.. configuring, importing, exporting... blah..

I should add: If anyone (hi mom) sees any glitches, let me know? Thanks..

July 18, 2002

Regular Expressions book

Jeffrey Friedl's "Mastering Regular Expressions" is available now and ranks #32 on Amazon today! Nice job Jeffrey! It's a great book, highly recommend it.

You can see my name in it under "thank you" notes.. I was a small help with the Java chapter

More bandwidth..

Tomorrow.. I'm moving this whole mess to a new server. It has significantly more bandwidth (dual T1 as opposed to 128 up dsl line) and a faster box (dual 200mhz as opposed to one 166).

I will also finally utilize a domain name I bought almost a year ago.. unix-girl.com...

This blog has generated a lot more traffic than I ever expected (mostly due to mis-directed google searches) and the move will be a *very good* thing.. and it's thanks to a very generous friend providing me hosting for free (and root on the box!).

July 17, 2002

Employees suspended over e-mail abuse

In this ananova story:

Hewlett Packard has suspended around 150 staff in the UK over alleged email abuse. It says it's fired a 'small number' of permanent staff so far.
HP says the investigation is focused on "the viewing and sharing of unauthorised and inappropriate material".

I'm curious.. I would assume by "inappropriate material" they mean porn, I wonder how much of it was spam? I get porn spam in my e-mail box (well, not at work, but personal that I do read at work) on nearly daily basis (register a domain with a valid e-mail address and you'll see what I mean).

If they mean joke e-mails.. sheesh.. I think half of my cow-orkers would be fired over that one.. (they should be for the severely unfunny ones and the stupid urban legend forwards).

Attaching JDB to Tomcat

I wrote this up once in a forum post on dslreports and recently someone asked me about that again... I've been working on a *better* and more encompassing (ie: not just tomcat) write up to post somewhere on my web page, but for now, to preserve it for posterity, here's what I posted on dslr a long time ago..

JDB is the debugger that comes with Sun's JDK.
It's very important to use at least version 1.3.0 of JDK, otherwise the debugger is rather flaky and tends to core dump.

1. Start tomcat with these options:
-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:server=y,
transport=dt_socket,address=8000,suspend=y

8000 can be replaced by any other numerical value.. it basicaly tells jvm to listen on that port for a debugger.

What will happen now, is tomcat will start but suspend itself and wait for a debugger to attach before proceeding.

2. start JDB and attach:

jdb -attach localhost:8000

in here, localhost can be replaced by where tomcat is running if it's running on a different machine and 8000 can be replaced with whatever port you set jvm in tomcat.

Voila! You can now debug servlets.

July 16, 2002

Quote of the day

"We'll make great pets"

Not the most profound of statements but makes sense to me a the moment.

July 13, 2002

Today's pictures

I usually take my camera with me when I go biking, actually I pretty much take it wherever I go. You never know when you'll get a chance to shoot that Pulitzer picture, right? (Yah, right).

Today's story..

I went on one of the steepier trails and managed to tumble down a bit.. and since I was already off the bike (and being eaten alive by mosquitos) and it was a rather nice area next to a little stream, I took a couple of pictures.. I briefly considered taking a picture of the freshly developing bruises on my legs, but thought better of it..


  • This is the trail down which I tumbled.

  • I saw a bush of these pretty up-close and personal.

  • The nice stream I almost fell into.

  • Dead tree in the stream.. I suppose this could have been me (if I was dead and looked like a tree) but I always wear my helmet.

Spammers and lies

This quaint text was included on top of a spam message I received today (To see the full message with headers click on "more" link on the bottom of this entry.).

LEGAL NOTICE: Pursuant to the requirements of 47 USC Sec. 227 b(2)(B)(ii)(I), and related FCC regulations, this message is *not* an unsolicited email (UCE). This message is the product of a consensual, pre-existing and ongoing relationship between sender and recipient. Attempts to intercept this message are in violation of 18 U.S.C. 2511(1) of the Electronic Communications Privacy Act (ECPA), which subject the interceptor to fines, imprisonment and/or civil damages.
This newsletter is a supplement you subscribed to.

Okay, my friend, you picked the wrong gal to spam..

  1. "This newsletter is a supplement you subscribed to". - Two lies right there...
    • (a) I don't define newsletter as a one-time mailing about a crappy product.

    • (b) I know what I subscribe to.. this isn't it.

  2. Remove me link: hm, you need my fulll name to remove me from your spam list? I don't think so.. If I was stupid enough to provide this information on your site I'm pretty sure it will just become a commodity - valid email address AND a name! Nice try.

  3. Title 47, Sec 227 b(2) reads:
    Regulations; exemptions and other provisions The Commission shall prescribe regulations to implement the requirements of this subsection. In implementing the requirements of this subsection, the Commission -

    (A) shall consider prescribing regulations to allow businesses to avoid receiving calls made using an artificial or prerecorded voice to which they have not given their prior express consent;

    (B) may, by rule or order, exempt from the requirements of paragraph (1)(B) of this subsection, subject to such conditions as the Commission may prescribe -

    (i) calls that are not made for a commercial purpose; and

    (ii) such classes or categories of calls made for commercial purposes as the Commission determines

    (I) will not adversely affect the privacy rights that this section is intended to protect; and

    (II) do not include the transmission of any unsolicited advertisement; and

    (C) may, by rule or order, exempt from the requirements of paragraph (1)(A)(iii) of this subsection calls to a telephone number assigned to a cellular telephone service that are not charged to the called party, subject to such conditions as the Commission may prescribe as necessary in the interest of the privacy rights this section is intended to protect.
  4. Do I even have to say it? Title 47: "Telegraphs, telephones and radiotelegraphs"


    1. Does not apply to the Internet, you spammed me via e-mail

    2. Is meant to protect consumers from unsolicited contact by people like you

    3. Does not define what unsolicited email is or is not, since it has nothing to do with email

    4. This message is not a product of a pre-existing ongoing relationship between us (I'm not that desperate for a relationship, thanks for asking). However, by sending me this lovely piece of junk you have pissed me off enough to formulate a new, ongoing relationship in which I will make sure you will lose some things.. like your Internet access.. your website and any other thing I may find while tracking you down.. good luck.


I hate spammers, but what I hate even more are stupid spammers that try to tell me that not only do they have the right to spam me, but put *Legal threats* (unfounded as they may be) in their message.

Return-Path: <Kenny8248s18@earthlink.net>
Received: from alias.acm.org (alias.acm.org [199.222.69.90])
by geddy.pslashg.org (8.11.6/8.11.6) with ESMTP id g6D7A7r04614
for <kasia@pslashg.org>; Sat, 13 Jul 2002 03:10:08 -0400
Received: from earthlink.net ([213.76.248.42])
by alias.acm.org (ACM Email Forwarding Service) with SMTP id COB73880;
Sat, 13 Jul 2002 03:14:54 -0400
Received: from q4.quickslow.com ([109.205.54.112])
by mta21.bigpong.com with esmtp; 13 Jul 0102 18:05:48 -1000
Received: from [130.191.133.94] by sydint1.microthink.com.au with SMTP; Sat, 13 Jul 0102 08:04:22 -0900
Received: from unknown (75.48.251.164)
by anther.webhostingtotalk.com with smtp; Fri, 12 Jul 0102 23:02:56 +0400
Received: from unknown (HELO hd.ressort.net) (22.141.59.222)
by mx.loxsystems.net with smtp; 13 Jul 0102 03:01:30 +0400
Reply-To: <Kenny8248s18@earthlink.net>
Message-ID: <036b48a51a7b$1664c5b7$2bc32ac3@lomoaq>
From: <Kenny8248s18@earthlink.net>
To: Kenny@geddy.pslashg.org
Subject: The miracle drug is finally here! 2836otws1-898xnzs3273N-21
Date: Sat, 13 Jul 0102 09:36:08 -0300
MiME-Version: 1.0
Content-Type: text/html; charset="us-ascii"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: AOL 7.0 for Windows US sub 118
Importance: Normal

Hiya,


A new medical breakthru! The miracle drug has finnaly arrived! Check it out!



Waiting to hear from you!



LEGAL NOTICE: Pursuant to the requirements of 47 USC Sec. 227
b(2)(B)(ii)(I), and related FCC regulations, this message is *not* an
unsolicited email (UCE). This message is the product of a consensual,
pre-existing and ongoing relationship between sender and recipient.
Attempts to intercept this message are in violation of 18 U.S.C. 2511(1) of
the Electronic Communications Privacy Act (ECPA), which subject the
interceptor to fines, imprisonment and/or civil damages.


This newsletter is a supplement you subscribed to. To unsubscribe from
this mailing list and receive no future letters, simply
go to our remove website, found here.



Message ID :


5606DVhA8-08l11

July 12, 2002

Do you want Microsoft to take over your computer?

Read this article at The Register.

"You agree that in order to protect the integrity of content and software protected by digital rights management ('Secure Content'), Microsoft may provide security related updates to the OS Components that will be automatically downloaded onto your computer. These security related updates may disable your ability to copy and/or play Secure Content and use other software on your computer. If we provide such a security update, we will use reasonable efforts to post notices on a web site explaining the update."

"Reasonable efforts to post notices" ? What in the world does that even mean!

This is probably just their way to cover their asses in an event like Code Red, but the ambiguity of this EULA really scares me.

MySQL and auto-increment

Over at Jeremy Zawodny's blog he writes a response to an article by George Reese at O'Reilly's OnLamp.

Good stuff.. I just have one little correction..

Jeremy says:
Finally, he says "You cannot easily determine from an application what values MySQL has automatically generated." Why would you need to do that? If you code the application properly, that's not going to be an issue. Remember, this is an AUTO_INCREMENT column. It's supposed to be generated AUTOmatically. If your code is generating the values, don't tell MySQL that it should be an AUTO_INCREMENT column. It's as simple as that.

I think what George is thinking about is a function similar to Oracle's sequence.CURRVAL which is easily obtained by using this query:

SELECT LAST_INSERT_ID()

If he wants to duplicate Oracle's sequence.NEXTVAL, it can be really easily duplicated in MySQL by the use of an additional table.

Now this isn't the same as having the nice and easy Oracle function but it serves the same exact purpose and doesn't depend on code to generate the auto_increment value.

Let's say you want to know what is the next value that is generated on an AUTO_INCREMENT column (we'll call it SOME_KEY) on table SOME_TABLE

1. Create a table, let's call this one SOME_SEQQ:

CREATE TABLE SOME_SEQQ (
   QUERY VARCHAR(200)
);

2. In that table now store something like this:

INSERT INTO SOME_SEQQ VALUES ('SELECT MAX(SOME_KEY) FROM SOME_TABLE);


Now when you define SOME_TABLE, just define your SOME_KEY as you normally would an AUTO_INCREMENT column.. something like this, perhaps:

CREATE TABLE SOME_TABLE (
   SOME_KEY INT NOT NULL AUTO_INCREMENT,
   SOME_DATA VARCHAR(20) NULL
   PRIMARY KEY(SOME_KEY)
);


Now in your code, when you want to know what will be the next value generated by your AUTO_INCREMENT column, you just need to query your SOME_SEQQ and increment it. This is also better to query for the current value rather than using the built-in MySQL function as it is *more* fool-proof (if not completely) than that.

Obviously, this is not fool-proof but it's better than nothing and probably the easiest way to duplicate what Oracle does without the use of stored procedures.
Note: this might easily break if you have more than one application inserting data to the same table!

I've done a lot of work duplicating Oracle functionality for MySQL to preserve the flexibility of our code and w/o going database specific on our SQL (we support more than one database, obviously).

July 11, 2002

Linux users

Lately I've been generally annoyed with Linux users as a group. One only needs to go and read a few comments on any article on slashdot that deals with Windows to see what I'm talking about.

Good example here.

Reading some of those comments makes me ashamed of being a linux user. Not to mention reminds me why I almost never read slashdot anymore...

It's as if some horrible forumla has been released onto the online community...

"Must hate Microsoft, must bash windows, must recommend linux above all others whether it makes sense or not".

Heck, I hate Micro$oft[0], I wouldn't use windows if someone paid me to[1] and I wish the entire universe would realize that linux is indeed 1000 times better than windows. Then I remember my mom.. how she is struggling with windows[2] and I thank the nearest deity she does't know about linux and how wonderful it is..

This is very simple: Linux is a great operating system.. I love my command line, wouldn't want to live without it, however, it is not suitable for everyone. Now if everyone would just keep that in mind we could all live in happy harmony..

.. and I bet half those slashdot geeks slamming anyone who uses windows are secretly posting from a windows machine themselves..

It's okay (heck, great) to hate Micro$oft, but know why you hate them.. not just becuase a website full of computer geeks tells you to.


[0] anyone reading this that knows me can attest to that
[1] well, except for when I use it at work, that doesn't count! I keep my fingers crossed behind my back the whole time! Besides I cheat, I just run an xserver and use open windows on top of NT.
[2] Thankfully she's not nearly net-savvy enough to find this site..
[3] Damn, I feel like I'm back on a.s.r with these footnotes..

July 10, 2002

Sarcasm for everyone

.. or is it? This is amusing..

Everyone in the world is getting sarcastic. It's not just comedians and dicks anymore. Years ago, sarcasm was reserved for people talking to people stupider than them. Now the stupids are fighting back, and doing it so badly, you can't trust anything people say anymore.

The whole thing

Oracle and Open Source

In this article, Computerworld quotes Larry Ellison of Oracle:

While Oracle Corp. is committed to the open source movement and its standards, database code will remain proprietary because there will be difficulties in providing services if customers make alterations to the source code.

While I understand a company that tries to protect source code that cost them quite a bit of money to develop, this has to be the lamest excuse ever. Difficulties in providing services if customers alter the code? Please! If you don't want to go open source, fine, but at least admit to the real reason..

On the other hand, SQLPlus could only be improved by going open source.. I know I would love to put some decent functionality into that thing.. Why can't a multimillion dollar company develop a decent command line client for their really expensive product, when an open source one like MySQL can? (Not only decent.. but an excellent one.) Why go open source with the client? Silly question..

July 09, 2002

Java servlets..

Linux Magazine in this article writes:


The disadvantage of Java Servlets is that they don't provide, by default, a good separation of program logic and presentation, since statements that output HTML are intermixed with the application logic, making maintenance difficult. One solution to that problem is the Velocity template engine, a Jakarta project (http://jakarta.apache.org/velocity).

What baloney.. I've done this for a living for a while now and there is absolutely nothing in the servlet design that prevents an easy separation of the application/logic layer from presentation. It's all about programming style.. I wish some authors would do more research and less whining.

Just fired them off an e-mail about that.. and that means I'm really annoyed!

July 08, 2002

IRC Funnies

These crack me up.. I think I spent too much time on IRC in my forming years of early 20s...


<tatclass> YOU ALL SUCK DICK
<tatclass>er.
<tatclass> hi.
<andy\code> A common typo.
<tatclass> the keys are like right next to each other.

July 07, 2002

On bikes and hill climbing

Everyone has his achilles heel... me? I have a hill. Literally. No, that is not a typo... what I'm referring to is the gigantic... no... humongous hill at the start of my favorite mountain bike trail.

I love mountain biking. It's by far my favorite outdoor activity and I try to do it as often as time permits. So of course, today being Sunday I hung my bike up on the rack, donned the ridiculous tight, padded shorts (who designs these things anyway?) and went off to the park.

Today being Sunday, the parking lot was filled with expensive SUVs packed with tanned people dressed in the latest in bicycle designer gear. You know those very colorful and bright, tight tshirts that make one look like a professional biker? That designed gear. I always feel rather inadequate in my $15 (sale, 50% off) shorts and one of the white or gray tanktops that I tend to wear when biking.

But enough about clothes... now the bikes. If my clothes make me feel inadequate... well... my bike just makes me want to hide under the nearest trail blazer. As everyone in the lot is putting together their Treks, Cannondales and other assorted shiny, high performance mountain bikes covered with shocks and other great stuff (Shimano, I bet) I have my bike. Well, at least it looks like a bike. It has shocks (front, only) and it's got Shimano stuff (ooooh), but that's where the good part ends. I've 18 gears, out of which 6 don't work, but that's okay, I never use the higher gears anyway... It needs a tune-up. Badly. I'm afraid when I take it to shop and ask for one they'll laugh me out the door. "Lady, it'll be cheaper to just get a new bike!". The good part is, the gears that work actually shift; most of the time.

I remember one time a seasoned veteran biker who was inflating his tires next to me (doesn't that just sound dirty?) struck up a conversation.

"What the heck is that?".
"A bike".
"No, really, where'd you get that?".
"Long story, there's a brand name sticker on the bike... see?".
"oh, well, good luck..."

I truly do believe he meant that last part.

Now the trail. I usually bike at the MDC in West Hartford. Known to the non-biking universe as the West Hartford Reservoir. There are many really nice trails at this park. Some are great for beginners, some advanced stuff (or so I hear) and everything in between.

There's really only one way to get to all the trails from the main parking lot... follow the asphalt-covered road to the first fork... or the next... depending which trail you intend to take. This is also where mountain bikers get separated from just bikers. Me? I take the very first right turn into the dust-covered (or mud, depending on weather, today it was dust) rocky trail that leads into the woods. I can do that... I have a cheap bike and am not afraid of abusing it. (I have a theory on the owners of the really nice, expensive bikes. It runs along with my theory on the owners of the really nice, expensive SUVs. In a gist: they never see the really rough terrain, the equipment is just too expensive for that.) Follow the trail... cross the asphalt path once more and I'm off into the woods, or rather climbing up a long, annoying hill to try to get to the really fun trails.

I have a goal in life. This goal is to be able to climb that one, long hill in one shot. Don't laugh at me, it's a worthy goal.

Time to present another one of my bike-related theories. The only time you will meet other bikers (unless they came with you) and hikers on any of the trails beyond the basic asphalt is when you are climbing a long or steep (or both) hill and are near dying. It's true. I proved it today. I climbed several hills that gave me some trouble, not enough to stop, but enough to start breathing heavily and on each and every such occasion there were people.


Case in point:

Setting: Long-ass, steep hill on a trail.

There I am climbing the hill in the first gear, breathing heavily, drenched in sweat, my face the color of a freshly cooked lobster when another biker is passing me by with ease.

"Hi" - he says, cyclist do that, we're nice people.
"Hello" - I wheeze in return.
"Are you okay?" - You could tell he was concerned, I'm not sure if it was the bright red color of my face or the fact that my knuckles were whiter than snow as I gripped the steering column in some sort of desperate hope that the guy wouldn't stop. Yah, too late, he did.
"I'm fine" - I said through clenched teeth and continued my painful ascent.

He shrugged, whipped his pedals around a couple of times and cleared the hill without a problem.

Now you may ask what is the point of me describing this embarrassing moment? It's this. Life is just not fair. See, I'm hardly an advanced biker (you can laugh here) but I'm not a beginner either... I just have this little hill climbing problem. Normally, I look cool and slick riding down the trails in some impossibly high gear (well, the ones that work on my bike anyway) the wind in my hair and so on.

The moral of the story? Next time you see a sweat-covered, red-faced female in cheap shorts on the side of the hill, don't think she's in trouble. Just because she looks like she's having a heart attack, that doesn't have to be the case, she's probably just horribly embarrassed about her hill-climbing ability.

Damn colours..

I just cannot pick the right colour scheme.. I'll leave the greens for now, but really, I'm not happy with them..

I'm going insane switching shades and hues and ....

July 06, 2002

Some pictures..

I'm still working on this whole amateur photography thing.. Took some pictures while riding my bike at my usual park.

Lessons from today...


  1. I really need a portable tripod I can just take bike riding with me.. out of all the pictures I took, maybe two were sharp.

  2. I need to learn how to take better light readings before shooting a picture.

Here are the couple pictures I thought were Interesting.. rest are really crap.. Click on the thumbnails to see the full (pretty big) pictures.

- Mushroom, self explanatory.
- Not a great picture.. just my bicycle in my favourite resting place on the trail. It's essentially a big rock on top of a hill with a great view.
- This is along my favourite singletrack that leads between a couple of dikes through a great meadow.. These flowers looked like a soft carpet.
- Not a great picture.. but a nice view at the same place as my bicycle picture above.

One of these days I'll organize the thousands of pictures sitting on my hard drive and post them in the same directory.. for now that's all that's in there.

(Also need to either write or find a good image index generating script.. )

Ho hum..

http://www.sk.com/news/newsletter/current/essay.asp

That is just annoying..
RIAA.. bah..

Tip of the day..

When setting up MySQL, remember the root password you set.

If you forget the root password for MySQL, read the documentation before you go off and reinstall the bloody thing..

If you forget to read the documentation before you reinstall, don't read it after you already reinstalled just to find out there is a really easy way to reset the root password for MySQL. It's just leads to frustration and general annoyance with yourself...

Me? Oh, I would never do something so silly..

Layout..

I'm working on it.. I don't like the colours.. Fonts are okay.

Hm, well, who would have thought I would be learning stylesheets.. oh well.. (Microsoft copy-righted technology on top of that.. ).

Did I mention it looks horrid in Netscape? Whatever happened to stylesheets being cross-browser compatible.. grumble..

First Entry

Would of course have to be a test entry.. so.. testing.. 1.. 2.. 3..