views:

415

answers:

19

I am planning to do a project in my spare time. I have some experience in Java. Please suggest a programming language I can pick up easily.

+2  A: 

If you have experience with Java, why not it? Regardless, I usually suggest Python as a first language unless someone has a specific interest that would suggest something else.

EBGreen
+6  A: 

I know many people who learned C# after Java, and they say that it is similar enough to have made the transition very easy.

Jason Whitehorn
I'll second that. C# is very much like a Java that had a love child with C.
Abyss Knight
+10  A: 
  • scheme -- maximum academic benifit, minimum difficulty
  • ruby or python -- maximum professional benifit, minimum difficulty
ejgottl
A: 

IMHO. If u're looking for a similar-syntax language, then C# is a right choice for you =)

A: 

C# if you're interested in trying out .NET development.

Andy May
+1  A: 

For similarity of constructs, I'd say C++.

For something totally different, pick a functional language - or a logical language.

warren
+1  A: 

I would suggest learning a language that is significantly different from other 'classes' of langauges. If you know Java, don't learn .Net - learn python. If you know PHP don't learn Python - learn lisp. If you know haskell don't learn scheme - learn C.

So, I'd learn one of these: C (low-level), C++ (or .Net or Java; higher-level), Python (or PHP or Perl; dynamic), Lisp (or Scheme, Haskell, Arc; functional).

Tom Ritter
+7  A: 

Python - at least from the responses I got to my question..

Gulzar
+1  A: 

Python is very easy to learn and it opens a new world for you, where you think "Wow, that little bit of code was all?" That's at least what I thought when I learned it and I think it wasn't a bad idea.

André
+1  A: 

C++. It's like Java, but is better. ;)

Paul Nathan
Could you elaborate on that? I can think of lots of reasons why it is better and why it is worse than Java.
Tarski
Paul Nathan
the library/documentation advantage of Java is negated (more precisely: obliterated) if you throw Qt in the C++ mix
Javier
What about Java memory management (garbage collection) being easier to understand and work with ?
Guido
My subjective experience has been that the Java memory management is more confusing, since it attempts to obscure the actual action of pointers and the heap. Others find it easier.
Paul Nathan
+2  A: 

It really depends on the project. All the suggestions c#, C++, Python, Ruby, etc. are excellent choices, but what is your goal for your spare-time project? Is it a web site? Is it a command-line tool? Is it a gui tool for windows? Linux? Mac?

I'd suggest that a good all-around language for any of these situations would be Java or Python -- both are available on most environments and have a wealth of documentation. If you're doing a web site, I'd look at python and using google's Google App Engine -- it's free to use and very functional. If you're doing a Windows GUI app, I'd look at C# -- it's very easy to deploy like any other windows app.

In any case, good luck on you new application!

JohnnyLambada
+1  A: 

I suppose it depends how much of a challenge you want to set for yourself.

You could use C# because it is very similar to Java.

On the other hand you may find it beneficial to learn C++, because of its popularity. If you plan on doing programming for a living it is well worth learning.

Otherwise if you're going to be parsing a lot of text you may want to learn Perl.

IMHO, a good programmer picks the right tool (language) for the job (type of program).

Tarski
+1  A: 

Choose a language based upon what you want to do and upon what platforms you choose to run your project on. There are other factors, too, such as the need for others to interact with the program, expandability, and other dependencies.

You didn't state what type or "generation" of language you are interested, though we can guess... Machine code is a first generation language and is always tightly coupled to specific hardware. Subsequent generations proceed to ever increasing abstraction of hardware and implementation specifics. In addition, there are interpreted languages. We sometimes refer to high and low level languages, relative height having nothing to do with superiority, but rather the relative level of abstraction from the hardware.

There's an overview here: http://en.wikipedia.org/wiki/High-level_programming_language

If your project has to run everywhere, that limits some choices. ...I'm hesitant to make a recommendation based on anyone being a "beginner" because what languages you are familliar with tends to frame (and often limit) thinking about how a solution to a problem can be implemented. For example, there's a bit of a religious war over "object oriented" and "procedural" languages; Java, which you cited, can be used either way.

I also think that it's very helpful to know C because it's a sort of "lingua Franca" (sp?) - or a bit like English in the global world today; knowing it is nearly expected and foundational - nearly...

Richard T
+1  A: 

Assembly, I know its out of vogue, too hard too long etc., but it will make you a better programmer. The High level languages use lots of libraries, it is possible to create a project and have 99% of your code library calls. Learn Assembly even if you never write a single program in it.

