Linked by Thom Holwerda on Mon 18th May 2009 19:06 UTC
Linux We all know them. We all hate them. They are generally overdone, completely biased, or so vague they border on the edge of pointlessness (or toppled over said edge). Yes, I'm talking about those "Is Linux ready for the desktop" articles. Still, this one is different.
Thread beginning with comment 364107
To read all comments associated with this story, please click here.
Reduce C/C++ use in Linux apps
by StaubSaugerNZ on Mon 18th May 2009 20:51 UTC
StaubSaugerNZ
Member since:
2007-07-13

Quite a few of his points are due to the use of C/C++.
Unfortunately many Linux developers are still using these languages for development and many problems result from this.

My advice (as a long-time Linux developer of applications for Linux) is to drop the C/C++ for the majority of applications and use Java instead. Mono is also an option but Java is ubiquitous and very, very fast these days (especially Java 1.6.13+ and things like JOGL).

Ok, so maybe 10% of apps aren't suitable for building in Java (missing features, or platform-specific stuff), but the majority are. Plus you get the added bonus of being able to deploy (and even *sell*) on Windows.

The remaining Linux issues mentioned (sound!) wouldn't be solved by the use of newer programming languages. The only thing that will fix that is a consistent vision and a lot of hard work.

Edited 2009-05-18 20:52 UTC

Reply Score: 2

0brad0 Member since:
2007-05-05


My advice (as a long-time Linux developer of applications for Linux) is to drop the C/C++ for the majority of applications and use Java instead. Mono is also an option but Java is ubiquitous and very, very fast these days (especially Java 1.6.13+ and things like JOGL).


No thank you! I don't want Java garbage anywhere near my system.

Reply Parent Score: -1

StaubSaugerNZ Member since:
2007-07-13

"
My advice (as a long-time Linux developer of applications for Linux) is to drop the C/C++ for the majority of applications and use Java instead. Mono is also an option but Java is ubiquitous and very, very fast these days (especially Java 1.6.13+ and things like JOGL).


No thank you! I don't want Java garbage anywhere near my system.
"

Well, that's hardly a reasoned response. I'm guessing you heard something from some other uninformed person several years ago and have never questioned your assumptions since.

When was the last time you developed a large application yourself (at least 50000 lines), or as part of a large team on even bigger projects? I'm guessing you are either not a developer or don't work on large projects that are meant to be used (and maintained) by other less-skilled people. How about writing multi-threaded distributed applications to utilise multiple cores? If you haven't then your unreasoned prejudice against Java is severely misplaced. Even Richard Stallman now approves of its use.

Ok, you might think I choose Java 'cause I'm not l33t enough to use C++. In fact I've been cutting code since learning Basic in the 80's. Have nearly 20 years doing cross-platform C and C++ from enterprise apps down to device drivers for scientific instruments and embedded systems. I got thoroughly tired of dealing with the platform differences and the stupid incompatible changes between C++ libraries (and even between minor revisions of the same library). Hell, several years ago Microsoft stated they would never truly support Standard C++, and the .NET C++ is a unloved child that really wants to be C#. I've done Fortran and scripting and all sorts of stuff in between.

In the end I settled on Java since it is productive enough for my purposes and can be reused in many application domains, from small single-board systems to the large banks I've worked with who have distributed systems. These days it is also Free Software.

So, if you have reasoned arguments as to why Linux developers couldn't solve some of the issues raised in the original article using Java then I'm happy to hear them. Otherwise, perhaps it might be productive for you to examine why your knowledge is so poor on the subject of Java on Linux.

Reply Parent Score: 3

wawrzyn Member since:
2009-03-24

I'm not sure... Definitely Java is an option, although for some reason I would rather prefer Mono. Still, it would be great to have an alternative environments.

And you have a bunch of other tools in GNU/Linux (easily available): Fortran77, Ada (GNAT). This is what I like about GNU/Linux.

To be more precise - we have FreePascal with Lazarus, which is very impressive and interesting couple of tools. In my honest opinion, for many small projects it would suit better than Java.

