What language would you recommend for a complete newbie?

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

sleeply
Posts: 95
Joined: Wed Jun 24, 2009 2:25 am UTC

What language would you recommend for a complete newbie?

Postby sleeply » Fri Aug 07, 2009 3:33 am UTC

Hi all,

I have no experience with programming at all, but I am interested in learning as a hobby and in my spare time. I was going to start learning C or C++, but then I was told that it would be better for me to learn Java. However, I don't think that I'll be going into a corporate programming job (which is what I hear C/C++ and Java are most used for), so I'm not sure if either of those two would work for me.

My question to you, fellow xkcd-ers, is what would you recommend for someone who has no prior experience and wants to learn programming just for fun? I see people recommending a lot of different languages, and I am quite confused :?
A poster for the philosophy club wrote:What if the world were a pineapple and we were all talking violins?
A poster for the math club, with an arrow pointing to the above sign wrote:Someone must have divided by zero!

sje46
Posts: 4730
Joined: Wed May 14, 2008 4:41 am UTC
Location: New Hampshire

Re: What language would you recommend for a complete newbie?

Postby sje46 » Fri Aug 07, 2009 3:39 am UTC

In b4 Python
General_Norris: Taking pride in your nation is taking pride in the division of humanity.
Pirate.Bondage: Let's get married. Right now.

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: What language would you recommend for a complete newbie?

Postby ash.gti » Fri Aug 07, 2009 3:45 am UTC

viewtopic.php?f=40&t=20660 has a lot of discussion for this topic. Read that first, then ask a question if you still have any.
# drinks WAY to much espresso

baultista
Posts: 99
Joined: Tue Jun 30, 2009 8:14 pm UTC

Re: What language would you recommend for a complete newbie?

Postby baultista » Fri Aug 07, 2009 4:44 pm UTC

sleeply wrote:Hi all,

I have no experience with programming at all, but I am interested in learning as a hobby and in my spare time. I was going to start learning C or C++, but then I was told that it would be better for me to learn Java. However, I don't think that I'll be going into a corporate programming job (which is what I hear C/C++ and Java are most used for), so I'm not sure if either of those two would work for me.

My question to you, fellow xkcd-ers, is what would you recommend for someone who has no prior experience and wants to learn programming just for fun? I see people recommending a lot of different languages, and I am quite confused :?

I learned VB first. Mistake #1.

I wouldn't start out with Java right away... learn how to code procedurally first, then with OO. You can sort of write procedural code in Java (use a single class and shove as much as possible in your main() function) but you'll develop some really bad habits.

I'd recommend Python, tbh. C++ is as good a starting point as any, too.
Could God write a program so long that not even he himself would have the memory to compile it in a single pass? -- Hamish Campbell

User avatar
TheChewanater
Posts: 1279
Joined: Sat Aug 08, 2009 5:24 am UTC
Location: lol why am I still wearing a Santa suit?

Re: What language would you recommend for a complete newbie?

Postby TheChewanater » Sat Aug 08, 2009 5:43 am UTC

Learn a C-based language first, like Java, C++, or C#. No, forget that last one. C# is evil.

I learned C++ first, and I'm still learning. I've never learned Java or Python, or anything but C++, as well as some Javascript and Actionscript.

Whatever you do, stay away fro any language that isn't C-Based until you have a good grasp on what you're doing. If you're a noob, it will give you too many bad habits, and make C/C++ seem to hard in comparison. That's the approach I took, and it's worked pretty well so far.
ImageImage
http://internetometer.com/give/4279
No one can agree how to count how many types of people there are. You could ask two people and get 10 different answers.

notallama
Posts: 236
Joined: Fri Jun 01, 2007 4:28 pm UTC

Re: What language would you recommend for a complete newbie?

Postby notallama » Sat Aug 08, 2009 6:23 am UTC

how will a non-c based language give you bad habits?

i'd suggest learning c before c++, but after a higher level language.
for a starting langage, i'd suggest scheme or ruby.

also, when you learn c, gdb will be your best friend.
(ddd or emacs provide a graphical interface for gdb)

User avatar
TheChewanater
Posts: 1279
Joined: Sat Aug 08, 2009 5:24 am UTC
Location: lol why am I still wearing a Santa suit?

Re: What language would you recommend for a complete newbie?

Postby TheChewanater » Sat Aug 08, 2009 6:44 am UTC

notallama wrote:how will a non-c based language give you bad habits?

i'd suggest learning c before c++, but after a higher level language.
for a starting langage, i'd suggest scheme or ruby.

