" /> kasia in a nutshell: February 2003 Archives

« January 2003 | Main | March 2003 »

February 27, 2003

Data validation

Data validation is particularly important when dealing with web development. Especially when passing user input to the database it should be checked not only for validity but also for malicious content.

Something that really bothers me recently (don't ask, project at work) is the level at which the validation is often done when using servlets. Mainly, in the servlet itself. I don't like that. It adds a layer of complexity that is really unecessary and makes reuse and architecture of code more difficult than it has to be.

Java is an object oriented language.. why not use that aspect of it to its fullest ability? Mainly: an object ought to validate itself. So, if you have a user object, instead of using servlet code to validate its attributes (for instance: email address) make the object know what the valid value is.. and return that to the servlet. "Hey object, are you valid? Sure thing! Okie dokie!" .. or.. "Hell no, here's your problem, make them fix it".

Easier, no? Seems obvious.. but apparently not to everyone.

February 24, 2003

Things that scare me

First, take a look at these pictures.. These girls look like they haven't had a decent meal in the last ten years. I could have sworn just two years ago the Sports Illustrated's swimsuit issue featured models with at least 5% body fat..

What scares me is that this is what is being broadcast as the standard for beauty. When I hear ten year olds talk of dieting (skinny ten year olds) and then view pictures like this reviled as 'feminine' and 'beautiful' I want to take all fashion designers and fashion magazine editors and drop them into a bucket full of bacon grease. Thanks guys (designers and editors), you're responsible for thousands of young girls starving themselves in a downward spiral of self-beating hell just to look like an escapee from a concentration camp.

Can any men tell me they actually find this attractive? Forget the makeup and suggestive posing.. look at their arms.

Great analogy

John Lichfield:

The US is a country that believes passionately in freedom, ingenuity and free enterprise. It has produced only two dozen kinds of cheese (some of which are excellent copies of French and British cheeses). However, if you walk into any American supermarket, you will see that the US has produced more than 50 kinds of peanut butter. They all taste the same but they have radically different labels.

France is a country that is overtaxed and over-administered by a suffocating bureaucracy. It has somehow managed to create 176 (or 258 or 1,000) different kinds of cheese, all of which are subtly different from one another. A lait cru (raw milk) camembert, eaten at just the right moment (when there is only a thin layer of dry cheese in the centre) is one of the great achievements of humanity. Ditto roquefort; and St-Nectaire; and cantal; and chaource; and so on and on (and on).

According to the Wall Street Journal book of political and economic orthodoxy, the American Way produces enterprise, variety and choice. The French Way produces stultification. Cheese defies that ideology. No wonder that cheese-eating is a term of insult for American right-wingers.

If we are being offered a choice between a cheese-eating civilisation and a peanut-butter-eating civilisation, I am with the cheese-eaters. Post-September 11, US politics and even US journalism seems to be going the way of peanut butter. There is room for endless freedom of choice between labels. The contents of the ideas are not allowed to vary.

[Thanks dave]

February 23, 2003

Must have been a windows programmer

Who wrote the Courier configuration scripts because a unix programmer would know better than to presume he knows what the user wants better than the user..

configure: WARNING: === Do not compile Courier-IMAP as root. Compile
configure: WARNING: === Courier-IMAP as a non-root user then su to
configure: WARNING: === root before running make install. You must now
configure: WARNING: === remove this entire directory and then extract the
configure: WARNING: === source code from the tarball as a non-root user
configure: WARNING: === and rerun the configure script. If you have read
configure: WARNING: === the INSTALL file you should have known this. So
configure: WARNING: === you better read INSTALL again.
configure: error: aborted.

Not only presumptuous.. but arrogant as hell.. Of course, takes 10 seconds to hack it, but it's annoying nonetheless.

I think I have space now!

After few years of being careful with my web-space due to hard-drive-size limitations.. I think I can finally say I have space!

Filesystem            Size  Used Avail Use% Mounted on
/dev/hda3              72G  3.0G   65G   5% /
/dev/hda1              99M   17M   76M  19% /boot
/dev/hdb1             113G   33M  106G   1% /disk1
none                  756M     0  755M   0% /dev/shm

February 22, 2003

The fun part

My new server is now plugged in and all fresh and ready to be configured, setup, played with and all the other fun stuff you do to a remote linux box that will host lots of web-related stuff.

I know everyone is just dying to know the config (yah right).. so here it is:

P4 1.7Ghz (one is all I need).
1.5GB RAM (a RAM fairy dropped off more than I ordered)
2 hard drives.. 80GB & 120GB (IDE.. SCSI would be nice but more expensive).

It's now happily sitting in the datacenter at a colocation awaiting orders.

I'll be moving this site to it sometime next week (I've lots of configuring to do first).

