" /> kasia in a nutshell: September 2002 Archives

« August 2002 | Main | October 2002 »

September 30, 2002

Neat visual illusion

Take a look at this image.

My first explanation is pretty obvious.. it's caused by the gradual changes in the colours and contrast in surrounding squares.

A friend suggested the checkerboard pattern is also at fault here..
To quote:

Our minds want to see the perfect idea of a checkerboard (alternate DIFFERENT colors) hinted at by the picture, so we are "not seeing" the filters applied to the picture like shadows or graduation of contrast that make the intensity the same as it hits our eyeball. The sense of a border is much stronger than the sense of absolute color values.

That explanation also makes perfect sense, in reality probably a combination of both.

Neat.

Original found by Steve.

MySQL: Linux or FreeBSD?

Nice write up in Jeremy's blog.

I've only used it on Linux.. and have been really happy with that result so won't be trying FreeBSD any time soon, but it's good to know Linux was the right choice :)

September 29, 2002

Somebody fix google

I get an amazing amount of google hits.. it seemed high, so went and looked in the logs.. Google is giving me an impossibly high rating for things it really shouldn't.. I mean, I understand why I'm #1 hit for "kasia", that makes a certain amount of sense.. but some of these.. ugh..

Here's some examples.. (there are a lot more like these):
python in a nutshell - number 1 hit over O'Reilly's site for a book of that title.
apache virtual host config - number 1 over apache.org
true porn clerk stories- number 1, over the site that hosts the damn things.
mysql auto increment - beat out mysql.com documentation..

I do know that blogs skew google ratings.. but I suppose the more people complain the sooner they fix it? I'd much rather have the google engine that works as it should (or used to) than more hits. Here's hoping they're working on this.

You can't expect me to be brilliant all the time.

Let's not beat around the bush, we're bright people. We, being programmers, sys-admins, other assorted computer geeks. It's nothing to be ashamed off.. so some of us are a bit socially-inept, reclusive or elitist.. so what? Somehow I doubt anyone but people like this read my blog..

Anyway, do you ever get the feeling that everybody expects 100% brilliance 100% of the time from you?

Well.. I'm getting tired of that. For once I want to be the one constantly asking questions and not listening to the answers.

This is my plan, from now on, once a month I will be dumb. One day a month of complete and utter stupidity from me. This should even out the playing field a bit, don't you think?

So tomorrow don't expect brilliance or humour from me.. instead, this is what you'll get:

1. At least 5 questions I should have known the answer to in my first year CS class.
2. Approximately 10-20 issues to which an answer can be found via a 2 minute google search.
3. 3 classes that are checked in but don't compile.
4. Three to Four hundred lines of untested code.
5. I'll ask you to install my sound card, modem and some other computer device.
6. I will be forwarding every single joke I see even if I've already seen it 400 times. It's that funny.
7. That Disney email? I'll believe it tomorrow..
8. I'll eat my lunch inside and leave the dishes in the sink for my co-workers to deal with.
9. I'll spend half my day talking on the phone. Loudly. In Polish.
10. I will disable my anti-virus software and execute every single attachment.
11. I'll work on my sun box as root.

This should keep me busy enough to result in zero productivity for the day.

I think we should all do that. Everyone who can sympathize with this issue, I call on you, be stupid for a day. For what purpose? Who cares, but it should at least make you feel a bit better next time you're expected to give a brilliant answer in under 5 minutes to a question you have no time to research.

(Yes, I am cranky today)

September 28, 2002

Bits and Pieces

Catching up on my blog reading.. so doing an 'everything' entry ala Jeremy.

Database refactoring
Awesome.. via Mike.

Jan..
is coming to New York. Don't fall into a tourist trap, Jan.. forget Central Park and the former world trade center site.. go see some real New York.. Lots of good stuff in the village and brooklyn.

Steve..
Update your bloody weblog..

Sys-admins
From The Fuzzy Blog an entry about sys-admins and what makes them professional.

"They don't make you feel stupid".. well.. Sometimes that's not easy. Good example from my days as a sysadmins (yes, I crossed over to the darkside and am a programmer now but used to be one of the legions of hard-working, hard-playing, stupid-joke-cracking sysadmins).

A user once came to me claiming his monitor broke.. "how?" "nothing displays" "did you change anything?" "no, didn't touch anything, I swear!". Okay, see, this is where you can make a user feel stupid with impunity, because he just broke rule #1 "you fiddle with something, you say what you did and save the poor sysadmin countless hours of trying to figure out what the heck happened.". Of course he changed something.. he set the resolution to 1600x1200.. with a 15" monitor that won't work very well.

Chicks dig...
Mark says that they dig OSX.

My t-shirt disagrees. It says that chicks dig unix. Then again, maybe it's just an all-encompassing category..

Today, this chick digs cold medication *cough*.

