r/reddit.com • u/CampusTour • Sep 03 '07
Ask Reddit: I want to learn to program, and have NO experience. What language should I start with and why?
/info/2ld0v/comments
183
Upvotes
r/reddit.com • u/CampusTour • Sep 03 '07
23
u/fforw Sep 03 '07
That really depends on what you want to do and why you want to learn programming.
10
u/bryanut Sep 03 '07
Programmer languages are just syntax, learning to program requires learing theory.
Take a class at your local community college. Otherwise you'll just end up teaching yourself bad habits.
45
u/IvyMike Sep 03 '07
It is useful to pick a language where you can quickly be doing useful things--this will help to keep you motivated and wanting to learn more.
Of the suggestions thus far, Ruby and Python are probably the best by this criteria.
If you want to appease the "learn lisp" guys, you can buy SICP and put it on your bookshelf, unread, just like most people do. ;)
134
u/rfugger Sep 03 '07
Python. The ability to try things out in an interpreter is priceless, especially for a beginner, and C-like syntax will make it easy to move to Java or C++ if necessary. Starting with all the static-typing restrictions of Java would be unnecessarily confusing for a beginner.
15
u/[deleted] Sep 03 '07
What are your interests? Do you prefer using Mac, Windows, Linux, or some UNIX variant? How do you plan to apply these skills?
However, if you've never used a commandline before (i.e. you prefer Windows), you'll probably want something with a lot of visual feedback. PHP feels very visual, since a browser window is more familiar to people than a bare terminal with strange text and the results of your first programs are immediately useful. Python for Windows is good too: it has an interactive mode that runs in its own interface (pythonwin) and let's you get instant feedback from bits of code, as do R, Ruby, and plenty of Lisp and Scheme implementations (just Google DrScheme).
7
u/karlhungus Sep 03 '07
My first language was Smalltalk (http://www.squeak.org/). I think i'm a much better OO programmer because of it. Depressing that i'm the only one to mention it.
13
u/vaibhavsagar Sep 03 '07
Play around with LOGO until you can draw simple geometric shapes in it and understand the turtle model, then start learning Python. You won't look back.
6
u/dude78_3 Sep 03 '07
I believe that the language is not as important as what you are coding. I think that you should start out with the goal of creating a (smallish) application which either interests you or is useful to you. Decide which language might be most appropriate for this and choose one which is tried and tested.
You can then start with basic books and exercises in that language and build up to writing your application. I personally started with books and exercises and found that they were sometimes too abstract and would struggle to understand how they applied in a real application.
Examples might be, a simple blogging application in PHP, an mp3 library and player in VB or Delphi, pong in C++... only you know what you are interested in and how hard you will work. Set your self a realistic goal and check with someone who knows to see if it is realistic before you set out.
6
u/jsolson Sep 03 '07
Learn Scheme. I once heard it said (probably by Olin Shivers) "Turing machines model computers. The lambda calculus models computation". Scheme is the practical embodiment of the lambda calculus. The advantage of starting here is that, while you're not likely to produce real practical software in Scheme, you will be able to work in an environment that is largely devoid of annoying distractions like handling input and output. My suggestion for where to start learning is with How To Design Programs. Once you've mastered that, move on to Structure and Interpretation of Computer Programs. After a real pass through those two books you'll have solid understanding of all of the core concepts that are central to all programming.
Becoming a good programmer has very little to do with mastering any given language and a lot to do with mastering concepts like iteration, recursion, time complexity (i.e., how long a program will take to run on an input of size n), and other basic algorithmic principles is crucial. Once you know these and one programming language, picking up other languages is, to a large extent, easy. From Scheme I'd recommend learning Smalltalk to really understand Object Oriented Programming as it was meant to be (and again, because you can work in an environment largely devoid of distractions like trying to get a window on the screen and handling I/O).
Also, every programmer should at some point in their lives write some assembly code and some C. This will give you some respect for how computers actually work.
Best of luck to you, whatever path you take.
24
u/[deleted] Sep 03 '07
javascript. c-like language exposure, without all the staic const & stuff. learn to treat functions as first-class objects from the beginning. do something cool on the internet.
5
u/spellboots Sep 03 '07
Ruby. http://tryruby.hobix.com/ to try it in your browser. I've used a lot of languages and can wholeheartedly recommend it as the best all-rounder.
5
u/xcbsmith Sep 03 '07
I better mention it because it looks like noone else will: Smalltalk. Squeak is well set up for a beginner programmer to start in.
14
u/Joseppi Sep 03 '07
English
4
u/mjc4y Sep 03 '07
Learn with something like python, or ruby (once you get that down, you can quickly learn Rails, the dev kit that works with Ruby for making web applications). If you do that and you like it, then move up to Java. Java as a first language is fine if you want to be a programmer for the rest of your life. If you learn SQL without learning the rest of the field,all you'll become is a really crappy SQL programmer (though possibly a well paid one. ;)
4
u/m9a9r9y9 Sep 03 '07
There are no entry level programming jobs in the U.S. Those jobs were outsourced years ago to India and China. If you want to be a programmer, I'd say your best bet would be to look for a job with a company that writes games. But I don't think even those jobs hire people fresh out of school.
4
u/pupeno Sep 03 '07
Don't worry about the language, worry about what and how you learn in. I'd start with How To Design Programs.
Switching languages will be easier latter.
4
u/StringyLow Sep 04 '07
Read "Code" by Charles Petzold.
It's like a crash course in computer architecture engineering.
It's simply amazing because it takes you from understanding electricity concepts to making logic gates to writing x86 assembly languages to writing a C compiler in 350 pages.
And the illustrations are awesome.
4
u/icey Sep 04 '07
I'm going to suggest something that may be a bit unpopular here but... The only person who can really make a recommendation for you is you.
I would say the best way to go is to go to the book store and leaf through a bunch of language books. Pick the language that gives you the smallest headache to start with. A lot of newbies start by trying to pick the "right" language first, and then end up giving up because the syntax drives them nuts, or they can't "get into" the flavor of the language.
The real, honest truth about programming is one language is never enough. The important thing about your first language is that it's going to teach you what programming is about.
OOP, functional programming, declarative, procedural, whatever; it honestly makes no difference until you have trained yourself how to think like a programmer. And you really can't do that until you've solved some problems with a program.
If you learn VBscript, Erlang, Lisp, Scheme, Python, Haskell, VB, C#, C++, Java or whatever first, it doesn't make that much of a difference; you need to just keep in mind that you're learning your FIRST language and that after that you can learn languages better suited to the sort of programming you want to do.
There are certain languages that are going to be harder to learn than others (Haskell, Ocaml and the functional family come to mind), but I think that will be fairly evident from looking through the books.
After you've looked through some books and say you've got a short list of languages you like; check out the communities for the languages that are in the running. That should be able to resolve the rest of your questions for you.
4
u/djacobs7 Sep 04 '07
The Warcraft III level editor. It employs all the same concepts of a procedural programming language, yet, it is relatively easy to pick up, and can quickly offer some very satisfying results. Making your first peons move is more rewarding than seeing "Hello World!" on a console.
16
u/[deleted] Sep 03 '07
C
15
u/[deleted] Sep 03 '07
C. Once you understand malloc() free(), file descriptors and pointers, you can move on to a language (like php/python/perl) that masks most of that for you.
If you don't learn what's going on under the hood first, you'll never be a great programmer.
6
u/valeriepieris Sep 03 '07
Everyone will say I'm nuts for this one, but if you just want to program for yourself, and you'll never need to share code with someone else who's fluent in your language (i.e. collaborate), I'd go for an unknown windowsy BASIC spin-off called RapidQ. I've written CGIs, stuff for my own academic research, and a crappy go game in it.
3
u/[deleted] Sep 03 '07
MIT has its programming 101 course online, we used it on our college too.
http://mitpress.mit.edu/sicp/
3
u/amacarth Sep 04 '07
No one mentioning Smalltalk? Originally designed with children in mind, simple syntax and has a rich IDE which shields the learner from unnecessary externalities.
Squeak is part of the OLPC. See http://wiki.laptop.org/go/Etoys
18
u/xyphus Sep 03 '07
Ruby, baby, all the way. I think it is by far the easiest programming language to learn for two reasons:
Ruby was the first non-technical language I learned (meaning besides things like Matlab, Mathematica, and OpenDX) and my first program was an neural network (with a back propigating learning algorithm) in about 70 lines. I knew the concepts involved in what I wanted to write, and the writing flowed natually from me unlike other languages in which you have to sit and think "Now how the hell am I going to do this?"
That being said, Ruby will get you started and you will be able to write working code very, very fast, but it doesn't necesarily enforce good habits. But it is my belief that these things come naturally with time as you become more interested in what you're writing. In contrast, writing code in Haskell is like being constantly scolded by a teacher, "That is not allowed!"
I also think python is a good choice because it is similarly very easy, but I think its much less fun because it lacks the beautiful synchronicity of Ruby.
7
u/gernika Sep 03 '07
Just start programming in whatever.
7
u/jrockway Sep 04 '07
Perl. Lots of very well-written (and time-tested) books available; tons of libraries so you can start solving real problems immediately; language designed so that you can know only a little of it and write good programs (There's More Than One Way To Do It); wonderful community that wants to help you be a better programmer; plenty of jobs around if you want to make a career of it.
I know redditors hate Perl, but it's really a baseless hate (wait until Python and Ruby are popular and you have to maintain the legacy code in those languages, I will definitely be here to remind you how much you liked them when they weren't mainstream). Perl has everything you'd expect from a modern language -- higher-order functions, a modern object system (look at Class::C3 and Moose), excellent editor support, etc. And, none of the other languages have the CPAN, so you're stuck solving the same problems over.
If you want to do web stuff, there are a variety of frameworks to choose from; Catalyst, which is J2EE-ish in a perlish way; or Jifty which is a super-nifty Rails-like framework.
FWIW, Scheme and Lisp are also good languages to learn first. "The Little Schemer" and "The Seasoned Schemer" (and "The Reasoned Schemer") should help you understand most concepts of computer science, starting with recursive functions.
Learning Perl after you're familiar with that will help you apply that theory and start writing excellent software.
4
u/SolarBear Sep 03 '07
I'm going to mention Lua since nobody (!) did. Lua is an incredibly simple language to learn and if want to get into more "serious" programming, you can learn C afterwards and it is trivial to imbed Lua in your C programs.
Lua does not force a programming paradigm down your throat : you can easily do procedural, object-oriented or even functional programming in it, and if you ever think the language is too limited, Metalua is trying to bring Lisp-style macros to Lua, although I have to admit I haven't had a serious look at it yet.
4
u/halcy Sep 03 '07
Perl, which is C-like, powerful and easy to pick up. Python has a very strange syntax unlike any other language, PHP is just plain fucking NO (magic_quotes, very non-powerful, slow, and the database api is painful), C and C++ are not for beginners, and java is too complex and overblown for smallish programs.
2
u/AlSweigart Aug 31 '08 edited Aug 31 '08
Python is the perfect beginner's language because it has a gentle learning curve but also supports powerful and advanced programming styles.
I'd also like to plug a free book I wrote for nonprogrammers: Invent Your Own Computer Games with Python It's released under a Creative Commons license. It teaches from complete game examples, and is designed for kids (but is good for teens and adults too, it's not written in a "kiddie" style). I wrote it because many books on this topic teach programming concepts without enough application, so people know the syntax but don't see it in actual use.
EDIT: Ha, forgot the link: http://pythonbook.coffeeghost.net/book1/
2
u/zxvf Sep 03 '07
I'd recommend you to get a copy of The Little Schemer. It has a great question/answer format, assuming no previous knowledge of programming, it manages to build towards great insights in tiny steps. Use Amazon's "Look inside" to see what it's like. Get it, and before you know it, you'll be severely mindfucked in a very pleasant way.
Download DrScheme to go with it. It's an easy to use Integrated Development Environment, with an editor that doesn't suck, error messages you can actually understand and a debugger with neat graphical hints.
I do not recommend you to start out with SICP. It's a great book, but definitely not light reading. Save it for later.
2
u/jacekplacek Sep 03 '07
One advice: pick something simple first as a language (no basic, though, visual or otherwise) and see if it gives you pleasure to solve small problems. If it does, you are on your way, if it doesn't - run, don't look back.
Pay special attention to how making a mistake makes you feel. You will make mistakes, plenty of them. If it challanges you intellectually and make you want to fix them - good. If it frustrates you - again, run.
Every proffesion is easier to perform if you enjoy doing it. So is programming. But if you don't enjoy it programming is going to make you much more miserable than any other. You can still make yourself marginally profficient in it but you will hate your life and never become really good.
As to what language? Doesn't matter that much. You will want (need) to learn more than one anyway. I'm partial to C++ myself but it's much more complex and much harder to learn than most (unless you start with "Accelerated C++".
2
u/RoadWarriorX Sep 03 '07
This is such an open-ended question that cannot be answered without some additional information of your intent. Why do you want to learn programming? Is the reason, that you want to create the next cool game, or make a cool web site, or just make your life easier with computers? What do you think? Because it will define what language you need to learn to do what you want.
I am not going to lie, but I like Lisp. However, it would be utterly foolish of me to come out to say "just use Lisp". What's more important is to pick the right tool for the right goal. So, only if you want to the conceptual parts of programming, then I would recommend a Lisp, because I know that is the best tool for that particular goal. But alas, it is probably a bad choice for you at this time.
Practically though, you need to determine what you need the language for, then do some basic research, look through some tutorials of some of the language to see if it works for you. Don't worry about making a bad choice, because you can always move up the next "hot" language. The important thing is that you got your feet wet and gain the experience.
2
u/jesuswilkinson Sep 03 '07
Start with Ruby, because there's an amazing free program called 'Hackety Hack' that was released earlier this year which was designed to be used to teach kids how to program. If you have a firm grasp on mathematics and logic and such, you'll probably breeze through all of Hackety Hack's lessons in a single day. By the time you're done with them, you should be able to program a lot of interesting things on your own.
2
u/[deleted] Sep 03 '07
Too bad LiveScript (Javascript) never really took off. On Linux, ngs-js is about as close to this as they come, but it needs someone to create a lot of add-on functions to make it work with web servers and be useful.
The reason I like it is because web developers already need to know Javascript, anyway, and because it can be clean and beautiful when used without having to have cross-platform browser code in it. I mean, if it's implemented as a server-side language, and if standards are maintained and C functions are added, it can be fast, easy to learn and use, powerful, and pretty to read.
2
u/[deleted] Sep 04 '07
How to start a flame war between developers.... Might as well ask Jews, Muslims, Christians, Buddhists, and Atheists what religion you study first and why.
2
u/chaztized Sep 04 '07
answer 1: Python.
answer 2: don't do it. you won't have a life. you'll spend all of your time indoors and never see natural light for most of your waking hours.
2
u/westsan Sep 04 '07
Isn't this the million dollar question!? Obviously your aptitude is in asking questions moreso than delving into the code.
2
u/eggplant-walnut Sep 04 '07
This depends entirely on your personality, other life experience, goals, and circumstance. It's like saying, "I want to learn about romantic relationships and sex. Which media character should I start with and why?"
If you have the inspiration and commitment to start with the best, learn everything it can teach you, and stay with what works, then the answer is Common Lisp. On the other hand, most virgins would be intimidated by Leloo in the Fifth Element. They might be better off working their way up slowly from Snow White, in which case Perl (There's More Than One (7) Way(s) to Do It) might be a better choice. Or, in response to the artificial meme of Python as best language to learn, maybe Princess Diana? This is essentially a psycho-social question. Nevertheless, the correct answer is BASIC.
I am the Walnut. I am the Eggplant. Who eats Cashews?
7
u/tadrinth Sep 03 '07
ruby. you can easily write solid ruby programmers in a simple text editor. writing java programs of any usefulness will require a full fledged programming environment. if you are working with a lot of text or building a website, then you definitely want ruby, due to built in regular expressions and Ruby on Rails.
13
u/timjpriebe Sep 03 '07
Perl. Everything will be easy after that.
3
u/[deleted] Sep 07 '07
python. because i said so.
2
u/[deleted] Sep 03 '07
java. it's a heavily used compiled language. lots of stuff is similar to it in syntax.
3
u/[deleted] Sep 03 '07
English.
2
u/[deleted] Sep 03 '07
I will re-iterate what others have said, and encourage you to first learn the basics of programming, in a language-independent way. Most people here will suggest languages they are used to, or have a lot of experience in. I personally feel that programming languages are all bad in many respects, and choosing one first, prior to understand basic concepts, is a bad idea.
So, in summary, think of the language as a toolkit; the means to achieve a goal. Learning how to build a chair, for instance, doesn't require needing one brand of hammer or another. Find a course or a book to learn problem solving for programmers, and then pick a language based on your domain (web programming, application development, scripting, etc.) Or, come back here, and if you still want to program after learning some algorithms and techniques, we're more than glad to suggest frameworks, languages, etc.
My reasoning is that, if you choose a language, then learn to program directly from it, you are limiting your thinking and may not consider generic ways to achieve a solution. It's like trying to draw balanced conclusions from only one reasearcher's work. It will take a bit of time to learn the techniques, but afterwards, you can learn to implement those skills using any language much more quickly.
http://en.wikipedia.org/wiki/Pseudocode
2
u/[deleted] Sep 03 '07
Based on your comments further down the thread, I would say the best bet for you is Java or C#.
Both are well documented and popular, so you'll have no problem finding books and references, and they use a syntax that is common among many other languages. They're also marketable and mainstream, so employers will notice.
2
u/[deleted] Sep 03 '07
C->Java->SQL->Ruby. Pick up some Perl, PHP along the way, and you will be fine. That will keep you busy for a while, but that's ok.
2
u/stesch Sep 03 '07
C64 BASIC, like everybody else.
2
u/[deleted] Sep 03 '07
If you are a Windows user then you may like to check out Microsoft Visual Studio Express, which Microsoft promotes as:
"Free, lightweight easy-to-use, and easy-to-learn tools for the hobbyist, novice and student developer"
For more information and to download visit: http://msdn2.microsoft.com/en-gb/express/default.aspx or http://msdn.microsoft.com/vstudio/express/beginner/
The tools and tutorials you will find will allow you to develop windows applications, or web applications in c# or vb.net (c# is my recommendation).
I'm sure this reply is likely to get down modded because it is promoting a Microsoft development environment, don't let that put you off as Visual Studio Express really is an excellent way for a beginner to get into programming. One of the first programming languages I learnt was c#, and have had no problem transferring my skills to non Microsoft technologies such as Ruby on Rails or Java.
2
u/[deleted] Sep 04 '07
Ahhhhhh! Give up now! The fact that you are so fundamentally lost that you have to post this ancient troll-question to a public forum and sit there watching the 50 flame-wars break out indicates that you are too far behind the curve already.
People who are cut out for programming do not have to ask this question. They simply pick a language and use it. Then they pick another language and learn that too. And they learn multiple platforms and languages and libraries and frameworks and methods and just keep going.
You will be rotten at this unless you simply keep learning all of your life. You never stop reading. You have to be an independent self-starter. You have to simply dive in and resolve that this is what you are committing your life to. You BECOME learning.
I'm telling you what's good for you: go into some other line of work. The last thing we need is another rock sitting there waiting for somebody else to push all the buttons for them. You couldn't simply Google for "what programming language should I learn?" on your own. How are you ever going to manage to type in a bug-free program on your own?
At best, you will struggle along getting flamed every hour for posting Yet Another Stupid Question that is already answered on page one of any manual, eventually manage to program-by-rote in one language which you will then flame everybody else for not worshiping, get a temp job as a code monkey for a couple of years until the one thing you hoped you'd only have to do once in your life - LEARN - gets thrown back in your face again when the industry changes and makes your beloved language/platform/method outdated, and then retire to become another bitter ex-code-jockey grumping about the good old days.
Yes, I know, it's making me very unpopular for saying this. I'll get modded down for being "mean". And when you live to be old and gray, you will see that I was right.
1
u/jspeights Jan 15 '09
LEARN PROCESSING!
1
u/pilt Sep 03 '07
Learn to code in imperative languages (C, etc.), learn to code functional (Haskell, Lisp and its likings) and try programming in a really low-level language (finding a m68k board could be a good start).
1
u/[deleted] Sep 04 '07
I think everyone's first language should be Java. The language is nice and clean and it is very similar to C#/C/C++ that are used throughout industry. Depends how serious you want to be. I mean you should set yourself the goal of learning C if you want a job out of it someday.
lol I wouldn't recommend a dynamically typed language for a beginner - so strange that this page is filled with people with the opposite opinion.
1
u/averyv Sep 04 '07
ruby is a very good place to start. it lays down the basics of what it is to write code in very short order, the syntax is easy, and the concepts are plain. it is a scripting language, so it is manageable, and it is strongly suited for unix environments, which makes working with a computer much less magical and much more practical.
1
u/ajmoir Sep 04 '07
I think it's going to be hard for most posters to give you a clear answer as most of us are seasoned programmers. Personally, I wish someone had given me a lisp book and environment 20 years ago, it would have saved me time and pain.
The big question is why do you want to be a programmer? If it's just for fun then feel free to pick any language. If you have a task in mind then see what language other people used. If you want to become a professional programmer then have your head examined.
The languages I'd recommend in fall in three camps
Camp A Logo, Scheme
Camp B Smalltalk (Squeak), Java
Camp C Ruby, Python
If you want to understand computation then Camp A, you want a good grounding for professional work then Camp B, you want to get stuff done then Camp C.
In most cases Ruby is as good as anywhere to start, the how to program book by the pragmatic programmers along with the pick axe will get you started.
1
u/yungJoc Sep 04 '07
Javascript.
You already have it on your computer (in your browser), and for the programming you'll be doing as a complete newb it will work fairly well.
Afterwards, graduate to Python, Java, Lisp or Haskell. Then study some of the big concepts in computer science:
Assembly language Algorithms Data Structures Operating systems Compilers
1
u/Nessie3 Sep 04 '07
What language to start with? How about English?
1
u/[deleted] Sep 04 '07
English.
1
u/[deleted] Sep 04 '07
Here's a crazy contrartian opinion on what would make a great first programming language: Flash Actionscript.
1 (great) reasons for it:
It will really hold a beginner's Interest: You can do "fun" interesting things onscreen the first time you tinker with it. It's tightly coupled to the gui, so you can minipulate graphics, sounds, movie clips just as easily as you can output "hello world". (only it's bound to seem more interesting/rewarding for a beginner than outputting text strings.) Down the road you may (or may not) realize you're working with an extensible, robust OO language, etc, but you don't have to be familiar with anything like that to get traction on your first learning days.
If you end up loving programming, it surely won't be your last and final language, but it's a great, painless way to get started.
1
u/reddit_user13 Sep 03 '07
c
1
u/berlinbrown Sep 03 '07
factor.
http://factorcode.org/
1
u/anonymous-coward Sep 03 '07
I'd advise something high level and abstract, but high level in a mathematical sense, not in an easy-hackery sense.
For example, Lisp/Scheme/Python are OK, because they teach mapping and closures and functions as objects and styles that range from functional to object oriented. They will expand your head with Big Ideas, and show you what is possible, and make you resentful when you are forced to program with anything less flexible.
Perl/PHP are not OK because they focus too much on quick hackery to juggle files and strings - they are utilitarian, for some set of purposes. (OK, I assume that Perl also has the more elegant stuff buried somewhere in its giant hairball, through a process of agglomeration.)
Languages like C will force you to focus on the details. You'll struggle just to juggle strings and files, and won't even catch sight of the Big Ideas.
1
u/dallen Sep 03 '07
Start off with machine code and work your way up
1
u/farra Sep 03 '07
A year or so ago I went to a number of local high schools and provided some tips for students interested in computers. I put together a bunch of useful links on my website:
And while most of my professional programming has been done in Java, I agree with most here that a good place to start is Python or Ruby. Though at some point you really should try a number of different languages.
1
u/antihero Sep 03 '07
In my opinion it's not that important what language you learn. Once you learn one it's often kind of easy to learn the next, given that they are somewhat similar.
I started with Java which has it qualities, it foster some good object oriented thinking. After that I learned C mostly since I wanted better performance from my apps (in the dark ages of slow Java VMs). Now I mostly program C++ since I feel that I get a better pay off.
However, just learning a language won't get you that far unless you actually have a plan on what you wanna do. You will mostly end up doing uninteresting 'hello world' stuff. You should, in my opinion, get yourself a project and see what tools / programming language that fits the job. One of the first apps I wrote outside school was a simple raytracer (sound hard but it's not that complicated) and it's of course very rewarding when you get nice images of blobs and fractals out of the program.
Some languages pro/cons in my opinion
Java - Kind of easy to get going, it's rather strict and won't allow you to do extremely stupid things. Memory allocation is kind of easy. Java has some overhead since it forces some odd constructs on the programmer.
C - A small language which is extremely well defined and kind of easy to learn. C is extremely widespread and has a lot of possible applications. However, C is a motherfucker to debug sometimes, especially memory, I know professional C programmers who still doesn't understand how malloc / free, stack / heap works.
C++ - C is a subset of C++ more or less, and have some extra stuff that many C++ programmers find useful, templates for example.
Given this I would actually recommend C without knowing more about what exactly it is that you want to do. Keep object orientation in mind though. Even if C isn't a object oriented language it helps a lot remember why object oriented programming is so rewarding.
Find someone that is willing to answer your questions, it helps a lot of course. Make sure that you don't ask people to work it out for you or you will find yourself very lonely very fast. There is a big difference between asking someone to explain how malloc / free works and weather you have to call free for every malloc. The first would result in an essay and the latter in a simple yes. It's essential that you do the hard work.
1
u/digitizemd Sep 03 '07
Anyone who doesn't say C is wrong! C is easy to learn and low-level enough so that you become knowledgeable about basics like memory management; and really understand pointers quite well. Granted, most languages are structured similarly, but after C you'll easily be able to move on to C++ and or Java. Most of all, C is the most widely used.
1
u/[deleted] Sep 04 '07
Hindi
\Thank you folks, I'm here all week.
1
u/tkosan Sep 04 '07
I recently wrote a series of free ebooks for programming newbies which you might find helpful. After years of teaching programming newbies using a variety of languages, I finally decided that starting with assembly language was best. (http://professorandpat.org).
1
u/loveandlight Sep 04 '07
I suppose Pascal and Cobol went the way of the dodo a long time ago. :-)
1
u/anoopsaha Sep 04 '07
Try Latin or sanskrit. The mother of all languages.
-1
u/lectrick Sep 03 '07
Whatever you do, do not start with Ruby.
This is like giving your teenage son a Lamborghini for his first car. Better to start him off with a utilitarian beater like Java so that he will actually appreciate the good stuff when he gets around to it. ;)
Ruby as a language is the best I've ever used. And I've coded in the following languages: Basic, Visual Basic, Pascal, C, C++, Java, Applescript, Cocoa, Bash, Perl, C#, T-SQL, Scheme, and a dozen other miscellaneous ones... I haven't done much Python but the (you didn't hear it here first) "significant whitespace" put me off, as well as the wordy OO. Ruby was designed from the get-go to be OO and it shows (unlike languages like PHP or Python or Perl where it was slapped-on afterwards...).
-3
u/[deleted] Sep 03 '07
I would say Java, using something like http://www.bluej.org/
Java is a simple, relatively clean language with great online support and documentation. You can use the java forums to ask n00b questions http://forum.java.sun.com. Java is also one of the most used languages these days.
If you don't learn Java as your first language, you'll almost certainly need to learn it as your second ;)
0
u/randomb0y Sep 03 '07
Here's a little story for you. I was having a chat with a friend of mine who's a programmer. He's making a decent living working for a major ERP software producer. The software they are selling is not anything you would have heard about but they have enough large customers (engineering companies) that have been around for ages. In fact the software company itself started as an engineering company. In the 80s one of their engineers started to write this ERP software just as a hobby, and the whole thing just kept growing and growing over the decades. The interesting matter here is that the whole thing was started by some geeks with no training at all in computer science, they just picked up a programming language and started the project as sort of a side job.
Fast forward to the XXIst century and you will see that we are slowly returning to the same state. Now all ERPs are modular and you can put together the exact solution that you need for your enterprise without much skill in any programming language. You can sort of get the result that you need by drag-and-drop, and most of the work is spent just clarifying with the end users just what exactly they need from the system.
So what I'm saying is that programmers will become obsolete in the near future. Well, perhaps not obsolete, but not as highly sought after as they are now, or as they used to be in the '90s.
So here's the best piece of advice you'll get today: forget about programming. Pick a major in business, or chemical engineering, or go to med school or law school. Or, if you like computers get an engineering degree.
0
u/mk_gecko Sep 03 '07
How about BASIC? Visual Basic is still being used for games (TowerDefense) and programming in Excel and Access.
-2
u/manthrax Sep 04 '07
I suggest you go big and learn C or C++ first. Python is neat but it is interpreted. I think that alot of people are drawn to programming with the idea that they want to do build something better/faster than what already exists. If all you know is python, you will feel like a second rate programmer until you learn C/C++, whos performance is not going to hold you back. I like python, but having maintained a python script that was regularly used by neophyte programmers, 90% of my support issues were someone unindenting a goddamn line of code by accidentally hitting backspace, and thereby changing the whole flow of the program. Python flow control formatting needs to be fucking optional. If they just curly braces like the rest of the goddamn universe, I'd be able to reccomend it more highly. If you are just curious about OO or wanting to poke around, I'd reccomend java.
0
u/[deleted] Sep 03 '07
[deleted] — view deleted comment
0
u/[deleted] Sep 03 '07
[deleted] — view deleted comment
0
u/[deleted] Sep 03 '07
[deleted] — view deleted comment
0
u/[deleted] Sep 03 '07
[deleted] — view deleted comment
0
u/[deleted] Sep 03 '07
[deleted] — view deleted comment
-8
u/[deleted] Sep 03 '07
[removed] — view removed comment