Category Archives: Software

Noteworthy software, apps, and tools.

Apple’s Challenge

If I was Apple I wouldn’t be worried at all about Windows, I would be worried about the next generation of Linux desktop software. The main reason I’m considering a G5 for my next desktop purchase is that I want a powerful machine that Just Works when I plug stuff in and can still run all the open source tools like Subversion, rysync, PHP, MySQL, etc etc that I rely on. It’s also interesting that all the software I regard these days as truly essential isn’t desktop software, it’s server software. I can survive switching text editors or graphics programs or even operating systems, but if I had to use ASP and SQL Server instead of Perl/PHP/Python and MySQL I’m not sure what I would do. I can function without these things on my desktop, but having to access them remotely (if it’s pretty transparent) prohibits some pretty cool stuff and diminishes my productivity.

Windows and OS X are tools I use to get things done. Linux desktop software (X, KDE, Gnome, etc) is a hobby. If I could focus on getting work done instead of getting my wireless card to work I could consider as a serious and cheaper alternative to a OS X desktop. (No matter what I want one of those new Cinema displays though.)

To preemptively clarify, my comments do not at all apply to Linux in the server space, where it by far the most mature and capable platform out there and I would hardly consider anything else.

Staticize 2.5

Version 2.5 of the Staticize Reloaded plugin is now available for download. Installation instructions are included in the archive. What does Staticize Reloaded do? It is a highly advanced caching engine that dynamically and automatically caches pages on your site that need to be cached, when they need to be cached. It also allows for some parts of a page to be cached and others not to be, so for example your menu could always be dynamically included from a single file while your main blog content was cached. With Staticize Reloaded you don’t have to worry about rebuilding, stale caches, slow posting times, or any of that. It works silently, efficiently, and trasparently to both the end user and the author.

This version adds the ability to have dynamic functions on a page in addition to dynamic includes. It also adds full support for etags and last modified headers, though you must turn it on in the plugin file. My one tip is that when you redesign or tweak your template temporarily deactivate the plugin. Staticize Reloaded is well-suited for sites on older servers or that receive more than twenty thousand visitors per day. WordPress is so fast anyway I find it’s not worth caching on lower-traffic sites.

Update: The zip archive had a slightly older version of the plugin than the final 2.5 release. Please re-download to get the latest and greatest and fastest.

A Foot of Mac

I broke down:

Three retail boxes, one for Keynote software, one for a 12 inch Powerbook, one for an iPod

Now I’m just walking around with a big goofy grin on my face. First thoughts:

  • I cannot tab in forms like I used to
  • Enter lets you change the filename instead of drilling down
  • The aliasing of the fonts looks funny at first but you get used to it
  • It’s faster than my Vaio
  • Things are very intuitive (e.g., setting up my bluetooth mouse)
  • iSync rocks
  • Setting up my phone as a GPRS modem was not intuitive.
  • I want something like Putty
  • 256MB of memory is not enough
  • I’m getting used the quirks pretty quickly
  • I keep hitting the trackpad when I’m typing and erasing stuff

It’s not a total switch, I still have Windows XP on a laptop and a desktop that I use daily, and my Gentoo desktop has been running very well. This is just getting my feet wet on a new platform, and greatly expanding my testing enviroment. A big part of my motivation was that a grossly disproportionate part of my audience (about one in six) is on OS X, a platform that I previously had no easy way to test on.

I would love to hear software recommendations and general tips and tricks. One thing I really miss is I used to have shortcut keys that would launch putty SSH sessions to different servers and use key authentication so I didn’t have to type anything, about 5 of them, and not having that is actually slowing me down a lot.

Bizarre Content-Type Problems

I’ve been having some really weird problems with my mime types lately, which has put a hamper on some of the RSS and standards compliance stuff I want to do here. Every document generated by PHP was being sent with a Content-Type: text/html; encoding: iso-8859-1; regardless of whatever was being specified with header in the code. I’m still not entirely clear on what fixed it, but I believe it had something to do with no default content type being specified in the php.ini file, but a default encoding specified. This confused things somewhere and it’s all resolved now. There is the default content type of text/html which works for 99% of stuff, and the overrides now work for the rest. Now I can rest easy.

Updated autop

Most of the scripts I offer on this site are things I’ve written myself, for myself. As part of this living site they are constantly updated and tweaked, yet sometimes I don’t update the scripts section with what’s running live here, usually because I tell myself that the code is so ugly that no one would ever want to use it. Well . . . it works. I’ve decided to put the updated autop code up for all to use. Impetus for the change came almost two months ago from Phil Ringnalda, though my implementation is pretty different from the one he suggested in his post.

Basically what the update does is make the paragraph code ‘smarter’ to deal with lines that end with block-level tags, therefore not creating extra spaces and invalidating your HTML. Try it out! I’ve left the simpler version there for people (like me in some applications) that don’t need the extra code at all.

Sometimes