*cough* *sneeze*

I've been battling a nasty cold for two days now.. Maybe if I actually stayed in bed for longer than 5 hours I may get better..

In the meantime I'm creating a mountain of used tissues, popping cold medication and coughing out colonies of virii. I think I may have selfishly infected half my co-workers yesterday as I went in to work thinking it was just a little one.. it's not.

Today, I'm staying home and working on getting better.. it's a promise. Hot tea with lemon and honey, coming up.

September 27, 2002

Keyboards

Ask talks about keyboards and key remapping. This is really a topic dear to my heart.

I'm a unix programmer. I do most of my work in emacs (rest in xterms) and that means I use the ctrl key quite heavily. In my previous job I was lucky enough to have my own Sun machine with the properly placed ctrl key (where the caps lock is on the PC keyboard). Not so much luck in this job. I have a pc (yuck, yuck) which I basically just use as a dumb terminal and make an XDMCP connection to a Sun eserver and work on that (open windows, teehee).

When I first started working here I started to have pains in my left hand. This is scary to someone who types for a living.. if I can't type, I can't program. Turns out the culprit was the incredibly bad design of a PC keyboard. Think about it, which key do you use more often, the caps lock or the control key? Who in their right mind would put a key that's used heavily in a position that is awkward to reach when touch typing and causes the little finger to be twisted in an unnatural manner. I've remapped my keys (Ask has directions on how to do that in his entry) no pain ever since... (my computer at home has had remapped keys for years).

These keyboards look pretty good.. unfortunately I never had any luck getting used to an ergonomic keyboard. I can type really fast, but not on one of those keyboards.. can't quite figure out why that is.

Now the happy hacking keyboard is what I really want to get.. Too bad I can't quite justify spending that much money on a keyboard just now..

Database schema tool idea

One of the things I've been pretty busy with at work is making sure our code is no longer Oracle specific. We want to be able to dump a copy of MySQL on a box and test on that.. since administering a copy of Oracle just for a team of 4 people is asinine.. (right now we share Oracle with another team, we step on each others toes a lot).

So in the process of doing this I discovered the only copy of our schema definition (it's a big one too) lives in Erwin. Yuck. So it's either create a version for MySQL in Erwin (no way, no how am I doing that) or a flat file SQL script. Of course this is about hm, 3K lines or so.. a maintenance nightmare.. not to mention having to maintain two separate definitions of the same schema.. one for Oracle, one for MySQL.

So this is the idea my boss and I discussed: A tool that will store the defintions of tables, views, primary keys, indexes, etc.. and the same tool will either create, update, drop, insert.. whatever is required to keep a schema in synch with a definition. This way I can make it non-database specific, as the tool will know which db it's working on. Schema look ups become simpler as only need to use grep.. and only one copy of the defition needs to be maintained. Need to create a new copy of the db? Just run the tool.. Neat, no?

September 25, 2002

More random personal pictures

This time it's my car and my bike all in one lovely shot.
That sticker on the back window says übergeek.

Ridiculous pop-up

Received this pop-up at work today while browsing some useless site mid phone-meeting. I'm actually kind of sorry I did not click on it to see who it was and what exactly they were selling (I'm guessing a firewall), but the ridiculousness of it struck me enough to take a screen shot.

It's funny.. however there is a dark undertone here. Essentially these companies are taking advantage of the lack of knowledge of the average computer user to push their products. Shame on them.

Imagine someone like my mom (as clueless as is humanly possible when it comes to the internet and computers). If she had seen that I'm quite sure she would be calling me screaming about an error message that came up with some horrible warning.

I hate marketing. Hate it, hate it, hate it. If a company needs to use deceptive practices like this to advertise their product they don't deserve my (and anyone elses that I can convince) patronage.. should have checked who it was, sigh.

September 24, 2002

Where I spend 8+ hours a day

Was posting this elsewhere.. might as well share it here.
My work space. It's an office I share with two co-workers, divided by a cube wall for some privacy..

Edit: added the view from my window. This was taken last fall.. but it hasn't changed at all.. other than the coloring on trees.

Oracle makes lazy programmers

There is really no accepted standard for SQL. That's a big problem.
There's an "agreed to" standard but that's not really the same as having an actual standard.

By allowing things like:
"DELETE table WHERE id=42"

Oracle is creating a legion of programmers that don't know any better and sprinkle SQL like that in most of their code. That's bad. Bad Oracle.

Proper syntax should be:
"DELETE FROM table WHERE id=42"

Another reminder that S in SQL does not stand for Standard.

MS trying to be more like open source..

Of course without going open source..

In this article...

The MVP initiative will be a big part of Microsoft's efforts to promote a sense of "community" among users and developers, connecting its own product developers with the users most in touch with product issues.

