Slashdot Mirror


What Programming Language For Linux Development?

k33l0r writes "Recently I've been thinking about developing (or learning to develop) for Linux. I'm an IT university student but my degree program focuses almost exclusively on Microsoft tools (Visual Studio, C#, ASP.NET, etc.) which is why I would like to expand my repertoire on my own. Personally I'm quite comfortable in a Linux environment, but have never programmed for it. Over the years I've developed a healthy fear of everything Java and I'm not too sure of what I think of Python's use of indentation to delimit blocks. The question that remains is: what language and tools should I be using?"

21 of 997 comments (clear)

  1. Language you need to be proficient in. by Salo2112 · · Score: 5, Funny

    Hindi.

    1. Re:Language you need to be proficient in. by Anonymous Coward · · Score: 5, Funny

      I am not having hear of the language insightful, please telling me where it is I can learned of it.

      Regards,
      Anonymously Cowarding

  2. How much do you want to learn? by modmans2ndcoming · · Score: 5, Informative

    C/C++, C#, Objective-C, Java, Python, Perl, [insert language of choice]

    All can be used to do Linux development.

    KDE, stick to C++ and Python.

    Gnome, stick to C and C# and Python.

    GNUStep, stick to Objective-C

    Java and Perl and any other language you choose can be used as well, but the desktop environment support for them is little to non-existent, depending on the language.

  3. Why not stick with C#? by Anonymous Coward · · Score: 5, Interesting
  4. Comment removed by account_deleted · · Score: 5, Insightful

    Comment removed based on user account deletion

  5. C, Java and Python. by rjh · · Score: 5, Insightful

    This question is remarkably easy.

    The UNIX API is written in C. If you don't know C, you won't be able to understand UNIX system calls.

    Beyond that, learn Java and learn Python. You yourself say you have a "fear of Java." Sounds like a pretty good reason to learn it. Likewise, you say you're not sure about Python's use of indentation. Sounds like another good reason to learn it.

    It is usually good practice to learn one new language a year. These recommendations should be seen as beginnings not endings.

    My final bit of advice is to learn PROLOG, LISP, Haskell or Erlang. And by 'learn,' I mean 'become fluent in.' These languages are radically different from anything you've experienced before. Learning how to think differently about problems will make you a much better programmer, regardless of what language you ultimately wind up using in the private sector.

  6. This is all true however... by Narcocide · · Score: 5, Informative

    ... it is also pertinent to note here that the GNU standards document, section 3.1: "Which Languages to Use" strongly advises plain old C for both performance and absolute maximum cross-platform compatibility.

    Since operating system and hardware platform independence are both key factors of code re-usability and really what open source software is all about I personally think this is a strong call.

    However the parent post is correct in that application intent trumps all. If you are just writing shell tools you never intend to use outside of Linux then PERL is likely fast enough and probably much easier/faster (bottom line: cheaper) for the average developer to work with.

    If you're writing web software use PHP, but it will make you feel dirty inside.

    1. Re:This is all true however... by GreyWolf3000 · · Score: 5, Insightful

      Everyone programming for Linux should start with C until they have a solid understanding of how the Von Neumann architecture really works. Once you "get" virtual/physical memory, compilation of C into IL, IL into assembler, and how linkage works, start toying with POSIX threads. Once you really understand the tradeoffs and performance implications of things like dynamic binding and certain aspects of object oriented programming, you can move up to something like Ruby or Python and *really* understand not only what you are doing, but what that interpreter is doing for you.

      --
      Slashdot: Where people pretend to be twice as smart as they really are by behaving like children.
    2. Re:This is all true however... by Anonymous Coward · · Score: 5, Funny

      Everyone programming for Linux should start with machine code! Then after that, they should learn assembly. Only after mastering this can they begin to appreciate the power of Fortran! Finally, once they have mastered Fortran, C will finally make sense. Then, 5 years of steady C development, where they achieve Nirvana-like (the band, not the state of mind) understanding of C if they begin by handwriting the C compiler in Fortran and then transitioning it into C once the compiler is able to self-compile!

      Then, only then, can you even begin to consider Object Oriented Programming. This should be jumped into arm-pit hair-first. Learn Java first -- Sun designed it to be object oriented to a fault. Then slam on the breaks, realize it's crazy, and start taking concerted steps back until you get to C++, which is C with only a modest amount of caffeine added.

      Once all of that is done, you too can begin to program in Ruby or Python, Perl, or Bash scripts. That way, you will have a solid base of high performance programming to throw away when you move into the more heavy duty interpreter languages.

      Or really, lets just damn it all to hell and learn Lisp -- functional languages is the way of the future. We can't all bother to learn what the computer is doing. If I program in a fancy-pants language like C, I might have to bother to learn how to write threads, locks, and all that crap to make my programs run fast. In Lisp, I have so little control over what's actually happening, I can just blame someone else when my program is slow.

      Yeah. Learn Lisp first.

    3. Re:This is all true however... by computational+super · · Score: 5, Insightful
      C - absolutely.

      Another thing that C has going for it is that virtually all Linux apps are written in C. So, if you ever want to install anything from source, and something goes wrong, you'll be glad you know a thing or two about C so you can figure it out (and even submit a patch that ends up being applied to a big, established project like WINE - that's a pretty awesome feeling, let me tell you). All *other* languages interpreters are written in C - it's always worthwhile once you've gotten comfortable with a language like Java to sit down and write your own interpreter in C so you can really get a good feel for what it's actually doing.

      So, yeah, I second the parent. Definitely C.

      --
      Proud neuron in the Slashdot hivemind since 2002.
    4. Re:This is all true however... by Wolfbone · · Score: 5, Interesting

      Or really, lets just damn it all to hell and learn Lisp ... I can just blame someone else when my program is slow.

      Nope!

      http://www.lrde.epita.fr/~didier/research/verna.06.ecoop.pdf

      http://portal.acm.org/citation.cfm?doid=1143997.1144168

      http://www.eecs.berkeley.edu/~fateman/papers/lispfloat.ps

      Yeah. Learn Lisp first.

      Good idea. :) I know /you/ were only joking but Lisp has been held back by a ton of widely believed (and massively ironic) mythology and it is very sad. The only thing really wrong with it is the lack of stuff written in/for it because of its grossly undeserved reputation.

    5. Re:This is all true however... by Anonymous Coward · · Score: 5, Insightful

      and these days when I need to write in C I generally end up writing a fair amount of code to manually re-implement functionality that I would get 'for free' in C++.

      Odds are you're ignoring one of the true fundamental virtues of programming: Reusability.

      You see, when you have a rock stable ABI, like C affords you, you can create these things called "Libraries", which future products can then depend on, often times even in other languages like Python and Java. And those products can then be depended on, and so on and so forth until you have a whole working system.

      I laugh every time I hear someone say something like "Oh C++ has [blah] "for free"". No, you don't have it for free, someone else just coded it, stuck it in your fat C++ library and now 10 years later people bicker about whether it was actually the right approach to standardize so much of this crap, when so many different "standard libraries" are so totally and hopelessly incompatible.

      C's standard library is so spartan that you can write your own "standard library" full of goodies like lists and queues and trees and other time savers, and you never have to get into such arguments to begin with.

      Or, if you're incredibly lazy, you can use some of the community maintained, amazing C libraries that already exist. My personal favorite happens to be GLib, but anyone who's written enough code in C to have an opinion on the subject has probably written one of their own or come across one they like as well (such as eGLib in Mono, the Apache Portable Runtime Library in Apache, and the list just curls on...)

      So yeah, all of that stuff was added to C++ because it was useful... Just as long as you're working on one project, with one version of [OS], with one compiler...

  7. Re:Java by Matheus · · Score: 5, Insightful

    I was also curious about your "healthy fear of anything Java"
    Really? You are way too young to be developing "healthy fears". Java, like *every other language, has its issues but there is nothing abnormally nasty about it to treat it like a plague. Specifically relating to your .NET experience Java is a significantly more mature language than C#. You are more likely to get better performance and stability out of Java's virtual machines just because they've had more time to be beat up by a vast community of developers. M$ did a good job of getting C# out the door but like any child it has some growing up to do.

    As many of these posts have mentioned: Don't limit yourself. Try everything. Obviously for Linux purposes knowing C (and a healthy amount of Bash scripting and Perl) is useful purely because the OS is built on it BUT for developing applications on top of it many languages have benefits depending on what you are trying to implement and so eliminating anything from your list will hurt you in the long run.

    "Free your mind and the rest will follow"
    -En Vogue

  8. Re:What do you want to program? by mebrahim · · Score: 5, Interesting

    Why do people usually underestimate shell scripting? Shell scripting is a real scripting language by which you can even create GUI apps for a modern desktop environment like KDE.*

    * for example using kdialog

  9. IndentationError by ksw2 · · Score: 5, Insightful

    If something like indentation is a show-stopper for your choice of language, then you are missing the point.

    Computer languages are about data structures and idioms for manipulating them efficiently. In contrast, whitespace is a cosmetic, superficial thing.

    Yes, I adore Python. (I wish I had paid attention to it ten years sooner than I did.)

  10. LOLCODE by Anonymous Coward · · Score: 5, Funny

    Develop in LOLCODE:

    http://lolcode.com

    "HAI WORLD" Example:

        HAI
        CAN HAS STDIO?
        VISIBLE "HAI WORLD!"
        KTHXBYE

    I'm doing contract work right now, and won't my client be pleasantly surprised to see the project completed in LOLCODE... ROFLMAO!!! I can haz milestone payment?!?

  11. Re:Learn C and Python by imbaczek · · Score: 5, Funny

    I've worked professionally with a hammer and it was totally unusable. We've had 4 finger smashes a week. Hammers are absolutely unusable on real world projects; worse, they're counter-productive due to that finger crap.

  12. Re:Java by FishWithAHammer · · Score: 5, Insightful

    Managed code performance is good enough for essentially anything aside from high-performance video games (and even that isn't far off).

    "Java is slow" is a stupid old myth. Does it not occur to you that JIT compilers compile to native code?

    --
    "You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
  13. Why not start with assembly language? by Joce640k · · Score: 5, Funny

    ...it's the only way to be sure.

    --
    No sig today...
    1. Re:Why not start with assembly language? by that+this+is+not+und · · Score: 5, Insightful

      I am mostly an Assembly Language programmer and it can teach some bad habits. I don't generally trust anybody else's code, so end up coding up everything from scratch. It's a solitary practice. That said, 'pointers' and other things that seem weird and remote to many people are painfully obvious if you started out in Assembly.

      Bare hardware and real memory addresses rule. However, a bare-metal assembly language programmer will mostly work with embedded controllers in this day and age. Yay for the little 8 bitters and even the 4 bitters. There are still billions being deployed.

  14. Re:Java - A healthy fear by BitZtream · · Score: 5, Insightful

    I too have a healthy fear of Java, but that is changing.

    I feel it VERY important to state that Java apps as a general rule are bloated crap.

    I also feel it VERY important to state that Windows apps as a general rule are bloated crap.

    I used to avoid Java like the plague due to the slow bloated feel of the apps I had used. Fortunately, recently I was forced to write a Java servlet because a library for that I wanted to use was a java library and it was the only one with a license acceptable to the project I was working on.

    In the course of writing the Java servlet I came to learn that Java and the JVM aren't the problem, its just the poorly written apps that I've seen. I meantioned Windows above because it suffers from the same misconception to most non-techies (techies have their own more legitimate reasons for disliking it). Most Windows (and Java) developers suck. They aren't developers, they are people who wrote an app for some other reason. Whatever that reason my be isn't important. Whats important is that we see a lot of crappy Java and Windows apps because those are things that lots of people have easy access to. Pretty much EVERYONE has a Windows machine of some sort they can use, and most of those Windows machines hava JVM. Since you can easily setup a Windows or Java development machine for little to no cost or technical ability, the barrier to entry is low enough that those non-developers can write bad apps that give the language (or OS) a name as a poor performer, when in reality, 99% of the time, the app is the issue, not the engine under it.

    I write this post as a former Java hater, who now maintains a servlet that services hundreds of thousands of hits a day, certainly not the biggest web app by any standard but it is a high performance application doing image manipulation in 'real time' for its end users. I still think you should learn C (C++ is good as well, but do C first IMO and you stand a better chance of using object oriented languages properly rather than abusively), but if you are a good programmer, Java can be an excellent language and runtime enviroment to build on. I would not have wanted to write my web servlet in C or C++ in this case.

    So for the Java haters, just think about why you hate Java. Do you hate it because of the shitty apps you've used, or because there REALLY is an actually problem with it?

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager