Archive for December, 2007

“Santa putting children’s information at risk, warn experts”

Friday, December 21st, 2007

After all the major privacy blunders in the past few years, by both private corporations and government agencies, this tongue-in-cheek warning isn’t likely to raise any eyebrows at all.

“F*cking programming” [NSFW!]

Thursday, December 20th, 2007

As a software developer, I have occasionally been tempted to put… um, “colorful” language… in my source code and comments, especially about whatever vagaries of the OS API that I’ve just spent several days locating and working around. I generally manage to suppress the urge, because it’s rather embarrassing when you go to share or sell the code. But apparently not everyone has a problem with that. (Thanks, interrobang!) (It seems that it isn’t only open source projects that have had to deal with that, either.)

This particular snippet has to be my favorite:

if ( w->ssmailbox.auto_resize != False ) {
Widget parent;
x=0; y=0;

/* AAAAAAAAARRHRRHRRRRRRRRRRRRRGGGGGGGGGHGGGHGHHHHHHHGGGHHHHHHHH!!!!!!!!!!
Fuck me gently with a chainsaw! Will someone please tell me how the fuck
you resize a fucking widget?? Why, when I call whatever resize method
I try with 64×64 does the fucking window end up 64×82? WHY????????
WHY???????? WHY???????? WHY???????? WHY???????? WHY???????? (why..?)
*/

for (parent = (Widget) w; parent != None; parent = XtParent(parent)) {
#ifdef Xt_doesnt_suck_wet_farts_from_dead_pigeons
XtResizeWidget(parent, im->width, im->height, parent->core.border_width);
#else

“#ifdef Xt_doesnt_suck_wet_farts_from_dead_pigeons”?!? That’s an instant classic.

“An uncanny 1960s view of the future World Wide Web”

Wednesday, December 19th, 2007

Spotted on Chris Linfoot’s site. Very interesting.

“Transactions specialist – flexi-time contract hire”

Tuesday, December 18th, 2007

I’ve pretty much given up posting the spam and scam messages I receive here, because there’s very little new in them, just the same tired rehashes of the same tired fake offers. But this one is notable because it’s one of the few actual “money mule” e-mails I’ve ever gotten.

I know I shouldn’t have to say this, but if you ever get a message like this, don’t be tempted. You’re being asked to take stolen or scammed money from people and send it to the thieves, and when the police go looking, it’ll be you — the “mule” — who they charge.

Note that, like pretty much all spam, this was mass-produced and sent to lots of different e-mail accounts, which is obvious because the address in the to-line only has the same first few letters as one of my addresses. It was obviously sent to an alphabetical list of target addresses.

After much consideration, I’ve decided to leave the entire message unchanged, including the e-mail address, because someone might find this entry by searching on that. Again, don’t be tempted to contact this scammer!
(more…)

This Morning’s Interesting Conversation

Tuesday, December 18th, 2007

I answer a soft knock on the front door a few minutes ago, still in my houserobe because the recent blizzard has driven me into semi-hibernation, to find two soft-spoken and well-dressed men at the door. One is in his late twenties, the other maybe forty, and each carries a handful of literature and a book with the suspiciously self-righteous look of a cheap but well-thumbed Bible, bristling with bookmarks. Even half-asleep, I have a good idea that they aren’t Fuller Brush salesmen.

“Good morning, sir,” twenty-something begins. “I hope we didn’t get you out of bed.” I mentally grant him minor points for noticing my attire. “Do you have a minute?”

“Not really.”

“Oh.” They seem taken aback by this. “Well, if we could just leave something for you to read. My name is Greg, by the way, I didn’t get yours…?” as he tries to urge a Watchtower on me.

“And you’re not going to either. Good day,” as I close the door.

You know, there’s a good reason why door-to-door salesmen have all but vanished. People don’t like having things pushed on them uninvited. But apparently certain groups haven’t quite gotten that. And I’m willing to bet they never will, too.

Cross-Platform GUI Programming

Monday, December 17th, 2007

Over the last week or so, I’ve been working on a test program for Project X. The requirements pretty much dictated a GUI solution, but while I work primarily under Linux, the other developer on it works primarily in Windows, and we use both C++ and Lisp for this project. Any programmer who’s tried to write GUI programs for more than one platform knows that while all GUIs look pretty much the same, and do almost exactly the same things, the programming interfaces are completely different.

That’s rather ridiculous, when you think about it. If you develop a program for one OS, even in a mostly-portable language like C++, you have to all but rewrite the interface code to get it to run under a different OS — just to get the same general look! Microsoft and Apple have a vested interest in making it difficult for people to port programs to other platforms, so it makes some sense that they wouldn’t go out of their way to simplify it. But open-source people don’t, and they’ve come up with a solution: a package called wxWidgets.

Not only does wxWidgets bridge the GUI interface gap in a way that’s portable, it does so in a way that’s accessible from nearly any programming language! The Lisp interface for wxWidgets (wxcl) wouldn’t compile cleanly for me under Linux, but I suspect that will be fairly easy for me to fix when I need it. The C++ interface worked with no problem, and in maybe ten hours of work (with no prior experience with it) I’ve managed to build all the GUI code for the test program, for both Linux and Windows. :-)

“But wait, there’s more!” The wxWindows solution also covers other areas of cross-platform pain: a standard graphics format (XPM), file and stream handling, multiple (human) language programs, multithreading, database access classes, Internet and TCP/IP classes, multimedia classes, embedded web browsers, and more — all source-code portable between different OSes. And it’s cleaner than MFC or any other Windows programming framework I’ve used — and I’ve used a lot of them, and even written a couple of my own. It’s… elegant. That’s the only word I can use to describe it.

This is the way programming is supposed to be.

Between this kind of thing, the rise of web-based programs, and the recently-mentioned Unity feature of the upcoming VMware Workstation, the OS is becoming less and less relevant. And that’s a good thing… for everyone except Apple and Microsoft, at least. :-)