Thanks Jeremy, Steve and Jeffrey for all your help! You guys rock.

February 21, 2003

From the "who cares" department

Jeremy posted a list of blogging annoyances.. I have to say I agree with majority.. and so as not to be an annoying blogger (to Jeremy anyway) I figured time to put up a page about me.

So here it is, read it and weep.

February 20, 2003

Countdown to..

Nothing?

It will launch in ah.. eh..negative time...

Time warp or whoever left last just forgot to turn off the lights?

(found elsewhere)

Spam not just for sad geeks anymore

Forget increasing your penis size, breast size, having better sex or getting that much needed free vacation.. now you can also buy steak knives through the convenience of spam in your inbox..

At least it's something different.

Professional Steak House Steak Knife LIQUIDATION !

Okay, that was exciting.

February 19, 2003

How the traffic flows

I find myself amazed by how little I can predict which of my entries will generate interest and traffic. There are some entries into which I put a considerable amount of thought and work that gather nearly no interest and then there are those generated by a two minute break from sanity that become popular for no real reason other than their general silliness.

Good example is the entry I made a couple of days ago about referer links on weblogs. It is useful information but I never thought it to be news-breaking.. and as often is the case, I found myself to be wrong. Not only has this inspired a tutorial on how to use the very technique I described to hijack weblogs (why do you need a tutorial? This is simpler than dirt) but also spawned a Register article and a rather detailed discussion on dslreports.com. Granted that last one was directly related to the Register article, but you get my point.

What is to be my logical conclusion here? Stop thinking? Apparently when I do that I produce uninteresting, mediocre content nobody cares about but when I post whatever comes to my mind the whole world is listening. It's enough to give a girl a complex.

The true conclusion, however, is that while weblogs tend to have a more concentrated, specialized audience they are still victim to fickleness of human interest just as much as news is. Well, hope someone found this to be interesting -- my natural cynicism leads me to think otherwise though.. I spent at least five minutes on this entry after all :)

February 18, 2003

Digging out

Newsflash: it snowed in the Northeast.

I attempted to dig my car out this morning but gave up due to the knee-deep snow and lack of a decent shovel or plow truck (he came, he left and I'm still snowed-in, hoping he's planning on coming back!). Instead took a walk and snapped a couple of pictures.. literally couple..

one, two.

For some odd reason the lens on my camera kept fogging up so majority of the pictures I attempted to take did not come out. The "no parking" sign is near my house, cute, no?

February 17, 2003

Five best things

Being snowed in on a Monday is not one of them.. Since I was sharing this elsewhere and had to think about it for more than five minutes I thought I should at the very least make a blog entry of it..

In no particular order..

  • Warm embraces
  • Fast bike ride down hill
  • hiking on a warm fall day
  • the 15 seconds after finishing a long, tiring run
  • soft cats snuggling

February 16, 2003

Displaying referer links on blogs

Not a good idea without first cleaning them.. As I discovered today on another blog, way too easy to hijack via a javascript in the referer!

How is it done? Too easy..

<script>top.location.href='http://redirect_to_this_assholes_page';</script>

Edit: On second thought, this was probably targeting automatically-generated statistic pages... and a blog just got caught.. of course this is assuming someone didn't specifically target that blog but rather used a crawler.

Statistic pages makes more sense as hardly anyone ever visits their own and would likely not notice for a while, whereas with a busy blog it's spotted very quickly.