also, when you learn c, gdb will be your best friend.
(ddd or emacs provide a graphical interface for gdb)


Not quite bad habits, but I started to learn basic, and it made c++ a little hard to grasp at first. Although I don't think I expected to get it right away, if I had continued with Basic, I'd want to learn c++ for its extended functionality, but it'd be harder to learn sometimes longer ways of doing things.

Hey, anyone tried GML as a first language? That's like C,C++, etc.
ImageImage
http://internetometer.com/give/4279
No one can agree how to count how many types of people there are. You could ask two people and get 10 different answers.

User avatar
Mat
Posts: 414
Joined: Fri Apr 21, 2006 8:19 pm UTC

Re: What language would you recommend for a complete newbie?

Postby Mat » Sat Aug 08, 2009 9:02 am UTC

I'd suggest python or ruby, which are very beginner friendly, but unless you have a specific goal in mind for what you want to program, the language itself isn't that important. Just make sure you find a good resource to learn from. You might want to have a look at the "how do I learn about [n]" thread.

Whatever you do, stay away fro any language that isn't C-Based until you have a good grasp on what you're doing. If you're a noob, it will give you too many bad habits, and make C/C++ seem to hard in comparison. That's the approach I took, and it's worked pretty well so far.
This makes no sense. Also, I would avoid C++/Java/etc. because there's a lot to learn for a beginner. C itself would be better.

User avatar
You, sir, name?
Posts: 6983
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City
Contact:

Re: What language would you recommend for a complete newbie?

Postby You, sir, name? » Sat Aug 08, 2009 9:59 am UTC

I do not think C is a good language to start with (don't even get me started on C++ and Java, they're even worse). What it boils down to is that you've got to learn to crawl before you learn to walk. Until you've got the fundamentals of code flow and types and all that down, being confronted with pointers and weak typing and all the stuff that makes C powerful will just make things needlessly difficult. C simply has too many gotchas to make a good first language.

In that sense, python is a good choice. Ruby will work too, or lua, or most other modern interpreted languages.

TheChewanater wrote:Not quite bad habits, but I started to learn basic, and it made c++ a little hard to grasp at first. Although I don't think I expected to get it right away, if I had continued with Basic, I'd want to learn c++ for its extended functionality, but it'd be harder to learn sometimes longer ways of doing things.


Basic is hardly representative for non-C based languages. It's well documented as mind-crippling. For in the words of Edsger Djikstra:

"It is practically impossible
to teach good programming
to students that have had
a prior exposure
to BASIC:

As potential programmers
they are mentally mutilated
beyond hope of regeneration
."

(Re-formatted in verse with questionable metric by me)
I edit my posts a lot and sometimes the words wrong order words appear in sentences get messed up.

sleeply
Posts: 95
Joined: Wed Jun 24, 2009 2:25 am UTC

Re: What language would you recommend for a complete newbie?

Postby sleeply » Sat Aug 08, 2009 1:29 pm UTC

Thank you for all of your replies, they have been helpful :D

After further consideration, I decided to start with Python, then maybe try C or C++ after I get a firm grasp on the basics. I have a question though--one of my friends has some programming experience and recommends that I do Java after Python, instead of C or C++. I know that Java is more commonly used, but from what I've heard, it doesn't seem like it would be the language of my choice for my needs. What would you say would be a better transition into the world of programming after finishing Python?
A poster for the philosophy club wrote:What if the world were a pineapple and we were all talking violins?
A poster for the math club, with an arrow pointing to the above sign wrote:Someone must have divided by zero!

notallama
Posts: 236
Joined: Fri Jun 01, 2007 4:28 pm UTC

Re: What language would you recommend for a complete newbie?

Postby notallama » Sat Aug 08, 2009 3:06 pm UTC

the troule with java is that if you put it on your resume, you might have to use it.
if you want to learn the java libraries, i'd suggest using them from another language,
like clojure, scala, or groovy.

c++ is good to know, but as a said, learn c first.
basically, c++ will seem fairly magical if you don't first wrap your head around pointers and the preprocessor.
it could easily lead to cargo cult programming if you jump right to c++.

User avatar
You, sir, name?
Posts: 6983
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City
Contact:

Re: What language would you recommend for a complete newbie?

Postby You, sir, name? » Sat Aug 08, 2009 3:13 pm UTC

sleeply wrote:Thank you for all of your replies, they have been helpful :D

