Archive for May, 2009

Why Linux is Better than Mac (or, how I learned to stop worrying and love apt-get and debuild)

May 29th, 2009 24 comments

First, I am a Mac user; I am a Linux user, and I was a Linux user before I was a Mac user.  I manage two Linux servers, and I run Linux on my desktop.

For my laptop, I bought a high-end Mac almost three years ago.  At the time, I had just started using Linux regularly, and was dual-booting my desktop with XP.  I was maintaining a Linux Samba Server (for a very small office), and I wanted something with Bash and X11 without running cygwin.

I wanted everything on my laptop to “just work” without running into the issues good laptops have had running Linux at the time.  I was suduced by iTunes and the cool ads, and I wanted to run World of Warcraft without dual booting (in the cold, dark days when Wine didn’t work as well for games).

I spent $2000 on a laptop, and I must say I have been quite pleased… until today.

I have resolved to make (and always make) everyone I give “free” support to (friends, family) buy a Mac or Linux box, mostly because I don’t want to hear the phrase, “I think I have a Virus” ever again!  Usually they don’t – what they have is a lousy Windows driver.

However, if you know what you are doing, Macs Stink! This is really true if you are into open source software, because it is almost impossible to compile someone else’s code on a Mac, even if they wrote it for Mac.

For example, I found a bug in FreeOrion while I was playing it on my MacBook Pro.  I looked at the revision logs, and sure enough someone had fixed it. I didn’t want to completely update to the Trunk, because I was concerned new features would add new bugs.  All I wanted to do was play the game.

I downloaded the file with the fix I wanted, and downloaded the FreeOrion source code for the version I was using.  I patched the source code with diff, and then opened it up in XCode to compile it.

10 errors.

Ok, so there are library dependencies…

It has taken me three hours to find the various dependencies online and install or compile them for mac.  After you find and install them, you have to tell XCode they exist one at a time, where they are, and make sure the version matches EXACTLY with the one the xcode maker was using when he first complied the software.  I’m still not done with this process, and honestly don’t know if I will ever get it working right (or if it is worth the time).

Compare this to Linux. I use Ubuntu.  A year and a half ago, I needed a feature for mod_auth_kerb (a web-server authentication module) that someone had posted a patch for online.  I ran apt-get source mod_auth_kerb to download the source code, patched the file, changed the version number in the deb file, and ran debuild.

errors. Ok, so there are library dependencies…

I ran sudo apt-get build-dep mod_auth_kerb. It installed all of the libraries for me. Then I ran debuild again and, presto, I had new debs (software packages) ready to be installed with the new feature. The whole process took about 20 minutes, ten of which was spent waiting for the computer to compile or download a dependency.

Did I mention that the Linux example above was the first time I had ever compiled a package from source to make a change? With a process that easy, it certainly wasn’t the last. There were instructions on how to do it online – all I had to do was intelligently follow them.

On a Mac, it is easy to do the small things, but once you become a little more savvy, the Mac is harder to use and harder to learn.

Macs have this weird, non-liner learning curve that starts very low and stays shallow for a while, but then gets “super-steep” – it is very difficult to be in the tech-savvy but non-pro middle ground.

Linux’s learning curve starts a little higher – you really have to be able to install your own operating system and brave enough to try (even though I think it was Jono Bacon who once said, “you can stick an Ubuntu CD upside down in a 5&1/4 inch disk drive and it will install”).

However, Linux gives you a much smoother transition from novice to native, with very helpful people to guide you on the way. You don’t even notice how much you have learned about software (without books, and without some ridged corporate dictated curriculum) until someone you are talking to (not from the Linux world – usually a Windows IT guy) says, “You mean you modified and compiled your own software? You know how to program C – I could never (read: don’t want to) learn how to do that… I’ll just stick to Windows.”

Wait, I’m not a programmer – I just modified someone else’s program – it took all of twenty minutes!

I am tired of people telling me that Linux is, “Of the programmers, by the programmers, for the programmers”.  No it isn’t.

It also isn’t like commercial software, which is “Of the ‘design department’, by programmers, for Stupid People” or “of the MBAs, by the programmers, for the IT staff“.

Linux is “Of the User, By the User, For the User“. It doesn’t assume you already know everything (or anything) – it only assumes that you are a human, and as such, you are capable of learning.

In Linux, moving from novice to expert is a natural progression, without the sharp, ridged lines that separate different types of “Power Users” (IT Staff, Designer, Web Manager, Developer, Home “Enthusiast”) in Windows or Mac. This is not because you must learn all about your computer to use Linux, but because you can learn a little bit more about your operating system and use that small, little bit of new knowledge in a meaningful and useful way. You can make changes, starting with small changes, to your Linux, no matter what your interests are.

Sooner or later, some little thing will piss you off, no matter what operating system you are using. In Mac or Windows, you just have to live with it (or shell out big bucks for an entirely new system or piece of software).

In Linux, you can (have legal right and the tools needed) fix it.  So you go online and read a little – maybe post your issue to a mailing list and subscribe to one to listen for a reply. Someone sends you a command to run that solves that little issue, and you find yourself looking at a blinking cursor on a black screen for the first time ever (or at least since you installed WINDOWS 3.1). It’s not so bad – you start doing little things here and there when it’s faster or more convent.

