How to Write a Good Script

There is definitely an art to writing scripts that don’t suck. It isn’t enough to just get the job done. It’s everything to make your script do the right thing, with messages, with errors, and over time (like years from when it was written). 1. Always use absolute paths for everything. You cannot assume what your environment will be. You can’t. If your script executes via cron it’s likely it won’t have any of the environment variables you depend on. Including PATH. Or HOME. The working directory will probably not be what you expect, either, so don’t write to files in the directory you’re in without thinking about it. Especially if you’re running as root. You’ll actually have permission to …

Read More

Dear IBM/Tivoli: Transport Encryption

Dear IBM, At SHARE a couple years ago you were presenting the new stuff going into Tivoli Storage Manager 5.3. A number of us ganged up on your staff afterwards and told you we need transport encryption. Not total encryption of our data, but just something like SSL so that we could move data on untrusted networks. You asked why we couldn’t just encrypt all of the data, which is a feature you offer. We didn’t like that because there are a lot of other gotchas there. The biggest gotcha is when our customers forget their encryption key. Yeah, we know, they’re dumb, but it’s a real-world problem. When they forget their TSM node passwords we can just reset them. …

Read More

links for 2006-03-24

stock.xchng – the leading free stock photography site (tags: photography stock free photos images photo design) Welcome to graphix4change.com I love the NSA spying t-shirts (tags: shirt politics photos photo)

Dell Firmware Updates

For posterity, if your Dell firmware updater keeps telling you: An Update Package is already running. Wait until it is complete before proceeding with another update. it’s /var/lock/.spsetup.

I Hate Programmatic Email

Hi. I don’t want email from your apps. Really. I don’t want to know that your cron job ran successfully last night. I don’t want to know that there were 38 commits to your CVS repository. I don’t want to know that you are planning routine updates to your J2EE environment every Tuesday for the next year. Not via email, at least. Over and over and over and over I get mindless email from applications. I get an email per error. I get a notice per scheduled change. I get commit email, and log checking email, and email that says everything is fine. And you know what? I stopped listening. I built a mail filter for all the crap you …

Read More

100 posts, w00t!

A big thank you to all who read this blog. Using my sophisticated web analytics package (me looking at Webalizer output) I think there are about 30 of you now. You make me all warm and fuzzy. In other notes, Firefox 2.0a1 just seems a LOT faster than 1.5. I don’t know what those guys changed but hey, cool. Obviously I’m keeping my 1.5 install around in case, but wow. And WordPress 2.0.2 doesn’t fix the weird rich text editor problems that I have, where the posted document doesn’t have the same paragraph breaks that the editor shows. Doh! Anyhow, thanks folks! Update: And yes, I know that the daily del.icio.us postings are counted in the 100, but hey, seeing …

Read More

The Death of a Developer

“Hello?” “Hi, this is boss-of-developer. Sorry, I got your number from one of the other managers. Where are you?” “I’m about to be in my office.” “Stay there.” An extraordinarily short amount of time passes. “Hey, what’s up with you and my staff?” “Um, they’re kinda off the reservation and I want to help them but they think they need stuff like 100% uptime, huge machines, etc. and they totally don’t. I believe in the cause, I just want to add some of my own wisdom so that things are better for everybody down the road. And if they need big hardware we can always scale up, and do so very easily. I think they missed my point.” “Yeah… they …

Read More

Developer, Part Three

So I spent the morning conversing with my favorite developer, via email. It went something like this: “We need PHP 5.1.2, Apache 2.2.0, Java 1.4.1, and MySQL 5.0. We also require a four CPU machine and 8 GB of RAM.” “I counter with PHP 4.3.9, Apache 2.0.52, Java 1.4.2 or Java 1.5.0, and MySQL 4.1.12, and a virtual machine until we can tell what exactly you need.” “You are being obstructionist. Please give us what we ask for.” “Actually, I don’t think my services will fit your needs. You might explore some other options. Go talk to our Windows techs.” “We need this to run on Linux. Please help me. The Windows guys sent us to you originally.” (ooh, they’re …

Read More

Standardization: Bathrooms vs. Sporks

Done right, a standard is helpful. You can rely on it, make assumptions using it, and get things done faster. Done wrong and it’ll be the square peg that has to fit into the round hole. The idea of a standard is that you minimize the variations you’ll encounter. You might have to embrace certain variations, though, in order for your standard to be useful, and therefore popular. Take the spork. You know, a spoon with mini fork-like tines at the end, popular at Taco Bell. It is a miserable fork, and a crappy spoon, because it tries too hard to be more efficient. Take the bathroom. You could have one standard, the toilet, for both men and women. Or …

Read More