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?"
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.
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.
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
Hindi.
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.
http://www.mono-project.com/
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.
Mono could make the transition very easy for you, depending on what your doing.
Light the blue touch-paper and retire immediately.
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.
C/C++ are the languages you'd want to go for. They can do *everything*, have great support, are fast etc.
.. just use it.
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
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.
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.
Comment removed based on user account deletion
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.
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!
extern warranty;
main()
{
(void)warranty;
}
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
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.
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.
For example, some of the following: OCaml, Python, Ruby, C++, D.
But there are really lot of them available. What's best, depends on what you try to do and your taste.
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.
Do you even lift?
These aren't the 'roids you're looking for.
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.
"It's the height of ridiculousness to say for those 9 lines you get hundreds of millions."
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.
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.
Lagito ergo expectabo
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."
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.
"With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea...."
RFC 1925
"all of the above"
You really should have a good grasp of the concepts of programming languages, so that you can work with the bulk of projects that come your way.
A little scripting, a little functional, a little procedural, a little OO, all combine to make Jack a versatile hacker.
Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
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'm not too sure of what I think your use of periods to delimit sentences.
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.
Eclipse is nice. Some people like gedit, others various versions of vi or emacs.
/asbestos>
Help stamp out iliturcy.
F95 .... Seems an obvious choice.
... 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.
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.
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.
Comment removed based on user account deletion
Erlang and Haskell, of course. Just the other day here Intel told us all how only functional programming can save Moore's law.
Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
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.
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.
I was also curious about your "healthy fear of anything Java" .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.
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
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
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.
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!
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.
Any sufficiently advanced technology is indistinguishable from a rigged demo
--Andy Finkel (J. Klass?)
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.
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.
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.
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.
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.)
What is this "nastiness" you speak of?
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
Fight Spammers!
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?!?
http://www.theregister.co.uk/2008/08/14/cobol_california/
Have you ever actually tried using python? I am very much in favor of capital punishment for everyone who doesn't properly indent his code in other languages anyhow, so being forced to indent in python wasn't really a problem for me. I do not understand why people keep bringing up this argument, there are valid reasons why python was designed this way and it is something you get used to after 5 minutes. And if you really insist on using braces, you can still use them:
if button_pressed: #{
launch_missiles() #this line must be indented but slashdot does not allow me to
#}
karma police: arrest this man, he talks in maths; he buzzes like a fridge, he's like a detuned radio. [radiohead]
What will you make out of them? Webpages, client apps, games, or boring work applications?
THen consider the apis for what you want to do. Python is nice but it lacks severely in many gui apis compared to Java's swing or .NET windows forms.
If you want to get hired you need to focus on .NET or java as its what most employers want. A few will want experience with php for smaller websites if you want to start using that as many new graduates will not know it as they do not teach it that much yet at universities.
In regards to your comments on Java I have to say that Java is a rich language if you consider the depth of the javadocs where the apis are very rich. There is an api for everything and there are a ton of third party ones on the net unlike C# which everyone uses the MSDN to get their information.
http://saveie6.com/
The things that are likely to show up in the *nix world that aren't as common in Windows are Makefiles and various text editors (vi, emacs, ...); those and reading man pages.
I learned in Java (a pain to set up on *nix), learned fun OS-level stuff in C, and use C++/Python. I develop on Linux for a visual effects company; a lot of that sector uses *nix for software development.
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.
If you can't configure your editor to auto-convert tabs to spaces, and you can't find a different editor you can work with and you can't keep your hands of the tab key, then you can't work for me...
Sweet language, optimized for programmer happiness.
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."
C if you are programming for GTK or GNOME
C++ if you are developing for Qt or KDE
Python seems to be popular with both types of developers, but getting pyAwkward installed is usually annoying.
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.
Rampant bullshit. You'll get somewhat better performance out of HotSpot than the Microsoft or Mono CLRs--not that much better, but definitely better--but in almost seven years of using .NET regularly (I started in March '02), the CLR has not been the cause of a single crash in anything I do. "Good job of getting C# out the door" my ass, you troll, it's been just shy of seven years since its release!
(And if you want to be taken even remotely seriously, drop the childish "M$" crap.)
"You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
Using GTK+ under Python makes for a very nice, clean easy introduction. You can also use Glade to design an interface which is relatively familiar if you have experience with .NET.
I also recently started programming under Linux coming from a Microsoft oriented background, and found GTK+ and Glade to be the perfect stepping stone over to Linux development. I started with C, but Python is a fantastic language to learn and works very well with GTK+.
I'd say start in Python, Java, C, Ruby, C++, or Perl. In roughly that order of (my!, personal) preference. Just choose a language and go with it. BUT then, focus on reading other people's code, learning algorithms, and design patterns.
C++ is my favourite programming language, and it works equally well on Windows and on Linux. I recommend it.
Firstly - I would say that an experienced programmer will need to change languages - but a good programmer knows that there is more to programming well in a language than getting the job done.
Good code should be easy to understand, easy to maintain, efficient and use the facilities of the language.
On old and fairly outdated book - the UNIX haters handbook - has a lot to say about the faults of C and C++ see http://www.simson.net/ref/ugh.pdf
And the chapters on C and C++ make points worth noting about languages.
Whilst its easy to write code in C that does what you want when all goes well - rarely do you see good C code that covers efficient memory use, stops all possibility of buffer overflows, does good memory management and handles all exceptions well.
People who thing you can pick up a language quickly are either exceptionally good (and they exist but are not common) or they are probably not using a languages strengths but coding to a lowest common denominator.
Having had my RANT - I suggest Python.
Its up and coming. It covers windows and Linux and Mac.
You can do batch and web programming. You can do Open office programming (think VBA)
No language is perfect
I too am perusing an IT degree in a college that has a love affair with Microsoft, despite my complete abhorrence for the company and proprietary software in general.
In the Linux world you'll want to be familiar with C. But C++ is a perfectly good language for programming on Linux if you're already familiar with it. Since C++ is just an OOP extension of C, writing in C will just be a matter of not using the extensions. You'll also want to become at least a little familiar with bash scripting. Then you'll eventually want to have at least one of the higher level languages in your toolbelt, like Perl or Python. I've been programming professionally for 35 years now and on Linux for the past 10. Personally I prefer working in C++ rather than C, but ever since Microsoft cozied up to C++, that has been an impossible sell to Unix/Linux people. So, I've mostly been using C.
And then there are people who know that modern VMs may run code actually faster than C, because over time the VM has the opportunity to profile actual usage pattern and can do aggressive optimizations that no C compiler could dream of.
Free Manning, jail Obama.
Choice of language begins with the problem being solved. not the OS you happen to be developing on.
Are you just looking to tinker in the GNU/Linux world, or do you have a specific problem?
Simple Web/DB dev? -> php/js
Heavier Web/Server dev? -> Java
OS-related dev? -> C/C++
Heavy string processing? -> perl (or python is speed does not matter)
System admin-type problems? -> bash/perl
Cause after people get serious about security they will realize that only ADA has the stuff to make things right.
So... why would you need OS inside another OS anyway?
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
Come on, be a real programmer. Javascript is where it's at and you don't need Linux to do it.
Learn C and PERL. Trust me.
The whole Unix philosophy is that you *don't* use the same one tool for everything. You use the right tool for the right job. If you're doing text processing, you almost certainly want Perl; if you're doing extensive GUI work, you might make a different choice. In some cases you might glue two or three languages together in the same project. Evergreen is written in C and Perl. Large parts of the Firefox GUI are done in XUL and Javascript, but the base application is written in C or C++. Emacs is written mostly in Emacs lisp, but the core is done in C.
Doing everything with the same one tool whether it makes any sense or not is the Microsoft approach. If you're going to do Linux development, you'll do better to unlearn that.
Cut that out, or I will ship you to Norilsk in a box.
I agree, Python has developed a respectable object model and it has room for some functional programming.
Python has two^H^H^Hthree additional advantages:
1) Doesn't stand in the way of refactoring and reorganization as a project grows;
2) Balances support of exceptionally rapid development ("batteries included" === GREAT library support)
3) Straightforward mechanisms for binding to C and C++ subsystems: Low level work can be fast where necessary, while still allowing the high level executive integration that Python does so well.
Python's authors are conservative about introducing "new stuff just because they can", while being unafraid to deprecate and eventually drop suboptimal bits from earlier releases. So the language is both competent and predictable.
It is more mature, but C# fixes a lot of what is wrong in Java (lack of automatic boxing of primitive types anyone!).
To compare them, they are both completely adequate for the same problem domain. Also consider that Java 2 was a reboot of Java so you kind of have to go off of that as your starting point, with that taken into consideration, you really only have a few more years of maturity for Java.
I worked for severals years as a programmer in the unix world (mainly solaris with the occasional linux development thrown in) then made the transition to the windows world.
In both worlds C is the common denominator language. I was suprised by how much of the Win32 API is plain old vanilla C. So whatever you've learned about procedural programming, memory management and pointers comes in handy in both worlds.
Next up is C++. The OO support makes it powerful but its hybrid roots and expansive ambitions make for many pitfalls. In the Win32 world much of the code/library sharing is done via COM. In the unix world you'll accomplish similar reuse via pipes, shared memory and shared bindings (e.g., using the same compiler or a compatible one as everyone else).
If you can master C and C++ then the world is your oyster - you will rarely encounter a problem that you can't solve better than most because of your understanding of what is really going on.
Lastly I'd pick up Java and/or C#. Both are excellent languages that incorporate many of the wonderful concepts you studied in your programming languages and constructs class (or whatever it's called at your school). They're both extremely productive languages with rich libraries, excellent documentation, concise syntax and great futures.
Along the way I'd grab PERL and at least one shell language (I'm partial to bash but ksh and tcsh are others). For many tasks they're more than adequate and mastery of them will make you more productive - you'll quickly automate things that others will waste time doing manually.
Which brings me to my last point. Be a fan of tools. Tools are your friend. If an IDE is available use it. They don't change the algorithms but they can dramatically increase your productivity by reducing the time it takes to do things that programmers do all the time. Learn keyboard shortcuts/combos. If you're an emacs-er then know your ctrl combos. If you're vi* fan, know your commands. Learn to use the debugger for all of the languages you learn (if they have one). Learn your .rc files and fill them with time saving aliases and settings.
The more languages you know the better you will be at writing code. You will see patterns emerge. I can't tell you how many times I've seen bad solutions to problems come about because the people involved didn't know about the features of their language or their language's libraries.
Use your downtime to browse through API documentation. When you're find -exec'ing in a huge directory pull up another xterm and skim through a header file or man page on a library call. Most of the time skimming is more than enough to set you apart from your peers - you'll be able to lookup the details when you need them while they'll be wasting time building it from scratch (and creating all the bugs that have already been fixed in the api you're using).
...it's the only way to be sure.
No sig today...
This is generally only true if you let the Java VM use *FIVE TIMES* as much RAM as a C program. Java needs that much RAM to do efficient garbage collection. Using less than that causes more collection cycles to run, slowing everything down.
The other bad thing about Java is that if your program ever needs to use 300 MB, it will *always* use 300 MB forever after.
APL for sure... its easy to learn, fast and extremely useful!
It's a little off topic, but make sure you learn how to make man pages, Makefiles, deb files, et cetera...
Learn Common Lisp.
One of the oldest, but still far ahead in terms of language features than any other language.
But really, its a matter of what features YOU want in a in a language. Personally I have a hard time programming in a language w/o closures without going mad.
Since you already have the M$ stuff, I would say:
C, then Perl, then C++, then Java. You should also pick up Bash and Csh scripting. Make sure you read and absorb "Effective C++", "More Effective C++", and "Design Patterns".
For Web, learn PHP and some J2EE. I would get really familiar with CSS and Javascript, though. Try the different frameworks and common libraries as well.
Finally, learn some Lisp and Prolog. They will come in handy in the future. Also get familiar with Functional Programming. It looks like it's going to be all the rage.
"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."
Seriously? You might be in the wrong field.
Why bother with a higher-level language?
Assembly: Accept No Substitute
I sometimes code for fun, or when forced to.
But for 20 years now I've been a program/project manager instead. Lots - repeat LOTS - more dough.
And don't believe the shit that some guys wll say about 'yes, but contract pgmrs earns tons...' - the project manager always earns more, because he controls the budget.
Downside is you have to deal with managing..well, read an average /. thread and you'll understand...
THEY JUST DO THE RESEARCH. If this quality of cluelessness is typical of you, then you're one or both of 1) mommy's little dumpling; 2) somebody who should be on a different career path.
One thing needs to be understood however: the speed of a library like Gtk has nothing whatsoever to do with the speed of an application coded in a particular language (like C or C++). Don't confuse the efficiency of a language (implementation) with that of a popular graphics library coded in that language.
Have a look here for some benchmarks: http://shootout.alioth.debian.org/
On these benchmarks (and on Sometimes C and C++ end up as the fastest of the pack, sometimes they don't (contrary to the usual opinion of Slashdot commenters). Fortran wins several times. However, C and C++ always tend to be in the top-10%.
A rule of thumb I use:
(1) If it's floating-point centred, and especially linear-algebra centred (Linpack, LAPACK, Eispack), Fortran is likely to be fastest, certainly not C or C++. However ... Matlab, Octave, Scilab etc. tend to be quite competitive when the work can be formulated in terms of high-level matrix operations (so that the overhead caused by the interpreter can be made up for by the excellence of hand-optimized assembler libraries). Besides they get the job done in one tenth of the time it takes to code from scratch in Fortran, and you get a far better chance of getting things right the first time.
(2) If it's centred on manipulating data-structures (trees, heaps, allocation. eallocation, moving, traversing, counting, coding) which relies mostly on pointer juggling, then C and C++ tend to be fastest.
(3) For everything else ... try to find real-world examples.
>> That's because you can get within a few percentage points of native code performance with Java's VM.
In theory yes, in practice, you pay a significant performance and resource penalty. Not that it matters if you're writing some utility that is seldom used, or know that your users are going to have plenty of hardware to run your programs (Eclipse comes to mind).
>> 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.
C++/Qt is just as productive as Java or C#, without any of the disadvantages (resource use, performance, interface with C code, etc).
More like hours? I was used to it before the end of the tutorial. It's not something you think about, really.
Any useful Python IDE does it automatically (see my list of IDEs later in this thread); if you use vim you want :set sts=4 ts=4 et sw=4
(and vim already comes with a fine indenting/syntax highlighting module for Python).
It's rare that you're presented with a knob whose only two positions are Make History and Flee Your Glorious Destiny.
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.
Learn C for when you code needs to be fast. Learn Python for when you need to be productive. Then you can learn how to write the code that needs to be fast in C and have it run within a Python app.
lack of automatic boxing of primitive types anyone
I'd agree with you but those were both fixed in Java 5.
About the only thing I'm aware of that Java is really missing relative to C# is LINQ (not that that's by any means a small thing)
I'm going to be radical here: you've got a good set of tools under your belt, but need a toolbox to put them in. Now is a good time to learn bout make, autoconf, libtool, and package managers to bundle your software. Or the CPAN Perl module build systems, or Ant. But learning a large scale capable build system may stand you in better stead in the long term than learning yet another language, because you will have to package your toolkits. Learning a good one will prevent you from inventing yet another.
If I see one more "let's replace 'make' with our own in-house system that only one person understands and never will work right", I'm going to line them up interlaced with the "let's do source control with our own in-house system" idiots and give them snorkels so their brains can get some oxygen from here they stuck their heads up their asses.
I'd like to hear more of his healthy fears of Java. I've some experience with a lot of java frameworks and I know a lot of things are really anoyeing but as a whole, the java platform is very vast and works. If I were to make a desktop application, I'd try something blazing new (in the productiveness front) like griffon + javafx.
I know you hate Java, but do reconsider. Since you have established your .NET skills, you will probably cover the vast majority of the universe of software job opportunities if you can add Java to the list. Of course there is a lot valid stuff outside of .NET and Java, but those are the dominant players, professionally speaking.
You won't be locked into the Java language. The Java ecosystem is much larger than that: the Java class libraries, of course, but also Spring, Hibernate, J2EE, the Apache goodies, Eclipse, debuggers, profilers, monitoring etc. If you expect to integrate your software with a future unknown codebase -- perhaps by acquisition or merger -- there is a good chance it will be Java-based.
Ruby, Python, JavaScript and other languages do run on the Java JVM, but I suggest taking a look at languages that really sprung up from Java, like Groovy and Scala. Groovy appeals to the dynamic typing camp, and Scala to the static typing camp. The advantage with these languages is that they integrate into the Java platform just about as well as the Java language itself. You can write real Java-visible classes in these languages that integrate seamlessly with the rest of the Java platform, including annotations, generics and enums. Other languages can run in the JVM and call Java classes, but it's likely a one-way street. Java classes cannot call, say, a JavaScript class (JavaScript has no classes!).
My own experience has been with Groovy, which claims Smalltalk, Ruby and Python as its inspiration. It's much more productive, powerful and readable than Java. Yet it integrates well with all things Java. And yes, it's production code deployed on Linux.
Yes, you're going to make things harder on yourself if you try to use C#, or Visual Basic, etc.
And yes, knowing C will help. A lot.
But the answer is the same, no matter what platform you're on. The answer is, "It depends what you want to do."
For instance: It helps to know C, but if you'll be doing, say, web apps, it would be ludicrous to be doing it in C. If, on the other hand, you're doing things with hard realtime requirements, C might be the upper end of what you'd use. And there's all kinds of things in between.
Don't thank God, thank a doctor!
On top of that, it doesn't take much juggling to get your app to run on multiple platforms.
One would think, right? But it's actually NOT that much easier to get your app running on multiple platforms. I shall describe to you three projects that I wrote in C, Java, and ObjC respectively.
The first app was written in C, it was a webserver. It actually was really easy to port, because I used basic C libraries. About the only problem was that on Solaris, I had to include some libraries that I didn't on the other *nixes. The other *nixes? Linux, OpenBSD, and Mac OSX. It all worked like a charm, no cross platform issues. I have no doubt it would have run just as fine on SFU (services for Unix) on Windows, or if one had the right compiler, like djgpp, it would work just fine as well.
I wrote a raytracer in Java for a graphics course. I already had the vector class, which took care of most of the code, so most of was super easy to write. Just make a vector, cast the ray, just a bunch of math that I had already written into Vector and Matrix libraries. There was just one problem. How do you draw a pixel in Java? Oh yeah, that's right, there is no way to do it. Some implementations allow you to do a drawRect() of size 0,0, but others interpret that as a "draw nothing"... thus in order to actually draw my image correctly across Linux, OSX, Solaris, and OpenBSD, I had to draw 4 times as many pixels as I had to, by doing a drawRect large enough that it would actually draw something on each one of the OSes. And these are all POSIX systems? WTF?
Last, I got sick of the performance of my Java raytracer, as well as the inconsistent undefined behavior of drawRect() with a height/width of 0,0. So, I ported my raytracer to ObjC. I started with the vector library, things went fast, and easy. It also worked perfectly on OSX, Linux, OpenBSD and Solaris. It used SDL for the graphics (which actually has a defined behavior that allows one to draw one and only one pixel). And the standard POSIX thread library to make it multithreaded to draw even faster.
Point of all of this: The LIBRARY SPECIFICATIONS are the most important thing to be defined across the board. Any unspecified behavior in your library results in being able to write code that won't work on a different implementation of that same library. Also, without a Java VM, the java raytracer wouldn't run on that system, which means it is no better than requiring the ObjC library, and SDL library.
WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
What I discovered after all my coding years is that you need to learn a lot of different languages, since some are suitable for given problems and not for other ones.
Learn ASM, C, C++, Java, HTML+Javascript, Python, etc...
The more languages you master, the more jobs you can pretend.
Also, learn the eXtreme Programming concepts:
- TDD (Test Driven Development) = write your tests before your code. It's really important !!!
- use source control for each of your projects
- practice pair programming, you'll progress faster
Once you'll master this methodology, you'll be in the 10% of the good coders.
As others have said, language isn't so important. That said, I can only recommend the tools I'm happy with: the Ganymede version of Eclipse for C++ with the Subclipse plugin (for Subversion). Gcc/G++ works well for me, though you can also use icc if you like. Other developers have told me that the Python version of the Ganymede Eclipse package is very nice as well, but I stick with C++, so that's only what I've heard. Find tools you like to use for development, and learn the libraries. You may want to take projects you developed for Windows in school and port them to Linux. That should give you an easy start.
Depends what you want to contribute. Most languages are used in the Gnu/Linux environment depending on application.
That said, I am not a professional programmer and don't program for money, I have a day job that pays very well. I do enjoy programming though and am currently constructing an accounting/business management app for KDE and using QT4 programming in C++.
My test bed will be my own company and will eliminate my reliance on QuickBooks and winblows altogether. Once in a useful and productive state I will release it to the community for others to use most likely through sourceforge.
This is just my way of also contributing to the cause along with all the other programmers out there that have contributed many top notch applications I use everyday such as K3B, soundjuicer, xine, firefox, & KDE.
Good luck and welcome to the good side of the force.
"Suppose you were an idiot...and suppose you were a member of Congress...but I repeat myself." Mark Twain
Look at the project and figure out which language is best suited. Procedural or OO? Compiled or scripted? If you don't feel comfortable enough with the language best for the job, practice it.
I agree.
My automatic answer to the the question would have been Java and Perl.
Because that's what I use.
Knowledge of C and, even better, assembly is a serious plus.
Then again it largely depend on what you're doing...
Desktop/KDE: C++
Desktop/Gnome: C
Server side: Java
Anything real-time: C (or C++, maybe)
If it wasn't for KDE, I would advise steering clear of C++. IMHO, it's a steaming POC that is neither as easy as Java, nor as close to the metal as C, or, for what matters, Java (Java remains a seriously *simple* language, in that the mapping from code to assembly is extremely straightforward).
I would personally avoid doing any long term development in Perl (which I love), Python (which I don't like), Ruby (which nobody had as much as heard of until RoR came up, which for some reason was based on the most obscure language this side of functional programming), or any other "scripting language" as some call them. The reason for that is that while they'll allow you to get something up and running quickly, the absence of strong typing make it a pain to maintain.
Having said that, knowing *one*, say Perl or Python, is an absolute requirement for all those short term tasks.
Oh, yeah, and this being Linux means Bash, the bane of my life, is also of course a necessity.
Off topic, but still, my wishlist:
- C is in dire need of a face lift; we don't need header files anymore (my box can compile a 1M LOC Java project in 2 minutes), classes (and just classes - I like to encapsulate things), no pointer arithmetic (get on with it, compilers do it better than you, showing off is not a reason), arrays that have a length (the whole strncmp thing should be a hint: functions need it anyway).
- a command line language that doesn't suck and has no pretense of becoming an app one. I vote TCL (I have fond memories of that one). With syntax expansion, too.
I have seen a lot of people recommending C/C++, but I that would not be my recommendation. If you want to be able to dive in and see quick results, I would choose a language that you are familiar with that has as little change as possible when switching between windows and Linux. Some of my preferences would be Java, Python, or C# (with Mono). Also, I think it is a great idea to choose some cross development libraries like Qt or Gtk and begin your development in your familiar Windows environment, and then attempt to build and run in Linux.
On the spectrum of languages, C# and Java are really pretty close together...
Don't think of this question like "I want to learn the uber-development platform again, only on Unix instead of Windows this time." For one thing, it doesn't exist (except in Eclipse-land maybe). Unix is all about combining tools and using what is to hand. There's more than one way to do it. In fact, your choices are basically combinatorial as far as what pieces you put together. Don't think of that as a paralyzing decision point, just pick something and start ripping.
For another thing, you will get a lot more out of programming even in the C# environment if you broaden your perspective. Learn some dynamic languages like Scheme or Ruby, learn some new programming philosophies like functional or declarative programming. Learn vim or emacs (I'm an Emacs person, but to each his own), typing text into files, programming without a net.
Just like you can see the von Neumann architecture poking out through C, you can see the Unix way poking out through Perl. You might consider starting with Perl on Unix. You will be able to write powerful programs quickly, you'll have an excuse to get started learning regular expressions (Mastering Regular Expressions is a classic), and the Unix system calls are practically written into the language and docs. Learning Perl, from O'Reilly, would be a good place to start.
I would also strongly recommend learning the command line and bash scripting, not necessarily for the syntax, but for pipes and the core utilities. Classic Shell Scripting, again from O'Reilly, is a terrific introduction.
Q: What did the comedian say to the crowd?
A: If I knew, this joke would be 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
reSonans joke about the dead Mono fiasco flew right over the idiots with mod point heads...
Java was designed for networked applications.
It shows because the Java stack and libraries written with it rarely have built in flaws that allow computers/servers to be compromised.
So there's one reason and it's a big one if you think about it.
Mod me down, my New Earth Global Warmingist friends!
Install the latest Ubuntu, you can then install your favorite text editor, I prefer "kate"
Create a custom Makefile, don't use variables and macros, just keep it simple,
target: dependencies
Language of choice is C/C++. Haven't tried all the plethora of fourth generation languages yet.
If you want to check for memory leaks, valgrind is a great tool. You can use valgrind and kcachegrind to get a nice gui view of which parts of your program is using the most CPU time.
A great debugger is "kdbg", setting breakpoints, watches, single step etc.
That's all that I've found so far. No sense using Microsoft bloatware.
The other bad thing about Java is that if your program ever needs to use 300 MB, it will *always* use 300 MB forever after.
I am far from being a Java fan, but... if you use 300 MB in a C program, it will *always* user 300MB forever after too. free just returns storage to the process heap, for eventual re-use by malloc within the same process.
That "Healthy Fear" is not very healthy. You were taught that fear because Java is the main competitor to .NET. Just to be clear here, I make my kip as a C# developer and if I could I would trade up to Java. The deeper parts of Java are muddy and nasty, but on the other hand C#'s ability to never name a function properly bothers me every day. Go learn Java.
Slashdot, where armchair scientists get shouted down and armchair theologians get modded up.
I thought that the operating system doled out the memory... that's the reason that once Firefox uses 300 MB of memory, it will always use 300 (on windows, I haven't bother to check under any other OSes). So, even if the JVM deallocated the GC'ed memory, Windows will keep that chunk of memory earmarked in case the JVM asks for it again. All that being said, you are correct, everything is a time/space tradeoff and the logical choice is usually to trade off space for time.
If I mod you up, it doesn't necessarily mean I agree with what you've said, sorry.
...so learn JavaScript (and HTML and CSS). This is a highly useful and marketable skillset,
Fun?
Sig this!
Asking a software developer what programming language he uses is like asking a fiction writer what kind of typewriter he uses.
I personally like the idea of using .NET with mono. Even though there are some (ligit, and some useless) arguments against it, I would suggest you try it until you are comfortable moving onto something else.
It would be wise since you are coming from that very background.
Spend all your freetime learning how to use MUSH code. If you dislike Python's identation now, you may develope a strong need to explore it after dealing with the lack of whitespace that is MUSH code.
If I could go back 15+ years, I would have spent more time learning about relational databases and SQL specifically. Back when I was in school, we wore an onion on our belt because that was the style. We also cut our teeth on Pascal, then C, and eventually a little C++.
My first job was writing business applications for SunOS (yeah, pre Solaris days) using Oracle as the back end. I knew C well enough, but had virtually no experience with relational databases.
The VAST majority of the developers I know (including myself) write business applications. You know - billing systems, A/R, A/P, G/L, etc. I have written very few systems that did not use a database.
You may end up writing kernels or device drivers or something else, but the chances are that you will end up working in the IT department of some company and will need to know SQL, T-SQL, P/L SQL, etc. And trust me, MS Access doesn't count.
So yeah, pick a language, C or C++ - it doesn't really matter. But I would be inclined to say that you should also pick a database and try to write some basic applications that read and write data to a relational database. You'll be glad that you did later.
Just my 2 cents.
Tcl + Gnome/GTK+
It is very nice.
nuff said
There are, frankly, a LOT of extremely mediocre programmers on the market, and a common attribute they share is that they only know Java.
Hear hear. Another common love of the run-of-the-mill Java crank-turner is Eclipse and Maven. These folks are the Wal-Mart greeters of the software development world. Java as a language is okay enough, but the ecosystem that has settled around it is just so Velveeta-on-Wonderbread *average*!
Start with Fortran. After all, you can write bad Fortran code in any language!
The GNU compiler suite includes a compiler (gfortran) that supports F90/F95 as well as the older F77 that everyone loves to hate (even though most everyone who screams about it has never actually strong used it, and F90 is far nicer and more modern language than F66. Computed GOTO's are still fun though...). Furthermore, with the OpenMP extensions that gfortran includes, you'll be running parallel code in no time, and OpenMP actually works now with multi-core CPU's, unlike those functional-language evangelists' favorite languages...
-JS
Vanity of vanities, all is vanity...
I am not a programmer for my job, but a physicist. In the last 8 Years sice i started researching, i have writen tons of programs, and none was restricted to a single platform. For me structuring your toolset in a way that it is easy to change between Windows and UNIX-like OSes gives you the the biggest freedom to change something you dont like.
The cross-platform scripting languages which i used sucessfully:
Jython, tcl, matlab/octave
Windowing Toolkits:
Java AWT/Swing, tk, matlab (i dont recoommend to use matlab for guis, but it *is* cross platform)
Medium/low layer
Java, C (that is ANSI-C)
The stacks i used most successful are:
-Jython-Java-C (most elegant solution)
-Matlab-(C) (C was not necessary to use often, just to fix their DAQ driver)
-tcl-c (quick solution, but calling to octave as external program to do some mathematical tasks)
What i deprecated:
-Perl-Java-C
Many opinions abound about languages, but here's my take:
Ruby Neural Evolution of Augmenting Topologies
Considering your background the easiest migration path is to use Java as the language and Netbeans as a development IDE. Migrating from Java to C# is easy since C# learn a lot from Java. Netbeans is a great IDE that you can download from www.netbeans.org. It has many of the things you are used to in VS. That IDE supports many languages so it will help you develop C/C++, Ruby, Python, JSP, SQL, XML, HTML, XHTML, JavaScript, ... since those and other languages are supported.
I went the other direction. I went from a company that was pure UNIX/Linux to a MS shop. I had to learn C# and VS basing it on my Java + Netbeans knowledge. The transition is pretty easy and I continue to use both platforms.
I've hired quite a few people for developer jobs (which I would assume is your goal). When I'm interviewing a candidate I want to hear them say that "programming is programming". Syntaxt changes, but the fundamentals remain. You need to be able to adapt to the languages used in your projects, and adopt the new ones that evolve.
That's because you can get within a few percentage points of native code performance with Java's VM.
Hahaha! Oh you're funny. Show me an H.264 decoder written in Java and let's do some benchmarks.
Java should be a relatively easy step if you've learned the details of C# or VB.NET on any .NET Framework because similar concepts carry across both. The inverse is true too.
Sun Microsystems Microsoft Corporation
Java syntax C# syntax
Virtual Machine Common Language Runtime/JIT Compiler
Java Byte Code Microsoft Intermediate Language
Java Foundation Classes Framework Class Library
C++ kiddo became old-fashioned?! I'm getting old :(
Seriously...if you have spent any time at all in a Linux environment then you know that you just use whatever tool is easiest/best for the job at hand.
The very fact that you are asking the question shows you just need to strip Windows from your box and run Linux for a year or so until you really _get it_.
Or maybe you just like asking questions in 'slashdot style'...
One argument is that "that's what employers are looking for". If there is a glut in the supply market for that skill, you can guarantee that
So paradoxicially, it may not be the best choice to be to heavily invested in the "mainstream" choices.
Ruby Neural Evolution of Augmenting Topologies
From my local online service: java : 52% c++ : 26% perl : 6% php : 9% python: 4% others: didn't look. So your choices are: Java, even though it is an clumsy, slow and non-portable language. c++, particularly if you are using Linux because it compiles cleanly and is built in.
Why not invent your own language? It's easy (every CS student can do it, albeit I'm not so sure about IT students). You can invest your time in learning about compiler design rather than about a particular language, and then go forward and build your very own programming language.
This experience will introduce you to the most important difference between the GNU/Linux and Windows worlds: the GNU/Linux people are creative, but the Windows people expect everything to be provided by their vendor ready for consumption.
Learn Factor and you can write cross-platform programs in Linux, *BSD, Windows, Mac OSX with the exact same code.
Python for anything where speed or concurrency aren't absolutely critical, Erlang for anything where speed or concurrency ARE absolutely critical, D for low level stuff like graphics or writing python acceleration extensions, C for maximum portability.
But... the future refused to change.
Someone above said a pro programmer can use any language. That is true. It is what you do if employed by the hour. For stuff you want to do, you should choose your own favourite language.
I also endorse someone's comment above that you should have experience programming in a mnemonic machine code, (aka assembly). Personally, if I couldn't find a Pascal compiler for the job, I wouldn't bother thinking about the algorithm.
Almost, but not quite. The GNU C library, for example, will use mmap to allocate larger requests, and, when freed, will give that memory back to the system and allow the process to shrink.
Consider RealBasic.
It compiles to Linux, Windows and Mac.
Comment removed based on user account deletion
.
Face it, if you stay in the IT realm, you'll be programming app servers and some web dev.
8 out of 10 *enterprise* situations the language used is Java. I doubt you'll see much PHP/Python unless you *don't* want to make money.
.
Unless you want to do h/w drivers, kernel dev, full integrated KDE/Gnome apps, or use all FOSS, then C is the way to go.
The key question is why do you want to learn to program on Linux?
If it's to further career goals, then it would be best to look forwards and not back. And almost all of the suggestions are looking back at the past.
The future? XRX - XQuery/REST/XForms (and XSLT).
Master that and you'll be able to deliver apps faster than the most rabid Rubyites and will be much in demand if a career is what you are after.
Fact is, if you don't know XRX, then you won't be working for my firm. ;-)
Commonly used languages never seem to die. COBOL is a good example, and a lucrative one, though probably not a lot of fun these days. C is partly there as well, though is good for foundation knowledge or if you have a hankering to work on Linux internals. But it's all past history. Look to new technologies, functional languages, concurrent languages (Erlang comes to mind) and stuff that makes XML easy and productive to use.
It'll be more fun, and more lucrative too, I'll bet.
My 2 cents worth.
Chaeron Corporation
j/k C the way it is
GENERATION 25: The first time you see this, copy it into your sig on any forum and add 1 to the generation.
You should have just create a BufferedImage, you can then call setPixel on the "WritableRaster" you get from it. Then you render the whole image to the screen at once.
I don't define myself as "hesitant" to use manage code, I define myself as "where's my pointer?" You're right, I'm generally skeptical at best of new trends. My job isn't to be trendy or try new stuff - it's to solve problems in something standard, efficient, and sustainable. C has proven a language capable of nearly every practical task thrown at it for the last 30 years. It is easily the most portable ever created. Why would I want to switch?
Yes, there are those that say I shouldn't be tied to a programming language, because they come and go. That's absolutely true, but I see no reason to use new tools if they offer no substantial advantages to my problems over the old toolsets.
I'm sorry, I can manage memory and manage pointers. I do not need to incur the penalty and nuisance of using java. C very closely resembles how the underlying machine works (at least for Von Neumann architectures), and I think that's a very good thing for programmers.
Actually, it probably has more to do with braindamaged design decisions like giving every single object an extra word in case somebody ever wants to take a lock on it. There's no way a decent garbage collector would have that much overhead.
You've obviously never used Lisp.
Honestly, all the Windows code I've written is either C or C++. Including object-oriented stuff like stacks, queues, vectors, lists, etc.
Granted, VC++ (as of VC8) lacks C99, it still compiles ANSI C89 code well enough. But I honestly am going to write a script to convert cl.exe options into gcc/mingw options as gcc/g++ pwns VC++.
You are limited to ANSI C though. And C89 at that.
While on the topic of Windows, I hate how *everything* that requires a reference in Windows is basically a void *. What happened to type-safety, Microsoft? THen again, I wouldn't be surprised.
It's sort of like Java in that I fucking hate it (no pointers, gotos, templates (not generics), multiple inheritence, the other fun stuff in C++) but I find ways to work with it. I get the familiar PHP dirtiness feeling when even *looking* at it though.
Anyways, program in C/C++. For simple things I use C. When I'm too lazy to implement half of STL in C, I use C++.
In programming contests, I use both.
Be careful though. Pointers and STL spoil you :P
proud caffeine whore
...i hereby invite you to join our Jump'n'Run game project "BlinkenSisters". I think, participating in an already working project makes quite a lot of sense, because there's already a team that can help you out when you're stuck.
We do the core engine in C/C++ with the SDL library, use CMake as our *nix build system and also have (a few) Perl scripts around.
As for writing portable code: The game is supposed to run everywhere, my team and i can show you many pittfalls of non-portable programming (yeah, we done them all). We have a wide range of sub-projects: From enhancing the engine to scripting to writing new, small tools.
If you're interested, email us at:
team AT blinkensisters DOT org
Look, this thing is totally safe! Built it myself, you know. You just press that button like this and then turn that lev
This is not hard. C++. Do some investigation and play around a bit. There is no superior.
(lack of automatic boxing of primitive types anyone!).
The autoboxing/unboxing was included when Java 5 was released over 4 years ago.
And that particular syntactical sugar is nice, but was never a show stopper.
"If they have both, tell them we use Linux. And if they have that, tell them the computers are down." -Dave Chapelle
Haha, you so funny!
Ever heard of... bluray?
Look it up, newbie.
Mod me down, my New Earth Global Warmingist friends!
By your logic, why not just use assembly?
I mean, I know how to manage registers, allocate memory, call interrupts, etc.
I'm sorry, but these high level languages abstract a lot of power away.
Assembly is actually how the underlying machine works and I think that's a very good thing for programmers.
Mod me down, my New Earth Global Warmingist friends!
Using Java avoids most of the nastiness of Linux
I wonder how that's "insightful", and not "flamebait" -- I consider Java to be the nastier of that pair. A quote I've always liked: "Saying Java is great because it works on all platforms is like saying anal sex is great because it works on all genders."
That said, Java is cross-platform, and has had a lot more practice at it than C#. It seems to be trying to make it difficult to not be cross-platform. But I don't think that's a huge concern, these days -- Python and Ruby have decent Windows versions, and there's plenty of cross-platform toolkits for C/C++.
As a user, I only really appreciate Java programs when they're developed by people who didn't care about portability, so it's really fun to find out that they just work on Linux -- but if you're designing something to be portable, that works well.
Don't thank God, thank a doctor!
Like others have said, learn C/C++ and how to use the compilers (gcc / g++). Don't bother with Fortran -- that is more or less a dead end. Learn make. Learn how to use libraries supplied by others. Then learn how to make libraries of your own to complete the circle. Once you have mastery of the *nix tools that allow you to do what you want then you should explore other languages and you will have a better understanding of where each language lies in the bigger picture. If you want to do HPC you might stick with low level compiled languages perhaps together with MPI or some other IPC glue, but if you are interested in GUI programming that decision may be reversed abd python or similar my be best. It is better to first learn the landscape than the details. I would argue that learning a language is second to learning the environment. For example, once you learn how to program sockets to communicate between programs, that skill is language neutral. One thing is certain -- there is no substitute for experience. No matter what you decide to do, keep at it. The more code you write, and the more code from others that you work with, the better you will be at coding.
Too bad for your rant that opinions are like assholes, and so are you.
I genuinely feel that we need something better than X.
I agree -- although X itself is trying to become "better than X" as well.
However, I'm not convinced that Windows has got this right, either. The closest seems to be OS X.
Trivial example: I have two monitors. My laptop's monitor is 1920x1200. My external monitor is 1920x1080. On Linux, this is all I have to know -- if I want a game to run on my external monitor (which is quite a bit bigger), I simply set it to 1920x1080. If I want it to run on my laptop's monitor (say, at a LAN party), I set it to 1920x1200.
On Windows, if I set a game to 1920x1080, it will run on the "primary" monitor -- by default, it will be stretched strangely on my internal monitor. I have to make the external monitor the "primary", thus putting the taskbar there. Which is stupid -- I have more vertical space on the internal, and that's where the taskbar lives on Linux.
One more, while I'm at it -- on Linux, I simply installed. I don't think I had to do anything to enable the drivers -- if I did, it was a few commands which are identical on all nvidia systems. By contrast, on Windows, nvidia was not allowed to distribute drivers for that particular model, and Dell only had Vista drivers on their website -- I had to actually have a Dell tech feed me links via chat.
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*
I don't know. Do I use Swing/SWT/*insert random API here*
Use whatever you want -- it's called a choice, and as a developer, you have even less of an excuse for complaining than an end-user does when presented with the GNOME/KDE question.
As a KDE user, I have a little setting I can set -- enabled by default -- which applies my QT themes to GTK+ apps. I'm sure there's something which does the reverse. So end-users don't have to care what toolkit an app is written in -- it will likely just work, and look like it's supposed to look.
Further, trying to maintain library compatibility requires intense efforts by developers and users alike. Upgrade one lib, you may break a build.
This work is also mostly done by distros.
I consider this to be a much better situation than Windows or OS X. On Windows, everything is statically linked, so if there's a critical bug in a given library, you have to wait for each application to update. On OS X, libraries are either distributed by Apple (so you have to convince Apple to force an upgrade, and you've got the same problem as on Linux), or they're bundled inside the .app folder, meaning that while you probably can update them all, it's not going to be fun.
Both the Windows way and the OS X way also waste disk space and bandwidth -- sometimes insignificant, sometimes not. Just look at the OS X download of vlc, and compare it with the Ubuntu vlc packages.
Compare this to Linux. Critical vulnerability in openssl? One apt-get command and it's fixed. For everything.
I'm sure I'll be modded offtopic as well, but especially for development work, I am much more comfortable on Linux.
Don't thank God, thank a doctor!
Only if the memory you allocate is in large chunks. If it's in small chunks, but a lot of them, they you're screwed. Also, you memory will most likely get fragmented so that you waste a lot of it in odd-sized chunks that don't quite fit your allocations. This will also slow down your allocations and frees so they are far slower than GC performance.
Which is why you use garbage collection and 'memory hungry' environments like JVM for long-running server programs. Or you really, really carefully write your code to really carefully make memory allocations.
I would say, yes, Java is particularly nasty, and it's good to have a healthy fear of it.
It is the COBOL of this decade, just as PHP is the COBOL of the Web. I am sure my brain would be better off not knowing it.
I'll admit that this is an opinion, not a fact. It is, however, a strong opinion, and I'll continue to tell everyone who will listen. And it is a fact that it is better to learn more than one language, even if your day job demands exactly one.
Don't thank God, thank a doctor!
if you use 300 MB in a C program, it will *always* use 300MB forever after too.
Depends on what you mean by "use." If you mean it will have mapped that much into its memory space, that's usually true if the allocator is sbrk() based. mmap() based allocators, on the other hand, can return the memory to the OS.
However, "use" even in the sbrk() case doesn't mean you've used 300MB of RAM. If you never touch it again, it'll be paged out to swap or, if the allocator is written in this way, not have any memory backed to it whatsoever (one can use mprotect() to indicate a range of memory has no access permissions, for example). Yes, those 300MB will be in your address space, but address space != memory.
"I've been cooking pastry- now I would like to do main dishes- what ingredients should I use?"
What exactly do you mean by "developing for Linux"? Writing drivers? Expanding kernel? Writing desktop apps? Web sites? Command line tools? Distributed programming on Linux cluster? Other, whatever that might be?
Until you answer this question you will get answers all over the map.
Desktop applications- you'll likely use C++ (with some C where APIs isn't properly wrapped by a miriad of OO wrappers for Gnome, KDE or cross-toolkit), however there are great apps in Python and other scripting languages. For lighter weight web site (not necessarily in size, but in functionality) you'll likely use PHP or Ruby. For something more substantive on the Web you'll use Java (and don't be afraid, performance-wise it got quite decent, probably at least ~80% of good C++ app speed).
Ultimately, your choice is limited if you are planning to work in the guts of the system (C with some elements of C++) but beyond that you can use whatever, so you better rephrase the question.
Rampant bullshit. You'll get somewhat better performance out of HotSpot than the Microsoft or Mono CLRs--not that much better, but definitely better
First, Mono performance is abysmal compared to JVM. Second, wake me up when CLR can inline a method more than 32 instructions long, or with control flow (if, for, while, etc)... which won't happen because the combination of 'real' generics and a bytecode that forces the VM to track exact types throughout means CLR will always be stuck with poor performance compared to better designed systems.
"Java is slow" is a stupid old myth. Does it not occur to you that JIT compilers compile to native code?
Ahah ? You should tell that to people who develop applications delivering only 1000 pages per second on a 8-core machine where equivalent plain-old C easily delivers more than 10000 pages per second on a single core of the same machine. Surely the GC is at fault, everything related to object management is at fault, the memory footprint voiding all cache efficiency is at fault, in summary, the language is at fault.
An yes, that's what I see in enterprises.
I think the real problem with Java developers is that they have been told that what they did was fast, and they believe it. But let's face it : when processing an HTTP request burns ONE JOULE there is definitely a problem. No wonder why datacenters are filling that fast...
Everytime a Java developer tried to prove me wrong, he showed me he was able to reach performance levels I was able to reach 10 years ago on an obsolete machine. "Look: 500 pages per second on this small 4-core xeon !". Well, I do 2000 on my 2.5W, battery-powered Geode computer, and that is small.
So please stop spreading bullshit about efficiency of such things, there are people who believe you and now we find their crap sucking all the power of datacenters.
Comment removed based on user account deletion
Read "The Art of UNIX Programming" by Eric S. Raymond (Addison Wesley). Then you will know.
INTERCAL is as timeless now as ever. And "timeless" is a namestate for the ever present non-function call to any thread where the process commits to the secondary state, of course.
"Java is slow" is a stupid old myth.
Java is still glacially slow at startup. Even before you get to the JIT stage, it has to decompress the JARs, extract the class files, validate them, and then start executing the bytecode (or incur a JIT compilation cycle and then execute native code). Validation can take a fair amount of time -- doing so requires each method to be simulated (making sure the stack stays coherent no matter how a given instruction is reached, for example) -- though the Hotspot JVM lets you disable this. A fully native application, on the other hand, just maps the files into memory, applies relocations (if that's even necessary these days), and then starts executing.
For server code, I don't care about Java's startup time. I'm usually checking out a number of database connections, catching up on logs, and doing a zillion other things which make the JVM startup tasks insignificant. For a small command-line utility, on the other hand, the difference is very noticeable.
Also, even in native code, Java is performing a number of extra security and boundary checks which equivalent C code usually doesn't have. I consider this a feature.
C! C! A thousand times C!
If you "fear" Java but not C, you don't know enough about the two languages.
Java has huge marketshare in business programming at the moment. Java is object orientated and the memory is managed. If you know C# you'll find Java similar in certain aspects. If you know .NET and Java you've got most of the business market covered.
C is the foundation of Linux/Unix and teaches you about memory management. C might not be going anywhere but businesses are steering clear of non managed environments. Not knowing how they work however is a mistake. If you work on embedded systems or games, you'll want to know C. If you do go down this path far enough you'll also want to learn C++ eventually but learn one step at a time.
These posts express my own personal views, not those of my employer
In addition and outside the scope of your question, develop a preference for two languages -- the "guts" implementation language and the "pretty" UI language. They *can* be the same language, but I haven't found that this is a workable situation. The tools that you've used on Windows make it possible to write UIs and nuts and bolts in the same language, but even there it's somewhat easier to write "big", "complicated", and/or "performance" code in VC++ and then paste up an UI in VB. I would strongly recommend developing this separation -- always having a text-only interface and additional interfaces that interact with the core through the command line and/or over a network socket. This is one of the few aha/gotcha issues that I was very happy to figure out and sad that no one mentioned it previously.
Finally, learn some "odd" languages: Lojban, Malbolge, Scheme, Erlang, Prolog, m4, INTERCAL, and so Forth, for many reasons, including becoming familiar with some of the other tools potentially in the toolchest.
I see that you have one month of experience in a single sourced proprietary language. You seem to have successfully stumbled through your first program which you have already released to customers, and now you feel confident enough to recommend this language to others. WOW. All I can say is that your program must have been so simple that it took little more than a few lines of code added to the hello world program to make you a success. Your story is just in line with what I hate about Microsoft's approach to programming. It is so Zen, programming without the need to know about programming. If you reduce the problem until it is pathetically simple, then it is not surprising you can write a pathetically simple program to solve it. But here is my question... Did you check any return codes (or enable exceptions)? Did you consider any of the possible things that could go wrong with your program and check for them all? What if the customer's machine is resource challenged? Did you code up the first design that came to mind? If writing code this way is so easy, where is your job security? The next person that comes along with a month to spare can replace you. After what I have said you may think I am an asshole. Maybe I am. You said c# showed no signs of being limited in anything you intended to do... As far as I can tell, c# is good at accessing .net components. The problem is (and this is true of most Microsoft programing) that in the end when you want to actually do something interesting, like accessing hardware, things will become extremely difficult and you will hate everything about managed code. Trusted computing is the bane of existence to real programmers. The day you have two years of experience in .NET you will become overqualified and may never be allowed to work again. I think I have said enough.
Figure out what you want to do/help with, and see what they are using. Personally, I would start with C/C++ and move from there, but it depends on what you want to do.
I completely share your disappointment at Python's usage of indentation as syntax. I gave python a deep review when it appeared, around '97 or '98. I was fascinated by the concepts, I could see there was some important element of progress in it. But I concluded that I could never use the language because of the indentation problem. It was (and is) unacceptable that I would end up changing the logic of a program by inadvertently deleting an invisible tab. It is the duty of the editor to fix the right indentation of my code, and it is an invaluable debugging tool to press tab in my Emacs screen and find out what the right indentation should be. This is obviously impossible if it is the change of indentation itself that marks the end of a loop or of an if clause. Really really really impossible to adopt.
I had hopes that the Python developers would eventually give in and allow the (maybe facultative) usage of a reserved word for closing loops and clauses. This has not happened. Worse: it has become a matter of pride, a distinctive aspect of the language.
I went on with my mostly C with limited Java usage. Until in 2005 I decided to give Ruby a try. From that moment, all my projects have been written in Ruby, with substantial C inserts. After writing almost 100.000 lines of Ruby code, I am more awed than ever about the qualities of the language. It goes without saying that you use keywords to close loops and clauses in Ruby (either the end keyword, or C-like curly brackets, at your choice.)
A few reasons for giving Ruby a try:
You should take great care to distinguish between Ruby and Ruby on Rails. The first one is the language. The second one is an application based on the language. While it is obviously good that RoR gained such a notable momentum, it must be remembered that Ruby is a language as of itself, with great qualities that can be harvested even if one does not use RoR. I, for one, do not use RoR.
RAII doesn't force you to use direct heap allocation, you know. It is quite common to use memory pools and use RAII to ensure that pool element are accounted for correctly.
HAND.
C++ is "slower" than C because all those fancy object constructs tend to compile into *lots* of C
If your goal is blinding speed of execution then the close you can get to machine registers the better. C can get closer than anything except assemblers and is portable.
If your goal is blinding speed of development, then you're in IDE territory. Maintainability? Well, there you start to come down to architecture.
And, once you start down that track it's hard to stop before you get to XML documents delivered by XForms and processed by XQuery.
Mind you, if you don't stop before you get there you'll never get anything done.
While I agree that your list is something that programmers should aspire to, it's pretty overkill when it comes to hiring programmers. The vast majority of the programming jobs out there are really boring technically. It's primarily programming business logic, and someone capable of writing their own compiler will be bored out of his/her mind doing that kind of work, not to mention costing more than someone more suited for that sort of mundane programming.
It's been my experience that unless the work is particularly challenging, the best mix is one or two knowledgeable, experienced programmers and then mix in a multitude of "minions" to handle all the tedium that's frankly below what serious programmers should be working on. You also avoid many of the problem personalities that tend to come with more advanced programmers...too many of those are a recipe for disaster.
For what it's worth, the team that I've assembled at my current employer is primarily junior developers straight out of college. I look for simple problem solving skills, the ability to write code with the best-case big-O for the problem being solved and, since it's a web-based application, the ability to write thread-safe code (not the ability to write multi-threaded code, mind you, that's handled by the application server). Junior programmers are cheap (coming straight from college, most of them actually think that $60k is a lot of money), have very few poor habits and the office is fairly conflict-free. I spend my time reviewing their code, mentoring them when they approach a problem in a way that can be improved upon. And when there's something that is complex enough, I take a more hands on approach. All that leaves me with more mental programming energy to devote to my personal projects.
I've worked in environments where most programmers were at my level it didn't work nearly as well as our current team does.
Try developing for a paying customer (employers included.) They'll tell you what they want and that's what you'll need.
I myself have decided long ago NOT to meddle with GUIs and to become proficient in stuff that matters to most of my customers. Nowadays as a rule I program Java. System specific stuff I try to isolate and to solve in Perl or -in extreme cases- in C.
I hadn't the slightest objection to his spending his time planning massacres for the bourgeoisie... (P.G. Wodehouse)
I second you design your own language. Then we would have yet another choice for programming language, which would attract fans from all over the world which absolute reject any other language.
Keep in mind: programming is just a tool. nothing more and nothing less. as long as you can generate a bug-free-five-start application, nobody cares what language you used.
Linux: most languages are supported. Now it's your turn to pick :)
that you can do this generically -- so you don't have to have the refcounting logic repeated all over the place.
HAND.
Because we live in a world where multiple OSes exist? Because there are more than just one kind of processor? Because there are 32-bit, 64-bit, 128 ...? Because programmers make assumptions ...
Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
What is C other than a slightly higher level assembly language than nasm?
I was one of the longer holdouts, writing assembler long after C compilers got really good. This went on until the day I used the compiler switch to see the generated assembler code coming out of the compiler. Addressing modes I was aware of but had never bothered to use were accessing carefully aligned data items in a structure referenced off a base register. Several times I still wrote better code for specific routines, but overall the code generators are fantastic these days. If the profiler says you are wasting too much time in a specific routine, it might make more sense to find out why the compiler is not optimizing correctly, rather than counting the cycles of hand written code. Knowledge of assembly can help you use the C compiler more efficiently, but we are long time past the point where we should be coding large amounts of code, "by hand". Smarter people than I have spent hundreds of man years on the code generators, and I for one would like to leverage off that work.
wow, bluray players do their h264 decoding via java bytecode huh? maybe you should re-educate yourself on what exactly java is used for by bluray players :)
Notable things that are in C# that are missing from Java:
using (Stream fs = new FileStream("foo")) {
int[,] a = new int[10, 20]
int? x = null
foreach (int x in xs) yield return x*x;
IList<int> l = new List<int>()
>e 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.
FSF software is largely written in C, and they were the guys who published that document. It made sense in the 90's because C was one of the few cross platoform and highly efficient languages available at the time. Also, the C compiler GCC was and is the flag ship product of the FSF so of course they are going to push C.
That some people still push C for application programming is mostly because there are still a lot of old timers who aren't familiar with modern programming languages.
Anyway, if you need a standardized cross platform language these days you have many better choices. Python springs to mind. Java works as well, although I find the language design somewhat poorly thought out.
If you still need the performance benefits of C, you should use C++, which is actually faster than C due to the performance benefits of template programming. C++ provides higher level abstractions like object orientation, virtual functions, and templates.
Many people still use C over C++ due to the simplicity of the C syntax. C is easily learned compared to C++. This is a benefit; however, if you are a serious developer, you should just bite the bullet and learn C++, as it will make you more productive and allow you to write safer code by using smart pointers and stl containers.
That said, you should learn C as well, as it is still a useful language, especially when doing kernel space programming. There's no reason to write a non-embedded user space application in any language lower level than C++ though.
Java is actually good enough, especially for a .NET developer.
Otherwise, learn C++ for low-level stuff (and, as many others have recommended, look into Qt - its rich library will likely remind you of what you got used to on .NET more than once), and Python for high-level & prototyping. Note that knowing C++ means knowing all of it, which means you will learn all the C bits in it as well - after that, you will likely be easily able to at least read & understand C code, and if you ever want to write your own C code, you'll only need to glance through the spec to see what C++ bits are also in C, and mind the few minor incompatible differences.
I wouldn't advise to go for Mono first or second. For one thing, you say you want something different, which it isn't. For another, it's rather slow compared to what you might expect from a .NET clone (it doesn't even use a compacting GC, which means that you run into a pretty real possibility to fragment your heap to the point you can't do an allocation!). Its visual development tools (e.g. MonoDevelop) are extremely unstable. Finally, its future is not very clear - I don't see it growing much in the last year or two, and there is strong opposition to it among the F/OSS crowd. Especially now that Java is fully open sourced.
That said, it's still worth looking at just to know what's there and to learn its limitations.
If you're just looking at application development, with Mono ( using Monodevelop IDE ), C# with Winforms is supported, so you don't really need to change your mindset. Personally, C++ is a preference ( with Qt for GUI if i have to ) but Mono has really made life much simpler for those coming from a .net background.
yawn, yes yes java vms are very good at optimizing memcpy, and adding numbers together in tight loops. wow.
what happens when you try something complicated? something that users ACTUALLY spend a fair bit of processor time on? like say, compression/decompression?
oh dear me. looks like java is LESS THAN HALF THE SPEED of C when used for data compression (http://molhanec.net/old/lzma_speed.php), and my own repeated benchmark runs of the jorbis ogg-vorbis decoder shows it as running at only ONE THIRD THE SPEED of ffmpeg's C decoder, and that's after optimization from the author. the author of jgz is proud of his java deflate library that's only 2.2 to 2.7 times slower than zlib (http://www.bolet.org/jgz/goals-en.html).
that's just awful. i mean, really really sad.
so anyway, until this pathetic joke is remedied, i'll stick to using, well, anything compiled apparently, since java is still the joke i remember it as being. some people actually have to write maintainable, fast code for a living you know.
and for some reason my users don't sit around all day calculating fibonacci sequences. where can i get some of your users?
i would say that even for a competent programmer, it is difficult to write a program in assembly that is portable between intel, arm and power architectures. some would even say you'd need to rewrite said assembly in its entirety! hardly economical.
in my experience, c code can often be ported to new architectures quite easily, so long as endian issues and library availability were addressed during the planning stages.
i hear c can execute quite fast when compiled too, almost as fast as assembly!
For maximum compatibility and exposure go with ANSI-C or C++ and try to choose popular GUI toolkits (QT or GTK).
Don't try to use funny libraries or funny language with special bindings what currently seems to be overly en vogue.
The sysadmins will thank you :)
And Accessors... and some cleaner stream implementation.
So between Ruby and Python, which should I choose? Though I heard a lot of great things about Ruby, I haven't tried it yet, what is its strong point over Pyhon? (let not talk about perl here)
I don't understand why if you know C# you would be put off by Java, since they have lots of similarities. If you know ASP.NET/VS you probably been exposed to VB too, so the white-space/indent in Python should be no biggie. Once you start playing with command line Python scripting might as well touch on all 3 Ps in LAMPPP - Perl/PHP/Python - which powers half of the web and can be used more dynamically than C# for anything from desktop scripting to web dev. If the Ps got you excited you would almost want to go lower and learn more about the Cs - C/C++ which are their foundation.
It was frequently mentioned that you should never stop learning new languages. (e.g. one a year)
I totally agree.
But how to do it effectively? To my mind effectively means having at least a bit of fun.
Writing hello world and testing some language specific things is rather unspectacular.
Personally I have got a lack of creativity when it is about to start a new project.
Nowadays there are bitbucket.org, github.com and others. Browsing it for good may result in a interesting project to participate and dive into the new language.
But it is rather rare to find something interesting there.
How do you do it?
import slashdot.reply; public class Reply { public static void main(String[] args) { try { I hate Java for one single reason: to express any idea you need 3 times as much code. } catch (Exception e) { and the whole idea of checked exception is simply silly. } } }
Some pet hates about Java:
* True polymorphism for generic types (look to ML)
* Real templates (a la C++) with anonymous strict typed compiled instances
* Better interaction with native C libraries - JNI stinks - look how perl processes headers, maybe do something like this
* Only one superclass - bah, that is a pain
* Annotations - whose idea was this crap? Make it a real part of the language so it can be enforced
Don't get me wrong, I make my bread and butter from Java, but lets not kid ourselves that it has issues.
"Java is slow" is a stupid old myth. Does it not occur to you that JIT compilers compile to native code?
Yes. At runtime.
Some 5 years ago I migrated all my programs to Linux, using the software generator Modgen, written in C.
At that time I was creating a lot of programs in Visual Studio using VB, calling PL/Sql packages procedures for Oracle.
Nowadays I use Python (easier than Java; just use a set of import statements for the classes you want to use in your py-file and all classes are available for use), where the GUI aspect is replaced by WxPython (The WxPython demo provides a wealth on code examples, that can be tried out from a navigation tree) and the Database aspect by Mysql (I use Phpmyadmin as the administrative interface to all my databases).
For Web-applications I still use Php + Mysql.
To see examples of both a Windows app and the equivalent Linux app, check the JW-CPO-WIN and JW-CPO app on http://members.home.nl/wijnenjl/index7o.html; for an example of a Php web app see JW-RES-LAMP-PHP.
I turns out that these applications also work on windows, although I try to avoid it as much as possible.
I also tried to check if a development framework like Eclipse, Netbeans, Jbuilder was feasible. I like their beauty, although the learning curve is rather steep. (Eclipse is good for Java development, Netbeans has some nice tutorials for Web Applications. Jbuilder has a feature, where changing code is changing your graphical diagrams).
The major reason for me to use Linux is, that all the languages (including the functional languages such a LISP, Prolog) can be learned for free, the drawback is that the intuitiveness of the development GUI is lagging a few years behind on Windows.
So. In summary: learn C (and also a bit of CPP), Python and WxPython (You probably won't need Java anymore).
Not only it isn't far off, we've been here already. For example, all Unreal games are built on top of UnrealScript, which is largely a Java-like, bytecode-interpreted (not even JITted!) language. Of course the 3D rendering parts and such are still written in C++ (not C, by the way) and marked as "native" classes and methods in UnrealScript.
On a side note, Unreal Engine 3 uses mark & sweep garbage collection, as well.
The 'architects' of C# did not even read an object oriented book. Some guys read a few java tutorials and came up with the idea of adding renamed Java keywords to C++, thus the birth of C#.
Go to wikipedia and look for MVC (model view controller) programming, then you'll see that Java Swing is the only MVC oriented real world GUI framework. Then try using a C# DataGridView with one million rows on virtual mode. It's crap!
Something no one has pointed out yet explicitly (though narcberry alluded to it) is that each of these languages runs on both Windows and Linux (and other operating systems as well). Some languages may be better supported on some platforms, but the differences are generally small beyond the library differences you run into mostly with C/C++. While the various .NET languages are certainly Windows-centric, and Perl/Python/Ruby/etc. were mostly born and bred on *NIX systems and favor them still, for the most part it doesn't matter. As many have pointed out, Mono exists for *NIX systems. C/C++ obviously work in both worlds, the only substantive difference is in the libraries you might use to get things done (C++ keeps coming up as a *NIX language, but between VC++ and other C++-related projects at MS, Microsoft takes C++ very seriously). But I've worked at Windows shops who had all of their scripting done in Perl and Python - running on Windows.
A better focus for your question might be to learn about the different classes of languages. If you've never seen much other than C# and ASP.NET, you're limited by the narrowness of your knowledge of abstractions more than by your inexperience with Linux. Learn about managed versus unmanaged languages (C/C++ versus C#). Learn about static versus dynamic type systems versus the in-betweens (for you, perhaps IronPython and F# compared to C#?). Learn about different ways of building concurrent systems (shared state vs. message passing, most things vs. Erlang or E).
The most substantial difference from a programmer's perspective between Windows and *NIX is really the difference in the native threading APIs (which you generally see only from C/C++). Most of the rest is just learning a variety of libraries, and you'll probably learn and forget more of those over the course of your career than you care to think about, regardless of what platform you're on.
#!/bin/bash
The performance penalty for VMs (the ones with JIT) is often exaggerated, though it depends on the way you write code for it.
For Java, some things are unavoidable as it lacks any means of explicitly doing non-heap allocations, or circumventing array-bound and null checks; and the JIT can only be so good at optimizing those.
Note that this doesn't mean that your typical idiomatic C# program runs as fast as an idiomatic C program. It just means that you can, if needed, code at a much lower level in C#, sacrificing convenience and safety for speed, for spot optimization, without having to resort to C/C++.
Over the years I've developed a healthy fear of everything Java
Why?
Coming from C# I would think Java is the most natural transition...
Mono, C# and other horseshit may get you past the bean counters who cannot tell any language from another. However, once they pass that CV on to the engineers and technical staff they will see that big C# (cocktothorpe) and immediately doubt your qualifications, especially in regards to programming.
If you want to learn programming on Linux, stay far away from any thing that even hints of M$. As everyone else has mentioned, become proficient in C and you will always have a job.
Over the years I've developed a healthy fear of everything Java
Why?
Coming from C# I would think Java is the most natural transition...
Learn the Art of Unix Programming, because the programming culture is very different to Windows: http://www.faqs.org/docs/artu/ Programming languages are not so different to Windows.
Check out Groovy! It has some neat features which is on par with LINQ
Here it's done in Groovy: http://permalink.gmane.org/gmane.comp.lang.groovy.user/5526
Here it's done in LINQ: http://weblog.infoworld.com/udell/2005/09/28.html#a1310
C. And don't forget the man pages.
I've found that people from a Windows background overlook the man pages. They are absolutely essential for effective C programming on Linux or other unixes such as Solaris or BSD.
man 3 printf and away you go!
I'd also argue that shell scripting should be a higher priority than PERL at first. Although shell scripts look ugly and confusing to a novice, after a couple of hours with some good references, and some practice on the command line, their power and simplicity become apparent. tldp.org has some excellent sh/bash resources for beginners and experienced coders.
For PERL, you really need the camel book. PERL is a nightmare, but it's a rite of passage, like C++ only worse.
Stick Men
How do you draw a pixel in Java? Oh yeah, that's right, there is no way to do it.
You can't have looked very hard.
http://michaelsmith.id.au
I'm pretty sure you can AOT your code for faster startup with most VMs, no?
"You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
So AOT your code to remove the first JIT step and let your optimizing VM (HotSpot or whatever) only JIT when it's doing dynamic recompilation.
"You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
I don't recall saying JSP was a well-built technology. I don't use it.
I use ASP.NET instead, which is quite fast, quite featureful, and very scalable, as opposed to (hurp!) PHP or the like.
"You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
That said, Java is cross-platform,...
Java is not cross-platform, Java is a platform. Take threading as an example. If you know Java threading and only Java threading, then you don't know Win32 threading, or POSIX threading. I think that's what GP meant by Java avoiding the "nastiness" of Linux -- if you opt to use the Java platform on Linux, you can avoid having to learn the system calls or whatever that comprise the "Linux (programmer) platform".
Attention zealots and haters: 00100 00100
Eclipse is usually quoted as being a big "resource hog", but few people realize really why it is using all those resources. You, like many, probably think it is "wasting" all that memory and is just being an inefficient dog. However, in reality, most of the memory eclipse uses is to make it work faster, and being able to provide you with fast code completion, error analysis as you type, fast searching and compilation. Eclipse will use more memory generally when you have more source files to work with, causing it to have to index more data for almost instant use (code completion especially needs to be fast to be useful). It will also do a lot caching of files for performance reasons.
For smaller projects, containing say 200-300 source files, Eclipse happily runs with 40 MB of RAM, and won't exceed that unless really needed. If you feel it is wasting too much resources, then turn off some of the useful features... you may find that wasting resources for very handy features is not that bad a trade-off.
If it's in small chunks, but a lot of them, they you're screwed.
No, but you might need to use a custom allocator, and writing those to be performant is a fairly black art on any OS. (Yes, I've written such things for an application that had a non-standard memory usage pattern. The default "high-water mark" allocation strategy used by malloc() is much easier to work with!)
"Little does he know, but there is no 'I' in 'Idiot'!"
Heh... assuming AOT == ahead of time compilation, I find it funny that they have a term to describe what the rest of the world just calls "compilation." :-)
Yes, AOT can be much faster. Case in point is gcj, which compiles Java code to normal ELF objects -- and, of course, no VM required, so a JVM doesn't even come into the equation. You will lose validation checks (e.g., the code can segfault if it's tweaked), but from my perspective: who cares? Obviously, this isn't something I would want playing in my browser (but, then, who uses browser Java applets anymore?), but for something like Eclipse it's wonderful.
There are some runtime security checks which might go missing, too. As far as I'm concerned, that is the domain of the OS, not a VM I'm starting up myself.
Anyway, yes: I'm keen on seeing Java compiled to native platform binaries. Sadly, this is still a niche rather than the dominant model. I don't see my workplace getting off of Sun JVMs anytime in the near future, for example.
Huh. There are great language bindings for java and perl (and other languages) for gnome. These are first class languages for the gnome platform:
http://www.gtk.org/language-bindings.html
I use gtk-perl a lot (with GUI design in glade) and it's great!
I have developed for Windows since Windows 3.0. Starting with MSVC 5.0 Visual C++ I have used all Developer Studio's. One and a half year ago I researched our options for a X-platform basis for our software clients. I looked at Mono for 2 hours before discarding it. I finally chose Java SE, and it took me very little time to get used to the fabulous NetBeans IDE (looked at Eclipse too, but NetBeans takes much more care of things that aren't very obvious to Java newbies) I am now porting our MSVC/MFC C++ codebase to GCC with the C++ standard lib and the impressive Boost library. I had to refresh my C++ skills, regarding templates mainly, but it was well worth the effort. After a lot of evaluations I decided to opt for CodeBlocks as my IDE. It's not comparable to Visual Studio, but certainly good enough! So I'd recommend standard C++ for software that has to be fast (our software manipulates 1 bit TIFF G4 compressed files, quite CPU intensive), and Java for the rest. You aren't working directly with Linux with any of these suggestions, but it will run very well on Linux, as on most other OSes,
RAII is the reason you shouldn't be using C any more (ie. C can't do it).
"I think I might like Obj-C over C++, due solely to the really nice init/release/autorelease mech for memory allocation"
This is RAII...
Obj-C is Ok, but locks you into Mac-only development.
C++ is a better bet in the long term. It has ugly syntax, sure, but you get used to that.
No sig today...
You are right there are no pointers in Java. The closest thing are Object references. The big difference between pointers and Object references though are that Object references are a completely separate type that does not derive from a basic type like int or long depending on your platform. This means that certain operations, especially calculations, are simply not allowed as they make no sense (pointers in Java make no sense as there's no address space, which also happens to make Java virtually immune to some security issues like buffer overflow exploits).
Still, object references can be thought of as pointers, but more abstract. You can still do the important stuff with them, like putting them in lists, dereferencing them, double indirect lists, etc.. with the big advantage that everything you can do can be closely and accurately scrutinized by the compiler.
One of the biggest design goals for Java was to eliminate large sources of potential (programming) problems by making it possible for a compiler to make sense out of your code. Java, and perhaps C#, are currently probably the most strict programming languages there are, providing more compile time checks then ever before. It also makes Java very refactorable and is the reason why Java IDE's can provide so much automated refactorings and fixes, with quite a high degree of confidence that these will not affect the intent of the code.
You mean writing something that already exists? I guess you already missed a big point of why Java is being used then. For such things we just use the existing libraries (which donot necessarily have to be Java based), or more likely, the built-in zip style compression, which may or may not be optimized for your platform depending on where you actually run the code.
"Java is slow" is a stupid old myth.
Perhaps you can write fast code in java but I'd say that it's much harder than in other languages since the compilers are so retarded. You can find interesting examples on J2ME forums where mobile game developers try to squeeze everything out of it (and quite generously share their findings with each other despite actually being competitors). Did you know that
for (i = 0; i < whatever; i++) {
int value = 1234;
System.out.println("the value is:" + );
}
is much slower than
int value;
for (i = 0; i < whatever; i++) {
value = 1234;
System.out.println("whatever");
}
The compiler is so fucking retarded that it hurts - I don't think it even tries to optimize anything.
IMHO it isn't fair to say that java isn't slow if the requirement is that you first make many optimizations that other compilers do automagically. One should compare average quality code in Java with the same in some other language because most code is of average quality.
So.. what was the cause of those crashes then? Cause I don't even remember the last time I had a crash with a Java program or JVM.
"Java is slow" is a stupid old myth.
Perhaps you can write fast code in java but I'd say that it's much harder than in other languages since the compilers are so retarded. You can find interesting examples on J2ME forums where mobile game developers try to squeeze everything out of it (and quite generously share their findings with each other despite actually being competitors). Did you know that
for (i = 0; i < whatever; i++) {
int value = 1234;
System.out.println("the value is:" + value);
}
is much slower than
int value;
for (i = 0; i < whatever; i++) {
value = 1234;
System.out.println("the value is:" + value);
}
The compiler is so fucking retarded that it hurts - I don't think it even tries to optimize anything.
IMHO it isn't fair to say that java isn't slow if the requirement is that you first make many optimizations that other compilers do automagically. One should compare average quality code in Java with the same in some other language because most code is of average quality.
All that crap is meant to be done by the compiler, not by the programmer.
C runs like blue light out of the box, without the tedium you describe. The day that Java does likewise, you'll finally be able to say it's fast.
Meanwhile, it's over a hundred times slower than C.
Good list, except #3 is a bit specific, I think. There are a lot of other CS fields besides language parsing that teach these skills, and requiring that one in particular is a bit of over-specialization unless that's what you're hiring for.
I'd also still disagree that fearing Java-- or any particular technology- is a good thing. As you say, the language that the applicant spends their workday in doesn't matter all that much, so why not Java? It's easily the best intersection of pleasant to develop in vs. can build something substantial that I've ever used. It's also a harder language to make errors in. It's no ML where "it compiles so it probably runs correctly", but it's a far sight better than C, C++, or Objective-C. (Not sure about C#-- don't have much experience there.)
E pluribus unum
Heli-X(.net) is written in Java and runs ok on my 1,7GHz Sempron. So 3D games shouldn't pose a real problem.
So I second Java.
As a programmer since 1982, I have leanrt many languages. The only language so far that has given me indepth insight into Unix/Linux is C.
In my personal opinion, procedural languages outstrip objective languages in both maintainability and speed of development (but only if you have a skilled team).
Learn C.
I disagree. PHP might have been advisable 5 years ago, atm. it is wiser to stick to Python, Java or Ruby on the Web Platform. After Django and co. nobody really considers PHP to be a wise call.
.Net I however don't understand the problems with Java. Especially for Servers and in near future for games and 3d web-apps (not applets, but java hot-start apps) Java will and is the way to go. Also learning the strength of eclipse is in my eyes a very good step for each coder.
On the Front End again things like Laszlo or better GWT (Java written Forms for HTML translated in pure JS) are worth looking.
Basicly coming from a Windows world and knowing
The indentation problem of Python is just something you have getting used to. After getting used to it, you start to love it. After loving it, you start to write python apps even where you are not supposed to...
C isn't going away any time soon, and it works on ALL platforms
C doesn't work on Xbox 360 XNA; only C# works for that. C doesn't work on smart phones that use J2ME MIDP; only Java works for that. C doesn't work for the client side of web applications; only JavaScript and ActionScript work for that. C doesn't work for the server side of web applications installed on shared hosting; generally, interpreted languages whose names start with P work for that. In general, C compilers targeting sandbox virtual machines such as these aren't high-profile, if they exist at all.
I input the data straight into the bus, by using eight Morse keys at 4 Hz.
Now get off my lawn!
Any sufficiently advanced intelligence is indistinguishable from stupidity.
There are a couple of posts which express the philosophy that the particular tool does not matter. I agree 100%. Be adaptable to a given instance.
IMHO, if you have learned how to learn, then I suggest the following exercise:
1) pick a simple app, like a console or web-based address book (the UI does not matter in this exercise)
2) implement in language of choice ( I would recommend C, the reason will be clear shortly )
3) given a set of other interests {C++, Perl, Python, Java, C#, etc}, repeat #2 a couple of times
4) reflect on the experience of porting between languages
What you should be looking to do is to build confidence in yourself. Knowing how to do something as hard as possible, even though you may not need to do it in real life is a real confidence builder.
So, if you know how to make apps in C and can build an appreciation what higher level languages are doing for you, you will be able to speak intelligently and confidently with anyone regardless of the language or environment.
Other people have expressed this in different ways, but:
If you want to achieve a level of excellence beyond the average programmer, learn a number of languages well. If you are developing on Unix, learn at least:
If you had asked about developing on any other system than Unix, I'd have dropped the requirement for shell script programming.
The benefit of learning more than one language is that it leaves you with the ability to consider a problem from more than one point of view, gives you insights into effective and powerful methods, and lets you choose the right tool for the job.
There is nothing more painful than a multi-hundred-line C program that should really be a 20 line shell script or a 300 line shell script that should really be a 500 line Python program. Especially when it comes to maintenance.
Once you have started learning the languages, take care to get to know the associated tools; the profilers, the debuggers, tools like ltrace, strace, valgrind, lint checkers, and so forth. Then research the available libraries for those languages (CPAN for Perl, Boost for C++, etc.)
Oh, and when I say learn a language, I mean use it to write a non-trivial, useful program that you intend to use regularly.
say no more.
I have a long C# background and I found that the Vala programming language has been a great learning experience for me. It's not a rock solid platform yet and there is also very few tools for it but if you look at the code for the Vala compiler itself, it's just an awesome project! It allows you to write comfortably in a syntax similar to C# but you still have 100% interop with C (you can use all the normal Linux libraries like GTK, libpng etc etc) and it compiles to native code. Since Vala is growing very fast right now, it's also an opportunity to be part of a new revolution. To be in it from the beginning. You have a chance to make a difference and impact this terrific new platform. If you don't feel comfortable working without mature IDE tools you should just stick with C# for now and use Mono and MonoDevelop for instance. Long term you will not be able to make significant contributions to the open source community using Mono though because many users will reject the apps just based on the platform (which is silly in a way but it's a fact unfortunately). Java rocks for server side but has been reject on the desktop due to the bloatiness of apps like Eclipse. Python is great for scripting and small utilities.
java you moron.
Develop for everything. Are you gonna be a kernel maintainer? Or develop something useful for someone?
ksh, bash and sh. As for your "healthy fear of Java" please, behave like an adult, that is something pretty childish to say.
IANAL but write like a drunk one.
But are there any usable PeeCee emulators written in 100% Pure Java, 100% Pure C#, 100% Pure JavaScript, or 100% Pure ActionScript? A lot of times, your application will run in a sandbox that allows only one language or allows only one bytecode which in turn is dominated by one language.
just use .NET and you'll be happy for ever.
THE END
But this captures only a tiny portion of C++ capabilities such as those which allow effective support of RAII.
Do we even want to support the RAII, whose members sue their own customers?
No wait, that's the RIAA.
OO C is really a poor-man's C++ and looks like it.
But when you have to deploy on a poor man's handheld computer, a poor man's language starts to look attractive. Yes, C++ can be made to run in sub-megabyte environments, such as by ditching iostream for cstdio, overriding every class's operator new, and even rewriting all of libstdc++ as was done in uClibc++. But the "learn C++" books tend not to teach space optimization.
And most application aren't performance critical anymore on modern hardware anyway.
Are netbooks and PDAs not "modern hardware"? They ditch raw CPU power in favor of size and battery life.
I'd rather have programmers who write maintainable documented code than programmers who write unreadable undocumented code that lowers the CPU usage from 5% to 4%.
What about readable documented code that increases the battery life from 7 hours to 9, avoiding the need for a mid-workday battery swap?
Well at my college we are all Linux, they start you off with C++, but IMO I think they should start off with Python to ease in the freshmen. I would suggest Django/Python for web programming (I am in the process of learning), also PHP (which I love and currently do all my side projects in) as for non web programming I would go with C/C++, and dare I say Java.
You can find Python book online, and Django book as well.
For a good IDE I really like Geany, it works well with a Linux system, and it's light weight. It looks for installed compilers so you don't have install anything on top it as long as you have all the stuff you needs like GCC, OpenJDK, etc.
For most things, standard libraries are almost cross platform. You say you use C++, use the "standard" and you'll find everything that you are already used to.
Ah, but what about GUI ? Those are definitely not cross platform. Well, you can pick, there's GTK, there's GTK, etc... Or, go for a real cross platform toolkit such as wxWidgets. you apps will run on pretty much any platform after a recompile...
or if you use a cross platform language, say python (wxWidgets + python = wxPython), then you don't even need to recompile.
wxWidgets was originally created for C++ but it has binding to other languages, so what you learn with one language can be re-used with another language if you have a different need that dictates that.
I suggest C/C++ and Tcl/Tk. Together, they are quite powerful and Tk GUIs also work in Windows. I know Python tends to be the scripting language of choice here on /. but Tcl is quite widely used and if you are working in a field which has Tcl legacy systems (like EDA tools) then learning Tcl will give you a huge boost. Other than that, Perl for command line scripting might also be handy.
Legally obligatory sig : My opinions are my own... etc etc
And what do you think the runtimes on all those platforms are written in? c/c++.
They're written in C++, but then the executables are signed with a private key that the user doesn't know. The console makers control the private key for unmanaged code on video game consoles, and the network operators do the same on North American mobile phones.[1] On web clients, we can't always assume that the user owns the machine to install an unmanaged-code plug-in; the machine could belong to the parents, the employer, the school, or the library.
Last time I checked (showed my boss how much quicker a c binary can be executed than a long php script by running both on my hosts' web servers) my hosting provider supported cgi binaries written in c
But then don't you have to run the same architecture and the same distribution on the development machine on your desktop that the server runs?
but in the early days of the net, c code frequently ran on web servers, which is where the "bin" in cgi-bin came from :-)
In the early days of the net, there wasn't any name-based virtual hosting (that came in 1999 with HTTP/1.1), and web site maintainers often had shell accounts on their web servers so that they could compile, test, and deploy on one box.
[1] North America is relevant because it's the largest single-language market in the developed world, because Slashdot is in North America, and because I am stuck in North America.
C if you want to earn a living; Python if you want to keep your mind.
You can get phones that were never locked (just not from your local phone company, who subsidizes your phone purchase by "locking you in") or by paying someone $25 to $40 to unlock your current phone. Or you can search certain places on the web and find the programs ...
As for web servers, you don't need the same architecture - just a cross-compiler, and there are lots of free ones out there.
Local machines? Last week I saw 16-gig usb keys for $50. Just boot a copy of your OS off that (okay, not really much of an option for Windows users, but that's a FEATURE, not a bug :-). Or boot off a dvd and use a usb key as your data store.
I've been programming for 25 years (I'm 34), and I have a favorite. (For the record, it's Python.) All languages are certainly NOT created equal. You clearly have a favorite -- Perl. The irony is that you "wouldnt' particularly recommend more modern and high-level languages." A good high-level language does NOT hide too much of Linux from you.
In fact, most high-level languages handle low-level operations in almost the same way. I.e., open a file, write something to the file, close the file. Listen on a socket, accept bytes over the socket, etc.
So, this poster is simply wrong. Learn a lot of languages, as many as you can. I recommend Python, Perl, PHP, Ruby, C, C++, Java, at a minimum. Pick a couple of favorites (for me, Python and C) and learn that one to perfection, but try to keep up with important developments with the others, too.
Finally, this is definitely NOT a Windows world, unless you are only focused on desktops! In fact, UNIX/Linux dominates the number of servers connected to the Internet. Thus, unless you are only ever going to write Windows GUI applications (you aren't, and if that's your job, you better start looking for a life preserver), your school is certainly doing you a disservice by focusing exclusively on Windows. It is a very smart move for you to be focusing on other platforms -- actually, it's a matter of survival.
As someone who has no particular love for Python, I'm not encouraging you to use it. Still, of the possible criticisms of the language, the whole "using indentation to delimit blocks" is probably the worst. It just works, people. I went into it skeptical too, but Python's parser is smart enough to handle just about any style of indentation you throw at it, so long as you're at least somewhat consistent in its usage.
If you want "Python without mandatory indentation", Ruby is probably about as close as you'll get, though they're significantly different. Still, if that's your gripe about Python, you owe it to yourself to at least give it a try before you write it off.
Game... blouses.
..or get away from *nix
slashwhat?
>"Recently I've been thinking about developing (or learning to develop) for Linux."
What does "develop for Linux" mean for you? If your goal is to build working software quickly, use something like Python or Ruby that gets out of your way; the skills you build there will port nicely back to other platforms, as will the software itself.
If, on the other hand, an intimate acquaintance with the platform itself is what you're after, the C advocates have the right of it. The APIs are really what distinguish Windows from Linux at this level, and your most straightforward access to them is through C (just as .NET is really Windows' native tongue these days).
Since Linux has achieved vastly better penetration in the datacenter than the desktop, most of the market for "Linux programmers" these days is really in hacking the server stuff that happens to run atop Linux -- Web apps, that sort of thing. If you're looking for a resume bullet point, most people aren't looking for Linux programmers per se, they're looking for people who can work with one of the stacks that run best on Linux -- LAMP, Rails, Spring, etc..
Depending on the task:
What do you want to do with it?
If you're planning in doing IT automation, I suggests you Perl. It has TONS of available modules ready to use.
Otherwise, by all means, learn C and C++ the best you can.
Very good C/C++ developers are really hard to find these days, and we always struggle when we have to hire some.
Make sure the language you choose gives you access to the OS via system calls. If you can't make a direct call to every function described in section 2 of the manual (without twisting your code into multi-language knots), then you should not choose that language.
You may never actually use system calls, but one day you'll be grateful that you can.
In the course of every project, it will become necessary to shoot the scientists and begin production.
You can get phones that were never locked (just not from your local phone company, who subsidizes your phone purchase by "locking you in")
I can, but my customers either don't know this or aren't willing to pay hundreds extra up front for the privilege of running unsigned apps. Therefore, I must write software in Java if I want to deploy it on customers' phones.
As for web servers, you don't need the same architecture - just a cross-compiler
You also need 1. a lot of patience for the edit-build-upload-run cycle, and 2. an upgrade to a hosting plan that allows such untrusted binaries, often for an additional monthly fee.
Local machines? Last week I saw 16-gig usb keys for $50. Just boot a copy of your OS off that
I don't know the password to select an external boot device, and staff is unwilling to help me out. Or the library may have deployed dumb terminals such as those made by NComputing, and I don't have physical access to the terminal server. Besides, when the USB ports on the front of the PC are filled with epoxy, fooling around with the ports on the back might look suspicious enough to get me kick-banned from the library.
Give this a try: http://www.lazarus.freepascal.org/
...do it like most Linux developers do - ignore all the cool and advanced stuff available for Linux - and stick to the 1970s, programming in C.
It will guarantee you a life of fixing bugs.
Main difference between the BSD license and the GPL license: one is from California and the other is from Massachusetts
The important thing is to pick a language which is well suited to what you want to do! Anyone who tells you that "the language to learn is something" is wrong. There are too many languages to consider any one as the language. Modern languages which fit certain tasks include C for system tasks, C++ for applications where overlays and objects are useful, javascript for things which need to run on the client system, perl for things which benefit from string handling and associative arrays, etc. Note that the list of languages is not complete, nor are the areas of usefulness mentioned anything more than hints, many problems solve equally well using the features of any of several languages.
Having programmed for a living for decades, I have found that a language which includes features relevant to the task will result in much less effort in writing and maintaining the code. So pick a problem which interests you, and pick a language which helps solve that problem (not one you think you should learn which isn't a good fit). Embrace the strengths of the language you choose, don't be one of those people we used to say "can write FORTRAN in any language."
Good luck with your learning!
All that crap is meant to be done by the compiler, not by the programmer.
C runs like blue light out of the box, without the tedium you describe. The day that Java does likewise, you'll finally be able to say it's fast.
You AOT your code by passing a flag to javac. Thanks for playing, we have some lovely parting gifts for you.
Meanwhile, it's over a hundred times slower than C.
And it actually has the conveniences and features of a modern language to boot! Holy shit, a tradeoff between features and speed, who'd have thunk it?
Newsflash: speed is no longer everything. It is very much possible to get "good enough" given modern hardware. And save us all your holier-than-thou "YOU ARE ACCEPTING INFERIOR PERFORMANCE YOU CRETIN"--performance doesn't mean much when you've hit that "good enough" plateau and the benefits of writing code in a modern language (runtime checking, exceptions, cross-platform operation) outweigh the extremely minor "MY BENCHMARKS ARE SO OH MY GOD DAMN FAST!" benefit of C.
"You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
Sometimes I think my perception of reality is distorted when I hear about CS programs which require working with proprietary software like Windows. At least in some german universities, it's easily possible to avoid Windows completely, from semester #1 up to your PhD. An estimated 90% of all machines in our CS & mathematics departments run Linux.
Microsoft offers almost all of their software for free to students. Still, every single course that I've attended required the use of GCC, Eclipse or other free (as in speech) tools. You _could_ use Visual Studio, as long as your code compiles with gcc in the end.
I'm very, very happy with this situation :-)
I know right now there is no significant importance given to functional languages, however they give a very good "Programming" experience when learned.
n/t
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
The GNU C library and its manual are a good introduction to Linux programming.
You wrote, "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."
That is a really damning comment on your university.
If I were selecting an IT course at a university, this would be one of the first filters I would apply.
The problem with learning Perl is that you may walk into a future workplace and management will ask everybody if someone knows Perl. Being the honest person you are you'll instinctively raise your hand, not noticing everyone else is resolutely sitting on theirs. I've seen enough Perl code in the real world to convince me not to even look at the index page of a Perl book for that fear alone.
Phillip.
Property for sale in Nice, France
I see that you have one month of experience in a single sourced proprietary language. You seem to have successfully stumbled through your first program which you have already released to customers, and now you feel confident enough to recommend this language to others. WOW. All I can say is that your program must have been so simple that it took little more than a few lines of code added to the hello world program to make you a success. Your story is just in line with what I hate about Microsoft's approach to programming. It is so Zen, programming without the need to know about programming. If you reduce the problem until it is pathetically simple, then it is not surprising you can write a pathetically simple program to solve it. But here is my question... Did you check any return codes (or enable exceptions)? Did you consider any of the possible things that could go wrong with your program and check for them all? What if the customer's machine is resource challenged? Did you code up the first design that came to mind? If writing code this way is so easy, where is your job security? The next person that comes along with a month to spare can replace you. After what I have said you may think I am an asshole. Maybe I am. You said c# showed no signs of being limited in anything you intended to do... As far as I can tell, c# is good at accessing .net components. The problem is (and this is true of most Microsoft programing) that in the end when you want to actually do something interesting, like accessing hardware, things will become extremely difficult and you will hate everything about managed code. Trusted computing is the bane of existence to real programmers. The day you have two years of experience in .NET you will become overqualified and may never be allowed to work again. I think I have said enough.
Yes, i DO in fact think you are an asshole, as i made it very clear i am inexperienced, on purpose, so as not to lead anyone astray. You seem to think that i don't realize how inexperienced i am but i think i made that very clear. If someone sees that i have one moth programming experience, yet somehow decides to base all their decisions on my recommendation, that would be their fault, not mine, i simply wanted to share my experience.
And my program is, in fact, quite simple, as it is supposed to be a very simple utility. I have no doubt there will be bugs, but I did include some simple error handling, like when the serial port opens, if it fails, it tells the user rather than flipping out. There isn't much else i am doing that would fail, but it's fine, my program does one simple task but it does it very well and it will be incredibly useful to our customers. It is not a "pathetically simple" program, however.
And job security? No shit, if i were hired as a programmer and i started one month ago, i would have very little job security, but why do you even think that is a reasonable explanation? Who would hire someone like that? I'm a mechanical engineer at a company that has only 8 employees. I do all of our mechanical design and CNC machine programming, and my job is extremely secure as i have brought a very good set of talents to our company. I'm only writing software because it turns out i can, and the only other software we have is terrible and old and not very useful.
You say that accessing hardware is difficult, but it's not, it's quite simple. My program interfaces with the serial port to connect with our product, and that can be accomplished in about 3 lines of setup, and then just one line to read or write to it, or a few more if you include error handling. Are you sure you know anything about C#? It's actually a pretty capable language - at least compared to what you seem to think of it. Maybe you should try LOOKING at it?
And anyway, you seem to have assumed a bunch of things that make no sense, and ignored the facts i did put out there only so that you could make some poor and misguided attempt at tearing me down. So yes, i do think you are an asshole, at least you got one thing right.
-Taylor
Worldwide Military budgets: $2100 billion. Worldwide Space Exploration budgets: $38 billion. Really, world? Really?
I am personally a fan of Python and WX (wxGlade in particular)
But C/C++ and WX and Java are also fine depending on the projects.
Lisp and Perl are among my first loves though.
Guys - while the business problem goes unsolved the squabbling over syntax continues. Programming languages allow patterns of knowledge to be documented and automated so the debate if C++ or Java or C# it "better" seems a bit well...Slash bloody dot.
Sometimes freedom comes with a price - like buying your own hardware. If you want to use other people's hardware, you have to respect their terms and conditions, same as if you borrow a shovel or a drill from someone, you're expected to return it cleaned up and in good working order.
As for the console stuff, this is the same bitching and whining that people do over Tivo - sometimes, to be free means giving up something. In other words, don't buy a Tivo. Ditto for the consoles.
As for this:
Really. I mean that ... and remember that whatever you decide you like now may not be what you like 5 years from now.
For me, I like Python quite a bit. As someone who use to write Java back when it was the hot language Python let me do what I wanted to do without having to define lots of boilerplate or worry about VM implementation differences, etc... It also was portable ... VERY portable (no more System.gc tricks to avoid VM bugs on some platforms).
I also think C is a great language to know even if you don't have much reason to use it right now. Seems like a lot of languages themselves use C (Python is written in C, so is Java ... I think). If you know C you'll have a good basis for programming and a good understanding of memory management (which most higher level languages take care of for you).
If your looking for specifics here is my $0.02 (not in any order):
Web (Open Source or Small-Medium Company): Ruby, Python, PHP, Mono
Web (Open Source/Closed Source or Large Company): Java, C++, Mono, Python
Desktop (Open Source or Small-Medium Company): C, C++, Ruby, Python, Mono
Desktop (Open Source/Closed Source or Large Company): Java, C, C++, Ruby, Python, Mono
As for the "I must write software in Java if I want to deploy it on customers' phones" - Java isn't that hard to learn.
I know Java, but maintaining four versions of a program's business logic in parallel (C++, C#, Java, ActionScript) can introduce inconsistencies. Or can one of those languages easily be compiled into the others?
The moment you realize how dumb asking that question is the moment in which you can answer that question grasshopper.
Must-learns, even if you don't stick with them: C and Java. Yes, Java can be extremely unpleasant to deal with at times, but it is worth knowing. C is very useful to know, but honestly, I'd learn it last.
If whitespace-is-syntax bugs you (it bugs me) and you want a good scripting language, then try Ruby. It's not as mature as Python, but I can highly recommend it.
Perl is ubiquitous, but it's really a write-only language. ;) *ducks multiple flamethrowers*
Knowing shell scripting (ie. sh) is of course nice, but for anything non-trivial, you should be learning one of: Perl, Python, or Ruby.
C Works just fine on the XBox
With a developer agreement, which as far as I know isn't readily available to small businesses.
the XBOX 360
With a developer agreement, which as far as I know isn't readily available to small businesses.
the PS3
With a developer agreement, which as far as I know isn't readily available to small businesses.
the Wii
With a developer agreement, which warioworld.com states isn't available to businesses without a prior published commercial title and leased office space.
and on smart phones.
With a developer agreement, which likewise has a high cost of entry
.
The Javascript and Actionscript engines you are refering too are written in C.
But you can't install a new Javascript or Actionscript engine on a computer you don't own.
In the first two cases, just because YOU don't have access to the development enviroments that allow you to use C on those platforms, doesn't mean it doesn't work, it means you can't make it work.
What should I learn and then do in order to gain access to the development environments?
Pretty much every major browser has a way to run a C plugin, even those on smart phones including mobile IE and mobile Safari, it just isn't something that will run from within a web page without the user installing it, granted.
Did you mean "the user installing it", or "the owner of the facility installing it"?
I'm sorry you are not comptent or confident enough to use C as your language
I have used C on a PC running Windows and on a PC running Ubuntu. I just don't know where to start in order to negotiate the agreements needed to use C on anything but a desktop or laptop computer.
Get familiar with the (usual) Linux shell, bash. Learn to be productive with it, and it will help immensely. You should know some shell-scripting, as well as all the basic GNU utils, and the various keyboard shortcuts.
is that Perl would handle almost every generic programming problem you have. Then if you wanted to venture into GUI land you could either use Perl/Tk or start with Mono and Gtk+.
This will give you the broadest range of deployment options as you don't have to worry about compiler specific issues.
http://www.gibby.net.au/
http://www.gibby.net.au
Lisp.
Language: C++
Tools: Emacs, GCC/g++, gdb, gmake
This is nothing like what programming is to me though. I am the kind of guy that sits down with the processor documentation and learns every instruction. I can visualize the states of the CPU, and can often guess what is wrong in situations where there is little or no debugging software or hardware available. This is the result of decades of low level programming on new processors for which in-circuit emulators aren't available yet for the speed of chips being used. I started writing embedded software when the EPROM in used with the 2716 and the processor was the 8085. I write calibration software for gaseous flowmeters and optical refractometers. I write applications that control laboratory instruments that purify proteins. I write encrypted communications software used by the military and the finance industry. My design for the SCSI interface become the industry standard. I have traveled the world customizing multitasking operating systems for Sony, IBM, Fujitsu, Siemens, ACT, Microdata, NEC, Compupro, Motorola, Shared Financial, Rite-aid... I program in assembler, Forth, Fortran, C/C++, Pascal, Modula, Python, and some languages weirder than those. Now ask me what good .NET can do for me. Unless I want to write the same old code one more time to bring up a dialog box and call a Microsoft database routine, .NET won't help me do anything that is cutting edge.
I am used to work ing with electrical engineers. They show me their schematics, then I help them write diagnostic software to help them prove the hardware is working right. I look at the schematics and figure out what the I/O addresses are and what bits need to be set to get interrupts to fire, and what is going wrong with the DMA. If Microsoft had their way, we would not be allowed to execute code written in assembler. In fact they already have operating system support to keep us from doing that very thing. Over my career, my job security came from my knowledge of the x86 processors and all the peripheral chips a
C works on all platforms in the same way that a universal remote works on all tv's. Did you pay attention at all in any Op Sys classes? Have you heard of System Calls? Shared Objects?
Heck even integers vary by platform. Try using int64_t on windows... etc.
It is able to be made cross platform if you insert the needed pre-processor ifdef's, find all the libraries you need etc.
I don't care what GNU might say; the problem stems from their definition of cross-platform compatibility. It also stems from the fact that they aren't going to advocate a language that they can't control that some other company can.
I'm not saying Java is the answer, and its performance leaves plenty be desired. But Java is far more suited for cross-platform suitability then C is. Try taking C code for anything related to anything file related, network related, or THREAD related and simply 'using' it on linux (from windows). It won't compile. Now do the same with java.
I'm sorry claiming C has the absolute maximum cross-platform compatibility is a statement I find to be absurdly false unless you twist your definition of compatible to the point where it doesn't mean anything at all.
"Jazz isn't dead, it just smells funny" ~Frank Zappa
EdelFactor
C and C++ may have comparable running speeds, but there are still large differences in certain areas.
The differences matter more on the embedded side, of course, but generally speaking, only timing critical applications require C. C++ is probably fast enough on today's desktop, and is virtually required for any type of GUI programming these days. It's not a bad language, but it does allow a novice programmer plenty of rope with which to hang himself.
The society for a thought-free internet welcomes you.
on the other hand if all you want to do is pay down your mortgage, take a few holidays a yea, buy your chick a ring and yourself a few toys - join the MS crew - we get company mugs and t-shirts!
if you want a paycheck, see what kills companies are looking for.
... I get it you want to do actual *nix user-space programming. C and C++ is what you are looking for. If, however, you want to be able to solve problem on a Linux platform, the language you chose must be aimed at the problem you have. Java is probably the most robust and powerfull platform around. It is not exactly best suited for desktop programming, although great desktop softwares comes out of it, in a perfectly portable fashion (think of the Eclipse platform). It has some drawback: non object primitive that is not totally solved by the autoboxing system, and some other i can't remember of. I still use Java for every other things i have to do, even sometime when a script could do, since i'm considerably faster writing java. Python is way-cool too, its an extremely powerfull platform with conceptually rich features. It is no way near as robust as java tho, and i developped an allergy after having used a Zope based product for a while.
The way to feel Linux (or UNIX) programming is to use a simple text editor with syntax highlighting and gcc/make.
It takes time to get used to these after Windows, but if you master them, you'll be able to dig into any open source code you find on any machine that you can log in to. Choose an IDE - and you could just as well have stayed on Windows.
Another must-do is learning Perl. Perl may not be the best language there is, but Linux is Perl.
You should try and learn a language a year to see the differences.
I'm using c# and the mono project to build apps for linux. I'm also building apps in java and I find the mono project to be a better experience.
of course not many people will stray from what they know, so its often hard to get an accurate comparison unless you try it yourself.
Definitely learn about 20000 of Standard Mandarin characters first. Then move on to APL, which then is quite easy to digest. Then you might have just enough background to move on to C.
I think that you can keep the simplicity. Look, the language it's just the tool, so, you can choose the tool more comprehensive and specialize yourself as u need. For example: C and C++ are two good comprehensive languages that can give to you the bases of programming and let's you to get familiarized with important concepts that are applicable to the other languages. Concepts like OOP (with C++) can be used with other OO languages like Java and C#. The C language it's universal, syntax and other features are used by almost other all languages (python, perl, php)... and the particularities you will discover by yourself.
-- Fernando F. Linux User #263682 http://desconstruindo.eng.br
First, read "Advanced Unix Programming" by Marc J. Rochkind. This is perhaps THE one source book for learning to program Unix. Then, become proficient in C. C was developed to write Unix, and Unix was written in C. After that, read the source. You can't write for any application (OSes included) until you can read the source ... which in this case is in C.
I am just curious about what University you attend. We've found that most programs are Java oriented.
Why not Ruby?
More powerful than Python, without the brain-damaged syntax. (And I'm not just talking about the indentation.)
I've done a lot of development in VB on Windows. Yeah, I know a lot of people don't like it, but if you, like me, have worked with assembler, C, C++, Pascal, PHP and most other languages under the sun and understands what's going on under the hood, it's an excellent tool to quickly whip up a useful little program with a nice GUI in almost no time. For instance, it took me eight hours to whip up a tool for batch renaming of files based on about 40 parameters, complete with a script engine for customization (it was for my own use, so I cut a few corners on documentation, validation and all that stuff).
So far, I've not seen any tools for Linux with similar capabilities. Most are to slow to work in (for instance, C variants), the few that I've seen that comes close lack too many features. Examples I've tried: RealBasic, MonoBasic, Gambas, Lazarus, KBasic.
If I'll make a device driver, a file system, a game or something like that, I'll use C, but for high level stuff, I want a tool that is efficient with my time, even if it's at the expence of CPU time. CPU time is cheap, my spare time is not.
Suggestions?
Java is a step above VB in terms of having low barriers to entry, which means the market is full of people that can code in Java, but not necessarily create good software in it.
That said, if you're moving to Linux, the right answer is C. Once you know and are adept at C in a Linux environment, every other language is a small matter of syntax and semantics.
Well, maybe not small, but you get the idea...
While it's important to understand different programming languages, their advantages and disadvantages, at this stage of your career (and the state of our global market and economy) you may wish to examine your career direction.
As an IT student, you weren't educated to be a programmer. You've been given some basic instruction on programming and could reinforce that, regardless of your role in IT it doesn't hurt to know what you're talking about, although you'll see early in your career (and by reading slashdot) that isn't always the case.
However, as a programmer you are in direct competition with the best in the world who work for, at best, 70 cents on your dollar. As you map your career, focus on sustainability. IT is the business of providing solutions to enable a core competency. Writing code is not typically (with many exceptions of course) a value-add activity for most businesses (Microsoft, Sun, Amazon, Google all great exceptions to this rule).
So what IT roles are sustainable? Those that DO provide business value - project managers work closely with the business to ensure cost effectiveness and quality to requirements; architects work with the business to define strategy and long-term technology direction; analysts work closely with business to write specifications for developers; the list goes on.
Business is still 'deciding' which roles are critical to keep in close engagement. They often misjudge and have to correct. One role that continues to move out of the US is that of developer.
Before all the highly paid, extremely talented, and often underemployed developers in this forum get up in arms, I should point out that there will always be a need for experienced technical leadership within the US IT workforce. But these people start out as CompSci or CompEng majors, not IT majors. They move on to technical masters degrees or even PhDs. If that's what you want it's not too late, but you didn't choose the right undergrad for that. Yours positions you between those folks and the business, which is a role that is *less* likely to be outsourced.
Learn to take recommendations from these technical people. Learn to trust their experience (and know enough to question it when appropriate). Spend time reading about technology and learning the business. Take on some side projects to exercise your development skills and learn new tools.
The point is, find your niche based on long-term career sustainability, not flavor-of-the-month programming languages.
Use anything, but if you use C at the bottom (where you need speed, or for tiny projects where the extra amount of your time that it'll use won't matter much) and python at the top, you'll be fine, and ready for 99% of the world's problems.
As for python's whitespace issue: get over it. If this is distasteful enough to you that you have a problem with the language, then you're going to have some sort of aesthetic issue somewhere, with another language. Whether you choose python or something else, you're going to need to learn how to "just deal." It sounds like you (in particular, this is no longer generic advice) ought to go with python just so you can get over that mental block. Once you're over it, then maybe you can switch to whatever (although you probably won't want to).
"Believe me!" -- Donald Trump
No mention here of Kylix, Lazarus, or any of the other Pascal variations. Anyone care to comment on those?
*** *** You're just jealous 'cause the voices talk to me... ***
Seriously? You're asking this question without any reference as to what sort of application you'd like to develop? And if you're afraid of Python's indentation, I shudder to think of what your code in any language. I read once a comment that summed up the indentation issue pretty well and I paraphrase it here:
Python's indentation is like lobster. Most people who've tried it, like it. But it can be hard to believe that you'll like it until you try it.
I would pick some task I wanted to accomplish and then go looking for a language that I thought would be suitable for that task by all measures, including being a language I was interested in learning.
Aside from very few examples, I can't really name a programming language that is platform specific in itself. The libraries and APIs make them platform specific.
Whenever I had projects, I used C or C++, VS to compile for windows, gcc for unix. Use some build flags to isolate your platform specific APIs, or just avoid them altogether if the project permits.
Real world programming is C and C++. If you want to fake it without sacrificing too much, go with Java. Any popular scripting language has platform independent VMs.
Obviously if you are using an MFC derived scripting language, you will be stuck with microsoft ... but even some of those have been made available to linux systems.
If you line up your ducks correctly, any programming language can do anything specified on any platform.
Seriously. Change schools. I have to question the credentials of an academic institution that focuses learning primarily with closed standard tools. It's generally anathema to
Languages are like ice cream flavors; you can try many of them, but you will end up liking maybe one or two or three of them eventually. The great thing about Linux and its distant BSD cousins is that they were designed for programmers from the ground up. You can't argue with C's versatility and heritage to *nix in general. You can't call yourself a true *nix programmer until you give yourself a real chance with C. Nonetheless, many, many languages are suitable for day-to-day deployment. Personally, I will take csh/bash/Python over Perl any day, and C++ when writing for Qt in addition to C. Java seems quite interesting to me for cross compatibility and scalability, but I didn't grow up on it as much as C.
I'm a fairly hard core C/C++ programmer, who has developed embedded device drivers to codecs to doom editors.
It seems nobody has mentioned VB, for rapid application development, concentrating on making the user interface as user friendly as possible, as well as developing the fast bits in C was hugely pleasurable.
I usually hate everything microsoft, however I think VB might be one of the best things they ever made...
MFC was an abomination however.
Right I might go code VB for linux....
It is very important to use a language as highlevel as it requires to be. It doesn't make sense to develop a KDE application that reads RSS Feeds in Assembler. In other words it doesn't matter which programming language you choose. you will soon find another language that will fill your needs better. If you are studying Computer Science your should be comfortable to learn a new language in a couple of days. Most of the API's will be unfamiliar but that changes as soon as you get hands on experience.
Most (?) programmers have this thing about languages. They program in different ones until they find one they really *really* like. After that, EVERYTHING is about that language. Unfortunately, this is ridiculous.
Every language has its strengths and weaknesses. Every programmer has certain levels of competency with the different languages. Every project has its requirements.
In other words, pick the language that best meets the requirements of the project FIRST. THEN look at your competency in that language and come to the conclusion whether to proceed to the next best language, or use that one.
Btw, I once learned a language to do a project *while* *working* *in* *industry*. If you aren't able to do that, or don't want to do that, then this industry probably isn't as compatible with you as you think.
But, if you want my opinion based on my experience: learn as many languages as you can. The more languages you learn, the better you will be overall. You'll be surprised just how different you have to think in any given language to get the job done.
http://www.muppetlabs.com/~breadbox/bf/
If you want to make the big bucks in Information Technology get over your fear of Java. There is not one fortune 500 company that does not have Java some where on their enterprise. Well maybe not Microsoft, but I would not be surprised if they did.
(Or perhaps Mono...)
And it would be well worth taking a side-trip to do something non-trivial in Prolog to see how backtracking works.
There are a lot of interesting computer languages out there!
If you're not part of the solution, you're part of the precipitate.
Why would I check in whitespace changes I didn't want the editor to make in the first place?
I do mine in English, I've tried spanish but could never find a good interpreter.