Thursday, November 6, 2008

Programming - Hold Still, This Won't Hurt a Bit

Well, Linux/Unix is not meant for the joe-average desktop user. It was meant to be a hacker's toy, and nothing more, so it must be really awesome as a development environment! Well, it has some issues. Linux development may have improved since the Unix Haters Handbook was published, but it still has a long way to go. In this next user-submitted rant, we will see what the issues are.

I have to say that I love a good IDE (Integrated Development Environment). A good IDE should have a logical, easily-navigated UI to create applications. The UI should allow the enduser to easily enter all of the data needed to compile/link the app, and the IDE _should_ do whatever needs to be done to successfully invoke the compiler/linker to create the app.

An example of a good IDE that does exactly that is Microsoft's Visual Studio. It uses fully complete wizards to guide the process, and its underlying tools are well integrated with the IDE. It doesn't use extremely fragile, intermediary text files full of various macro languages to achieve the creation of a "project". When you finish the wizard, Visual Studio directly creates the needed makefile for you. It's easy and painless to develop Win32 apps using MS tools.

An example of bad IDEs that don't do this very well are Linux IDEs. The IDE "wizard" takes you only half-way gathering all the info it needs, then it runs some very poorly integrated (if one could even describe a unidirectional, textual pipe as "integration") GNU tools which, too independently of the IDE, try to analyze your system and come up with the remaining necessary info to create the makefile.

It's painful and difficult to develop apps with a Linux IDE.

A big part of the problem is that the IDE uses a lot of the GNU tools (autoconf, automake, etc), which strive to create "universal" dev files that take into consideration every possible configuration quirk of the thousands of Linux distributions made by Tom, Dick, Harry, and their dogs Spike, Fido, and Spot. But this is a nightmare for a newbie who wants to just compile, link, and run his C/C++ program on his single installation of Ubuntu. He doesn't need to take into consideration some quirk of "Martian Christian Linux", yet another pointlessly trivial variation of Linux which, for god knows what reason, is supposedly better for Martians who also happen to be christians. The GNU tools spewout a plethora of dev files that are humanly unreadable and uneditable by all but the extraterrestrial beings who devised the incomprehensible, needlessly convoluted alien "language" that these tools use. This is bad news if you need to hand modify one of these files because the IDE didn't quite get something right (and believe me, it's a good bet that IDE's "output window" will demonstrate blissful
ignorance as it chuffs out autoconf error messages telling you to hand edit your configure file to add this or that). The IDE isn't smart enough to parse the error output of the GNU tools and follow the instructions given to you, even though it's supposed to be the job of a good IDE to maintain and "edit" the underlying compiler/linker support files instead of telling you to do so. Otherwise, what's the point of an IDE?

With Visual Studio, I never had to actually hand-edit any makefile, nor create _any_ other convoluted text file containing any kind of "macro/shell language" for the purpose of creating a make file. I never had to, because the IDE was capable of completely managing the makefile via data that I entered exclusively through the UI. I don't need to remember what the "text flags" are to enable various compilation features, because the IDE's UI is actually useful (as opposed to just a thin wrapper over some hideously designed, command line tools that use their own "logic" to determine what "text flags" ultimately get passed to the compiler/linker).

If you go to the GNU website, you'll find tons of "manuals" that explain to you in excruciating detail what each tool is for, and how it works. Here's a URL to get you started on your quest through dozens and dozens of barely comprehensible (and almost pointless) pages of instructions:

http://www.gnu.org/manual/manual.html

Now I suppose someone can write even more detailed tutorials than these pages, and take you along the way at a slower pace (although it would probably take a person a few years of work to come up with such a volume of text), but here's the bottom line:

These are very complicated, convoluted, and frankly, unintuitive tools to use. You can read all these manuals until your eyes fall out, and your brain can maybe retain enough of the voluminous details of each tool such that you'll actually be able to do something useful with them, maybe even on a daily basis (but with a stiff penalty against productivity as you spend too much time plowing through the voluminous GNU docs just to figure out how to enable/disable even one compilation feature). But they will never be easy to use. They will never be as easy as .NET. Never. They will never be half as easy as .NET. They will never be a quarter as easy as .NET. These tools are designed to take into account so many variables/installations/quirks in the entire Linux universe, that they can never be anything but tremendously complicated and convoluted and unintuitive. Think about it. Someone somewhere at this very moment is taking a Linux distribution, and for god knows what reason, changing one damned thing about it supposedly to make it better, and releasing yet another distribution. And now the GNU toolshave yet one more quirk to take into consideration. Let's see, shall we accomodate it by making yet another "implicit rule", or maybe a "macro", or how about an "environment variable"? How about all 3 of them? Hey, it's free software so it's not like you have to pay 3x as much for 3 different ways of doing the exact same thing, plus a doc file that grows 3x as big in order to explain the 3 different ways to do the exact same thing. And wait, this is getting really hard to use what with all this stuff heaped on top of it. So let's make another utility that spits out a bash script that makes the data file needed by the first utility. And of course, let's not make this second utility UI based, with
graphical controls the programmer can click on to select his features, and enter filenames, and such. No, let's make this second utility text-based just like the first one, so that you need to learn yet another "macro/shell/syntax language" and have even more data files to keep track of. And of course, as more and more deviations happen in the Linux world, we'll add stuff to this second utility too.

Finally, someone gets the idea to make things "easier" than those tools. What does he do? He makes another text-based utility of course, with yet another macro/shell/syntax language that tries to cover the exact same ground as the first set of tools. Yep, this one is going to be all things to all people too, but somehow it's going to be better. Now we have two tool sets that essentially do the same thing, and even in essentially the same way, but they're different for the sake of being different. But wait. Now we need to transfer data between the two of them, so we need to make a utility to do that. And no, let's not make just one such utility. Let's divide our resources making dozens of them,of course all of them command line tools (do Linux compiler writers even know what a GUI is, and how event-driven programming works?) each one doing essentially the same job, but in an arbitrarily different way that will somehow mean that support personnel will have to deal with yet more quirks/inconsistencies/variations on the exact same theme.

Madness. Sheer madness.

You've got autoscan, which generates a text-based configure.scan file. Then, you've got automake, which takes a text-based makefile.am file and generates one or more text-based makefile.in files. Then, you've got autoconf, which takes a text-based makefile.in, and text-basedconfigure.am file, and generates a very convoluted, text-based configure file. Then, the configure file generates a whole boatload of other text-based files. And each text file is filled with lines written in its very own, exclusive Martian dialect, with no set order in which information appears.

You're an intelligent being capable of easily reading text and applying deductive reasoning to it. A computer can crunch numbers fast, but it's not so good at deductive reasoning and making complex choices by analyzing freeform text. If you can barely make sense of the above tools and their output, what luck does an IDE have?

The problem isn't necessarily that an IDE is riding atop of text-based tools. Microsoft's Visual Studio does that too. The problem is that an IDE is riding atop of a whole mess of text-based tools that churn out way too much information, in a format that is way too free-flowing, poorly structured, and involves way too many "script/macro languages" that are totally unrelated to the language your app is developed in, all for the sake of trying to be all things to all people from the ancient past (in computer terms), to now, to the day that the last Linux guy ever forks another package and therefore causes another inconsistency to accomodate.

These dev tools are so complicated that even the IDE that tries to make them easier, is itself convoluted, complex, unpredictable, unstable, and ultimately unintuitive.

For god's sake, will some competent programmer please fork gcc, and fix this thing so that it actually is capable of _integrating_ with an IDE? Fix it so that it doesn't require the IDE to use "auto tools" that spew heaps of incomprehensive script files written in a variety of Martian and Venusian languages. Fix it so that when the IDE and these auto tools invariably "break" your project, you don't have to waste hours trying to hand-edit all those Martian-language data files, to get them to work again, until you finally throw up your hands in frustration and nuke the entire directory of unusable poot and restart from scratch (with Visual Studio and Microsoft's compiler instead).