Oh, yes... And we have all these srcipting languages with state-of-the-art Python (try it, it's possible to use it with Java -> Jython ;-), Perl - we can create miracles when it comes to regular expressions and text processing, PerlDBI - and we have advanced tools for processing database reports, also, or at least for data preparation.

There is a lot of animals in this Linux world... And you might be right. We need standards and we should to concentrate on some subset of technologies as far as we mean "desktop development". But it wouldn't be so easy, as the power of Linux resides in its differences and huge amount of options, tools, alternatives etc. = flexibility given to the end-user. I like it. I can choose what I want.

I know, why are you talking about Java - because it's an easy way to standarize this Zoo of different technologies. And the idea is good...

... But we will never resign from C/C++. These languages are the basic ones. GNU/Linux as well as all the Unixes were born from C. C++ is a reasonable continuation for many C developers. And it's not so bad for end-user as long as the application is well written. To be honest, there is no problem to compile C or C++ source by hand if the sources are properly distributed with the proper configuration script. Moreover, in the majority of cases this way is the best one to get the software installed correctly - but yes, it means this is not an option for standard user.

In my opinion, GNNU/Linux is for people which have enough computer literacy to perform smart decisions and smart choices. The rest should work with Windows - they will never be happy with Linux. Even, if we would have 90% of software written in Java or C# (on Mono), standarized across most of the distros (if it's possible) there will be still a huge group of people, which will prefer to use standard "configure/make/make install" approach. They would be creating alternatives all the time.

GNU/Linux is flexible, yet inconsistent. That's why I like it :-) You can do a lot, but you cannot think that 90% of work would be done by a wizard.

Imagine how many distros we have - we cannot make "Linux" ready for desktop. "Linux" is to general term. Almost as general as "operating system" (and in fact, "Linux" means only a kernel, but I don't want to go into these details). The question is bad and we will not receive a proper answer.

Maybe, the correct question is:
"Do we have at least one GNU/Linux distribution ready for desktops, to the same level as we have a lot of distros ready for servers - like: CentOS which is an exact copy of RHEL, an industrial standard?"

Let me think: Ubuntu? Which *buntu? ;-)

Allright, for me, my distro of choice is Slackware. Ok, it's not ready for all desktops, at least it suits my desktop (or "workshop") very well.

Edited 2009-05-18 22:42 UTC

Reply Parent Score: 4

StaubSaugerNZ Member since:
2007-07-13

I'm not sure... Definitely Java is an option, although for some reason I would rather prefer Mono. Still, it would be great to have an alternative environments.

And you have a bunch of other tools in GNU/Linux (easily available): Fortran77, Ada (GNAT). This is what I like about GNU/Linux.

To be more precise - we have FreePascal with Lazarus, which is very impressive and interesting couple of tools. In my honest opinion, for many small projects it would suit better than Java.

Oh, yes... And we have all these srcipting languages with state-of-the-art Python (try it, it's possible to use it with Java -> Jython ;-), Perl - we can create miracles when it comes to regular expressions and text processing, PerlDBI - and we have advanced tools for processing database reports, also, or at least for data preparation.

There is a lot of animals in this Linux world... And you might be right. We need standards and we should to concentrate on some subset of technologies as far as we mean "desktop development". But it wouldn't be so easy, as the power of Linux resides in its differences and huge amount of options, tools, alternatives etc. = flexibility given to the end-user. I like it. I can choose what I want.

I know, why are you talking about Java - because it's an easy way to standarize this Zoo of different technologies. And the idea is good...

... But we will never resign from C/C++. These languages are the basic ones. GNU/Linux as well as all the Unixes were born from C. C++ is a reasonable continuation for many C developers. And it's not so bad for end-user as long as the application is well written. To be honest, there is no problem to compile C or C++ source by hand if the sources are properly distributed with the proper configuration script. Moreover, in the majority of cases this way is the best one to get the software installed correctly - but yes, it means this is not an option for standard user.

In my opinion, GNNU/Linux is for people which have enough computer literacy to perform smart decisions and smart choices. The rest should work with Windows - they will never be happy with Linux. Even, if we would have 90% of software written in Java or C# (on Mono), standarized across most of the distros (if it's possible) there will be still a huge group of people, which will prefer to use standard "configure/make/make install" approach. They would be creating alternatives all the time.

GNU/Linux is flexible, yet inconsistent. That's why I like it :-) You can do a lot, but you cannot think that 90% of work would be done by a wizard.

Imagine how many distros we have - we cannot make "Linux" ready for desktop. "Linux" is to general term. Almost as general as "operating system" (and in fact, "Linux" means only a kernel, but I don't want to go into these details). The question is bad and we will not receive a proper answer.

Maybe, the correct question is:
"Do we have at least one GNU/Linux distribution ready for desktops, to the same level as we have a lot of distros ready for servers - like: CentOS which is an exact copy of RHEL, an industrial standard?"

Let me think: Ubuntu? Which *buntu? ;-)

Allright, for me, my distro of choice is Slackware. Ok, it's not ready for all desktops, at least it suits my desktop (or "workshop") very well.


Good reply. I agree with you that choice is indeed good.

However, the use of C and C++ for the bulk of applications is part of the problem not the solution. It is just too hard to maintain these applications across different flavours of Linux and libc versions. Why not let Sun/Oracle do the bulk of the work for you?

For example, people whinge about Gtk+ and Qt not cutting it yet they have no experience on Swing, which is perfectly good for most basic application uses (although does miss some things, and admittedly doesn't have perfect desktop integration). It is pretty hard to beat Java2D for cross-platform fonts and compositing graphics (particularly now that it is implemented as hardware shaders using Direct3D and OpenGL).

You are right. With small projects plenty of tools are adequate. For large projects of large duration and large teams the simplicity of Java is actually a benefit to have everyone understand what has been written (although you can indeed "write bad FORTRAN in aby language", including Java).

I used to use Slackware back in the 90's. After many years I just wanted to get things done without any hassle so I've been using Ubuntu for a while. I guess time-constrained users that want "low hassle, just get things done" is what the article is talking about, not developers like ourselves.

Reply Parent Score: 2