February 15, 2003

My new server

Is sitting in Jeremy's apartment waiting to be taken to the datacenter. Can't wait to play with it.

Here's some pictures of the server Jeremy took for me since I'm such a horribly impatient person and wanted to see it right *now*... There's the box, the server, Jeremy's shoes and a kitty cat. While that is my box it is not my pussy..

February 14, 2003

Go opera!

Opera releases "Bork" edition:

Two weeks ago it was revealed that Microsoft's MSN portal targeted Opera users, by purposely provided them with a broken page. As a reply to MSN's treatment of its users, Opera Software today released a very special Bork edition of its Opera 7 for Windows browser. The Bork edition behaves differently on one Web site: MSN. Users accessing the MSN site will see the page transformed into the language of the famous Swedish Chef from the Muppet Show: Bork, Bork, Bork!

Can't fight them with logic and fairness, beat them with humor!

February 13, 2003

"When I was growing up.."

Am I the only one who finds these forwards horribly annoying?

"When I was a kid life was so great! Now it sucks! We have to wear seatbelts now!"

Yah, life was terrific, just great and now it bloody sucks.. Yes, doctors no longer make house calls but you don't have to die from pneumonia either.

Things changed.. women can vote, races are less segregated and if a woman is raped she doesn't have to move out of town shamed.

Times change, move along now and stop listening to the media so much.. times aren't as bad as they make them out to be.

February 12, 2003

The stupidest of holidays

The holiday may be stupid but the hearts are fun to make.

[via: Jeremy]

.. and here's a nice card selection for that warm-and-fuzzy feeling.

February 10, 2003

Enter the twilight zone

They're multiplying.. What's this now.. number four?. Should I start asking for commission?

Refs:
One
Two
Three

Is it still Monday?

There are very few things less pleasant than driving through a winter snow storm in the dark.. Today I learned what they are.. intimately.

As I was driving home, through showers of white, cold, horrible stuff falling from the sky I got a flat tire. Flat tire in a snow storm? Yes, it can happen, I'm living proof. Easy, you say, just call road assistance, right? Wrong.. they claim a delay of two+ hours due to all the tow trucks being out rescuing span out SUVs from snow dunes.. Alright, I thought I would just change it myself.. I've never changed my own flat tire before, but how hard could it be? A few bolts to unscrew, a spare to put on.. piece of cake.

Sure, changing a flat is probably easy if you're not stuck in a snow storm in the middle of central CT being passed by speeding SUVs and old grannies wavering from one side of the road to the other. It being a death trap aside.. route 15 in CT has no breakdown lane.. fun.

Then a plow track passed me by.. going around 50 miles per hour.. plowing and sanding..

Being covered from head to toe in snow, sand and rock salt is not pleasant, fun or enjoyable. Although the service-type-person at the garage I went to fix my flat at (who wants to drive around on a donut in snow?) found it very amusing. I don't.. my winter coat is ruined -- road salt leaves stains.

This week over yet? Should I be concerned my right eye is now in pain from the salt?

February 08, 2003

Targeted advertising

Those advertising folks at Micro$oft must think these things through quite well.. coincidence or not? You be the judge..

Pay attention to article subject.. and that's a damn big ad too!

New Java features

Catching up on my reading this morning and ran across this on slashdot.

Boxing will be incredibly handy.. I use that all the time (as I imagine most Java programmers do).. Generics (yucky term) will save me headaches from necessary-bad-design to sidestep the lack of this feature in current versions of Java. Big thumbs up for static imports as well!

This will be great.. I can hardly wait!

February 07, 2003

A must have..

This is the t-shirt that thinkgeek.com doesn't sell, but really should. I'd buy 10.


For my friends.

Snowy day

So it is, and on to random things straight from under my hair..

It snowed today.. quite a bit, morning commute was hell (why did I even bother leaving home? I must be insane, I could have just worked from home). Three spun-out SUVs spotted on the way to work. Hah. Just because you have four-wheel-drive doesn't mean you're above the laws of physics.. no traction means no traction. Why can't people remember that?

