Archive for April, 2008

Vim messing up indentation on your pasted code?

Friday, April 4th, 2008

I’ve had this issue forever. I want to paste in some code from somewhere else into a Vim session on some random box, but I have to remember to do “:set nocindent noautoindent nosmartindent noreallypleasedontindent” all the time. Well, I finally had some time to google for an actual solution to the issue (I knew I couldn’t be the only person in the world with this issue) and I found one that is sooooo easy. Ready? Next time you wanna paste in some code, run this first

:set paste

That’s it. Now paste in your code, and after the angels stop singing in your brain, you can get back your normal indentation settings with:

:set nopaste

As you might expect. 🙂

All Linux Distros Suck

Tuesday, April 1st, 2008

1. In reality, all Linux distributions suck, some just suck in ways you might not have discovered yet.

While I am not the holy master of all that is Linux, I like to think that, having deployed, administered, maintained, and supported a good number of distros (not to mention UNIX variants), in varying environments and for varying purposes and constituents, I have some clue what I’m talking about. This may well prove to be false, but I’m putting it out there for now. (oh yeah, I also co-authored a book on the topic of Linux Servers).

There is an alarmingly large, and growing, camp of Linux users who feel that the answer to any problems you’re having with any Linux distro that isn’t the one they use is to switch to the one they use. This kind of thinking leads to IRC conversations similar to this one:

<guy> I'm having trouble getting Apache and PHP 5 to compile against my system's OpenSSL libs.
<1337d00d> What distro?
<guy> SpaghettiX
<1337d00d> Oh. I use RavioliX. I just run "leet realm beam apache" and all that stuff is done for me.
<guy> Ok, so... what about SpaghettiX?
<1337d00d> I'll never get why people run SpaghettiX. It's bloated and slow, not to mention broken.
<guy> ok, thanks anyway.
<guy> Hey do you happen to know how to find the version of ZDE that's running on SpaghettiX
<1337d00d> No idea. Never used SpaghettiX because it's bloated and slow, and broke
<1337d00d> Use RavioliX. This is open source. It's all about choice!

No, really. Conversations like this happen all the time. It’s not limited to Linux distributions either, but we won’t go down that road for now.

The point is, here’s a guy (aptly called ‘guy’) trying to get some work done, and 133td00d decides to take this opportunity to try to convert the guy to his personal religion instead of just bowing out because he doesn’t know the answer.

Also, note a couple of things here: First, 133td00d says that SpaghettiX is bloated and slow, and then mentions that he’s never used it. Second, he says open source is all about choice, but is chastising ‘guy’ for not choosing RavioliX. These are both classic logic flaws often made by people who believe they’ve seen some kind of light. I’ve made a hobby of leading zealots into logical corners like this. It’s great fun.

The reality is that all Linux distributions suck. No matter which distro you choose, if you use it for enough different tasks, you’re *going* to tickle some bug in some library, or some quirk in some tool, or some idiosyncrasy, or missing package, or weird config syntax, or oddball package management… stuff. If you run into LDAP issues on one distro, and move to another one to get around that issue, you’ll inevitably run into a broken PAM module or something. If you have compilation issues on one platform because of GCC, and switch distros, you’ll have compile issues because of autoconf. If you leave one distro to get an upgraded Apache version in another, you’ll inevitably find that *that* distro has an outdated Python install.

Of course, most fanboys don’t really understand this, because they run, like, 3 towers in their basement with a dynamic dns setup, and a firewall that isolates the other two towers on their own network segments, and then brag to their buddies how that have a “production” network with a DMZ in their house. They’ve never had to do what you’d call “managing servers”. They’ve never had to automate the installation of a farm of machines that authenticate via cross-domain authentication schemes, or had to use a protocol analyzer to figure out why *one* guy in a thousand can’t reach their web site, or set up a print server that supports 10 versions *each* of Windows, Mac, Linux, and Solaris, to any of about 60 different printers of varying makes and models, or support teams of developers requiring 3 versions of perl, 6 versions of gcc, 4 versions of Java, 3 versions of Python, two versions of PHP, InnoDB *and* MyISAM tables in MySQL, in addition to PostgreSQL (and they’ve never had to back all this stuff up).

If you think there’s a distro that does everything under the sun flawlessly, you should not let other people know that you think that. Further, if you’ve never used a distro, but are going to bash it, don’t let people know you’ve never used the distro. Better yet, don’t bash stuff you haven’t used. Shut up and learn from people who *have* used it.

2. All operating systems suck.

Read it, learn it, know it. If you’re so focused on Linux that you never even thought about this statement, sit down for about an hour and stare out a window and ponder it. The truth is that OSes in general are not fault tolerant enough, not easy enough to use, administer, maintain, secure, and/or integrate. Operating systems are extremely difficult beasts to tame. They are, by anyone’s definition who knows about them, “hard”. If you doubt it, consider that many OS designers have graduate CS degrees (there are plenty of PhDs, even), and meanwhile operating systems, on the by and large, still suck.

3. Be a part of the solution.

Once you realize that it isn’t just a single distro, and not just a single operating system, and not just a variant or version or whatever, but that *everything* basically sucks, you might become disillusioned, or even depressed. Don’t be. It’s the golden age. It’s like the world before cars, and everyone is waiting for someone to invent a car. There are so many problems to solve, there are so many opportunities to be a hero in some form, so many possibilities. There’s so much to be done that it’s a complete waste of time to sit around bullshitting about how distro “x” does thing “y” better than “z”, so we should all be using “x”. Meanwhile, in the grand scheme of things, “y” is so infinitesimally small that in 12 months “y” will be done in some completely different way, if “y” isn’t completely obviated or swallowed up by some other process altogether.

The computing universe as we know it is only a couple of decades old. We’re all still just pioneers hacking at stuff with pickaxes (YOU had a PICKAXE!?). You don’t have to be an OS designer to make the computing world a better place, either. Most people are *not* kernel hackers, but are solving (for some definition of ‘solving’) issues, filling gaps, patching up holes, and building bridges, all in user space, using languages other than C and Assembly (though they’re nice too).

There are trails to blaze. Get off IRC and go blaze them.