Is it just me, or are there a ton of Open Source folks picking up iBooks or TiBooks and saying goodbye to Windows and/or Linux on the desktop? I've been noticing it for a while, and reading Nat's blog entry just serves to drive the point home again.
I'm just testing Trackback to see if I set it up right in MT. Can someone else with an MT blog see if it works right?
Update: I made some changes that have probably fixed a bug. Maybe it works better now.
Update #2: It's working. Ask pinged me just fine. Let's see if I can ping him too...
Update #3: It seems that Derek has it working too.
George Reese has an article up on O'Reilly's OnLAMP titled "Ten MySQL Best Practices." I have a few problems with it, however. So I'll take time to detail them here in the hopes that others might think about these issues too.
First off, I'm amazed that anyone still uses the phrase "best practices" anymore. Think about that phrase. The word "best" implies that the author is smarter than everyone else on this particular topic. How arrogant.
Network Security
Anyway, on to the content. His #2 best practice (see how dumb it sounds? Why can't they be called recommendations? Or lessons? Or...) is "Hide MySQL from the Internet"
MySQL has a pretty solid track record for security of a network service. Nevertheless, there simply is no good reason to expose MySQL directly to the Internet-- so don't do it. When you hide MySQL behind a firewall and enable communication to the server for only hosts running application servers and Web servers, you constrain the path of attack a would-be hacker might take.
But he completely fails to mention that 95% of users could benefit from taking advantate of MySQL's skip-networking option. With it enabled, MySQL doesn't listen to any TCP ports AT ALL. It only listens for local unix socket connections. Given that most MySQL users are running PHP and Apache and MySQL on the same machine, there's little need to leave it open on the network at all.
I'm not saying that this is the solution to the problem in all cases, but he's clearly not aiming at the more sophisticated users anyway. Otherwise he wouldn't have had to tell them to use passwords in his #1 best practice.
Note, also, that he misused the term "hacker."
Binary Data
The #4 "best practice" he lists is "Don't store binary data in MySQL." Instead, he advocates using the filesystem to store binary data. I'm so sick of hearing that argument. A lot of people do store binary data in MySQL and it works just fine thank you very much. In fact, I've found a very useful technique when I need to store large amounts of text (non-binary data). I compress it using Perl's Compress::Zlib and store it in a MySQL blob field. Why? It saves space (and therefore disk seeks on queries). Having the data in MySQL means that I don't have to worry about it being replicated on all the servers it needs to be. I let MySQL do it's job and I get on with mine.
He's likely assuming that the application that needs the data will be running on the same server as MySQL. Either that, or he's saying that you should fragment your data store, putting some of it on one machine (in MySQL) and some on another (in the filesystem). I think that's a decision one should not make lightly.
ANSI SQL Only?
Ah, #5 is one that really gets me. It is called "Stick to ANSI SQL" and says this:
MySQL provides many convenient additions to the ANSI standard that are very tempting for programmers. These additions include timesaving tools like multitable deletes and multirow inserts. When you rely on these features in a MySQL application, you limit the ability to adapt the application to any other database engine. In fact, you may make it impossible to port the application to another database without a significant rewrite. For maximal portability, you should therefore stick to ANSI SQL for your applications.
Oh, please.
One of the big reasons to use MySQL is that it's fast. Damned fast. By taking advantage of it's features, you can save a heck of a lot of time in developing your application. The reality is that people don't often move products or projects from one database server to another. Why not? Because they're all different anyway. Yes, they all support ANSI SQL to some degree or another, but if you limit yourself to the least common denominator you're going to waste a lot of development time.
In fact, when Rasmus Lerdorf (the father of PHP) was at Yahoo! a few weeks ago to talk about PHP, he mentioned what a dumb idea most database abstraction libraries are. Why? Because the lowest common denominator across SQL databases is pretty damned low. And I tend to agree with him.
Not using any of MySQL's special features is like programming in Perl and not using Regular Expressions (just because every language does them differently). It doesn't make a lot of sense.
Sequence Numbers
It gets worse. In #6 "Create your own sequence generation scheme" he argues against using AUTO_INCREMENT fields for a few reasons. Let's examine his reasons.
He starts with "you can only have one AUTO_INCREMENT column per table." So what? That's a well documented limitation. It's not a reason to avoid them, it's just something to keep in mind when developing. That's like arguing against using VARCHAR fields because they can hold "only" 255 bytes of data. That's what they were designed to do.
Then he says:
You cannot have a unique sequence for multiple tables. For example, you cannot use AUTO_INCREMENT to guarantee uniqueness for columns in separate tables so that a unique value in one table does not appear in the other table as well.
But he fails to mention how rarely that is a problem. I'd like to see the database design that relies on having unique numbers across tables. If you do need that, then take advantage of some other method. But that's rather uncommon.
Finally, he says "You cannot easily determine from an application what values MySQL has automatically generated." Why would you need to do that? If you code the application properly, that's not going to be an issue. Remember, this is an AUTO_INCREMENT column. It's supposed to be generated AUTOmatically. If your code is generating the values, don't tell MySQL that it should be an AUTO_INCREMENT column. It's as simple as that.
There's a story titled "A Linux user goes back" that's been circulating recently. It's the story of a three and half year user of Linux who has gone back to using Windows on his desktop. The article a good read. It reminds me of my struggle to find a decent OS for the last 5-7 years.
There's even more good reading in this thread on the ArsTechnica forum. Unlike most discussion forums (think slashdot), it's not a flame fest. Instead it's a small group of folks talking about why they use the desktops they do. I wish there was more of that (reasoned, calm discussion) on the web sites I frequent.
Maybe it's time that I tell my story too. Well, maybe the abridged version. Yeah...
Ever since I learned Unix back in 1992 (wow, it's been over 10 years already), I began looking for a "good" operating system to run on my computers. For a while, I ran Windows 3.1. Then Linux came along and I used it for a few days. But it was rather immature. I went back to Windows and stuck with it until discovering OS/2. I loved OS/2. It was a real 32 bit operating system with a decent user interface and great stability. But there were few mainstream applications for it. It was a lot like Linux in more recent times.
I eventually ditched OS/2 for Linux and ran it for a year or so. I had a Linux box on the Internet via 10 megabit Ethernet back in 1994 (or maybe 1993?). It was a lot of fun. I was in college and cared about e-mail, Usenet, Gopher, and browsing the Web. Since I was a Computer Science major, I didn't write many papers--mostly programs. But since I worked in the computer labs, I had ready access to Mac and Windows when I needed them.
Then, in 1996 I got a co-op job working for a mid-sized oil company. There I was introduced to Window NT 3.51 and really liked it. Yes, it had the crappy Windows 3.x user interface, but it ran all the apps I cared about and was really stable and responsive. Not long after that I got my hands on Windows NT 4.0 beta 2 and ran it as my desktop at home for over a year. It was good enough that I didn't care to upgrade to the release version until something forced me to. Finally, a stable OS with a good UI and plentiful apps.
All during that time, I also had a Linux box. It was a Pentium 133 with 64MB of RAM. It was my firewall and proxy. It sat in the corner and did a good job. But at some point in 1999, I re-caught the Linux fever. It was all over the press. The Internet boom was, well... booming. Microsoft was about to go down in a big way!
So I switched to RedHat. I learned all about RPM hell. I got pissed at RedHat eventually. Wanting a better UI and a more "desktop" Linux, I tried Mandrake. It was better. Keeping up to date was a pain in the ass. But I stuck with it. At the end of 1999, I moved to the Bay Area to work for Yahoo!. In 2000, I got religion and moved to Debian. I also bought an IBM ThinkPad 600E to replace the one that I had to leave with my former job.
That's noteworthy because it expanded the range of things I needed a good operating system to deal with. Not only did it need to be a good "desktop" OS, it had to be a good laptop OS too. Linux was just struggling to get there. PCMCIA was still hit and miss. USB worked if you knew how to make it work. But I got the 600E working beautifully. I loved it.
As time went on, I got all my home computers (there were 5 at the peak) running Debian Linux. I had a small army of machines running a bullet-proof OS and I was damned proud of it. I even manged to get 802.11b wireless support working well (a bit of a struggle).
But then cracks in began to appear in the armor. I got to be a very busy person. The tasks that I used to enjoy (figuring how to make X or Y work in Linux) became quite burdensome. I began to value my time far more than I had before. I found myself wondering if I could get things done faster in Windows. It reminded me of that anonymous quote I've seen before:
Linux is only free if you don't value your time.
In fact, I started to feel the truth behind that statement. I spent far too much time trying to make USB stuff work right, setup my new printer, and so on. I'm not stupid. I've been using Unix for a long time, as I've pointed out. It's just that, as any Linux user knows, things aren't always as intuitive or well documented as they need to be.
At work I had two computers. One ran FreeBSD (my main development desktop) and a crappy old P-200 running Windows NT 4.0. The Windows box was there so I could test things in Internet Explorer--just like 98% of our users would actually see them. And at home, I bought a copy of VMWare to install on the ThinkPad. I installed Windows 98 and ran it under Linux. That allowed me to use Internet Explorer, Word, and PowerPoint when I needed to. Life was a little better.
Earlier this year I acquired an Apple Powerbook G4 Titanium (long story). I've been using it a more and more recently. OS X is pretty darn nice. There are a lot of good applications for it. And the machine is self is excellent. I have minor complaints about it, but no more than with any other. I'm not at all tempted to try and install Linux on it.
The two and a half year old ThinkPad 600E was starting to show its age. I had long ago put in a bigger disk (20GB) and more memory (512MB) but it was still sluggish in the VMWare instance. I decided that I needed to get an new laptop and that it probably ought to run Windows (either 2000 or XP). I wanted a laptop because I travel occasionally and really don't see the need for another desktop machine. Plus, I like being able to take my computer to work once in a while.
Thanks to EBay, I got a new IBM ThinkPad T23 with a 1GHz CPU, 512MB of RAM, a 48GB disk, and Windows XP professional. I'd have rather had Windows 2000, but XP is reasonable.
So now I have three laptops. The oldest runs Debian Linux nicely, the new ThinkPad T23 runs Windows XP, and the TiBook runs Mac OS X. Amusingly, I find myself using the XP and OS X machines 98% of the time. Sure, I often SSH to work or one of my co-located Linux servers (there are two of those), but for desktop use I find both XP and OS X to work quite well. They're still far better than what's available in the Linux world.
Linux may be headed to the desktop someday, but it's not there yet. Maybe in a few years. Linux is great on the server. So is FreeBSD. I can only see limited reasons for ever running a Windows server. The same has become true of a Linux desktop.
That's the short version.
Don't get me wrong. I still use Linux a lot, just not on my desktops (or laptops).
I got some spam yesterday. I run SpamAssassin aggressively, so I don't see most of the spam directed at me. But this one was different. It was different because it went to my pager. That' right, my cell phone got all exited about it. And I got VERY, VERY PISSED OFF about it.
I decided that this particular spammer had crossed the line. (In fact, I later found that they had spammed ALL of my virtual domains). It was time to fight back. This spammer was also a little strange in that they asked you to reply via e-mail if you are interested in their "offer", so I did.
I wrote a Perl script using Net::SMTP that talked directly to their mail server and delivered messages to them on my behalf. In fact, it would do that in a loop. I let it run for a few hours from a few machines. By my calculations, I had sent them about 50MB of messages (a few thousand, in fact). I could have sent a log more, but there's a lot of hops between me and their server (hosted in Asia, of course).
I have access to A LOT of network bandwidth. They probably didn't expect that.
I figure that they'd either null-route my servers or they'd get the point and take me off their list. Either way, I'm happy. But there's no way to be sure, so maybe I'll fire it up again later today and send a few hundred thousand "did you take me off your list? I await your reply!" messages.
I really hate spammers.
Doc has an interesting presentation that's now on-line. Anarchy & Infrastructure was first delivered at this year's Jabber Conference. Good stuff.
Doc Searls has an interesting entry in his weblog today about RF interference and the impact that notebooks with WiFi electronics may (or may not) have on commercial airlines. As someone who is likely to use a TiBook on the plane (it gets over 4 hours on a charge!), I wonder about this. After all, I did recently put an AirPort card (ironic name, huh?) in it. And removing the card is a non-trivial task.
Leave it to the Perl community to come up with a shell that can perform all sorts of cool tasks. The XML::XSH module and the accompanying xsh command-line shell provide a ton of ways you can browse, manipulate, and transform XML documents using a shell-like interface. Check out this story at O'Reilly's XML.com for details.
Damn, it's hot!
Ya know, ever since I moved to the Bay Area, I've loved the weather. Except for those 5-10 days a year when it gets REALLY HOT. Why? Because my crappy apartment doesn't have air conditioning. And I'm not about to spend EVEN MORE money just so I can have it for a few days of the year.
Grr. Why is housing so damned expensive here? This sucks.
There' a very good article over at K5 that talks about the events leading up to Palladium and how Sony (and others in the entertainment industry) influence the process.
All signs are pointing at a release of MySQL 4.0.2 very soon. Lots of bugs fixed since the 4.0.1 release. We've been running 4.0.2 pre-releases in Yahoo Finance for a few months and it's been going quite well. Check the MySQL home page for 4.0.2 to appear soon.
Given that MySQL 4.0.2 will probably be labeled "beta", don't run it in production unless you know what you're getting into. Thankfully I do. :-)
I noticed an entry in Derek's blog about having installed IMP and being really happy with it. I'd like to take a moment to mention that IMP is one of the two great web-based mail systems available on Linux. The other is SquirrelMail, which I have running on my Debian box. It's just as easy to install and has a nice interface. If you're in the market for one of these, check them both out.
Expect a discussion of these in Linux Magazine later this year.
As the story over at Wired explains:
About 50 AIDS activists shouted, whistled and booed their way though a speech Tuesday by U.S. Secretary of Health Tommy Thompson, who delivered the entire, inaudible address shielded by nearly a dozen Secret Service and other security agents.
I love it when folks in other countries treat our "leaders" with the respect they deserve. I honestly don't know why shit like this doesn't happen more often.
Go read the article. It'll bring a smile to your face.
I've had to try and explain to several folks lately exactly what a blog is. It turns out that there's a pretty good definition right here.
The folks over at www.yahotties.com have taken upon themselves to collect all the "interesting" pictures that appear on the most viewed articles page at Yahoo News. Yeay! Now I don't have to remember to check it myself every day.
Over at Better Living Through Software, there's a great piece on the deep linking debate. My favorite quote is:
The only reason you would assign a URL to a page is so that people could link to it. If you don't want people hyperlinking to a page, you just don't give it a URL.
But go read the whole thing. It's not that long.
Apparently there are more than a few people who are big fans of Office Space, just like me. The difference is that these folks are all excited about getting their hands on a red Swingline stapler.
OBE is "Out of Box Experience," of course. Anyway, here's a page on which Chris Barrus unboxes his iRack (I mean "Xserve") and lets us watch. I was there for the big announcement, but haven't had the change to play with one of those yet. I'd like to. Apple, are you reading this? (Of course not...)
If I ever move to a place where I can afford to build a house (rather than renting an expensive crappy apartment), I'll seriously think about building a nice home theater. Check out this setup and this setup to get an idea of what inspired this thought.
Oh, it would also help to have a lot of cash to throw around. Those things don't come cheap.
Well, it's about time. I mean, who didn't see this coming someday? Anyway, here's the story at news.com.