After further consideration, I decided to start with Python, then maybe try C or C++ after I get a firm grasp on the basics. I have a question though--one of my friends has some programming experience and recommends that I do Java after Python, instead of C or C++. I know that Java is more commonly used, but from what I've heard, it doesn't seem like it would be the language of my choice for my needs. What would you say would be a better transition into the world of programming after finishing Python?


It doesn't really matter where you go after python. After you've learned C++, learning Java is pretty straightforward, and vice versa. If you know people who are into Java, you may consider taking that avenue just for the convenience of having a go-to guy.

notallama wrote:the troule with java is that if you put it on your resume, you might have to use it.


Indeed. There should be a don't ask don't tell policy about Java.
I edit my posts a lot and sometimes the words wrong order words appear in sentences get messed up.

the.coding.eye
Posts: 52
Joined: Thu Apr 16, 2009 4:56 am UTC
Contact:

Re: What language would you recommend for a complete newbie?

Postby the.coding.eye » Sun Aug 09, 2009 5:56 am UTC

TheChewanater wrote:C# is evil.


As someone who isn't super advanced in programming, although I have done a fair amount of website programming using ASP.NET and C# along with all the database stuff, why do you consider C# to be evil?
"In theory, theory and practice are the same. In practice, they are not."

User avatar
Vault
Posts: 169
Joined: Mon Nov 10, 2008 5:00 pm UTC
Location: Just past the event horizon
Contact:

Re: What language would you recommend for a complete newbie?

Postby Vault » Sun Aug 09, 2009 2:43 pm UTC

Probably because it's from Microsoft. The issue I have with it is that if you write a program for .net you have almost no hope of it being cross platform (though if the Mono project accomplishes its goal, this won't be as big of an issue).

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: What language would you recommend for a complete newbie?

Postby ash.gti » Sun Aug 09, 2009 3:19 pm UTC

Vault wrote:Probably because it's from Microsoft. The issue I have with it is that if you write a program for .net you have almost no hope of it being cross platform (though if the Mono project accomplishes its goal, this won't be as big of an issue).

I have run a few C#.NET compiled binaries on my Mac with absolutely no changes to the binary. All I had to do was install mono. Its not perfect (I got a few errors that caused it to crash, but those same features worked in Windows when I tried later) but its pretty darn good in its current implementation.

I don't know C# at all so /shrug no comment about it as a language, but Mono seems to be doing pretty well as far as I can tell.
# drinks WAY to much espresso

User avatar
Vault
Posts: 169
Joined: Mon Nov 10, 2008 5:00 pm UTC
Location: Just past the event horizon
Contact:

Re: What language would you recommend for a complete newbie?

Postby Vault » Sun Aug 09, 2009 3:46 pm UTC

From what I know about C# as a language it seems to be nice to work with. It's a lot like Java, but with some extra features that I wish Java supported.

User avatar
TheChewanater
Posts: 1279
Joined: Sat Aug 08, 2009 5:24 am UTC
Location: lol why am I still wearing a Santa suit?

Re: What language would you recommend for a complete newbie?

Postby TheChewanater » Mon Aug 10, 2009 6:24 am UTC

Mono isn't completely reliable, espesially for networking (you might not need that at this point, though.). Also, C# will probably die out if Mono isn't finished, and you'd have to start learning a different language to keep up with all the latest libraries and resources.
ImageImage
http://internetometer.com/give/4279
No one can agree how to count how many types of people there are. You could ask two people and get 10 different answers.

sleeply
Posts: 95
Joined: Wed Jun 24, 2009 2:25 am UTC

Re: What language would you recommend for a complete newbie?

Postby sleeply » Tue Aug 11, 2009 9:34 pm UTC

Thanks for all of the replies :D

So I've gotten some Python basics with the help of some online tutorials, but I want to teach myself some more before I head off to other languages. I guess I'll probably go to C next, even though my friend believes that "it's only for nerds"--as if there's anything wrong with that! :x

Regarding Java, I think I'll do that after C++, though that'll probably be very far off into the future.

Thanks again!
A poster for the philosophy club wrote:What if the world were a pineapple and we were all talking violins?
A poster for the math club, with an arrow pointing to the above sign wrote:Someone must have divided by zero!

User avatar
ash.gti
Posts: 404
Joined: Thu Feb 07, 2008 1:18 am UTC
Location: Probably a coffee shop.

Re: What language would you recommend for a complete newbie?

Postby ash.gti » Tue Aug 11, 2009 9:50 pm UTC

hehe you can always mix and match

Code: Select all

class MyTest

  def factorial(n)
    f = 1
    n.downto(2) { |x| f *= x }
    f
  end

  inline do |builder| # ruby inline lets you write C functions embedded into a ruby class
    builder.c "
    long factorial_c(int max) {
      int i=max, result=1;
      while (i >= 2) { result *= i--; }
      return result;
    }"
  end
end


There is a python way of doing this too, but I don't know it off the top of my head.
# drinks WAY to much espresso

User avatar
Kurushimi
Posts: 841
Joined: Thu Oct 02, 2008 12:06 am UTC

Re: What language would you recommend for a complete newbie?

Postby Kurushimi » Tue Aug 11, 2009 11:57 pm UTC

A good way to practice a programming language, whichever one you choose, is to do Project Euler problems, if you like math that is. Some of them are really difficult, but there are several that can be solved with just a little time and effort.

User avatar
TheChewanater
Posts: 1279
Joined: Sat Aug 08, 2009 5:24 am UTC
Location: lol why am I still wearing a Santa suit?

Re: What language would you recommend for a complete newbie?

Postby TheChewanater » Wed Aug 12, 2009 3:42 am UTC

I'm not quite the expert on this... but why would one want to learn C then C++? I've picked up a decent amount of C, and it seems kinda like you would be learning the old way, then the new way, and then you're supposed to forget the old ways.
ImageImage
http://internetometer.com/give/4279
No one can agree how to count how many types of people there are. You could ask two people and get 10 different answers.

User avatar
Area Man
Posts: 256
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: What language would you recommend for a complete newbie?

Postby Area Man » Wed Aug 12, 2009 4:16 am UTC

TheChewanater wrote:I'm not quite the expert on this... but why would one want to learn C then C++? I've picked up a decent amount of C, and it seems kinda like you would be learning the old way, then the new way, and then you're supposed to forget the old ways.

Yes, completely unnecessary. C is not a stepping stone to C++, that's foolish; it's not a sequel to a must-read.
What can a newbie do in C that he can't do in C++ (and do it better); conversely, what do you have to use of advanced C++ to learn the simple stuff?
You can get the same basics by starting with ++ and gradually throw in more stuff.
Wasn't there a thread about this?
edit: yep
Bisquick boxes are a dead medium.

notallama
Posts: 236
Joined: Fri Jun 01, 2007 4:28 pm UTC

Re: What language would you recommend for a complete newbie?

Postby notallama » Wed Aug 12, 2009 4:42 am UTC

if your goal is to pick up c++ and use it as a primary language, then learning c first isn't going to do a lot of good.
if your goal is to learn more about computers/languages, learning c first is a pretty good idea.

the basic idea is that c is easier to learn, and it teaches you low level stuff right away.
and if you're using gdb, then you'll really start to get how the computer works.

you can do it with c++ too, but c gets straight to the point.

ex-kgb
Posts: 47
Joined: Sat Dec 20, 2008 3:55 am UTC

Re: What language would you recommend for a complete newbie?

Postby ex-kgb » Wed Aug 12, 2009 1:15 pm UTC

Stay away from

1. VB
2. C++
3. VB

I personally went Python -> Mono C# -> Haskell -> Asm -> C -> Caml, which doesn't follow any real pattern, but in the end the best thing to do is work with a bunch of languages and find out what works for you. It's better to get started now with C++ than to wait forever deciding to go with Python. So whatever choice you make, be prepared to dive into it.

Also, learn as many languages as you want. If both C and Python interest you, learn both. It will make you a better programmer, I promise.

User avatar
Kurushimi
Posts: 841
Joined: Thu Oct 02, 2008 12:06 am UTC

Re: What language would you recommend for a complete newbie?

Postby Kurushimi » Wed Aug 12, 2009 2:43 pm UTC

Except, I don't think it's a good idea to try and learn two languages at the same time when you're first starting to program. I'd think it could get more confusing than learning them in sequence.

transient
Posts: 65
Joined: Sat Jul 25, 2009 3:51 am UTC

Re: What language would you recommend for a complete newbie?

Postby transient » Wed Aug 12, 2009 4:49 pm UTC

I started out programming with C++ (see http://www.amazon.com/Beginning-Game-Programming-Development/dp/1592002056 for an excellent book). If you have a good book to follow, it probably doesn't really matter which language you start out with, because the book will gradually introduce you to more and more advanced concepts.

My opinion? Find a good book, and learn the language that book teaches. Its a lot easier picking up other languages once you know one (particularily true if you already know C / C++).


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 8 guests