OK, winter, we get it

I knew it was probably coming, so it wasn’t a total shock. But still… I woke up this morning to this:

Ugh. It will most likely have melted by noon, I suppose. Not that that will do much to repair my severely damaged psychological state.

Even worse, I’m annoyed that the default CSS for the new WordPress gallery functionality uses float: left so when there are only two images, it doesn’t center them, but leaves a nice, perfectly-sized void where a third photo would have gone. I’ll have to fix that. Speaking of voids, my annoyance (and distraction) at snow and CSS is somewhat compensated for by the smooth “electronic breakbeat jazz” grooves of Revolution Void.

Update, 8:13 AM: Great, now it’s actually snowing more. Take that, global warming! (Yes, please check out that site, if for no other reason than to prove that just because your URL is “globalwarming.org” doesn’t mean you’re a benevolent non-profit trying to save the world.)

Removing the Leopard Dock’s “shininess”

I know there were already dozens of blog entries the day after Leopard “dropped” with instructions on how to remove the shiny Dock, but I’ve actually been living with it peacefully and almost liking it.

But now at my new job, I’m not sure if it’s the saturated color on my iMac display, the particular desktop image I’m using, or some strange combination of those and other factors, but the Dock’s reflection was painfully (yes, painfully) shiny and distracting, so I just had to look up how to get rid of it.

Apparently there’s a whole cottage industry now around customizing the Leopard Dock’s appearance, but all I really wanted was the simple look you get when you have the Dock on the left or right side, but when the Dock is resting nicely on the bottom where it belongs. It was surprisingly difficult (in that I had to do three whole searches and then hunt through a few links on the first page of results of each) before I found (again) the simple command line instructions to accomplish this task. And in the interest of saving myself the trouble next time (if there is a next time), I’m posting them here:

defaults write com.apple.dock no-glass -boolean YES
killall Dock

Room 34 on iPhone

iPhoneI finally got myself an iPhone on Thursday. In fact tomorrow I will have two, which is one more than I need (and is also a story for another post), but the point right now is that I finally have an iPhone.

Naturally one of the first things I did with the iPhone was take a look at how room34.com looks on the iPhone. And since the iPhone’s Safari browser works pretty well, it looked fine. But since it’s optimized for a 1024×768 display, it also was a tad small.

By now I am all set to create an iPhone-friendly version of the site, but since it’s built on WordPress, I was pretty sure someone would already have created an iPhone-friendly theme, and sure enough, someone did. But they actually went one step further and built it as a plug-in, so you can keep your regular theme for computer-based visitors and mobile users will automatically see the mobile version. Nice!

It’s a bit plain for my tastes, and it doesn’t account for the fact that I’ve built my own navigation bar and menu system for browsing the non-blog pages of my site, but it’s a start. I plan to customize it over the next week or so to look more Room 34-ish, and to include all of the necessary navigation.

What Web 2.0 really needs is a global “turn off comments” switch

I love a lot of things about “Web 2.0.” Websites just look better, for one thing, and I firmly believe that “form” is a key part of “function.” The increased interactivity both between user and site and between user and other users has made the whole thing a lot more engaging.

But some people seriously need to shut the hell up.

I love the fact that many sites allow readers to comment on their articles. And I often wish more people would post comments on my own site. (I have to assume/hope more people are reading it than just those who very… very… rarely post comments.) But sometimes, especially when the topic inspires a passionate response (often involving Apple, love ’em or hate ’em), the worst thing I can possibly do is allow myself to get sucked down into the vortex of asshat ramblings in the comments section. And I have a perfect case in point here today from Technology Review.

I happen to be an Apple fanatic, I can admit that. But even if I didn’t love Apple, the iPhone would have won me over. In fact, going into the Macworld Expo keynote where Jobs first announced the iPhone, I met the rumors of an Apple phone with cringes and revulsion. Why would Apple make a phone? I wondered. What a stupid idea, I was convinced. But by the end of the keynote, I wanted one.

I still don’t have one, although I am presently contemplating it. Once I had actually used one, I was even more convinced that it was the greatest invention of the computer age. Opening it up to business apps and third-party developers is going to release the deluge. So I found the TR article interesting, but I seriously wanted to crush my skull in a vise after reading the first comment. And it just got worse from there, even with the commenters I agreed with. And yet, like with Katherine Kersten, I just can’t… stop… reading… them! HHFFRRRGGH!!! (Suddenly, I think I understand what that means.)

Resizing and regenerating WordPress upload thumbnails

WordPressFor quite some time, I’ve been wishing the thumbnail images WordPress creates when you upload an image were slightly bigger. The function that generates the thumbnails accepts a maximum dimension as an input parameter, but then the value (a paltry 128 pixels) is hardcoded in the script that calls the function, and there’s no way in the standard WordPress configuration to change the value, other than manually editing the admin script where the call is made.

This is easy enough to do, if you know how to find the block of code in question, but it’s wrong wrong wrong in terms of ongoing WordPress updates: when a new version is released and you update your files, the changes you made will be lost.

So the right way to go about this is with a plug-in, and fortunately there is one. It’s simple and it works. Except for the fact that it doesn’t regenerate any of your existing thumbnails.

Maybe there’s something else out there, but I wasn’t able to find one, so I had to resort to rolling my own.

The script is incredibly rudimentary right now. It’s not a plug-in, it doesn’t interface with WordPress admin at all, setting the file path and dimensions require manually editing variable values in the script, there’s no security, etc. It does seem to work though, which is the most important thing. There were a few bugs earlier on that I believe I’ve squashed, but I can’t guarantee there aren’t others, and given how quickly I put it together this afternoon, with kids screaming and car dealerships calling me every 3 minutes (yeah, that’s another blog post), it’s probably not quite as efficient as it could be. (That’s why I cranked up the max_execution_time and memory_limit values. YMMV depending on how many files you have to process.)

As long as you understand that you’re using it at your own risk, feel free to download the script. In order for it to work it should be placed in your wp-admin directory. And remember, it’s not secured at all, so I recommend uploading it, running it, and then deleting it. (Well, now that I think about it, I’m pretty sure including admin.php does automatically provide standard admin security, but don’t quote me on that.)

If I have the time and if anyone actually cares, I’ll update this and turn it into a proper plug-in with all of the attendant niceties. Otherwise… well… never mind!