Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

[ Create a new account ]

What Programming Language For Linux Development?

Posted by kdawson on Saturday December 06, @06:46PM
from the let-slip-the-dogs dept.
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?"
python perl c programming linux
tech programming
story

Related Stories

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • C or C++ (Score:5, Informative)

    by Amazing Quantum Man (458715) on Saturday December 06, @06:47PM (#26015961) Homepage

    The *nix API is in C.

    Alternatively, you could look at Perl, as well.

    If you're really desperate, you could use Mono, but I wouldn't recommend it.

  • I like Python (Score:5, Interesting)

    by pembo13 (770295) on Saturday December 06, @06:48PM (#26015965) Homepage
    Works beautifully in Linux and Mac, and well in Windows. May not be the best if you're building CPU intensive apps however.
  • by Salo2112 (628590) on Saturday December 06, @06:49PM (#26015969)

    Hindi.

  • by modmans2ndcoming (929661) on Saturday December 06, @06:50PM (#26015975)

    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.

  • by Anonymous Coward on Saturday December 06, @06:50PM (#26015979)

    http://www.mono-project.com/ [mono-project.com]

  • Learn C and Python (Score:5, Insightful)

    by volsung (378) <stan@mtrr.org> on Saturday December 06, @06:51PM (#26015985)

    C will give you a good base for learning how the system calls and libraries work, but Python is a lot more fun and better for any program where being close to the metal is not important.

    And seriously, if you use a decent text editor, in a few weeks you'll forget Python's indentation conventions ever bothered you.

  • by kwabbles (259554) on Saturday December 06, @06:53PM (#26015993)

    Do you want to develop KDE apps? How about GTK apps? Do you want to submit kernel patches, or create system utilities?

    You may want to be more specific, however - C, C++, Perl and Python are pretty much the norm.

  • C/C++ (Score:5, Interesting)

    by erikina (1112587) <eri.kina@gmail.com> on Saturday December 06, @06:54PM (#26015997) Homepage
    C/C++ are the languages you'd want to go for. They can do *everything*, have great support, are fast etc.

    Take a look at Qt and Gtk. They're the two big GUI toolkits. I personally like Qt more, it's better documented and much easier to get running in Windows (and macs). As for the python, there's nothing wrong with its indenting. The problems of the language are much deeper. No language is going to be perfect, it's a tool .. just use it.

    As for IDE's, if you're coming from a MS background take a look at the latest netbeans. It's a little slow (fine on new hardware though) and a bit better than Eclipse for C/C++ support.
    • Re:C/C++ (Score:5, Interesting)

      by dkf (304284) <donal.k.fellows@man.ac.uk> on Saturday December 06, @07:08PM (#26016101) Homepage

      C/C++ are the languages you'd want to go for. They can do *everything*, have great support, are fast etc.

      Let's be honest here. C and C++ are very fast indeed if you use them well (very little can touch them; most other languages are actually implemented in terms of them) but they're also very easy to use really badly. They're genuine professional power tools: they'll do what you ask them to really quickly, even if that is just to spin on the spot chopping peoples' legs off. Care required!

      If you use a higher-level language (I prefer Tcl, but you might prefer Python, Perl, Ruby, Lua, Rexx, awk, bash, etc. - the list is huge) then you probably won't go as fast. But unless you're very good at C/C++ you'll go acceptably fast at a much earlier calendar date. It's just easier for most people to be productive in higher-level languages. Well, unless you're doing something where you have to be incredibly close to the metal like a device driver, but even then it's best to keep the amount of low-level code small and to try to get to use high-level things as soon as you can.

      One technique that is used quite a bit, especially by really experienced developers, is to split the program up into components that are then glued together. You can then write the components in a low-level language if necessary, but use the far superior gluing capabilities of a high-level language effectively. I know many people are very productive doing this.

  • Java (Score:5, Insightful)

    by jarrettwold2002 (601633) on Saturday December 06, @06:56PM (#26016015)

    Using Java avoids most of the nastiness of Linux while preserving a solid code base. On top of that, it doesn't take much juggling to get your app to run on multiple platforms.

    I think it's a solid way to go, however, if your interest is in learning to actually develop for Linux, I would recommend C++. It's a language you're already familiar with presumably.

    • Re:Java (Score:5, Insightful)

      by samkass (174571) on Saturday December 06, @07:02PM (#26016057) Homepage Journal

      I second Java. It's very fast, very portable, well-supported, scales from embedded to enterprise, has great IDEs, is open source, and has a huge body of libraries, sample code, and support.

      I'm not sure why you call your fear of Java "healthy". Fear of any particular technology is unhealthy-- it prevents you from making rational decisions about them.

    • Re:Java (Score:5, Insightful)

      by Matheus (586080) <nwa@thebestisPERIODp.com minus punct> on Saturday December 06, @07:41PM (#26016285) Homepage

      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

  • by rjh (40933) * <rjh@six d e m o n b a g . o rg> on Saturday December 06, @07:11PM (#26016109)

    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.

    • by TheRaven64 (641858) on Saturday December 06, @07:35PM (#26016247) Homepage Journal

      My final bit of advice is to learn PROLOG, LISP, Haskell or Erlang

      If the original poster ignores every other post, and every other sentence from your post, and just reads this, then they will have the correct answer.

      Learning `Linux' means learning POSIX / SUS. Then it means learning whatever library you use on top of these. It's not an interesting problem. Learning Prolog, Lisp, Haskell, Erlang, FORTH, and Smalltalk will teach you how to think about writing code, even if you never use any of these languages to write a real application.

  • C first. It is the lingua franca of the Unix world. Even if you don't use it for yourself, you have to understand it because so much is written in it. And if you don't understand it, no one will take you seriously. One of my first Linux installs was so I could teach myself C cheaply and I needed a free, as in beer, compiler.

    Then after that, any language that you think might be interesting. Try multiple languages. I personally like Ada and there's a free GNAT Ada compiler for Linux.

  • Fear of Whitespace (Score:5, Insightful)

    by bitspotter (455598) on Saturday December 06, @07:51PM (#26016335) Journal

    I just started learning Python a couple of months ago (I come from a Perl/PHP web development background).

    Really, get over the whitespace-indentation thing. It's such a small thing to get hung up on compared to how much more powerful, elegant, and flexible the syntax is (for starters). That, and it encourages you to indent source code properly anyway.

  • IndentationError (Score:5, Insightful)

    by ksw2 (520093) <[obeyeater] [at] [gmail.com]> on Saturday December 06, @07:56PM (#26016347) Homepage

    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.)

  • LOLCODE (Score:5, Funny)

    by Anonymous Coward on Saturday December 06, @07:58PM (#26016361)

    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?!?

    • by Narcocide (102829) on Saturday December 06, @07:33PM (#26016235) Homepage

      ... it is also pertinent to note here that the GNU standards document, section 3.1 [gnu.org]: "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.