WolfmanDragon
I think you can get the same benefit from C, without having your knowledge tied to a specific CPU architecture. C requires understanding of how computers work, not how a specific computer works. At a certain point the value of the lower level details is a diminishing return.
Mnebuerquo
Sorry to disagree, but you are not required to to code directly to hardware. Classical Logic is required with Assembly, you can do a library call in C.
WolfmanDragon
A: 

Scala would be real easy.

Brian Knoblauch
+1  A: 

Java - but do it well!

You say you have some experience of Java, but if this doesn't include working on a project of a significant size then you probably haven't had to really get to grips with object oriented programming. Using Java will allow you to avoid the hurdle of learning a new language before you can get started on your project, but I think you'll still find that there's plenty of worth to learn...

  • Read Martin Fowler's book 'Refactoring'. More than anything this has taught me the 'how' and 'why' of good object oriented programming.
  • As your project progresses look at 'add-ons' for Java, like AspectJ, that will allow you to explore a new programming style. But it's only with a sufficiently complex project that the advantages of AspectJ will become apparent.
  • Performance tune your application - for speed and memory usage - even if it doesn't need to be small and fast! This will deepen your understanding of algorithms and the disadvantages (and advantages) of memory management. There are lots of tools available to help you examine your application's performance.
  • Then you can move on to rewrite portions in Scala, and you'll really appreciate how it makes programming easier than Java.
David Waller
+2  A: 

Python, Erlang, Scheme or Smalltalk.

Python for the ease of entry. It's deep but the learning curve is shallow.

Erlang because it's a great way to start thinking about concurrency in computer programs.

Scheme because it's Lisp and more. Scheme is concise, beautiful and powerful.

Smalltalk (Squeak) because it's a great way to really understand objects. It's a beautiful system where everything is an object.

Python let's you be quick and dirty; you can be intellectually lazy with it. Smalltalk is also very loose and fun but has more rigor and intellectual depth. Scheme and Erlang are more rigorous and exercise more of the under-utilized regions of the brain.

amiramir
+3  A: 

Python, definitely Python

  • simple syntax
  • open source
  • very powerful
  • tons of libraries (most things are builtin already)
  • great documentation
  • large community
  • most importantly, fun
Jeremy Cantrell
+1  A: 

Perhaps you could learn something that's valuable in every language you will pick up. This is sort of stuff you can learn from learning many languages, rather than answering the question you asked, I'd like to give you a small bootstrap towards something more valuable than knowing many languages, but what you indeed can get from knowing many languages.

Take up languages, learn their details quickly (glance over their features and study them) and try map in your mind how they are similar. This lets you understand better what programming languages really are - they are balanced sets of concepts you compose a program with. Try also learn about how different languages are being implemented, this gets to an another useful idea.

Learn to write programs with programming languages you see most interesting, and learn what libraries do they have to offer. The amount of libraries affect the most what you can do with the language at this point.

Pick up a programming language you see most fit, and write some programming tool related with it. For instance. parsers, compilers, runtimes, garbage collectors... Anything you find interesting at time. Try avoid writing over just learning things, choose your language accordingly.

Here's few programming languages I find interesting in this aspect: C, haskell, python, prolog, lisp, scheme, erlang, assembly of your hardware, smalltalk, SQL, cellular automatons(as language), javascript, basic, forth. They are all different enough from each other, they do not have much to learn in them itself, they are useful, they cover a wide base of concepts and ideas. They all ought give you interesting ideas and lets you see interesting ideas in them.

There are of course more of languages that fit this group, if you find any, I'd like to know too. I believe there's must be lots of interesting languages I have missed. Notice that this group is highly personal as well, for instance, you have java background, I have a visual basic + C++ -background.

Also consider installing some linux distribution if you haven't already. Many of programming languages have crippled or practically limited windows binaries.

You ought also ask more on stackoverflow about a language you are about to pursue upon. They often have things to know that save you lot of trouble and already bootstraps you onto the languagee. One instance is setuptools in python. Good question would be something like "newbie start onto python" "I've read through python's manuals and downloaded python2.5. Is there utilities or libraries that'd help a lot in understanding the capabilities of python?" Something like that.

Of course, it all is most preferrable when you already have some moderate knowledge about any language. Also goal towards developing actual programs and think in that aspect. (What do I benefit from this certain feature/convention in writing/deploying/reading/understanding my program?)

Cheery