It's a good start.. but you will not create a sense of community by being elitist.. "Yes, you can see our code, but only if we deem you worthy" is not going to cut it. The reason why the open source community is as tightly knit as it is lies in the idea that everyone is important.. Everyone has something they're good at and can contribute.. even if it is only a comment on the layout of a user interface.

This isn't going to help Microsoft develop a sense of community.. the users they are targeting already are deeply involved in 'all things M$' otherwise they would never gain the 'coveted' (I say this very loosely) title of a 'MVP'.

Once again, Microsoft is copying something they don't understand..

I would give them credit for at least attempting to be more open, but I cannot do that with a clear conscience.. I can see the business thinking behind this, and it's not to benefit the users.

Edit: Derrick has a pretty good commentary on this. (via inluminent)

September 23, 2002

Blogging annoyances..

I find it highly annoying when I read an entry in someone's blog.. want to comment and learn that I need to "register" to do so because anonymous commenting is not allowed..

Alright.. so anonymous is not allowed.. but why require someone to register? Will me creating some utterly useless account that will rot in a database until someone prunes it months from now assure that I did not use a fake name and/or e-mail address?

Have some sanity people.. I just wanted to post a 2 line comment! I have enough passwords in my head, don't need to create a new one just for this..

This is what I wanted to comment on.. but now I forget what witticism I was going to type out.. so pfffbt... they'll need to survive without my invaluable input.. I refuse to create an account for a comment.. it's stupid. I'm sure he/she (as in the author of said blog) is all crushed about it too :)

FOAF

Friend Of A Friend.

I created a basic foaf profile. Not really sure yet if this is good or bad.. it's kind of cool.. of course right now I'm pretty lonely in there, but just learning all about this idea..

