randombio.com | religious commentary
Sunday, February 28, 2016

Linux and Windows: Why You Need Both

Linux and Windows complement each other's weaknesses.

W indows or Linux? It is the oldest question since the chicken or the egg. I will argue that, just as you need both a chicken and an egg to make a good chicken soufflé, you need both Windows and Linux.

No question: for a server, Linux is the better choice. Yet many Linux users still have Windows desktop envy. If you check out the latest reviews of ‘Linux’ you'll see what I mean. Most of them discuss how nice the desktop looks, how you can install it without knowing anything, and how easy it is to point and click. Not one bit of technical information.

Wow, it's slick, they say. Pretty colors.

I don't care about colors. My desktop consists of six green-on-black text-mode xterms and a clock. And I'm thinking about getting rid of the clock. And maybe I'll change the green to gray. Gray is nice. Gray is beautiful.

Why Linux?

Linux users are divided into two camps. One camp uses it because of its adherence to the Unix philosophy of simple, powerful tools. The other camp wants to displace Windows on the desktop by making Linux more like Windows. If the first is a recipe for old-fashioned-looking desktops, the second is a recipe for defeat: if it's just like Windows, why not just use Windows?

In Linux, if you're comfortable on the command line you can create new software without having to learn a complicated windowing API. I started out writing a little five-line program to calculate radioactive decay. It evolved into a spreadsheet program that I use for all my statistical calculations. You can do that in Windows too, but if you want to program, or if you already program, Linux is cheaper and arguably easier.

In the X Window system the remote desktop is so powerful I often forget which computer the program I'm running is actually running on. Windows finally got a crude version of that, but Windows's graphical model means it is not as sophisticated.

Graphical programs running on three different computers. The display is on the computer at work called amnesia. Oxygen is my computer at home, and the third one is in our building in a different state. This is a common sight on Linux PCs.

Finding things is easier. Try to find the ten most recent files in a directory whose names start with “42b”, end with “txt”, and contain a ‘6’. It's easy in Linux. If you can do that in Windows, I don't know how.

In Windows, if something doesn't work there are usually only two solutions: reboot or reinstall. Linux rarely has to be rebooted, because you can log on to the system and fix things. That is why it is so much better as a server.

It's Unix's emphasis on the command line that creates these features. In praising Linux's similarity to Windows, we are praising its weaknesses.

Why Windows?

Yet I agree with Miguel de Icaza, who wrote wrote a famous rant about what killed the Linux desktop. That was in 2012. This is 2016, and Linux is still struggling. It's easy to see why:

End result: Windows moves ahead while we keep reinventing the wheel.

Most of the blame goes to the distros. Most ship with dynamic libraries only. So if you want to compile a static binary, you have to build all the libraries first. I tried that once; it's a major pain in the neck. But if you don't your app is dynamically linked, and there's no guarantee it will run on any particular computer. As a result commercial software is all but non-existent. Vendors don't want to deal with the complaints, and I don't blame them.

Last year we paid $7,000 for a piece of commercial Linux software. The vendor said it had to have a specific distro or the software wouldn't work properly. So we bought a new, top of the line PC and spent a week to get that damn distro to install. It hated UEFI. And it gave us bogus, lying, incorrect error messages. After we ignored those, we discovered that this distro did not have a single header file, which meant we could not compile any programs.

If you have a piece of scientific equipment, you are stuck with Windows. Our mass spec will only run on Windows XP with Service Pack 1. Put SP2 on it, it hangs. Yes, we don't let it get anywhere near the Internet. But in these cases we have no choice: we need Windows.


Now, some Linux users say Linux can do anything Windows and Macs can do, if you take the time to find the right programs and learn how to use them. This guy goes so far as to call the complaints that so many people have about Linux ‘lies’. But they aren't.

Take MS Office. I have a grudging admiration for PowerPoint, I dislike MS Word and I loathe Outlook. Even more than that, I detest, execrate, abhor, odium, feel aversion to, misogyny, misopedia Windows networking. (Yes, now Windows broke my thesaurus too.) Yet I use Word and PowerPoint all the time, for one single reason: my documents have to look identical on my screen and on the screen of the government bureaucrat who reads them. If an image disappears when Word renders it (which happened to me just this afternoon) we could lose a grant, or even worse the FDA could halt our clinical trial. Like most people, this is real work we're doing here, and ‘close’ is not close enough.