33 comments:

thepld said...

Prepare for a flood of comments by freetards claiming you don't know how to code, even though they've probably never coded either and have never used Visual Studio.

Anonymous said...

What?! Forget the actual compilation / linking phase! Do you imply that there's an IDE for Linux than isn't complete and utter shit?
Yes, Eclipse, Anjuta, Kdevelop are all garbage.

thepld said...

Eclipse is the biggest memory whore since OpenOffice. Waiting for it to load is excruciating.

thepld said...

Oh, and fun fact: The image verification things on blogger aren't loading under Firefox in Linux for some people. Ooops!

Anonymous said...

At least Eclipse is decent. Anjuta and KDevelop are a joke.

Nik said...

Freetards, anyone of you remember Kylix? Hey-yo, anyone?

No surprise you don't. Probably even never heard of it.

Kylis was supposed to be what Delphi is on Windows, back in 1998. It was supposed to be the ultimate IDE for developing Linux applications, both for console and GUI. Even with database connectivity for GUI apps out of the box (yeah, I know, you've never seen such a thing).

And you know what? It simply ceased to exist. It was discontinued.

Ah, sweet memories. Being a seasoned Win32 developer and Delphi guru myself, I decided to give Kylix a try on my Redhat Linux 5, I kept at that time, still hopeful and interested in Linux. First, it never installed, until I ran the installer (console-based, of course), as root.
It took some efforts to get a shortcut on the desktop, and resolve some other minor issues, before the IDE actually launched.

Then, I started with a trivial hello world GUI app. And you know what? Compiled and linked, it never, ever ran on a different Linux machine. It simply wanted libraries that were not there.

Someone still wondering why it got discontinued?

Anonymous said...

Compared with Visual Studio, Eclipse is a sad, bitter joke.

.
.
And it isn't supported on Ubuntu.

Anonymous said...

Compared with Visual Studio, Eclipse is a sad, bitter joke.

I don't disagree with that. But at least is actually usable, compared to KDevelop.

Martheen said...

I completely agree with this post! Downloaded those so called "open source" packaged in supposedly cross-platform source code (NetBeans, Eclipse, bla2) and all I got is "F**k u, use Linux for stinkingLib 0.2"

My friends in internship learned C# in less than one week (they have been programming in Delphi and NetBeans before), and in less than 2 weeks they produce GREAT applications (at least 4 of them). It took me the same time to build an ASP.NET application with Visual Web Developer. Express editions are free, small, lightweight, and as always, enable you to learn as you code.
Trying those "Open" IDE won't worth the frustation. Ever.

Anonymous said...

It seems this blog has a lot of haters and a lot of baited hooks in the water but the lusers aren't biting.

Anonymous said...

Programming is hard, let's go shopping.

No, seriously. I don't mind anyone using an IDE, be it for learning or for actual development. IDEs are great helpful tools but I still do believe that a programmer to be successful MUST be able to know what is a compiler, a parser, a linker, a garbage collector, a JIT compiler and so on, and know at least in general what each is responsible for. They must also be able to know what a library is, to tell which libraries their program links against... and more, more, more.

OK, my VS horror story. I was once writing a simple hobby app for the .NET CF using VS2005 evaluation version. Everything went good, the application worked great in the emulator but then the time to package it, if only for myself, has come.

EPIC FAIL.

VS reported an idiotic error messsage, that the "app.cab file could not be created". Great! I wouldn't probably notice otherwise. Google? Now it hints at the actual solution, then it did not. Two hours wasted to find out that the build (or was it source) and %TEMP% directories' names must be quite short. Or was it that they could not have spaces in them?

This is not to bash VS or defend other IDEs. This is to say that a programmer must understand what happens when they press that magic "build all" button and not only to debug own source, but sometimes the build process as well. All tools do have bugs. A "programmer" that doesn't know how to but with an IDE magic will be helpless as a baby if the IDE screws up.

Oh, and if you happen to code for some strange devices, like, say, POS terminals, you'll be lucky to have a vendor provided eclipse plugin. Many vendors just give a cygwin version of arm-gcc, their libraries and headers, and tell you to use emacs. :-) Oh, and "give" here means that they sell those wonderful tools for thousands of dollars.

Juan Pablo said...

Netbeans is very nice for Java and Ruby development; I use it all the time for that kind of projects. But again Netbeans is also available for Windows, so it is not plus point for Linux. However, for C++ and .NET, there is not match for VS.

Linux did save me once when I needed to write a ruby script to get MARC records from the Internet. The libraries required for the script to work were only available for Linux.

Anon said...

Simple!
Use NetBeans. An excellent cross-plaltform IDE.
MonoDevelop is getting their, last time I tried it, it had some rough edges. I personally use NetBeans.
Did I say NetBeans? I can't stress enough how good this IDE is.

Anonymous said...

I started out developing Java with Eclipse and sometimes Netbeans, which I both liked equally. But when i started using Visual Studio to do C++ I felt like in world of pain compared to Eclipse. But maybe thats just because of C++ not because of the IDE:

oiaohm said...

Ok they just code in .net then and use monodevelop.

Please learn to do more research. Lot of coding project use scon and cmake and other build system. Because yes the developers hate autotools.

Yes there is a option in kdevelop to use cmake instead of autotools

Visual studio is crap to build cross platform with.

MSVC is not coded to integrate into Visual Studio either.

Gcc there is no requirement for the IDE to use autotools at all.

Please get smarter and learn to start pointing in the correct directions.

Yes there are defects in Gcc I could list 12 key ones and none have anything todo with IDE integration.

Anonymous said...

Q: What is worse than your average 31337 l33n00x r00lz freetard?

A: A freetard that writes about "Ruby development" seriously.

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

tl;dr

Anonymous said...

We have a lazy freetard here... he's just parroting a Party line, but he's too lazy to write anything on his own. So he just copy/paste a Party manifesto here.

Anon E Moose said...

I find it amusingly ironic to see a copyright notice at the end of that steaming pile of GNU propaganda.

Jair Jaramillo said...

Long live to the Linux Haters Fork!!

Anonymous said...

Stallman should include his other words on his web site: "Don't buy a house, a car, or have children. The problem is they're expensive and you have to spend all your time making money to pay for them."

Programmers ought to go to all this trouble to produce the 'free software', while the rest of the world will just enjoy the freebies (while still making tons of money from their own jobs) - is this the plan? What does Stallman have against software developers?

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

Wow, we got a gay parrot!

oiaohm said...

http://www.fsf.org/about/contact.html

Seams strange what link did you pull that from. If its on fsf site address will be corrected for good. If its on the gnu site I see another nasty letter going to them again. FSF emails and queries are always meant to go to FSF email addresses.

Anonymous you could have saved as a lot of scrolling with a link.

RMS of GNU only speaks for a small section of the open source world. Even Linus the lead of the Linux kernel does not see eye to eye with him.

Anonymous said...

i'm surprised that copy paste is working properly in Linux oO

Anon E Moose said...

Quit posting bloody mile-long dissertations!

Anyone who wants to peek into the hairy mind of The Great Hippy knows where to find his ravings.

Your only contribution here is in flooding the place out.

...or is that your intention?

Anonymous said...

Please, please, write something about the android bug. This is great stuff, truly open source at its best!

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

Gay Parrot!

Anonymous said...

http://www.devx.com/opensource/Article/16969

Linux Haters Redux said...

I decided to delete the posts of Anonymous freetard. If you want, you can read the 'works' of rms he posted at the following locations.

http://www.gnu.org/gnu/manifesto.html
http://www.carnall.demon.co.uk/stallman/intro.html
http://www.gnu.org/philosophy/misinterpreting-copyright.html

Anonymous said...

@oiaohm

You claimed that Visual Studio is hard to make cross platform applications for.

You are wrong. Just test against WINE, and you will work on all the available operating systems;)