If anyone wants to be listed in my foaf (not sure why would anyone want to, but what the heck, at least I won't look so lonesome) drop me a note.

foaf links for your reading pleasure:
What it's all about.
Find profiles or get yourself listed - I haven't done this yet.. still debating if this won't end up just another marketing tool for someone (like spammers...).


More reading in Mark's blog from whom I got the idea.

September 22, 2002

Heels are an invention of the devil..

.. either that or sadistic men.

After spending last night dancing and walking on heels (a wedding, don't ask) I can barely walk today.. my feet hurt, my ankles hurt and my calves hurt from being forced into an awkward position all night.

Never again. . Christ I'm 5'8", I don't need the superficial height adjustment..

This is my excuse for no blog updates this weekend.. wedding and recovery.

September 20, 2002

language evolution

Jeremy complains about the changes in the every day usage of the English language we have seen with the growth of the Internet. All those phrases like ur, ru, lapses in punctuation.. everything in lower case (okay, I'm guilty of that one myself) etc.. etc..

Yes! My [insert your favourite deity] is that annoying! I've seen some of my very intelligent and otherwise wonderful friends lapse into this teenagish (is that a word?) and infuriating habit.. Makes me want to reach out, grab their cell phones, blackberries, palm pilots and other assorted keyboardless devices and throw them into the nearest west-nile-virus-mosquito infested swamp.

I blame those devices. Anyone who has ever attempted to have a meaningful text-based conversation via a cell phone will agree with me here.. After all, it takes fewer key-pushes to type out 'ur' than 'you are'.

I'd like to also add 'LOL' is just not funny and too reminiscent of early 90s AOL chat rooms. If you'd like to express emotion.. use the language our forefathers developed! (okay, *your* forefathers, mine developed Polish). "Oh, that was funny" takes more typing, but it'll sit better with me at least. I'm a fast typist, I suppose that makes it easier for me to type out a whole sentence instead of a silly acronym.. but the first time someone catches me using LOL, ROTFL or a similar atrocity, please smack me. I'll thank you later when sanity returns.

Of course, those complaints are not enough to finish off this little rant. A friend of mine, who is otherwise very intelligent and sane called something 'gay' the other day. 'That is soo gay'.

*bang* *bang* *bang* <--- the sound of me banging my head on my desk.

September 19, 2002

Did I mention I love google?

Search for "go to hell" and look a the first choice..


.. or just click here.

September 18, 2002

Burning Man

Terrific Aerial Photo by Thom Van Os.

That's it.. Next year, I'm there!

Blogs and spammers

Received spam just now.. that good old Nigerian (help me get this money and you can keep some percentage) scam.. two copies even.. I've yet to receive any spam to this e-mail address so I was curious how this happened.. Based on the IP address in the e-mail header, I checked my apache logs and my hunch was right..

217.78.74.18 - - [12/Sep/2002:17:08:39 -0700] "GET /blog/ HTTP/1.1" 200 71627 "http://www.movabletype.org/" "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)"

This guy got my address from my blog to which he came via Movable Type.

So this is what these spammers do now.. check sites that list recently updated blogs and use posted contact information.. I suppose they're more likely to get a live person that way.. sad.

I wonder how many candidates he'll get to claim the whopping sum of $36.. isn't that a tad low? :)

IP of course from Nigeria.. (even though the spam says Taiwan.. click 'more' to view /w headers).


person: George Opara
address: #5A Karimu Kotun St.
address: Victoria Island
address: Lagos, Nigeria

inetnum: 217.78.64.0 - 217.78.79.255
netname: NG-SIOTEL-20001206
descr: SIOTEL NIGERIA LIMITED
descr: PROVIDER
country: NG
admin-c: SN1917-ORG
tech-c: SA4434-RIPE
status: ALLOCATED PA
changed: hostmaster@ripe.net 20001207
source: RIPE
mnt-by: RIPE-NCC-HM-MNT
changed: hostmaster@ripe.net 20010508
changed: hostmaster@ripe.net 20010517
changed: hostmaster@ripe.net 20020913

Return-Path: <pro132alltrev@accountant.com>
Received: from ok61266.com ([217.78.74.18])
by linux.unixwiz.net (8.12.2/8.12.2) with SMTP id g8J1NVFE021583
for <kasia@unix-girl.com>; Wed, 18 Sep 2002 18:23:49 -0700
Message-Id: <200209190123.g8J1NVFE021583@linux.unixwiz.net>
From: "dante braga" <pro132alltrev@accountant.com>
Reply-To: pro2004all1111@accountant.com
To: kasia@unix-girl.com
Date: Tue, 19 Sep 2000 02:28:14 +0200
Subject: CRUCIAL
X-Mailer: Microsoft Outlook Express 5.00.2919.6900 DM
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by geddy.pslashg.org id g8J1Qsr10203

From: Dante Braga
(External Auditor)
Union Bank of Taiwan
5F,No.109, Min-Shen0g E. Rd.,
Sec. 3, Taipei.
Taiwan, R. O. C.
Telex: 26354 UBTWIBD
E-mail pro2004all1111@accountant.com

Dear Sir,
I am an external auditor for Union Bank of Taiwan. I got your email
address while searching for trustworthy individual personality that can collaborate with me in
this matter of crucial mutual benefits.In carrying out our professional etiquette report, we United States
Dollars ($36USD) in the account belonging to one of their late foreign customer who died along with
his entire family in September 2nd 1998 in a plane crash.

Since we got information about his death, we have been expecting his
next of kin to come over and claim this money because we cannot release it unless somebody applies for it as
next of kin or relation to the deceased as indicated in their banking guidelines. Unfortunately, we
learnt that all his supposed next of kin or relations died alongside with him in the plane crash leaving
nobody behind for the claim. It is therefore upon this discovery that I now decided to make this
business proposal to you, and release the money to you as the next of kin or relation to the deceased. And
subsequent disbursement since nobody is coming for it and we don't want this money to go into the Bank
Treasury as unclaimed asset.

The Banking law and guideline here stipulates that if such money
remained unclaimed after Six years, the money will be transferred into the Bank Treasury as unclaimed
fund.Regards to the professionalism we have the mandate to decide who becomes the next of kin, (though
classified). The request of foreigner as next
of kin in this business is occasioned by the fact that the customer
was a foreigner and a CITIZEN OF TAIWAN cannot stand as next of kin to a foreigner.

We agree that 30% of this money will be for you as foreign partner, in
respect to the provision of a foreign account, 10% will be set aside for expenses incurred during
the business and 60% would be for me.There after I will visit your country for disbursement according to
the percentages stated above. Therefore, to enable the immediate transfer of this fund to you as
arranged, you must apply first to the bank as relations or next of kin of the deceased indicating your
private telephone and fax number for easy and effective communication.And indicate where in the money will
be remitted to as well. I will also instruct you on how you can add in your application to the bank that
you get paid through Union Bank of Taiwan corresponding bank in America,Europe or Asia as this will be
Easier for us all.

Upon receipt of your reply, I will send to you by fax or email the text
of the application. I will not fail to bring to your notice that this transaction is hitch free and that
you should not entertain any fear as all required arrangements have been made for the transfer.

Yours Truly,

Dante Braga
(External Auditor)
Union Bank of Taiwan,
5F,No.109,Min-Sheng E. Rd.,
Sec. 3, Taipei.
Taiwan, R. O. C.
Telex: 26354 UBTWIBD
Please Reply to my private E-mail:pro2004all1111@accountant.com

Ouch!

Unfortunately this is something I can easily envision in my near future given my propensity to pick difficult terrain combined with my crummy amateurish mountain biking skills. If you're queasy, don't click that link (sorry if too late).

.. except I wouldn't wear a USPS jersey.. or hopefully have my butt sticking out..

(via dan)

Too funny..

Suddenly it's all clear!.

Must be pretty old though :)

September 17, 2002

I hate IE

Saw these two entries in my apache log..

GET /_vti_bin/owssvr.dll?UL=1&ACT=4&BUILD=2614&STRMVER=4&CAPREQ=0 HTTP/1.1
GET /MSOffice/cltreq.asp?UL=1&ACT=4&BUILD=2614&STRMVER=4&CAPREQ=0 HTTP/1.1

My first assumption "new MS exploit?"

Actually.. no.. Google search provided an answer:

These requests are generated by someone using IE with Microsoft Office installed. IE will query the server to see if it supports web discussions. This query will only happen if the user has the discussion bar turned on. The discussion bar appears by clicking the "Discuss" icon or View-> Explorer Bar-> Discuss. The bar is off by default.

Go figure.. it's a feature.

Dirt simple JavaScript to pick a random image

I wanted something to pick a random image for my blog but didn't want to spend more than 5 minutes on it.. so this is what I came up with..

Yes, I know, I could get fancy, use perl, size the images on the fly.. etc.. etc.. but I just don't feel this is worth all that effort :)

It's a very stupid little JavaScript that takes lots of assumptions and took me literally 2 minutes to write, but heck why not share it.

The script itself:

<script LANGUAGE=JavaScript>
<!-- JavaScript begin

  function pickNum() {

    var rval = "";

    var n = 9999; 
    var i = 0;

    while(i == 0) {
       i = Math.round(Math.random()*n);
    }

    if(i < 10) 
       rval = "000" + i;
    else if (i < 100) 
       rval = "00" + i; 
    else if (i < 1000) 
       rval = "0" +i;
    else 
       rval = i;

    return rval;
  }

  var img = "<img border=\"0\" " +
   "src=\"/photographs/random/" + pickNum() + ".jpg\">";

// end -->
</SCRIPT>

To use it to display an image in the page.. just use this somewhere in HTML:

<script LANGUAGE=JavaScript> document.write(img); </script>

September 16, 2002

Yahoo messenger problems

This is on linux (obviously), v 0.99.19-beta.

Started it, signed on fine.. but couldn't see any text in IMs at all.. including my own. Nicknames, fine.. text, nada.

Restarted yim.. didn't help, next X, didn't help.. rebooted (oh, the humanity), nothing...

I got tad annoyed at this point.. installed a fresh version.. same problem.

Aha, those famous problem solving skills kicked in and looked inside . ymessenger.. hm, all the files (history.dat, menu.rc, messages.dat and preferences) had a size of 0. I guess something got corrupted and yim just doesn't handle that well.

Removed ~/.ymessenger/, reinitialized it.. (changed my yahoo password as I managed to forget it) and now works fine.

Annoying.

1 year uptime!

One of my linux boxes (geddy) that serves as a mail/web and shell server for about 15+ people has been up for a full year.. yay.. (RedHat, kernel 2.2.16-22 oldie but works)


[kasia@geddy ~]$ uptime
2:57pm up 365 days, 13:31, 22 users, load average: 0.16, 0.05, 0.01

My sun box at work is up to 334 days.. catching up..

September 15, 2002

I've been productive...

Spent about four hours outside a coffee shop in Middletown writing a draft of an article for Linux Magazine. It was raining.. and I don't have a laptop (yet), so the pages (written in pencil) are now drying.. I'll type it up later.

I also made tuna salad.


.. and on a Tracy Chapman kick today.

[this unusually (for me) personal entry brought to you by the vast quantities of caffeine I consumed today]

September 14, 2002

Techie lady looking for love!

Looking for that special geek girl? There's hope!

I can't tell you how many times I've been at work and one of my fellow engineers will start talking about compiling source code, or using rpm to install a package on linux and all I can do is think about how bad I'd like to "rollback his segments"

(no, I didn't write that, seeing someone use rpm has a reverse effect on me)

.. more from craigslist

(via K. Kowalczyk)

September 13, 2002

Programming funnies

These are great..

Programmer: "What do you mean, I can't initialize things in an assert()?"

New picture..

Some daisies I photographed back in June..

Bigger..
Huge and not-cropped..

Throttle policy

I set a throttle policy of maximum 50 requests per ip per second. The idea is to stop harvesters.. not regular users. Hopefully 50 should be a good balance.. if anyone is seeing problems accessing this site, please let me know?. The idea is to limit site usage to harvesters and scripts, not regular users..

mod_throttle has incredibly dense documenation.. had to read it several times to understand what needed to be done.. and I'm not all that slow.

Here's my config:

In the Server configuration section of apache:

<IfModule mod_throttle.c>
   ThrottleClientIP 100
</IfModule>

Which essentially says: Throttle per client IP, keep a history of 100. 100 should be more than enough for my site, since my average requests per hour is 80-90. Too long of a history and it'll be a burden on system resources.

In the virtual host configuration section:


<IfModule mod_throttle.c>
   ThrottlePolicy Request 50 1
</IfModule>

In plain English: limit requests to 50 per IP address per second. I had it initially set to 20 but found that to be too low.. a very busy page (like MT's config panel) wouldn't load completely.. that's bad.

Now since this is my first time configuring mod_throttle and documentation is rather dense and information online very limited I may find out I'm doing something incredibly stupid here.. I guess I'll have to wait and see :)

September 12, 2002

The picture..

.. above the calendar is of my favourite single-track in West Hartford Reservoir where I go biking nearly every weekend. I took it June 22nd this year.. Bigger version can be seen here and in case someone has a huge monitor, the original 3.1mpixel version is here.

I'll be changing that picture (above the calender) every now and then..

My first cell phone spam

I wonder how coincidental is this with today's anouncement by Verizon that they're going to use MSN for their cell phone web services now?

Complete with links.. hmm.... (omitting the links below.. they don't need my help in getting hits).


MYVZW
f: tracie@myvzw.com
s: The Complete Guide for Attracting and Seducing Women

Attracting beautiful women is EASY- if you know how to do it

Yep.. Just what I need too! I've always wondered how I could attract beautiful women more easily..

September 11, 2002

Connecticut..

[.. excuse me while I whine.. ]
... is a vast cultural wasteland. I only know one person that admits to enjoying this state, my boss.
Nearest Japanese restaurant to me is a half hour drive and it's really not all that great.. even if it is supposed to be the best in Connecticut. Granted, there's one decent Thai place in Middletown, pretty good Malaysian and Indian restaurants (one of each) in New Haven...

Rest? Chains, starbucks and Dunkin Donuts.

Weather? Hot and humid in the summer cold in winter.

Friends? Most have moved out.. (most to California, go figure).

Why am I still here? Gives me something to complain about.

</whiney mode>

September 10, 2002

How to write Java code that's guaranteed to piss off your co-workers.


  • If you have a block of code that appears more than once, don't make it a method!


    finally {
       if(rs != null) {
          try {
              rs.close();
          } catch (Exception e) {
             // Ignore
          }
       }
       if(ps != null) {
          try {
             ps.close();
          } catch (Exception e) {
             // Ignore
           }
       }
    }

    Sprinkled into every single method in a database access class creates more lines of code and makes you look like a busy little coding bee.


  • When you have to reuse the same string more than once in a class, forget about declaring static variables.. only sissies do that. Adventurous people get joy out of discovering typos. Think of how many hours you can spend debugging and looking busy!

  • Don't oversimplify SQL.. sure you can use..
    "SELECT MAX(COLUMN) +1 FROM TABLE"
    .. but this is much more exciting and it'll impress all the chicks in the office:
    "SELECT MAX(NVL(COLUMN_NAME,0)) + 1 NEW_VAR FROM TABLE_NAME"
  • Don't forget to make sure all SQL syntax is as database-specific as you can get it. If they ask for compatibility with another database, more hours of billable time!

  • Even if you are using triggers for setting update time on tables, use "update_time=sysdate" just in case that trigger doesn't fire.. you can't be too careful!

  • Make sure your SQL code is nicely formatted..
    "SELECT Column_One, Column_Two, Column_Three FROM Table_Name WHERE Id=?"
    looks so much prettier than..
    "SELECT column_one, column_two, column_three FROM table_name where id=?"
  • When throwing exceptions, throw away that silly old SQL exception.. throw something new and exciting. The database was probably just complaining about something silly anyway. For simplicity, keep all your exception messages the same. "Operation failed" works just fine and to the point.

  • Don't use Interfaces! They're a part of a communist plot to hide information. Be nice to the caller, let them know exacly how you implement things..

    ArrayList list = new ArrayList(); :-)
    List list = new ArrayList(); :-(

  • Import statements are a waste of space. See how many more lines the second variation takes?

    java.util.List list = new java.util.ArrayList();

    -----------------

    import java.util.ArrayList;
    import java.util.List;

    .
    .
    .

    List list = new ArrayList();


  • Ordering and alphabetizing import statements is a waste of time. It's not like they get included in compiled code anyway.

  • Don't break up long lines, it's what the wrap function in a text editor is for. Why use up more lines?

  • Comment your code heavily! "return rval;" may mean something different than what it looks like! Some programmers are sneaky that way. Don't be one of them.

  • Declare all variables globally. Keeping variables local just because you only use them once is silly.. what if you decide to use it again? huh? What then?

  • Chain your calls!

    Object o = new Object(b.getVal(), c.getMoreVal(d.getAnotherVal()), (g == f ? (y.getBah() == z.getBleah() ? duh : new f())y.getVal() : x.getObject(new g())));

    You can do all this on just one line! Why waste space?


What not to do with SQL

I'm busy redoing our database classes to not be oracle specific.. ran accross this gem:
"SELECT MAX(NVL(COLUMN_NAME,0)) + 1 NEW_VAR FROM TABLE_NAME"

Which creates a new variable, select a max on a column, sets that value on a new variable and returns that..

Which accomplishes the same as this:

"SELECT MAX(COLUMN_NAME) FROM TABLE_NAME" + add 1

which is not oracle specific and more efficient on top of that..

September 09, 2002

mod_throttle

Installed mod_throttle today.

The installation instructions are pretty easy to follow.. they don't mention editing the makefile to specify locations of apxs and apachectl if it's no in your path.. but that's pretty self-explanatory anyway.. Should never try to compile something without at least reading the makefile.

I know I'm probably just being paranoid, but it annoys me to see someone use wget on my entire site and suck up all my bandwidth for 30 minutes to download all my files. It has to make connecting for others miserable. I don't even want to think of what nefarious reasons anyone could have to want a copy of my site. (Read? Like anyone reads this..).

So far it's just the basic config that produces the stats (the url isn't a correct one for this site, but it gives you an idea of how this works). No throttling yet.. but soon to follow as I come up with a policy that makes sense and isn't a burden on regular users.


<IfModule mod_throttle.c>
   ThrottlePolicy none
   <Location /throttle-status>
      SetHandler throttle-status
   </Location>
</IfModule>

Nanaimo Bar

Yumm.. Need to make some very soon..

September 08, 2002

9/11

From this Yahoo! article found via Jeremy..

Here in New York, corporations are planning to celebrate the second Wednesday in September with an array of gleefully gauche gestures. According to managing consultant Andrea Eisenberg, many companies plan to allow employees to come to work late(perhaps since only employees who arrived before 9 a.m. died in the attacks) and will display the American flag (never mind that many corporations have moved their HQ to Caribbean tax havens). Also look for "a personal statement by the CEO or office head, delivered in person" (hey--they can announce the latest round of layoffs at the same time!). One business "is naming conference rooms after employees who were lost on 9-11."

If it follows anything like I've seen elsewhere nearly a year ago.. the heart-warming letter from the CEO will have a paragraph on how *we* too can help fight terrorists.. How you ask? By being the best employees we can and being productive and selling, selling, selling more of whatever it is we sell!

Let's all be joyous Americans and wave our little flags and light up candles in memory while our freedoms are taken away from us in the name of national security.

Yes, putting up a flag on an SUV while spying on our neighbors who look suspiciously like Arabs is the way to remember the victims.

Cynical much? Not at all..

Google mirror

Literally..

Programmer salaries

Reading this entry in Jeremy's blog made me think (a dangerous proposition at any given time).

These graphs are pretty frightening, particularly when you're a programmer. Makes me wonder whatever happened to all those people?

I know.. They're busy complaining they cannot find a job that pays them what they used to make during the dotcom boom.

Case in point.

Not too long ago we were interviewing for a senior engineer position. Granted, the position required lots of experience, good skills, etc.. The one thing we were mostly looking for, however is basically someone bright. Someone who can think on their own and has years of experience to draw on. Pretty basic idea.

One of the candidates we interviewed was a guy with a very impresive resume. Worked for all these big consulting firms. Drove up in a big, white SUV with leather seats (so I check out the cars they drive in, so sue me, you'd be surprised how much you can tell about a person by the car they drive). Wore an expensive, Armani suit. My boss got to interview him first... I was next. Sure, impressive resume.. on paper. Not even the most basic unix skills (one of our requirements, we run unix, duh).. actually.. I really don't think this guy wrote a decent line of code in his life... On top of that, horribly arrogant and seemed rather disturbed that he had to interview with me.. some chick with a Polish accent and obviously not half the years of experience his resume brought with it.
After the interview concluded (I didn't like this guy one bit) we discussed it.. turns out he asked for an exorbitant salary... all based on the fact that he spent all these years consulting... but.. skills on paper and skills in reality didn't seem to match.. The worst part is, I really do believe he was asking for a lesser salary than he was used to making. I wouldn't pay this guy $20 an hour if I had to hire him..

Needless to say he was not hired.. we hired someone with a less impressive resume but a much better head on his shoulders. He didn't even wear a tie to the interview. (Actually in my book that's a big plus)

The point I'm trying to make.. During the dotcom bubble, programmers were spoiled. There weren't enough of them to fill positions in all these newly opening companies and that resulted in huge salaries paid to people who, by my standards, aren't even qualified for junior positions. Having a degree and an Armani suit does not make one a good programmer.

Having worked as a consultant for $200 an hour does not make one worth the salary.

Teachers make pitiful salaries compared to what an average software engineer makes.. why can't we be happy with what we've got..

September 07, 2002

Software copyright

"There was software development long before there was copyright for software at all. There are software developers who don't rely on copyright as any part of their incentive to develop software... "

Well said.

Search strings

Yes, I read those, who doesn't? Some are interesting..

These are for my site for this month. These are from last month.

A couple struck me as needing sharing.. one has to wonder..

what to wear under tanktops so sweat won't show
engineer fashion sense [isn't this an oxymoron?]
mating animals thumbnails
kids ballbusting [this sounds pretty sick..]
java goddess [they found the right place!]
marketing sucks software engineer [tee hee]

I think most people are just bored =)

Colours in vim

Ask Bjoern Hansen writes about colour modes and disabling them.

I like colours in emacs when I write code.. it's very handy, but outside of that purpose (syntax highlight) they're just annoying. Particularly in xterms... (unalias ls takes care of that).

Newer linux distributions come with vim configured for colours as well... I only use vim when doing quick edits, system administration, that kind of thing.. syntax highlighting is *highly* annoying.. I've yet to figure out a way to actually disable the damn thing (I haven't really looked) but one nice thing I discovered.

If you set your TERM environment variable to VT100, all the annoying colours disappear. Really!

September 06, 2002

MS eula

tee-hee

http://www.lindows.com/lindows_screenshots_mseula.php

It's Friday morning

I'm sitting at my desk drinking coffee. That's not the sad part.

The sad part is my deep thought for the day so far was how easy it is to make geek terminology sound dirty..

"I want to recompile your kernel.."
"Boot me up, baby"
"That's a nice set of objects you have there.. can I optimize them?"

Somebody shoot me..

September 05, 2002

Fonts, ack..

The FuzzyBlog listed me in the font bitch category...

I had no idea my fonts weren't resizable.. how icky.. (I blame Micro$oft, they have to be at fault somehow, right?).

Anyway, thanks to Dive Into Accessibility I'm no longer a font bitch.

I never did claim to be any good at web design (moderating the web programming forum on dslr not withstanding). How embarassing for me :-)

Edit: I'm doing my part for font size-ability....

David and Goliath?

Sarvis writes about codependency for bloggers..

This reveals the biggest danger of blogs -- and the biggest bore -- is that they become narrow little personal vendetta-graphs where the writer crawls up his own bunghole to send daily personalized nasty-grams out into the ether.

Hm, such animosity and anger.. Bitter? Then again.. that is a Micro$oft website..

September 04, 2002

Video games banned in Greece!

Can someone please explain this this to me? Has the world gone mad?

The Greek government has banned all electronic games across the country, including those that run on home computers, on Game Boy-style portable consoles, and on mobile phones. Thousands of tourists in Greece are unknowingly facing heavy fines or long terms in prison for owning mobile phones or portable video games.

This feels like some bad Tom Cruise movie!

The Greek government introduced the law in an attempt to prevent illegal gambling.

They saved the country from all those 9 year olds gambling their milk money away on a vicious game of pocket Mario Bros... I hope Bush doesn't read this.. he may think this is a good idea!

So is a standard installation of windws now illegal in Greece? Solitaire!

MT under mod_perl try two

As I noted couple days ago I am now running Movable Type using mod_perl. It runs nicely.. apparently it can run better when you follow the actual instructions!

Kasia reading and following documentation? Hey, stranger things have happened.. What's next.. commenting my code?

September 03, 2002

Traffic stats

Compiled webalizer and now I have an hourly cron job generating cute (if relatively useless) site traffic statistics.

Webalizer is pretty cool.. written in C, quite fast and definitely cheaper than Web Trends (tm)! (Free is my favourite price...).

I'm having a tad of a problem getting it to ignore my own domain as a referer though..

September 02, 2002

MT under mod_perl

I just got mod_perl running and my Movable Type is now executing under mod_perl.

It's a *lot* faster.. 3 times at least.

Here's the apache config I put in..

<IfModule mod_perl.c>
       <Location /mtype>
            SetHandler perl-script
            PerlHandler Apache::PerlRun
            Options +ExecCGI
        </Location>
</IfModule>

Now this isn't the best way to do this.. since it involes moving all static pages (images, docs, stylesheets) out of the mtype location.. I'm looking into doing it in a more elegant way.

Huge difference in speed!

Good read..

.. for all you bloggers out there..

this is good stuff.

September 01, 2002

Logging into MySQL now!

This is too cool.. can't wait to start writing code to do something with this..


mysql> select time_stamp, remote_host from access_log limit 1;
+------------+---------------+
| time_stamp | remote_host   |
+------------+---------------+
| 1030934140 | 12.243.203.xx |
+------------+---------------+

Testing..

Just downgraded MySQL to version 3.23 so I can get bloody mod_log_mysql working finally..

Let's see if the blog still works?

Have you ever..

Stood in front of a mirror in a badly lit bathroom and said to yourself "hm, I look horribly tired, time to take a picture!". No? Well, I have.

Some poor soul went and brightened this picture.