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

11 of 997 comments (clear)

  1. I like Python by pembo13 · · Score: 4, Interesting

    Works beautifully in Linux and Mac, and well in Windows. May not be the best if you're building CPU intensive apps however.

    --
    "Thanks for all the money you paid to us. We've used it to buy off ISO among other things" -Microsoft
  2. Why not stick with C#? by Anonymous Coward · · Score: 5, Interesting
  3. C/C++ by erikina · · Score: 4, Interesting

    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.

    1. Re:C/C++ by dkf · · Score: 4, Interesting

      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.

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
  4. What do you want to program? by Hapless+Hero · · Score: 4, Interesting

    That is the first question you should ask yourself, actually. ;)

    One thing you might learn, from a tinkering-with-Linux point-of-view, is shell scripts. Surprised no one mentioned them yet. They aren't really "programming" in the sense of creating apps, but they are fun and a cool part of Linux.

    --
    Move sig now.
    1. 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

  5. How about by smittyoneeach · · Score: 3, Interesting

    "all of the above"
    You really should have a good grasp of the concepts of programming languages, so that you can work with the bulk of projects that come your way.
    A little scripting, a little functional, a little procedural, a little OO, all combine to make Jack a versatile hacker.

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
  6. Re:This is all true however... by BlueCodeWarrior · · Score: 4, Interesting

    ...C++...

    The problem with C++ is that it's a crazy, crazy language. At first, it was just a superset of C, but now there's all kinds of stuff...it's mutated into a totally different kind of thing. C has this elegant simplicity going for it. There's nothing the matter with C++...except that C is (pretty much) perfect.

    Also your feel dirty comment, is that because of the ease in which a poor programmer can create unstructured code? If so would it not be the fault of the programmer and not the language specifically? (i.e. Assembly for the 8088, ..286, ..386 and IBM Mainframe made me feel dirty sometimes with they way you were forced to branch, but it was fast...and no I am far from an expert Assembly programmer.

    The problem with PHP (and I code mostly in it for a living) is that it wasn't 'designed' at all. Originally it was just a pre-processor, and it's grown into a full blown language from there. This is all well and good, except that there's no sort of continuity to it at all. Naming conventions? (isset vs every other 'is' function starting with 'is_', etc) Who needs them? OO? Sure...ish. PHP is great for getting things done, but I certainly feel dirty after coding in it.

    FYI, personally I do not have a preference and simply choose what is convenient for me to use that will get the job done, period. I honestly do not know the nuances between them...and I am sure that there are some.

    Always a good way to be.

  7. Re:C or C++ by EvilRyry · · Score: 4, Interesting

    That's only if you need features from the latest versions of MS.NET, mostly in the cases of porting existing applications. Mono is a strong platform in its own right and perfectly suitable for developing Linux applications.

    And you do NOT need to use an old version of C#. The compiler is C# 3.0 compliant and they plan on adding C# 4.0 support shortly after it is released.

    Thanks for playing.

  8. Re:Java by wtarreau · · Score: 3, Interesting

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

    Ahah ? You should tell that to people who develop applications delivering only 1000 pages per second on a 8-core machine where equivalent plain-old C easily delivers more than 10000 pages per second on a single core of the same machine. Surely the GC is at fault, everything related to object management is at fault, the memory footprint voiding all cache efficiency is at fault, in summary, the language is at fault.

    An yes, that's what I see in enterprises.

    I think the real problem with Java developers is that they have been told that what they did was fast, and they believe it. But let's face it : when processing an HTTP request burns ONE JOULE there is definitely a problem. No wonder why datacenters are filling that fast...

    Everytime a Java developer tried to prove me wrong, he showed me he was able to reach performance levels I was able to reach 10 years ago on an obsolete machine. "Look: 500 pages per second on this small 4-core xeon !". Well, I do 2000 on my 2.5W, battery-powered Geode computer, and that is small.

    So please stop spreading bullshit about efficiency of such things, there are people who believe you and now we find their crap sucking all the power of datacenters.

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