Work is busier than busy -- I'll be working all weekend. Delivery in about 3 weeks and I don't even want to think about the shape of the code.. oh, and of course with fewer coders (the recent layoffs) it will be all the more fun.

On the bright side of things.. I ordered my new rackmount server today.. it should be ready sometime next week and Jeremy, the really nice guy that he is, will deliver it to the datacenter for me.. where it will be hosted by a friend's hosting company. Friends rule.

I have one question. What the hell happened to Red Hot Chili Peppers? They used to be a bit hip, a little different and a somewhat cool band.. now it's all random-mainstream-love-sick-crap. Yuck.

February 06, 2003

Oh yah, I'm just web-chest-grafitti

If this continues Chris will have to start giving volume discounts to whoever buys the unix-girl ones.. On the other hand he might be starting to get sick of sashimi by now :)

Refs:
One
Two

Coders unite!

After seeing one too many of my friends/aquaintances/online-buddies spend another evening at home debugging cryptic code written by someone else.. I say no more!

Time for action.

I present to you D.A.R.E.

Developers Against Ruined Evenings.

Tagline: D.A.R.E. to comment!

February 04, 2003

Trademark crawler

I'm sure this serves some legitimate purpose.. but it just appears so slimey..

NameProtect engages in crawling activity in search of a wide range of brand and other intellectual property violations that may be of interest to our clients.

Found crawling my site.. It does appear to respect robots.txt so in it goes before someone decides to sue me over using their name.

Inquiring minds want to know

Okay, who's the wise guy responsible for the new rent-a-chest advertisment for my site?

February 03, 2003

Programmers -- the abused profession?

Programming is a tough field. To become successful as a coder one has to come in with knowledge, experience, ingenuity, quick wit and very good problem solving skills.

True, there are plenty of programmers out there who couldn't code their way out of a paper bag and will continue existing in a nine-to-five world for the rest of their professional lives drinking bad coffee and never writing much more than the mundane and boring.. but those people are not what I would refer to as "true professional programmers". They're.. just programmers.

The people I'm thinking of are the ones for whom programming is pure joy and excitement. They live for that moment of clarity when an incredibly complex problem becomes simple and solve-able with a few keystrokes and well placed braces. These are the *real* programmers. The ones who get to work on new and exciting things.. stuff that hasn't been done before.. They publish articles and gain admiration of other geeks worldwide. They get all the hot chicks too. Oh, alright that last one was a stretch.. and anyway not all great programmers are guys.

These people, these heroes of the computer world are probably the most abused profession in modern age. What other employees are not only asked to but expected to work endless hours of overtime without extra pay?

Have you ever applied for a job where the description included "50+ hours a week expected" ? I have. I'm a programmer.

In what other profession do people leave the office, drive home just to sit in front of the computer and work more, on their own time, getting no extra pay or even credit? Pull all-nighters on a regular basis simply because they don't want to stop working -- gotta solve that problem!

And in what other profession do these people not only do all this without a complaint but actually enjoy it!


We truly are the suckers.

I suppose the best compensation is that we actually do love our jobs and hell,most of us get paid pretty damn well. Even if it doesn't include overtime pay.

I like my profession.

More layoffs

The company I work for laid off more people today. All in development and QA. This stinks.. as one of my office-mates is gone and there's only two of us left in the office now. (I think about 20 people in the building total).

It sucks.. half the development staff is gone.

This is the third round of layoffs since I've worked here (two years this month) but the first one targeted specifically at engineering.

You know you're a geek when..

You wake up in the morning, prepare the clean clothes to put on after a shower and a network card dongle falls out from between them..

How did it get there? I wish I knew. I blame the cats.

February 02, 2003

How to fly without an ID

or "what everyone thinks is the law isn't".

Very interesting:

I have had occasion to travel a good deal in the last several months, and on those trips I decided to research and test this issue about the necessity for producing identification. I have talked with agents, and their supervisors, of several major airlines in cities across America, and have gradually pieced together a rather complete picture of the real legal situation regarding our right to travel.

[via: Jeremy]

February 01, 2003

Columbia

Others say it better than I.