The long, strange story
.. of the sex.com domain... down to shoot-outs with police..
" />
« May 2003 | Main | July 2003 »
.. of the sex.com domain... down to shoot-outs with police..
There's this handy little thing (that Jeremy pointed out last night, but I already knew..)..
apachectl configtest
It may save headaches at 4am when httpd won't restart after logrotate.. (yes, I know, mod_log_sql.. I know.. I use it for myself).
Received this from my bank..
Dear Online Bill Pay Customer:We have received notification that your payee, Associates BankCard MasterCard / Visa ( 1) no longer accepts electronic payments. We have made the necessary changes to how Associates BankCard MasterCard / Visa ( 1) is set up in your payee details to ensure that your future payments are made without interruption.
Why in the world would anyone stop accepting electronic payments? I would think that aside from the initial costs of setting it up it's a much more efficient way of accepting payments than envelopes filled with hand-scribbled checks.. but what do I know.
This scientology handbook from 1976 will explain how you can be the hero and fix all that is wrong in our society..
They even tell you how to deal with drug addiction..
What you can tell those on drugs will interest them -- that through proper vitamins and learning Scientology training drills to bring up their confront (sic) and communication level, they are able to come off drugs without having harsh withdrawal symptoms or suffering inhumane treatment.
Vitamins! That's what I was missing!
Here, in the northeast of the continental US we typically experience four seasons.. There's the cold winter, the hot and humid summer and the lovely warm and sunny spring and fall.
It appears that this year someone gave us a horrible, snowy, cold winter that lasted for six months and dumped us straight into hot and humid summer.. What is the deal here? Where are those lovely days of sunny, 70-some degree weather that we expect in spring?
This year's weather can be summed up with: snow, more snow, cold, rain, rain, rain, rain, rain, hot-hot-hot.
I want out... right after I file for beatification of whoever invented the AC. Bless you.
By Karl...
Or you could alienate your customers, sue the living shit out of everyone, piss off consumer rights groups everywhere.....and paint yourselves into a corner as some kind of fat, un-yielding modern day Skeksis....pretending to hold the moral high ground when everyone on the planet knows that you're totally full of shit and riding a sinking ship.
.. or you could use the money twelve year olds spent on over-priced Brittney CDs and buy yourself a senator or two. ..
.. is the beginning. No matter how many times I've done this - it never fails.. when I have to start a new project I hit a wall. It's not the lack of ability.. it's not lack of confidence in my skills.. it's just.. well, okay, I lie. It's usually lack of confidence in my ability to finish the project... heck, finish, I have a hard time just getting started.
The funny thing is, when I do get started it normally takes me about half an hour to get into the groove and just.. go.. everything comes together.. Code flows from 0 to 60 in less than 5 seconds... and I do have the ability to finish just about every project thrown my way.
So given the fact that in my short experience as a programmer I have yet to fail in a project, why such a disapointing lack of confidence at start?
Now, I know my typical entries are half-serious and light-hearted, this one isn't meant to be. This is something that bothers me.. a lot. I could be 30 times more productive if I could overcome this problem.. so why?
This one is sneaky.. most programmers when writing debug code tend to call the toString() method on an object to retrieve human-readable information and present it to the user in some shape or form (logs, system out, etc). That's good programming.. when debugging a problem we want to be able to read and view all information possible..
Here is the sneaky part.. you should never *never* call toString() on a Java object unless you're pretty damn sure that object will never be null. Why? It's simple.. calling toString() on a null object will generate our good old friend -- the null pointer exception. (What? Java has no pointers! -- wrong!). This is a huge problem.. Think about it.. where do we usually put most of our debugging code? That's right.. error handling.. Something like this, perhaps:
try
{
myObject = doSomething();
}
catch (HorribleException e)
{
String msg = "Dude, we got us a problem: " + e.getMessage();
msg += "The object looks like this" + myObject.toString();
// do logging and stuff..
//
}
If myObject happens to be null, which may very well be the case considering we have an exception while trying to create, modify or reference it it will throw a null pointer exception at which point this becomes a debugging nightmare as the original exception is now lost. Maybe not a huge nightmare in a development environment.. but try to debug issues with code like this in a production environment where all you have to go on is logs and system output. Right.. nightmare.
What should you do instead? Forget toString()! There is a better way of doing it and that's String.valueOf(object) which is implicitly called on calls that convert objects to strings. String.valueOf(object) internally calls toString() on the object -- but it checks for nulls! This is the behaviour you want in your debugging code.. if the object is null you do not want an exception.. just a "null" ought to suffice and the toString() output otherwise..
try
{
myObject = doSomething();
}
catch (HorribleException e)
{
String msg = "Dude, we got us a problem: " + e.getMessage();
msg += "The object looks like this" + myObject;
// do logging and stuff..
//
}
Will generate exactly the same output as the first example when object is fine.. but only the string "null" when object is null. Safer and even less typing! The scary part is how many experienced programmers have no clue about this little gotcha.. go spread the word. Thanks.
Matt pointed me to this Popular Science article.. Ice cream made with liquid nitrogen!
The result, literally 30 seconds later, was a half-gallon of the best ice cream I'd ever tasted. The secret is in the rapid freezing. When cream is frozen by liquid nitrogen at 196°C, the ice crystals that give bad ice cream its grainy texture have no chance to form. Instead you get microcrystalline ice cream that is supremely smooth, creamy and light in texture. Martha Stewart, eat your heart out.
Hmm.. where can I get some of that secret ingredient..
Spotted on his weblog...
Our father, who art in Redmond
Microsoft be thy name
Thy monopoly come, thy will be done
throughout the earth as it is in the US.
Give us this day, our daily license activation key
And forgive us our bug reports
as we forgive our system crashes
And lead us not into competition
But deliver us from innovation
For thine is the Control, and the Power and the Greed
Forever. Amen.
original on slashdot.
Another weblog to add to your RSS feed.. Karl, a fellow liberal-pinko-commie started his own weblog.
Karl is the nice fella behind all those witty headlines and news items at DSLReports that slashdot links to on regular basis.. and brings to you such wonderful, accurate and full of good ol' wisdom advice as..
There's no god damn house, come to think of it. There is no fucking Matrix. There is no golden ring. Whatever you do, however well you think you do it, you could and probably will be replaced with a minimal amount of ripples or tears. Therefore, you should be outside. Maybe eating Cheetos. Naked.
I'm all for naked.. you can keep your cheetos though.
Those of you that did.. did you see a guy with really long hair and a patch on one eye? That's my boss who got to go instead of me..
At least he brought me back a MySQL tshirt.. the back says "transactions" with a checkmark.. too funny :)
My inbox is just full of wonderful e-mail and high-quality advice lately. This here is a fine example of the advice given to me by some of my readers..
Hi Kasia or whatever ur name is,dont u think it'd be way cooler if you wrote about things that people can relate to,like boyfriend stuff?if you havent got a boyfriend then im sorry
It is thanks to this type of quality advice and touching insight into my readers minds that I can continue to bring you top-of-the-line blogging fun! Boredom.. err.. whatever.. Coming up tomorrow: "Like, omg! My bf got us eminem tickets! Totally!".. and other adventures in brain-dead-land.
Hey, how come nobody tells Jeremy to write about his boyfriend?
I've been running for a few months.. well, technically it's jogging since I can't quite run faster than a ten minute mile (yet) but.. it's great exercise and I'm enjoying it quite a bit. This morning I ran my very first 5K race.. The Hartford run/walk for the arts. Here's the problem with running a race for the first time.. everyone keeps saying how most people overtire themselves in the first couple miles and barely finish.. so I wanted to do the smart thing and pace myself.. well.. I did.. right through the finish line and finished in 35 minutes.. that's an average of just over an 11 minute mile.. I've had better times training.. few months ago..
At least this time will be easy to beat in my next race.. Maybe I'll actually compete! Of course considering all the top runners had times of 15-16 minutes.. it's not like it's realistic for me to win :)
Steve has a righteous rant about commerce websites that do not allow dashes or spaces in credit card numbers. He's right.. it's stupid.. there is no security in that. It's nothing but lazy and sloppy programming.
Funnily enough, his hall of shame includes a company dear to my heart (err... wallet).. Tickets.com.. my employer.. I'll, uh.. mention it.. somewhere. *blush*
If I see another entry on another weblog referencing to the "A-list bloggers" I'll commit a violent act. Of some sort.. not sure what yet..
No, really, it's quite tiring to keep reading the bitter, sarcastic, often humour-less references to some sort of "A-list". It saddens me that such is human nature.. always categorize into "good", "better", "more important", "more this.. ", "more that..". It reminds me of the time in fith grade when the girls divided themselves into two groups.. the "A-list" and the "B-list".. gee, sound familiar? It ended with parental intervention and a long discussion on "equality between friends".
Get over it people.. some weblogs are more popular than others.. Bitterness won't help it.. neither will sarcastic remarks and poorly worded humour with a pointy edge. In the grand scheme of things.. does it really matter who is popular who isn't? If I talked to any of my Real Life friends about how high (or low, as may be the case) my weblog ranks on some sort of "ecosystem" of useless statisics they would probably think I've gone nuts.. They would be right.
In other words.. it's boring, annoying and not productive. So get over it already and write about something that matters.
The great beer debate.. of course I have to add my idea of what a good beer is..
Bass Ale -- cooled down to about 50 degrees... actually, that's probably the best temperature for most beers.
My mom used to buy this Polish porter (this was in Poland) and boil it with honey.. I never got to taste it though, being a small child and all.. of course these days my mom actually buys Miller lite so I wouldn't exactly go by her taste in beers.
My favorite beers -- in a particular order:
Bass, Guiness, Zywiec, Sam's summer ale.
I wouldn't be a girl if I didn't mention Pete's Strawberry Blonde.. it tastes like strawberries.
What an odd entry to write while waiting for a compile at work..
These have been popping up in my log for several days now every half hour or so..
194.236.55.xxx - - [10/Jun/2003:05:10:09 -0700] "GET /blog/index.rdf HTTP/1.1" 304194.236.55.xxx- - [10/Jun/2003:05:10:09 -0700] "If-None-Match: \"4d00a7-54e3-3ee53ba4\"" 400
Spotted in my spam file:
... I have been totally disabled for the past eight years. I cannot work out of the home and I am trying to live on my social securoty.[more "pity me"crap cut out]I contracted with an advertising company . This company does addvertising for Universal Studios and a few more. They have asked me to get names, the town you live in and your and telephone number. For evey one of these they will pay me a dollor.
The only thing that you would get is one advertisement from the compay. Do you think you could do that for me? I will be so grateful to you... [sure.. and then my name and number will end up in someone's email box..]
The mispellings are a nice touch.. ends with a name and number which is listed under that name in Wallingford, CT (the town I work in.. ).. and on usenet on a BBS list from 1995 (heh).. but the IP originates in NYC .. so either this person is really, really stupid for listing her name or some poor woman is now being flooded with phone calls from irate spammed people..
For mere $39K it's a great deal!
Pretty good article on Java performance "urban legends".
In summary...
Thanks to Demitrious for the link.
I can understand seti, folding.. and the other random distributed computing projects.. but this .. was this started as a joke? Please someone say 'yes'..
(Yes, I do know this isn't distributed computing, but the whole competition thing is related)
Why is it that bad days, rotten news, bad things always seem to happen in herds and always when the weather is particularly gloomy, crappy and miserable.
It's enough to make one lose one's sense of humor. Oh, well, there it went.
Apparently just run several hundred emails through spamd at once... Disappointing.
Linux is great.. I have this old, old machine that serves as nothing more than an obscure email and web server for a domain hardly anyone uses anymore, but hey, it sits in its own little place on a friend's business dsl line and does its job well. This box is now up to 624 days of uptime and we're all being supremely careful about it staying up.. Really, perimeter around it, alarm on power button and cables and all that.. (actually, just kidding, but I've grown to enjoy watching the days add up..).
This box is old.. P166 with a dinky little 4GB hard drive that's now ancient in computer years.. This is where the comment "linux rocks" comes in play.. see, old hard drives tend to start having issues.. This one is no exception and it's starting to have some bad sectors.. uhoh.. better be careful, right?
Well.. (can you stand the suspense?)
This past week the shadow file became corrupted.. okay, no big deal, nobody can login.. who cares.. my friend is known for sprinkling VNC windows with open root shells all over the place so it's easy to replace the file from backup using existing VNC session.
Well.. then the passwd file becomes corrupted.. that's a bigger problem the box is now bouncing emails. Oopsie.. Same open shell windows.. restore from backup.. no problem.
Unfortunately.. the files restored freshly from backup got written to the same disk sectors.. can you guess it yet? That's right.. corrupt again! Well, solution simple.. sprinkle some fake-o files in the naughty inodes and write passwd and shadow to a nice, clean, non-corrupted ones.. Go figure it worked.
Why does linux rock? Try doing things like this on windows and stabilizing the machine in the process without restarting! The ancient, little linux box is still up and running and happily adding up days.. well, until more bad inodes show up.. But this is why we have backups :)
It seems Jeremy and I are not the only ones who excel in ability to find information rather than stored knowledge..
Really, that's great.. all this time I thought I was alone with my dirty, little secret!
I've been involved in a couple of discussions about exception handling in Java recently.. and while the discussions were sparked by unrelated topics I came out with one conclusion from both.. People just don't seem to grasp some very basic design ideas when doing error handling..
Number one mistake I see everyone do is..
try
{
....do something here...
}
catch(Exception e)
{
.. handle error
}
Unless you're working on a one-file CS project this is probably not a good idea.. The generic Exception object should only be caught when you *know* what to do with every different type of exception that could occur.. this includes something as basic as a NullPointerException.
In other words.. just catch the exception you can handle and throw everything else up to the calling class.. more often than not it's much more useful information at a higher rather than lower level.
Another mistake.. wrapping an exception inside a new exception and throwing it up the food chain that way.. This may seem like a good idea from the standpoint of clear, easy to understand design.. but by wrapping that exception you're throwing away vital information that the front end could use to handle the error.. It's often appropriate.. but more often not.
In a jist: Only bother with errors you know exactly how to handle.. throw everything else up. Well, of course, unless you're working on front end code.. then that's a whole different story.
Phew.. Java pet peeve #4908983439 :)