Sometimes when reading what should be a very dry article you see an unintentional typo or some similar snafu that makes you spurt Dr. Pepper. Sometimes I wish my keyboard had the equivalent of a sneeze guard. From Tuning MySQL Server 4.0 Query Cache:

You may increase or degrease query_cache_size to find the value, which provides best performance for you.

So am I going to need one of these if I want my database to be tweaked to perfection? All joking aside, the query cache in the 4.0x series is, for practical web applications, one of the best improvements thus far. Though it annoyed me back in the 4.02 days when they changed the syntax for the configuration options. Why? No good reason. They’re on 4.09 now and things couldn’t be smoother though. I know of several major sites that run MySQL 4 as their main backend.

First Letters

I’ve been noticing now with the fancy caps watermark that most of my posts begin with the letter I, and so I wondered how many of my posts were like this, so I put together a little query like so:

mysql> SELECT DISTINCT LEFT(post_content, 1) AS letter, COUNT(*) as count FROM b2posts GROUP BY letter ORDER BY count DESC;
+--------+-------+
| letter | count |
+--------+-------+
| < | 373 |
| I | 10 |
| T | 2 |
| A | 2 |
| W | 2 |
| C | 1 |
| S | 1 |
| M | 1 |
| O | 1 |
| Y | 1 |
+--------+-------+
10 rows in set (0.00 sec)

What does this tell me? Pretty much nothing except that before I came up with the autop function I started each post with a tag instead of text. Maybe it’s time to go back and clean up some old content.

Fancy Caps Thingy

I’m not sure how else to describe it, but if you’re browsing this with a modern browser you should be seeing the first letter of the paragraph of a post in a large serif behind the text. This is something I’ve been thinking about doing for a while, but never got around to it. CSS is a beautiful thing. It can think of a few tweaks for it, but basically the hard part is over. I’m still debating over what font to use behind the text, but I have all of the letter images (which are PNG by the way) generated through a neat PHP script so changing the font or color is a trivial issue.

Let me know what you think! Font suggestions? Too dark? Too big? Oh, and thanks to Rebecca for helping me out with the initial letters. She’s a life-saver.

Glasses

About two years ago I went and picked out a new frame to go with my new prescription. I wandered all over the store, but the ones that caught my eye (so to speak) were, in hindsight, terrible for me. I have an ovular face, and these were skinny and rectangular. The color was a deep brown, I put them on and felt a little taller, and things looked a little sharper, despite the fact that the prescription wasn’t in them yet. The design was fairly basic, but they had a brand name on them (I think Polo) so they were hideously overpriced. My judgment was influenced by Antitrust, a movie where the handsome main character, Milo, had dark glasses much like these.

Once the lenses came in I wore them to school, and the reactions were mixed, to say the least. Even the same people seemed to vary their opinions throughout the course of the day. It was different yes, but I don’t seem to remember it being that big of a deal. As my love goggles began to fade, I started to see why. They were skinny, and the way they sat on my “Roman” nose made them tilt oddly. One of my best friends summed it up later is that with the old glasses I looked like a doctor and with the new ones I looked like a lawyer. How should that be taken? I still don’t know. I’ve seen Ally McBeal, there are attractive lawyers. I’ve met some nice lawyers. But does it have an implication of moral tinge? When someone says you look like a lawyer in high school, it makes you think.

Anyway my mind wandered down this path today in the glasses shop by my house. I stopped in to get a “tune-up” on my current old glasses. They’ve been bent a little funny, thanks to me sitting on them a few times; the nose-pads needed to be replaced; the screw on the left was about to come out. The prescription is a little old, but that’s to be fixed later. The dark rims were there, and they called out to me. I flirted with them, tried on a pair or two, and laughed at the mirror at someone I had forgotten.

Almost There

I believe that in the weblog medium, nothing should come between the world and your words. Ideally you should be able to type a block of text, and it will be presented in a typographically sound, semantically meaningful manner without any intervention from you, the blogger. Unfortunately, everyone is caught up in presentation. Personally I’m very familiar with this because my aesthetic compels me to do things like curl my quotes, define every single acronym, and use paragraphs instead of multiple break tags, but this is a barrier to publishing. Before I had the curly quotes script, I would manually type in the HTML entities every time I used an apostrophe or quote, which as you can imagine can be very tedious. That’s been taken care of, and the code has even been integrated into Cafelog, the classiest weblogging software out there. I’ve addressed the paragraph problem in a rather superficial way that needs some looking at, and today I decided to take a look at the acronym problem. I’ve got it working just fine, I just need to hash out a little code that sorts an array based on the length of its key, and then I’ll put it up on the scripts part of the site. After this I want to clean up the paragraph code to deal with block-level tags, and then maybe port this BlogTimes thing I’ve been seeing around to PHP.

Update: Darn recursive acronyms! How ironic that the acronym PHP is messing up my script!

Update: It’s now online.