I don't even try to submit manuscripts in LaTeX any more. I am tired of editors whining that they can't handle it. LaTeX is miles above Word. It could have easily defeated Word. But the attitude among Linuxers was: it is already perfect. It wasn't, and now I can't use it at all. “LaTeX gives us fits!” was how one publisher put it.

The Solution

So here's what I recommend to all new Linux users: you need two separate computers (an old one will do) and one monitor. Forget dual-booting. Network the two PCs together through a dedicated five-port Gigabit switch and Cat 6 cables. Give them static IPs, and use VNC to view the display of one on the other. You can learn your way around Linux without the pressure of making everything work right away. This is what I do, and the network delay is almost unnoticeable.

There's a steep learning curve to Linux. A new user needs to learn how to edit a document, administrate their system, and figure out how to copy a file without losing it. Everyone (including me) keeps a list: how to set the date, how to stop the terminal from beeping when you hit backspace, how to change the IP address from the command line, and so forth.

Without the extra stress of being unproductive for two months, you'll come to appreciate the absolute precision of the command line. You'll be amazed that it can be possible to fix a problem without hitting Ctrl-Alt-Delete. If you're the least bit technical-minded, I guarantee you'll switch.

Next thing you know, you'll be typing things like this:
cat /etc/passwd | tr ':' ' ' | awk '{ print $1 }'
grep ^\ \ 1....1 $line | sed -e 's/^.* //' >> ~stuff6

And, unlike so many others who just dived headfirst into Linux, you'll actually be enjoying it.

Update mar 27, 2016:

Reader A.B. reminds me that programming in Windows is no picnic either:

All I need is ... not love, not even sex, ... is API. I started programming when I was 30 ... from Win32API. It is yet works good, so I don't need to learn Java, C#, Php or whatever.

BUT: Win32API is completely incomplete. It has no (height-for-width) geometry management. It has no hierarchical widget structure (even minimal) (because of that). It has only a restricted widget set (Common Controls). I have been waiting for years till they complete Win32API. Finally, Miguel de Icaza makes it with GTK (OK they mitigate QT).

And what about Microsoft?

They invent..... ohhhhhh MFC, COM, ATL/WTL, DotNet beasts (WinForms, WPF), WinRT, and other XML dialects, I don't follow the story any more. MFC was horrible, COM was better. And Don Box, the Microsoft guru, claimed "All is COM". Then, 2 years later, he claimed "All is .Net". Now they forget WPF and force us programming desktop GUI as it is a smart phone one....

What is your advice for an application programmer (or forecast if you have one)? Should I learn Java? (But Oracle could be sold too). Should I learn some modern MS framework ? or Mono by the way ? Our users are totally Windows citizens, we have no MacOS users there. MS Windows native framework seems the straightforward choice for me, isn't it? But I am a 50 year old stand alone programmer, Most of modern enterprise technologies are useless for me.

Yes, unfortunately lots of us have no choice, but we can hope, if Linux gets better. I took one look at MFC and said no thanks.

I hesitate to say the cloud is only a fad, but Microsoft must realize that when Android finally comes to the desktop it will be facing stiff competition from Google's ecosystem. So learning Java might not be a bad idea.

Here is my forecast for what it's worth.

In the future, CPUs will be powerful enough so that desktops will all be running some platform-neutral operating system, or maybe something like Azure. We'll have a Win32 app in one window, a Motif app in another, and an Android one in a third. For 99% of all users the apps are all they care about.

Of course, they'll have to make it glitzier and give it a more non-intuitive user interface than touch and gesture to appeal to younger users. The general rule is that given two options, people will always choose whichever option is worse.

Related articles

Linux setup tips

Fragmenta­tion is killing Linux

How to install Windows XP over Windows 7

Review of HP Prime Graphing Calculator

Installing SLES 11 SP3 on a HP Z820 Linux Workstation

On the Internet, no one can tell whether you're a dolphin or a porpoise

book reviews