Beta

Slashdot: News for Nerds

×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

What Programming Language For Linux Development?

kdawson posted more than 5 years ago | from the let-slip-the-dogs dept.

Programming 997

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

cancel ×

997 comments

It doesn't matter as long as it's on Linux (4, Insightful)

alain94040 (785132) | more than 5 years ago | (#26015955)

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.

This is all true however... (5, Informative)

Narcocide (102829) | more than 5 years ago | (#26016235)

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

C or C++ (4, Informative)

Amazing Quantum Man (458715) | more than 5 years ago | (#26015961)

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.

How about (3, Interesting)

smitty_one_each (243267) | more than 5 years ago | (#26016155)

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

Re:C or C++ (1)

incripshin (580256) | more than 5 years ago | (#26016175)

The *nix API is in C.

<sarcasm>Are you talking about the Single *nix Specification (S*Sv3)?</sarcasm>

Re:C or C++ (0)

Facegarden (967477) | more than 5 years ago | (#26016325)

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

I'm curious why you say that? I am extremely new to programming anything but embedded stuff, but c# has been super easy to learn. I started about a month ago and i just released my first software utility to a few customers yesterday. I admit knowing very little about the alternatives, but c# works great for me. I'm not doing driver development or anything complex, just simple apps to access small databases etc, and c# shows no signs of being limited in anything i intend to do. I also played with Mono in Ubuntu and it seemed fine. Not as full-featured as VC# for windows, but not bad. If he's already learning c# as he said, it seems worthwhile to me to learn how to use mono.

check out their success stories here: http://www.mono-project.com/Companies_Using_Mono [mono-project.com]

-Taylor

Fortran or Assembler (3, Funny)

www.sorehands.com (142825) | more than 5 years ago | (#26016351)

REAL PROGRAMMERS SPEAK IN UPPER CASE.

Real programmers program in FORTRAN. If it can't be done in FORTRAN, then write in assembler. If it can't be done
in assembler, it's not worth doing!

http://www.sorehands.com/humor/real1.htm [sorehands.com]

I like Python (4, Interesting)

pembo13 (770295) | more than 5 years ago | (#26015965)

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

Re:I like Python (3, Insightful)

19thNervousBreakdown (768619) | more than 5 years ago | (#26016117)

I don't like Python. Not one bit, but I'm willing to admit that my dislike is mostly aesthetic, which has prevented me from really exploring it, so I can't debate its pros and cons with any pretense at having made an informed decision.

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.

Anyway, that's completely the opposite of what I meant to say. A little thing like syntax shouldn't be enough to stop you from getting to know a language. Hey, it's easier to give good advice than it is to take it, and as I understand Python makes a lot of things really easy.

That said, Linux is C, and if you use that or C++ you'll never run into one of those situations where you have to step outside (or rather, below) the library to do what you want to do, which can get nasty quick.

Re:I like Python (1)

pembo13 (770295) | more than 5 years ago | (#26016149)

In contrast, one of the things I love about Python is it's use of whitespace.

Re:I like Python (1)

HeronBlademaster (1079477) | more than 5 years ago | (#26016369)

I don't mind Python's use of whitespace; what bugs me is that there's no standard for it. My professor gives us code that has spaces for indentation, so I can't copy his code into mine without manually replacing his spaces with tabs, and vice versa.

Re:I like Python (1)

fuzzyfuzzyfungus (1223518) | more than 5 years ago | (#26016127)

You don't necessarily want the meat of a CPU intensive app to be python; but using python to marshal bits of high performance code seems to be quite common and popular. Numpy and Scipy come to mind. You can embed chunks of C as well.

Language you need to be proficient in. (5, Funny)

Salo2112 (628590) | more than 5 years ago | (#26015969)

Hindi.

Re:Language you need to be proficient in. (0)

Anonymous Coward | more than 5 years ago | (#26016011)

Flamebait, indeed! Mod the guy funny, like he deserves!

Re:Language you need to be proficient in. (1, Insightful)

base3 (539820) | more than 5 years ago | (#26016053)

More like insightful.

Re:Language you need to be proficient in. (5, Funny)

Anonymous Coward | more than 5 years ago | (#26016123)

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

Regards,
Anonymously Cowarding

Re:Language you need to be proficient in. (0)

Anonymous Coward | more than 5 years ago | (#26016055)

Thank you! Come again!

Re:Language you need to be proficient in. (0)

Anonymous Coward | more than 5 years ago | (#26016069)

Thank you, come again!

How much do you want to learn? (5, Informative)

modmans2ndcoming (929661) | more than 5 years ago | (#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.

Re:How much do you want to learn? (1)

bersl2 (689221) | more than 5 years ago | (#26015995)

Gnome, stick to C and C# and Python.

Is Vala a usable option yet?

Re:How much do you want to learn? (2, Interesting)

erikina (1112587) | more than 5 years ago | (#26016023)

No, and due to the lack of momentum, I doubt it ever will be. But you can add C++ to the Gnome. Gtkmm is quite complete, or you can call Gtk+ methods fine.

Re:How much do you want to learn? (1)

TheRaven64 (641858) | more than 5 years ago | (#26016209)

GNUStep, stick to Objective-C

Or Smalltalk. I rewrote a load of the compiler this weekend so blocks are proper closures, rather than just downward funargs. The new version will be in Etoile 0.4.1 (probably January), or you can download it from svn now. Objective-C is basically Smalltalk for C programmers - if you're not already a C programmer then Smalltalk might be a better option.

Re:How much do you want to learn? (1)

mebrahim (1247876) | more than 5 years ago | (#26016259)

Why are you assuming he's going to write desktop GUI apps? ... (or am I wrong?)

Re:How much do you want to learn? (-1, Troll)

Foofoobar (318279) | more than 5 years ago | (#26016321)

C#??? You list that as important to Linux development??? Are you serious, Mr Ballmer?

Re:How much do you want to learn? (1)

imbaczek (690596) | more than 5 years ago | (#26016375)

ever heard of this mono thing?

Re:How much do you want to learn? (1)

Ed Avis (5917) | more than 5 years ago | (#26016359)

Actually, there is a java-gnome interface that is reasonably complete.

Why not stick with C#? (5, Interesting)

Anonymous Coward | more than 5 years ago | (#26015979)

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

Learn C and Python (4, Insightful)

volsung (378) | more than 5 years ago | (#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.

Re:Learn C and Python (1)

erikina (1112587) | more than 5 years ago | (#26016047)

in a few weeks you'll forget Python's indentation conventions ever bothered you.

Agreed. That's about the time it takes, until the lack of good debugging will get to you. :P

Re:Learn C and Python (1)

volsung (378) | more than 5 years ago | (#26016227)

I know this is mostly a snarky comment, but I'm curious what you think is lacking in the debugging. I used to write a lot of Python (and hope to get back to it soon) and the debugging tools were never one of the things that annoyed me.

Re:Learn C and Python (1)

Yacoby (1295064) | more than 5 years ago | (#26016221)

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

What indentation conventions?

Re:Learn C and Python (0, Troll)

AuMatar (183847) | more than 5 years ago | (#26016261)

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

Yup, because you will have dropped the language entirely by then.

I've worked with it professionally. We had on average 4 bugs a week due to the indentation bullshit, each of which took multiple hours to debug. It was not just inefficient, it was counter-productive. Python is absolutely unusable on real world projects (any project where you aren't the sole developer) due to that indentation crap.

Mono (4, Informative)

reSonans (732669) | more than 5 years ago | (#26015989)

Mono [mono-project.com] could make the transition very easy for you, depending on what your doing.

Moderator abuse (-1)

Anonymous Coward | more than 5 years ago | (#26016051)

How much time do we have to wait for CmdrTaco to cave and put Meta Moderation back to the way it used to be? I'm sick of mod points being abused.

Mods: the correct moderation for this post is Funny, not Flamebait!

Re:Mono (0, Offtopic)

wmbetts (1306001) | more than 5 years ago | (#26016159)

How is this flamebait?

Re:Mono (3, Insightful)

SirLurksAlot (1169039) | more than 5 years ago | (#26016245)

This is being modded as flamebait but it is actually a valid suggestion considering that the OP is coming from a MS background. Mono will allow the OP to ease their way into development in in a 'nix environment without having to jump in headfirst with a language or languages that bear little semblance to the tools they're already using. It's all well and good to suggest that the OP start learning C, Python, Perl, $_nonMSLanguageOfChoice but looking at it practically it makes more sense to transition more slowly.

It is also worth pointing out that the parent didn't say anything inflammatory like "Don't, just stick with MS and .NET," or "Linux is for phags!!!!1" They simply offered another option with the suggestion that they start with something familiar. Disagreeing with someone doesn't mean your mouse should instantly jump to the flamebait or troll options.

What do you want to develop? (4, Informative)

kwabbles (259554) | more than 5 years ago | (#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++ (4, Interesting)

erikina (1112587) | more than 5 years ago | (#26015997)

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++ (4, Interesting)

dkf (304284) | more than 5 years ago | (#26016101)

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.

Re:C/C++ (2, Informative)

drspliff (652992) | more than 5 years ago | (#26016105)

As for C/C++ IDEs I've tried and disliked both KDevelop and Anjuta, Eclipse/CDE and Sun's netbeans based stuff are quite nice, but my poor little laptop doesn't like them.

I ended up settling with Code::Blocks, it's lightweight and native (C++/wxWidgets) and supports all the de-factor features.

Re:C/C++ (1)

Brandybuck (704397) | more than 5 years ago | (#26016163)

I'm not sure about netbeans, but the other stuff is spot on. Learn C++ (you'll learn C for free along the way). Then learn Python as a second language. Add in Qt (and PyQt) and you're set.

Re:C/C++ (1, Interesting)

Richard W.M. Jones (591125) | more than 5 years ago | (#26016165)

Are C/C++ really fast? Have you got figures to back it up? I'm not just talking about using C directly, but using C with some heavyweight library like Gtk which does its own very inefficient implementation of objects (glib), uses reference counting, and adds tons of asserts (which in a true HLL could be eliminated by the compiler). As Wikipedia would say ... [citation needed].

Rich.

Re:C/C++ (0, Flamebait)

walshy007 (906710) | more than 5 years ago | (#26016213)

Are C/C++ really fast?

if you have to ask that question, you will have to surrender your geek card at the door

as for using large libraries, if you don't need the functionality why use it? and if you do do you really think you can implement it in a more efficient manner quickly?

Re:C/C++ (0, Flamebait)

erikina (1112587) | more than 5 years ago | (#26016271)

Are C/C++ really fast? Have you got figures to back it up?

Give me a break. Of course it is. And no, I'm not going to provide figures for an accepted fact.

I'm not just talking about using C directly, but using C with some heavyweight library like Gtk which does its own very inefficient implementation of objects (glib), uses reference counting, and adds tons of asserts (which in a true HLL could be eliminated by the compiler).

Jesus Christ. Do you have any idea what you're talking about? You think if the detail is hidden from you, it doesn't exist. As for removing asserts and debug stuff, I can't think of an easier way than with C. You can even just use the preprocessor (#IFDEFINE) to remove the body of the function. Then let the compiler optimize out any use of it. Try that with Python/Ruby.

As Wikipedia would say ... [citation needed].

Rich.

w/e

Re:C/C++ (1)

Psychotria (953670) | more than 5 years ago | (#26016295)

This [debian.org] may be of interest.

Re:C/C++ (2, Interesting)

martin-boundary (547041) | more than 5 years ago | (#26016303)

You have a good point, but don't forget that C/C++'s (potential) speed gain is not just about writing faster functions, but also about controlling exactly the memory layout of the program. Even if Java or Python is using the same third party libraries as you might use in C, the data will still be wrapped in ungodly layers of memory management garbage. With a higher level language, there's no fine grained control of memory that can ensure that what's needed really fits in L1 or L2 cache.

Indirect answer (0)

Anonymous Coward | more than 5 years ago | (#26016007)

You need to be able to adapt to different environments. I have a funny position with 50% SQL, 40% beaurocracy, 10% emergency! That emergency component can be one of a number of different popular technologies (ksh, perl, python, vb, c, php, even cobol) and existing programs are not all trivial. Whilst my boss is always willing to pay for a short-term expert, I always insist on having a go and invariably get it done cheaper. My only exposure to VB had been changing some constants in a VB-embed-in-Excel ages ago and one month ago I had to write something from scratch (~1,000 lines).

So my indirect answer: whatever the job demands. Adapt! ;-) To build those skills, find something open source to contribute to if you please. Write many small programs for yourself from scratch in different languages (this is what I do).

My university training enforced the use of a very broad range of tools: Haskell, C, Java, sh, Perl, Python, C++, Erlang, PHP, SQL, and even some Tcl. I guess that has helped too.

Java (5, Insightful)

jarrettwold2002 (601633) | more than 5 years ago | (#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 (4, Insightful)

samkass (174571) | more than 5 years ago | (#26016057)

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 (1)

walshy007 (906710) | more than 5 years ago | (#26016249)

java as a language is decent, but some people hate having to have their code run in a virtual machine, and the performance penalty that entails.

Yes I know of gcj and that is coming along nicely, but still the predominant thing nowadays is still vm and JIT compilers.

Re:Java (4, Insightful)

binarylarry (1338699) | more than 5 years ago | (#26016291)

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.

Re:Java (1)

tyler_larson (558763) | more than 5 years ago | (#26016153)

Using Java avoids most of the nastiness of Linux while preserving a solid code base.

What's the "nastiness of Linux"? After years of development, the only difficult thing I've found in Linux (POSIX) development in comparison to Win32 is the fact that you can't wait on both mutexes and file handles in the same call.

Re:Java (0)

jarrettwold2002 (601633) | more than 5 years ago | (#26016257)

I consider a couple of things nasty about Linux, where quite a few may dispute this or consider it trolling.

I genuinely feel that we need something better than X. There are a few alternatives coming down the pipeline, but while "it works so don't fix it" stands by itself, it also doesn't adapt terribly well when you try to adapt to rapidly changing tech.

Also, I consider the dozens of available UI API's, to be a bit of a mess, do I use GTK/QT/*insert random API here*

Further, trying to maintain library compatibility requires intense efforts by developers and users alike. Upgrade one lib, you may break a build.

Finally, I still think that Linux has quite a ways to go in usability and configuration simplicity. It has come a very long way, but it also has a very long way to go to match its' OS brethren.

Granted all of this may be annoying or considered off sides, but it's what I hear consistently and what I've experienced over the last 10 years of using various distributions of Linux.

Re:Java (5, Insightful)

Matheus (586080) | more than 5 years ago | (#26016285)

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

Re:Java (0)

Anonymous Coward | more than 5 years ago | (#26016349)

What is this "nastiness" you speak of?

What do you want to program? (4, Interesting)

Hapless Hero (786287) | more than 5 years ago | (#26016021)

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.

Re:What do you want to program? (5, Interesting)

mebrahim (1247876) | more than 5 years ago | (#26016311)

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

A valuable skill (3, Insightful)

MathFox (686808) | more than 5 years ago | (#26016043)

Now Microsoft is on the way down and Apple and Linux are moving up:

learn to write cross-platform applications

It isn't that hard, just pick a programming language that's available on both Linux and Windows and try to write programs that work on both Operating Systems. It can be done with some care!

Re:A valuable skill (1)

Zironic (1112127) | more than 5 years ago | (#26016067)

as long as you're not making any system calls?

Re:A valuable skill (4, Insightful)

siride (974284) | more than 5 years ago | (#26016103)

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.

Re:A valuable skill (1)

Zironic (1112127) | more than 5 years ago | (#26016177)

Isn't using system specific system call libraries technically equivalent with rewriting everything for each system?

Re:A valuable skill (1)

binarylarry (1338699) | more than 5 years ago | (#26016315)

Isn't using system specific system call libraries technically equivalent with rewriting everything for each system?

No.

Re:A valuable skill (1)

Java Pimp (98454) | more than 5 years ago | (#26016239)

If you stick to the POSIX api there won't be too much trouble. Not saying that there won't be any but Windows does have somewhat decent POSIX compatibility support. Much of the low level stuff like sockets, file i/o, threads, etc... are there. I don't know anyone that wants to write even somewhat portatble code that tries to invoke system calls without some C runtime library that abstracts the OS away. Where you run into trouble is with the more "Windows-y" stuff like that ingenious construct that is the registry... blech!

Anyway, more than just a language that is available on both platforms, a cross-platform library like WxWidgets (which encapsulates more than just GUI components...) can make it pretty easy to do cross-platform applications in something like C++.

Re:A valuable skill (3, Insightful)

Jerry (6400) | more than 5 years ago | (#26016267)

Exactly, and the best tool to do that with is QT4 from Trolltech.

Using their new, free, Qt-Creator GUI RAD IDE one can write source once and compile for either Linux or Windows.
Qt-Creator is available for free on both platforms.

With careful use of compiler defines one can also, with the same code, write against Oracle and PostgreSQL in the same source and compile on either platform without changing a line of code.

Compile in the static mode and you won't have to worry about missing libraries.

Vala (1, Informative)

Anonymous Coward | more than 5 years ago | (#26016063)

Checked out Vala? Its syntax is similar to C#, but it performs somewhere between C/C++. It uses the gobject system to implement object oriented behavior and has bindings for many core open sournce libraries like gtk.

None. (4, Insightful)

grapes911 (646574) | more than 5 years ago | (#26016075)

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.

Re:None. (2, Insightful)

david.given (6740) | more than 5 years ago | (#26016167)

Damn straight. Focusing on one language will cripple you. Learn as many languages as you can; you'll be a better programmer for it. Learning Smalltalk taught me about OO. Learning Forth taught me about code factoring and reuse. Learning assembly taught me C (and learning C taught me assembly). Learning Python taught me about the joys of good libraries, and learning Lua taught me how awesome a tiny, fast scripting language can be. And learning Haskell taught me how much I have still to learn.

There are a lot of *very cool* domain-specific languages out there, most of them written in the 80s and 90s --- not much has changed in the world of programming languages in the past decade! --- and they're well worth a look. Even if you never write any production code in any of them, they'll teach you huge amounts.

Whatever language you like... (1)

myzz (690332) | more than 5 years ago | (#26016077)

For example, some of the following: OCaml [inria.fr] , Python [python.org] , Ruby [ruby-lang.org] , C++, D [sourceforge.net] .
But there are really lot of them [linuxlinks.com] available. What's best, depends on what you try to do and your taste.

C and assembler (1)

larry bagina (561269) | more than 5 years ago | (#26016091)

You'll be doing yourself a huge service by learning C and some assembly language (x86 is a turd, but ARM is fun). Perl, python, java, c#, javascript, vb, and other higher level languages are nice (excluding vb :-), but it's a good idea to know what's happening at a lower level, where there are no native regular expressions, no native strings.

Also, try a functional language (haskell, scheme, lisp, erlang) to get a different perspective on programming.

I See Your Problem (2, Insightful)

Nom du Keyboard (633989) | more than 5 years ago | (#26016097)

I see your problem. Instead of C# they should have been teaching you Visual Basic.

[Ducks rocks, stones, brickbats, flames, gunfire, flying fanboys, Steve Jobs, and moderately sized precision guided asteroids]

Not only does that let you write in Visual Studio as effectively as C#, but you with very little extra effort you can expand that to also write and maintain Microsoft Office applications including Access written in Visual Basic for Applications, legacy applications written in Visual Basic 6/5/4, and Visual Basic Script based code. And that gives you a wide field of expertise dealing in a lot of the existing code already out there.

Re:I See Your Problem (1)

Joebert (946227) | more than 5 years ago | (#26016151)

[Ducks rocks, stones, brickbats, flames, gunfire, flying fanboys, Steve Jobs, and moderately sized precision guided asteroids]

[rips a fart]

C, Java and Python. (5, Insightful)

rjh (40933) | more than 5 years ago | (#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.

Re:C, Java and Python. (1)

the eric conspiracy (20178) | more than 5 years ago | (#26016161)

C, Java and Python offers a good core suite of tools that cover most problem sets in a Linux environment. I might add a basic familiarization of Perl just because of the immense package library that will come in handy, and shell can be useful (and it doesn't take much learning). Learning shell programming will also make you a stronger Linux user in general.

Re:C, Java and Python. (4, Insightful)

TheRaven64 (641858) | more than 5 years ago | (#26016247)

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.

English. (1)

KimiDalamori (579444) | more than 5 years ago | (#26016125)

No, Seriously... The programming language you learned at school is worthless, and not just for Linux, either. Soon enough, there will be a new microsoft language, or at least a new version, and everything you now know will be deprecated. All languages are like this, more or less. What makes you a good programmer is your ability to understand computers and break problems down into well-designed systems; knowing a programming language is nigh-worthless, because all you need for any arbitrary language is a week and a manual. Just pick something. It doesn't matter which language. Or which IDE. Hell, you could start with bash shell scripting, it's all the same. Fiddle around with it, and once you got a feel for it, dive right the hell in.

Re:English. (2, Informative)

Chandon Seldon (43083) | more than 5 years ago | (#26016191)

There are some languages that legitimately aren't going anywhere any time soon. This is especially true on *nix platforms.

C, C++, Common Lisp, Java, Perl5, Bash scripts. They were here 10 years ago, and they'll be here 10 years from now.

Re:English. (1)

PPH (736903) | more than 5 years ago | (#26016355)

Which means we can rely on them for solving problems. Instead of spending all our time chasing the language du jour.

haskell (1)

Neotrantor (597070) | more than 5 years ago | (#26016133)

haskell plays very nice with most linuxes, but i would start with C first

C. Just C. (1, Insightful)

TimHunter (174406) | more than 5 years ago | (#26016141)

Every other (modern) language is a derivative of C. (Well, except for Lisp, but that doesn't get a lot of use in Linux programming.) Perl, Python, and Ruby are written in C. "C is the atmosphere we breathe."

Re:C. Just C. (1)

FlyingGuy (989135) | more than 5 years ago | (#26016193)

have to agree with the parent, C is the language of *nix.. I love programming in Pascal, I use Lazarus/fpc but when it comes time to get down and dirty, to get speed or to get perfect portability, I just open up pico ( don't care for vi or emacs ) and just start coding. I keep Google handy for lib references, create a simple make file and just go.

B.MSFT... (-1, Troll)

Maxwell (13985) | more than 5 years ago | (#26016147)

So you are getting a bachelors degree....in Windows? Go for the PhD in Windows Server. And how did you manage to avoid linux and java for four years? Is the school in Redmond?!?

Python is great (1)

pbailey (225135) | more than 5 years ago | (#26016157)

And the indentation will not bother you for long and it also makes the code easy to read and enforces others to indent their code properly too.

Also, there are lots of batteries included :-)

Cheers

I would answer to you but ... (0)

Anonymous Coward | more than 5 years ago | (#26016181)

I'm not too sure of what I think your use of periods to delimit sentences.

There is no such thing as C/C++. (4, Insightful)

loufoque (1400831) | more than 5 years ago | (#26016211)

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.

Workbench (1)

symbolset (646467) | more than 5 years ago | (#26016215)

Eclipse is nice. Some people like gedit, others various versions of vi or emacs.

/asbestos>

Oldschool (0)

Anonymous Coward | more than 5 years ago | (#26016225)

F95 .... Seems an obvious choice.

Ruby or Python or C (1)

Roadmaster (96317) | more than 5 years ago | (#26016251)

Don't let Python's weird indentation turn you off. Try it and you'll either like it or hate it. I know the indentation gives me brain cramps, but I also know that I'd learn it quickly should the need arise; and also, I'd rather learn Python from scratch than become proficient in Java.

Ruby is an awesome language to learn and work with, and is my current favorite; but you'll struggle a bit with the documentation, you'll live under Rails' shadow all the time, and its raw performance is still a bit on the slow side.

Both Ruby and Python cover a wide range of applications, from command-line scripting (where Perl would usually be the tool of choice) to GUI programming to web programming (think Rails or Django, the usual domain of PHP). I'd be wary of tackling a massively parallel programming project in either one of these two, though.

Other than those two, your C# and Java background will come in handy should you wish to learn C++ or C, which are powerful, if unforgiving languages that require more elbow grease to get things done than Ruby or Python.

Please try to keep up. (2, Funny)

John Hasler (414242) | more than 5 years ago | (#26016265)

Erlang and Haskell, of course. Just the other day here Intel told us all how only functional programming can save Moore's law.

Python, Ruby, Perl (1)

kabloom (755503) | more than 5 years ago | (#26016279)

Python, Ruby, and Perl all seem to have pretty much the same goals and the same uses, but with very different styles. Pick your favorite, and don't let anybody get you down about your choice. In the long term, you should know your way around all 3, because you need to edit or understand other people's code written in these languages.

Also, you should definitely know your way around in C, even if you don't enjoy programming in it, even if you don't want to use it for anything big.

this FP for GNNA.. (-1, Offtopic)

Anonymous Coward | more than 5 years ago | (#26016281)

you can. No, and the Bazzar very sick and its

recommended languages (1)

hedrick (701605) | more than 5 years ago | (#26016283)

I started to reply, and then realized that I agree with rjh. So I mostly second his remarks.

Some of it depends upon what kind of work you think you'll be doing. For prospective web applications programmers, I'd put PHP high on my list, and enough Java that you can look for jobs in both the .NET and Java worlds.

Note that Java is very, very similar to object-oriented .NET programming. If you're doing .NET the right way there's no reason to be scared of Java. .NET is a Java clone, changed just enough that it isn't quite compatible with Java. But in most cases the same facilities are there with the same names. The differences are primarily in the interface to the outside world: GUI programming for desktop and the way it interfaces to the web server for web applications.

In terms of long-term learning, the disadvantage of tackling Java now is that it's not as different from .NET as some of the other things mentioned, so you won't learn as much. This assumes you're doing good object-oriented .NET. But in terms of practicality, it's one of the important application development languages.

C++ / g++ (0)

Anonymous Coward | more than 5 years ago | (#26016289)

I don't do much practical programming [Just CS homework and the occasional toying with graphics engines] but it seems you can do anything with C++. the g++ compiler is easy to install and compiles c++ from the command line.

It depends (1)

Goonie (8651) | more than 5 years ago | (#26016301)

I suppose it depends where your talents lie, and where you want to end up.

That said, if you want to be a better programmer, doing some C systems programming is almost certainly a good idea.

Until you know C - and perhaps try a teeny little bit of assembler - you've not really got any idea what's going on under the hood in higher-level languages.

And, while you're at it, have a crack at implementing some of the classic data structures and algorithms. Have a crack at implementing a red-black tree, or, if you're feeling very ambitious, some very basic 3D rendering stuff (even 2D can be hard enough...).

In practice, you won't have to do this out in industry, but you will come across the occasional difficult problem, and the same skills will be very handy when that difficult problem arrives.

C first, then whatever you want (4, Insightful)

darkwing_bmf (178021) | more than 5 years ago | (#26016309)

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.

Best Tool for the Job (1)

Thangalin (848856) | more than 5 years ago | (#26016317)

Bicycles are poor tools for hammering nails.

For hardware programming, use C.
For speedy software, use C.
For math, try FORTRAN.
For portable network applications, use Java.
For web applications, use J2EE, Ruby, Python, or whatever fits the project best.
For text parsing, use Perl.
For games, use the native language of a suitable library (Crystal Space, Ogre 3D, SDL, etc.).
For manipulating files and piping program execution, use BASH.
For AI, try Prolog.
For database queries, learn SQL.
For solving the 8-queens problem, use LISP.
For enhancing your OO mindset, write in Smalltalk.

Get it? Got it? Good.

Fear of Whitespace (4, Insightful)

bitspotter (455598) | more than 5 years ago | (#26016335)

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.

C/C++/Python/Perl (1)

Ximok (650049) | more than 5 years ago | (#26016339)

I have found that having a solid understanding of C and C++ works really good for linux.

For fast development, I turn to Python (I also like doing my GUIs in python with my back ends in C)

Perl is good to know for general scripting, but pretty much anything you can do in Perl can be done in Python

Don't forget your Shell scripts like BASH. They aren't much good for programming, but are really good to know.

IndentationError (5, Insightful)

ksw2 (520093) | more than 5 years ago | (#26016347)

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 (5, Funny)

Anonymous Coward | more than 5 years ago | (#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?!?

I'd learn Cobol (0)

Anonymous Coward | more than 5 years ago | (#26016373)

http://www.theregister.co.uk/2008/08/14/cobol_california/

Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Create a Slashdot Account

Loading...