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

60 of 997 comments (clear)

  1. It doesn't matter as long as it's on Linux by alain94040 · · Score: 4, Insightful

    First, let me start by saying that the definition of an experienced programmer is that they don't care about the particulars of any given language. Experience means they have seen many languages come and go and they will continue to adapt.

    That's the long-term skill that will keep putting money in your pocket. Coming out of college, it's important you know that.

    That being said, congratulations on sticking with Linux in a Windows world. Purely from a job perspective, there might be more jobs on the Windows platform, but they are also more boring. So your school is doing the right thing by exposing you to as much Windows IT as possible, and you are doing the smart thing by escaping to the better side.

    To answer your question: Linux is not so different from a programming point of view, but it has a set of standard libraries and utilities that can be combined in many amazing ways. I'm old-fashioned, so I still program in C++, but what I would also recommend that you explore are some of the fun scripting languages like Perl. I wouldnt' particularly recommend more modern and high-level languages on purpose: they hide too much of Linux, so what's the point for you?

    Learn about true modularity: whatever it is that you are trying to build on Linux, someone already did 90% of the work. You just have to build up from there. Algorithms are the same on Windows and Linux, but that mindset makes all the difference.

  2. C or C++ by Amazing+Quantum+Man · · Score: 4, Informative

    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.

    --
    Fascism starts when the efficiency of the government becomes more important than the rights of the people.
    1. 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.

  3. 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
    1. Re:I like Python by LaskoVortex · · Score: 4, Insightful

      That said, the idea of using whitespace as syntax ... well ... Oh God, I can't lie, it's horrible. But. But! There's ways around it. Ideally a code editor would make line-leading whitespace visible while keeping the rest invisible. Once you get more than one person working on a project, different indentation preferences (expand tabs to spaces vs. not) it's ridiculously easy to have weird mistakes creep in.

      Look, this is everyone's biggest beef with python if they are not yet proficient at it. Somehow, we have come to believe that whitespace is sacred and that a language shouldn't tell us how to use it. I'm not sure how to convince you otherwise except this: don't knock it until you have tried it. Once you really delve into the language, you will wonder why anyone ever would program in any other language for general purpose programming.

      Now, to more directly address your whitespace concerns:

      • You won't miss your whitespace freedom--in fact you impose your own whitespace rules on the code you right already. Python formalizes and enforces this good habit via syntax.
      • Since whitespace is syntax, you can use very standard tools to normalize it across a module in a couple of fractions of a second. Differing whitespace habits will never be a problem if you normalize whitespace before you begin coding on a collaborative module.
      • You won't mind the whitespace enforcement. In fact, after you go back to code you wrote a few months prior, you will be happy that something forced you to have consistent whitespace. Whitespace enforcement and other features of the language will shift your habits towards writing more reusable and maintainable code.
      • You will forget, for the most part, that whitespace enforcement is even part of the syntax once the language becomes second nature to you. In other words, you will so habitually use whitespace correctly (because you are forced to by syntax) that you will not even realize that you are using it as you code. All of the sovereignty over your whitespace that you thought was important to you will disappear because you will forget about its existence.

      So give it a try and quit spreading FUD to all of those people who want "control over their whitespace". There are bigger things to think about, like whether you or someone else will be able to comprehend or reuse your code in six months.

      --
      Just callin' it like I see it.
    2. Re:I like Python by kaens · · Score: 4, Funny

      4 spaces. Not 5. 5 is right out.

    3. Re:I like Python by cowmix · · Score: 4, Insightful

      That'a reminds me of something else I like about Python.. its language is documented.

    4. Re:I like Python by Jason+Earl · · Score: 4, Insightful

      Just for your information, Python isn't picky about spacing inside of open parentheses (or brackets) so you are free to express yourself there. I used to feel the same way as you do about whitespace as syntax, but now I actually appreciate it.

      The real advantage to whitespace as syntax is that everyone has to follow the same rules, and the rules are sane. I once worked in an environment where the Perl hackers that wrote the original code didn't believe in indenting at all (they all used nano as their editor). Collaborating with people that don't believe in indenting at all is quite difficult. After that, I was glad to use a language that requires some indentation.

    5. Re:I like Python by Amazing+Quantum+Man · · Score: 4, Funny

      <VOICE type="Jean-Luc-Picard>There are FOUR SPACES!</VOICE>

      --
      Fascism starts when the efficiency of the government becomes more important than the rights of the people.
  4. 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

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

  6. Why not stick with C#? by Anonymous Coward · · Score: 5, Interesting
  7. Learn C and Python by volsung · · Score: 4, Insightful

    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.

    1. Re:Learn C and Python by mickwd · · Score: 4, Informative

      "We had on average 4 bugs a week due to the indentation bullshit, each of which took multiple hours to debug."

      Any chance you could name the company you work for?

      Because I want to avoid your products.

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

    3. Re:Learn C and Python by STFS · · Score: 4, Informative

      Python is absolutely unusable on real world projects (any project where you aren't the sole developer) due to that indentation crap.

      Would you mind repeating that? I don't think the guys developing the following projects heard you:

      I could go on... but you get the point.

      If your software team is having problems with the significance of white spaces in Python, my bet would be that, no offense, the team was to blame.

      The trick is to coordinate the "white space rules" between members of the team. If it can't pull that one off, I wouldn't trust them to write code for a production system anyways.

      --
      You don't think enough... therefore you better not be!
    4. Re:Learn C and Python by bledri · · Score: 4, Informative

      Python is absolutely unusable on real world projects (any project where you aren't the sole developer) due to that indentation crap.

      It's fine if you don't like Python and don't want to use it, but to say that it's completely unusable on real world projects is a bit absurd. And while you may find it hard to read, I think it's obvious because if it looks like code is a block, it is. The main trick to read and follow PEP-8, use a decent editor and write unittests.

      --
      Some privacy policy Slashdot.
  8. Mono by reSonans · · Score: 4, Informative

    Mono could make the transition very easy for you, depending on what your doing.

    --
    Light the blue touch-paper and retire immediately.
  9. What do you want to develop? by kwabbles · · Score: 4, Informative

    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.

    --
    Just disrupt the deflector shield with a tachyon burst.
  10. 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'!"
  11. Comment removed by account_deleted · · Score: 5, Insightful

    Comment removed based on user account deletion

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

  13. Re:Java by samkass · · Score: 4, Insightful

    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.

    --
    E pluribus unum
  14. None. by grapes911 · · Score: 4, Insightful

    Focus on techniques rather than specific languages. Make sure you develop a strong foundation and new languages will be easy to pick up later. For a student, the foundation is way more important than a particular language.

  15. Re:A valuable skill by siride · · Score: 4, Insightful

    With good libraries or a language runtime, you shouldn't have to make any system calls. And the few times that you do, it can be wrapped in a thin abstraction layer within your program.

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

    1. Re:C, Java and Python. by TheRaven64 · · Score: 4, Insightful

      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.

      --
      I am TheRaven on Soylent News
  17. There is no such thing as C/C++. by loufoque · · Score: 4, Insightful

    As usual, people are talking of "C/C++".
    However there is no such thing. There is C, and then there is C++. They are very different languages.
    C++ suffers from a rather poor reputation because most people don't really know it, and because most code that has been written in it is really C-ish (C with classes) or worse, Java-ish (as if C++ was about OOP...).

    Anyway, my point is that it's a language that needs to be learnt separately from C altogether.
    It's both as low-level and as high-level as you want, bringing you the best (or worse, depending on how you use it) of both worlds.

  18. 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 tomhudson · · Score: 4, Insightful

      C - absolutely. C isn't going away any time soon, and it works on ALL platforms, not just linux (and in many cases porting to bsd is just a recompile and a few extra headers). You'll also have to learn to write your own make files - not a hard job.

      And you'll find you'll need perl and bash scripts.

      Everything else is just "for this type of app, these are what most people use ... pick whatever you feel most comfortable with."

    2. 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.
    3. Re:This is all true however... by lamapper · · Score: 4, Insightful
      Great post...

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

      I remember for years C being considered faster on systems than C++, although I believe over the years the gap, if there still is one at all, has narrowed? What is true, someone share it with me as I am curious? Are there any incompatibilities when using C++ and migrating to different Operating System environments any more like their use to be in the dark ages?

      Can you compile C++ down small enough to use in embedded devices or does C++ still pull in libraries that are not needed or too big? My guess is you can exclude the libraries that you do not need, correct? (Not trying to start anyone flaming, I honestly do NOT know.)

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

      I know there are Ruby on Rails camps and Python advocates, however does not PHP still run faster than either? (Take the same programmer, writing code with expert knowledge with all three programming languages, would not his final product , from a strictly performance issue in PHP be faster than Ruby or Pythong?)

      Considering that PHP was written with the web in mind and delivering web pages...do you really want anything else from strictly performance issues?

      Granted I understand that you can probably prototype in other languages much faster...

      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.

      Also from a modularity, library, procedure / function, object perspective, if you have been coding in any of them PHP, Python or Ruby on Rails, would you not have a significant library built up where the library issue becomes a non-issue?

      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.

      I do not have any Ruby on Rails or Python experience and am looking forward to learning more about them. To date I have been able to do everything I need to do with scripting and PHP...so my knowledge is very limited and I admit that freely. Further my Perl knowledge has been with simple scripting only, I have not had a 8 hour a day, 5 day a week Perl coding job.... Further when competing in an ACM Programming contest at college, of the 40 programmers who competed, I was 20th...so I have no delusions I know I am an average programmer and am okay with that. I always get the job done one way or another regardless.

      Funny off-topic story...the ACM Programming contest: I finished my first problem in a little over 2 hours. A friend of mine who placed, with his team representing our university, second in the world at the international contest in a previous year, finished his first program and had it judged correct in 27 seconds. (Since he had already officially represented the University twice over the years, he was ineligible for that years team and was competing just for the fun of it.) They give you the programming packets and allow you to look at them 10 minutes before the official start time, thus when the clock started he started typing and he was much, much faster typist than my 30 wpm with 5 mistakes, lol. I have nothing but respect for all of you who can put me to shame with your incredibly fast and excellent programming skills. As f

      --
      Is your Internet Throttled? Install DD-Wrt, OpenWRT or Tomato to learn the truth! Google: 1Gbps/1Gbps: 5 Communities
    4. Re:This is all true however... by GigaplexNZ · · Score: 4, Informative

      I think I might like Obj-C over C++, due solely to the really nice init/release/autorelease mech for memory allocation.

      Sounds like someone needs to read up on the RAII design pattern (not to be confused with RIAA). Sensibly written C++ will automatically release memory when it is no longer used.

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

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

    8. Re:This is all true however... by Jeremi · · Score: 4, Insightful

      I think I might like Obj-C over C++, due solely to the really nice init/release/autorelease mech for memory allocation.

      I've done just a bit of Obj-C programming, and I didn't see much advantage of init/release/autorelease over plain old C malloc()/free(). What I mean is, under C, I have to remember to free() each object that I malloc(). Under Obj-C, OTOH, I have to remember to [release] each object that I alloc (or retain). In either case I need to remember to explicitly execute a cleanup/release action to match the allocate/retain action, and if I don't get it right, the object is (effectively) leaked. That means I have to manually check every code-path to ensure that each of my ref-count-incrementing actions is matched by exactly one ref-count-decrementing action, which is tedious and error-prone. It's actually even worse than that, as Objective C has several different conventions regarding how system APIs handle ref-counts... some of them will have ref-counted the objects they return and expect you to [release] the objects when you're done with them, others don't... so it's quite easy to do the wrong thing.

      Compare that to C++, where I can (and do) use templates to create a reference-counting system that automatically frees objects at the appropriate time, and no explicit calls to free()/release()/decrement_ref_count()/whatever-you-want-to-call-it() necessary, ever:

      void FooBar()
      {
      MyClassRef myRef(new MyClass); // MyClassRef constructor increments the new object's refcount to 1
      MyClassRef anotherRef(myRef); // MyClassRef copy constructor increments the object's refcount to 2
      /* anotherRef's destructor executes here, decrements the object's refcount to 1 */
      /* myRef's destructor executes here, decrements the object's refcount to 0, and so the object is auto-deleted */
      }

      With that system, there is almost no way for me to mess things up(*). I don't have to remember explicitly to call any sort of (release) or (dealloc) function for each object I create, because it is guaranteed to be called for me by the destructor of the last Ref object.

      So I must be missing some key insight about Objective C's memory management system, because even with reference counting it seems almost as error-prone as C's manual memory management.

      (*) One way to still mess things up would be to create cyclic references, i.e. A refs B and B refs A. But that's a problem for any reference-counting scheme, and the solution is either to avoid cyclic references or go with a full-blown garbage collector.... and I've yet to find that I need to do the latter.

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    9. Re:This is all true however... by Jeremi · · Score: 4, Insightful

      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.

      That's all true... but I think you're missing something: all of that crazy stuff was added to C++ because it is useful. Of course, any given program will probably only need a small subset of those features, but for the programs that really do need feature X, having it available in the language is a big time-saver.

      I've done a good amount of both C and C++ programming, 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++.

      I'd say C++ is a lot like English: a big, overgrown, complicated, mess -- and damn useful if you want to get things done. (If you care more about elegance and simplicity, there is always Esperanto, for whatever good that does you)

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    10. Re:This is all true however... by quenda · · Score: 4, Funny

      Everyone programming for Linux should start with machine code! Then after that, they should learn assembly.

      Thats all very well, but only after they have a thorough grounding in writing microcode. How can you appreciate and optimise machine code, without knowing how it is implemented?

      Anything below microcode is a hardware problem.

    11. Re:This is all true however... by bug1 · · Score: 4, Funny

      all of that crazy stuff was added to C++ because it is useful.

      If you want crazy stuff that was put there to be useful then why not use perl ?

      ducks

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

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

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

  20. Re:Java by binarylarry · · Score: 4, Insightful

    That's because you can get within a few percentage points of native code performance with Java's VM.

    Most of the people who are hesitant to use "managed code" are old codgers, elitist fruits and brainwashed newbies who have to be forced into new paradigms, instead of being genuinely interested in new trends.

    It's best to avoid types.

    --
    Mod me down, my New Earth Global Warmingist friends!
  21. C first, then whatever you want by darkwing_bmf · · Score: 4, Insightful

    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.

  22. Fear of Whitespace by bitspotter · · Score: 4, Insightful

    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.

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

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

  25. Re:Indenting code by kabloom · · Score: 4, Insightful

    this line must be indented but slashdot does not allow me to

    A very good reason to use a language that delimits its blocks explicitly. C will work great even in forums that lose their linebreaks. (Perl too? I don't use it enough to know.)

  26. Programming for Linux? by narcberry · · Score: 4, Insightful

    Your first problem is thinking a programming language is for linux development, and perhaps another is for windows development.

    What you should actually be asking yourself is, what is the problem I'm trying to solve, not what is the os I can use.

    Your question as stated has a million unquantifiable answers (heck, if you don't have a problem to solve, ASP.NET is just fine on linux). Ask the right question, what programming language should I use to solve problem x, and now you will get intelligent answers, and at least one remark about turing complete languages are all turing complete.

    /rant off

    --
    Modding me -1 troll doesn't make me wrong.
  27. 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."
  28. Why I hate mono by Curunir_wolf · · Score: 4, Informative

    Try it. You'll be soon warning people away from it, too. C# programming is one thing (it's just a language), but the mono/.NET libraries will have you banging your head against the desk before long.

    I might have a skewed perspective. When I started working with mono, the big selling point was that we could use all the tools and processes on Windows (our development environment is standardized for the whole company's development department and has years of process development work in it), then deploy applications on our Linux servers (we were even using SuSE). Not so fast. Some of the data access libraries work different (tests that pass on .NET fail on mono). Most of those nifty widgets and reporting tools you're using in Visual Studio won't work at all, because they rely on GDI or other native Windows services/APIs.

    We eventually abandoned mono (and .NET for that matter, other than existing production applications), and we are now mainly using Java (it is the COBOL of the 21st century, after all). Deployments on our JBoss servers work exactly the same, whether they are on Windows, or Linux, and so far we have not encountered a single bug that we had to work around because the vendor's response was "Yes, that's a known issue and will be fixed in the next commercial release." (!!)

    --
    "Somebody has to do something. It's just incredibly pathetic it has to be us."
    --- Jerry Garcia
  29. 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.

  30. Re:Java by alanwj · · Score: 4, Insightful

    The reason to fear Java doesn't really have much at all to do with any merits of the language itself. The reason you should fear Java is that it doesn't really add anything to your resume to distinguish you. There are, frankly, a LOT of extremely mediocre programmers on the market, and a common attribute they share is that they only know Java.

    That said, DO learn Java. Not knowing how to use one of the most popular tools in your field is also not a smart idea. Just don't by any means think that your education is done.

    For what it's worth, here are the four major things I look for when interviewing programmers.

    1. Do you know C? (whether you are going to be programming in C is irrelevant)

    If you don't know C, you probably have very little understanding of how computers work. C is language you can depend on to be on pretty much every platform; C is the language external APIs and foreign function interfaces are specified in; C gets the job done when all your layers of abstraction fail you.

    2. Do you know a functional language such as Lisp, Scheme, or Haskell?

    Programming in a functional language changes the way you think about programming in general. Programmers that understand functional programming generally are able to produce better solutions to problems even in imperative languages. Structure and Interpretation of Computer Programs is available online for free. Read it today and improve your skillset.

    3. Can you write a compiler from start to finish?

    The theory surrounding language parsing (automata, state machines, regex, grammars, etc) is fundamental to computing. In fact, computing itself is usually defined in terms of it. Once you understand it, you find you apply it all the time.

    The ability to translate high level languages into optimized machine instructions requires that you understand your platform at every level. This is important because it lets you understand the tradeoffs you are making when you choose one tool or method over another.

    4. What is your current personal project?

    What your project is doesn't matter all that much, as long as you have one. Good programmers are usually always working on some personal project that excites them.

  31. Lern LOGO! by ArcadeNut · · Score: 4, Funny

    I hear it's going to make a comeback as soon as they add support for DirectX 10!

    PEN DOWN
    FORWARD 10
    TURN RIGHT
    FORWARD 10
    TURN RIGHT
    FORWARD 10
    TURN RIGHT
    FORWARD 10

    --
    Visit the Arcade Restoration Workshop @ http://www.arcaderestoration.com
  32. 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