VMware Workstation 6.5 will have Unity!

Sunday, December 16th, 2007

Unity — the VMware Fusion feature for Macs — allows Macs to run Windows and Linux programs on the Macintosh desktop, instead of in a virtual machine window. And as of 5:40am today (US Eastern time), I hear that that feature is coming to the next VMware Workstation version too!

I love ZFS!

Sunday, December 16th, 2007

As mentioned earlier, I’ve been using the ZFS file system on my network backup drive for the last couple weeks. Last night, I decided to run a “scrub” operation on it (a file-check, similar to fsck or chkdsk):

$ sudo zpool status
pool: zfs
state: ONLINE
status: One or more devices has experienced an unrecoverable error. An
attempt was made to correct the error. Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
using ‘zpool clear’ or replace the device with ‘zpool replace’.
see: http://www.sun.com/msg/ZFS-8000-9P
scrub: scrub in progress, 75.87% done, 1h9m to go
config:

NAME STATE READ WRITE CKSUM
zfs ONLINE 0 0 0
mirror ONLINE 0 0 0
loop0 ONLINE 0 0 4
loop1 ONLINE 0 0 1

errors: No known data errors

Five problems so far, which might seem horrible for only two weeks of use — until you think about it. That’s five problems on an encrypted network drive, using a chain of programs that are only mostly reliable on a local drive. I don’t know what kind of reliability people expect from network drives (this is my first), but in my very limited experience, that’s not too unusual.

My point is that ZFS not only detected the problems (where other file systems would happily have assumed that all is well, and either served up the erroneous files, or failed spectacularly if the damage was in a metadata block), it fixed them! If it had run into them during normal use, it would have fixed them silently too, only noting the problems in the log so that you could tell that something was going on!

That’s why I started using ZFS on that drive in the first place. Nice to see it in action. :-)

“Apple keeps critical security fixes to itself”

Saturday, December 15th, 2007

He-LLO, Steve! Security through obscurity doesn’t work! How many times do we have to be burned by your software before you learn that?

“AMAZINGLY SIMPLE HOME REMEDIES”

Friday, December 14th, 2007

Courtesy of my sister, whose sick sense of humor matches the rest of our family:

1. If you’re choking on an ice cube simply pour a cup of boiling water down your throat. Presto! The blockage will instantly remove itself.

2. Avoid cutting yourself when slicing vegetables by getting someone else to hold while you chop.

3. Avoid arguments with the Mrs. about lifting the toilet seat by using the sink.

4. For high blood pressure sufferers: simply cut yourself and bleed for a few minutes, thus reducing the pressure in your veins. Remember to use a timer.

5. A mouse trap, placed on top of your alarm clock, will prevent you from rolling over and going back to sleep after you hit the snooze button.

6. If you have a bad cough, take a large dose of laxatives, then you’ll be afraid to cough.

7. You only need two tools in life — WD-40 and Duct Tape. If it doesn’t move and should, use the WD-40. If it shouldn’t move and does, use the duct tape.

8. Remember: Everyone seems normal until you get to know them.

Daily Thought: SOME PEOPLE ARE LIKE SLINKIES. NOT REALLY GOOD FOR ANYTHING BUT THEY BRING A SMILE TO YOUR FACE WHEN PUSHED DOWN THE STAIRS.

If you can’t fix it with a hammer, you’ve got an electrical problem.