You edit a config file to add an apt repository, or pull open the smb.conf file, because you want to let your son access one set of files, from his computer, but not another set. You start hosting a blog on your own computer and, while setting it up, learn about firewall rules.

Then you patch a simple piece of software from the command line and write your own BASH script with a for loop to do a backup a particular way, and write a macro in OpenOffice. You start answering more questions than you ask on the mailing lists, and people start admiring your whatever-fu. Family members (parents, aunts, cousins) start asking you all sorts of computer questions, many dealing with Windows, and you start answering them because you actually do know – not the particular Windows issue, but the networking/hardware/software principal behind the problem.

Then someone says to you, that inevitably fateful day, “Linux is fine for someone like you, but I’m not a programmer.”

Someone like me? The first time I touched Linux was in college… as a Political Science major. A Libertarian friend of mine introduced me to it (we did an internet radio show – he was the “techie”). I got my MA in Economics, and fell into IT as a graduate student job: my landlord’s IT guy quit while I was in the office paying my rent, and I said, “you know, you can do that with Linux”.

The thing I hate about Mac and Windows is that they think you are stupid, or pigeonhole you into a “marketing category” which they then create and sell software to. That is why there is no “easy” way to patch and build software in Mac (or Windows). “Why would you want to?” they ask, “What is the market for that?”

Linux makes it easy to grow, because that is what people do when you don’t actively seek to stop them from growing. In Linux, there are wonderful tools that make it easy to fix “that first nagging problem”, and a huge community that is willing to give if you are willing to learn and try a little. Users don’t start fixing things because they “have to”, bugs get fixed and features added in Linux by other people all the time, so just like in Windows and Mac, and you are free to just sit and wait a little. Users start fixing/tweaking things in Linux because they can!

I think all users of any system would prefer to fix at least one little thing themselves rather than submit a feature request/bug report (if they can/know how) and wait for someone else to fix it for them. In Linux, the user can.

Windows is a little better than Mac in this respect. Apple goes to the community and shouts, “Hey look, we are based on an Open Source kernel – want to see Darwin?” That doesn’t help anyone, especially someone that isn’t already an advanced programmer interested in kernel design.

Windows at least has the tools to write your own macros in MS Office, where you can start out, and then move to the free and easy to use Visual Basic Express when you want to write your first big Application.

That natural path is only there for advanced Excel users, because they are the only people who start wanting to write macros in VBA for that “something that pisses them off”. The path is narrow and not very smooth, with people jumping off when the next step is “too big” and outsourcing their desire to the corporate VBA department. And there is a big hump from messing with a VBA macro to writing an application from scratch in VB.NET.

Game modding can be another road for teens running Windows, but that knowledge is focused on interface design. Some games have Python, and that knowledge can progress, but it grows only in one direction – to programming, and not to a general knowledge of Windows, or networking, or operating systems.

(Windows also has so many problems that someone in the family or office will start digging around in the registry when something isn’t working – the law of large numbers guarantees at least some progression into “Power Users”, simply because the printer isn’t working from that computer.)

Windows used to be better – around version 3.1. DOS came with QBASIC, and there were lots of apps you could modify and play with (anyone make the banana explosion bigger in the gorilla program?). You could also modify the autoexec.bat file and graduate to writing your own batch files to do things. But I was the last year of that generation, and today I turn thirty. When Windows95 started coming pre-installed on every PC, those that grew up with QBASIC and batch were there to program for it, but there were no new generations of natural tinkerers becoming programmers and IT architects to replace them. The new generation came up on Windows9X, and they don’t know squat outside of what is taught in their MIS classes.

Microsoft recognizes the need for “natural new blood”, and they have responded with free developer tools. But they still don’t have a reason for a user to cross into a little programming, or networking, or system design.

Mac doesn’t have that at all (the programming bit, not the problems bit, though both apply). Even though they come with a free compiler, BASH, X11, and XCode, all of these things are buried in the “Utilities” section, and there aren’t any little programs to play with that jump out at you. They don’t get it, and they never will. They are firmly convinced, as a company and culture, that “we know what’s best for the customer and we always will”. And, to their credit, they have made a ton of money with that attitude.

But the programmers going to Mac are doing it for one reason – money. People learn XCode when they get (or are expecting to get) paid to do it. Mac programmers learn from Linux or Windows.

And there it is – the Mac tools are hostile to new users and discourage them from ever becoming something more. Linux is inviting to intelligent people, offering smooth movement up the knowledge ladder with marginal increases that people take because they want to do some small little thing – they want fix something, and they can.

Linux is a lifelong learning journey which you can take at your own speed, choose your own path, and rest when you want to. And, there are always friendly fellow travelers – people who have been there before and are willing to point you in the right direction.

So tell your mom to get a Mac (so you don’t have to fix it all the time, and she can have her iTunes), but buy your daughter a Linux machine, and let her learn and love the learning.

Categories: Computer Stuff Tags: