McCain – time to lay off the mud slinging

John,

You’ve lost the presidential race. Not you alone, so much as George Bush and the exploding economy. The astonishingly horrible woman you chose as a running mate did not change anything for the better, nor did your insistence on tax cuts for the rich and shameless.

Barack Obama is going to be our next president. It’s all over but the hanging-chad-counting. (That is, assuming your friends at Diebold haven’t set up yet another November Surprise – that would be even less believable than last time.) Come January we’ll be swearing in “that one”. It’s time for you to take the high road and stop smearing our next president.

The skeletons in your closet are a lot bigger than Barack’s, John. Ayers? How about the Keating 5 and G. Gordon Liddy? Why do you think haven’t the Democrats brought these up more often? Maybe it’s because they’re trying to lead a civil, positive campaign, while constantly defending themselves from your incessant, petty negative attacks.

The best thing you could do right now is frame your campaign as positive goals for the country. Remind Barak of the other 40-some percent of the people he’ll be presiding over. Remind the country that even though you’re not going to make it, the rest of your supporters: the gun-nuts; the anti-abortion nuts; the anti-gay-marriage nuts; the oil barons and the trust-funders who think taxes are for the plebeians; the self-righteous, hate-filled, intolerant jesus freaks; and everyone else who has a PAC supporting your campaign, will need some lovin’ after the election. Just because they’re wrong, doesn’t mean we should ship them all off to Alaska or something – though if they want to go on their own, it appears they’d be welcome, at least in the big cities. But contrary to W’s example, the people whose party did not win the election deserve representation as well.

Come November 5, your political career will be over. Why not end it on a positive note? Reach across the aisle one last time and give Barack a hand up, instead of taking a vindictive last swing at him. If you can do this, I promise – we’ll all vote for you for “Miss Congeniality”.

Sincerely,

A Patriotic American.

Types of Comments

One of the most neglected features of programming languages is the comment system. Not that there isn’t discussion of the nature of programming comments – people are endlessly pondering how many comments to use, how to write code that’s “auto-commenting”,

As I see it, there are three major categories of program comments: descriptive, to-do, and comment-out. Programming languages should support native ways to differentiate these types of comments; none that I know of does and most don’t have very many styles of comment at all.

Descriptive comments are the standard, and the ones everyone talks about. They include program “headstones” that describe what the program is supposed to do, inputs/outputs, log history of changes, etc.

/*
program: whatever

revision history:...

author:...
*/
...
//this function turns a 6-digit date string into a unix date
...
$foobar = $foo ^ 2 / $bar; //standard accounting forumula

 

To-Do comments are dropped into programs while you’re working on – a “note to self” about something that needs to be fixed, or might be a problem later. I use php-style hash comments for these, but most languages don’t support different styles of comments, so I do a standard comment followed by a hash (//#!error or REM #?values should be global, for example). I use #! for action items, things that are likely to crash if they aren’t fixed, #? for things that probably should be fixed but probably won’t cause a crash. Then before a program is released, I can look for #! that must be fixed, or #? that need attention. Finally, I also use to-do style comments for printing/hiding debug messages while I’m working on the code; before release these should be removed.

#!this will fail if we get more than 10 users
#!divide by zero error
#?will a salesman ever sell more than 10,000 items?
#?this code is ugly, could be refactored
#echo "$user : ".print_r($user, true);

 

Comment Out are comments that are applied to actual code, to disable it while leaving it in place. Sometimes this is to test different methods; sometimes it’s no longer used but you’re keeping it for reference; usually you’re trying taking it out to see what it does. In PHP I use # for these, to differentiate them from descriptive // comments.

#old version
#$foobar = $foo ^ 2 / $bar; //standard accounting forumula
#new version, double the results
$foobar = 2 * ($foo ^ 2 / $bar) ; //standard accounting forumula
...
/* Removed: we no longer need user ID
$user_id = lookup($user_value);
if ($user_id = 0) {
$user_id = request_from_server($user_value);
}
*/

 

I tend to like descriptive comments to be lined up with the code, and todo/comment-out shifted to the left so I can see them when I’m looking through the code:

                //loop through users, capitalize their names
foreach ($users as $user) {
#echo "$user : ".print_r($user, true);
$user->name = ucase($user->name);
#don't ucase user address
# $user->address = ucase($user->address);
#!user phone number needs to be parsed
}

Code editors that auto-indent code (Visual Studio) and langauges that are indent-dependent (Python) defeat this strategy.

 

Types of Comments

As I see it, there are three major categories of program comments: descriptive, to-do, and comment-out. Programming languages should support native ways to differentiate these types of comments; none that I know of does and most don't have very many styles of comment at all.

Descriptive comments are the standard, and the ones everyone talks about. They include program “headstones” that describe what the program is supposed to do, inputs/outputs, log history of changes, etc.

/*
program: whatever

revision history:...

author:...
*/
...
//this function turns a 6-digit date string into a unix date
...
$foobar = $foo ^ 2 / $bar; //standard accounting forumula

To-Do comments are dropped into programs while you're working on – a “note to self” about something that needs to be fixed, or might be a problem later. I use php-style hash comments for these, but most languages don't support different styles of comments, so I do a standard comment followed by a hash (//#!error or REM #?values should be global, for example). I use #! for action items, things that are likely to crash if they aren't fixed, #? for things that probably should be fixed but probably won't cause a crash. Then before a program is released, I can look for #! that must be fixed, or #? that need attention. Finally, I also use to-do style comments for printing/hiding debug messages while I'm working on the code; before release these should be removed.

#!this will fail if we get more than 10 users
#!divide by zero error
#?will a salesman ever sell more than 10,000 items?
#?this code is ugly, could be refactored
#echo "$user : ".print_r($user, true);

Comment Out are comments that are applied to actual code, to disable it while leaving it in place. Sometimes this is to test different methods; sometimes it's no longer used but you're keeping it for reference; usually you're trying taking it out to see what it does. In PHP I use # for these, to differentiate them from descriptive // comments.

#old version
#$foobar = $foo ^ 2 / $bar; //standard accounting forumula
#new version, double the results
$foobar = 2 * ($foo ^ 2 / $bar) ; //standard accounting forumula
...
/* Removed: we no longer need user ID
$user_id = lookup($user_value);
if ($user_id = 0) {
$user_id = request_from_server($user_value);
}
*/

I tend to like descriptive comments to be lined up with the code, and todo/comment-out shifted to the left so I can see them when I'm looking through the code:

//loop through users, capitalize their names
foreach ($users as $user) {
#echo "$user : ".print_r($user, true);
$user->name = ucase($user->name);
#don't ucase user address
# $user->address = ucase($user->address);
#!user phone number needs to be parsed
}

Code editors that auto-indent code and langauges that are indent-dependent defeat this strategy.

Buddhaphone

Yes, I’ll be getting an iPhone 2.0 (or as I’m choosing to call it, hoping it will catch on, the “Buddhaphone”) but not this weekend when it first comes out, because I have to wait for my Verizon contract to run out at the end of the month. In the meantime, I’ll probably download the new software for my iPod Touch.

The Palm Treo 650 hasn’t been bad – with Missing Sync it syncs to my Mac fairly well. Verizon’s coverage is great, I’ll miss that with AT&T. But Verizon is also about way behind the technology curve; they recently announced and available upgrade to the Palm Centro (the new, smaller version of the Treo) that’s been available on ATT for over a year now.

The Palm has convinced me of the value of a smartphone, though, and the new iPhone should go above and beyond that. On a daily basis I use mobile web to look things up on Google and Yelp, and check that websites are working; Google Maps is now indispensable, paper maps to the contrary. The address book is my main reference (especially since it’s well-sync’d with my desktop), as well as the calendar, even though I still manage to miss birthdays and other notable occasions. I keep notes – grocery and affinity card numbers, shopping lists, busy day todo lists, ideas for t-shirt slogans (“Mentally Confused and Prone to Wandering”), beers I’ve tried, medical history… I used to use Pocket Quicken a lot but when my desktop Quicken fell down and couldn’t get up it took a lot of my enthusiasm away. I rarely use the camera – and I think people who go around holding up their phones and clicking pictures seem nearly as idiotic as the ones who keep a bluetooth headset in their ear when they’re not talking on it. And of course I’ve got an HP-12C emulator – there’s a hacked one for the iPhone as well (and even an HP-16C!) – hope they’ll make it to the new iPhone, hacked or not.

I actually read a book this weekend (“Down and Out in the Magic Kingdom” by Cory Doctorow) on my iPod Touch. The battery doesn’t last all that long when you’ve got the backlight on the whole time, and you have to keep swiping the screen to scroll but all in all it wasn’t that bad an experience, and you can’t beat the portability.

Yelp

I signed up on Yelp about a year ago, looked around, didn't find a whole lot of reviews. Recently returned because the guys on the radio were talking about it – and now it seems to be approaching useful mass.

So stop reading here, there's nothing new (by a long shot!) – go to Yelp – read reviews, sign in, write some reviews. Link me as a friend, if you're so inclined – address is fheald at this website's domain name.

Macworld

I'm the sort of “early adopter” who watches the yearly Macworld keynote with my finger on the “buy” button. I love Apple products, and I love new gear. It's more exciting to me than the Oscars, and it won't be stopped by the writers strike.

This year's nominees:

“Time Capsule” wireless network hub and printer sharing and hard drive sharing (“It's a floor wax and a dessert topping!”) – it's cool to be able to do automated backups; you could do this already with the “Airport Extreme” – just plug in a USB hard drive, or share a hard drive from any computer on the network (which may or may not work with Leopard's “Time Machine”). Although it is nice to be able to cram 1TB “server grade” hard drive into a tiny box. This is solving a problem I have today, which is how to back up two computers and also how to share files between them.

The iTouch “upgrade”. For $20 you get OS 1.1.3 and weather, stocks, notes, email – all the standard iPhone apps. Sounds great – but I've already got those, as well as a Unix terminal and access to dozens of homegrown applications, thanks to Jailbreak. The situation may change next month when the iPhone SDK comes out. I don't really mind paying to get those apps (and any future ones) legitimately – but how can I give up running Apache on my iTouch (even though I don't use it for anything)?

Our final canditate is the Macbook Air. All over the net there are people griping about missing ports, missing optical drive, etc. People don't seem to understand – smaller, lighter, sexier costs more. A Porsche costs more than a Chevy Pickup. Yes, it's too expensive for me (so is a Porsche) but I don't think it's too expensive compared to the other name-brand thin laptops it's competing against – Sony and HP and Dell. I do think it's too bad they don't have a firewire port – maybe they're giving up on that? – or some sort of high speed docking port. Or even an ethernet port. But this is a laptop for hardcore business “road warriors”. It's basically the modern portable version of the cube – limited appeal, high price.

And the winner this year is: my bank account! Because for the moment I'm not buying any of them. If they release a tablet PC next month, maybe I'll hover over the buy button again…

Another reason not to vote for Hillary

…because she just sent me spam. I would never have signed up for any Hillary Clinton mailing list, but today I got a campaign letter from her.

I responded:

Thanks for writing; not sure how you got my name. I am a very strong Barack Obama supporter.

In case you read responses, you should know I would sooner not vote, than vote for Ms. Clinton. I believe she is “owned” by the same or similar corporations, to those that own the current idiot-in-chief. Her ties to labor unions are too strong, and I believe her relationship with the health care lobbies compromises any possibility that she might make worthwhile reforms in health care. Lastly, I believe that she is unelectable, mainly because so many people in this country hate her.

Please consider supporting Obama. The country deserves a change.

And as anticipated, the bounce-back response from them:

Thank you for your message. I have received thousands of emails from people all over the country. Your comments are very important to me and I am excited that so many people are joining our conversation about how to change the direction of the country. Unfortunately, due to the high volume of comments, I am unable to respond to each email individually.

I have news for you, Hillary. If only one person is speaking, it’s not a conversation, it’s a monologue; it’s not a democracy, it’s a dictatorship. No thanks, do not want.

Antisocial Networking

I still don’t get the point of social networking.

I’ve just joined Facebook ( fheald at obtainium dot org ) – mainly because we think there may be a way to integrate my company’s product by using their embedded applications.

I’m also a member of Tribe ( justfred at obtainium dot org ), and Friendster (also justfred at obtainium dot org ). I bypassed Myspace, Orkutt, Linkedin and several others, despite the occasional

I also belong to quite a few yahoo groups, as well as a number of forums – mainly for vehicle-specific interests and other hobbies like tropical fish.

There’s an ongoing battle within the local San Diego Burning Man community between Yahoo and Tribe – there’s a presence on both.

Hard Drive Jukebox

Don't have an iPod, or it doesn't hold enough? Here's an easy and relatively cheap way to make your own hard drive jukebox. I use this to take a bunch of my (legally ripped from CDs owned by me) mp3s to work with me.

Take an internal hard drive. I've got a bunch of 128GB ones sitting around from old projects; I also had a couple of laptop drives (…which I got at a friend's garage sale for $5). You could also buy a new internal hard drive, they're really really inexpensive. The drive should be at least large enough to hold your entire MP3 collection; the bigger the better.

Get a USB container for it; Fry's has these for about $30 (I got a fine 2 1/2 for $10); or if you like the naked look, just get a USB-IDE adapter cable for around $20. You could even get a standard external drive if you find a cheap one that you feel like dragging around; usually they cost more than an internal plus a cheap case. I believe most of these cases are “plug and play” – you don't have to install software; just plug it in. They also have cases to put the drive in if you're worried about dropping it or banging it around; which you shouldn't be because it's just a backup, right?

Format the drive (MacOS if you won't ever plug this into a Windows machine; otherwise DOS so it can be recognized by either). Copy all your MP3s. Take it to work, plug it in and install iTunes. Listen to your music all week long.

Do not let a friend “borrow” this drive (or just swap cheap drives with them) because they'd be able to browse your music collection (and you, theirs). This would be wrong.

All hallows

A few years back, I was on my way out to a camping trip on Halloween. I stopped at a local supermarket for last-minute supplies, and wanted to buy a couple of eggs to make an omelette the next morning – preferably two or three, but I settled for half a dozen. When I went to check out, the cashier let me know that they were having a special where I could get two dozen eggs for the price I was paying for half a dozen. She could not understand why I thought that was funny, or why I suggested it should come as a package with a case of whipped cream.

I won the costume contest at work today. I wore my ghillie suit, with a single large rubber eyeball. I told people I represented the things in the fridge and that we were demanding our own government.