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.
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
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.
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.
"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
There are some languages that legitimately aren't going anywhere any time soon. This is especially true on *nix platforms.
C, C++, Common Lisp, Java, Perl5, Bash scripts. They were here 10 years ago, and they'll be here 10 years from now.
-- The act of censorship is always worse than whatever is being censored. Always.
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.
... 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.
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.
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
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!
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.
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.
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.)
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?!?
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]
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...
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."
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."
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
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.
...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!
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.
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
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
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!
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.
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.
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.
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.
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.
"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.
Read "The Art of UNIX Programming" by Eric S. Raymond (Addison Wesley). Then you will know.
"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.
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.
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.
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. } } }
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.
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...
Actually he is mentioning Linux. GNUstep is a really good platform for experimenting with Objective-C. It should be stable and full-featured enough for the needs of learning. I started coding Objective-C on that about 6 years ago. Over time I switched to Mac, which of course provides me with a more stable environment for Objective-C programming, yet GNUstep was very useful and I guess it evolved since I last used it.
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.
Why, did gcc drop objc? It seemed to work well when I played with it a while ago.
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.
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.
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
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.