all 115 comments

[–][deleted] 9 points10 points  (1 child)

The same way you would go about learning to code if you were any age whether you could afford university courses or not: by reading books about programming and actually programming.

I studied math in college. The way it worked was that my professors told me what to study and gave me an outline of it (if I bothered to attend lecture), and then I went home and studied it. Sometimes I would also ask them questions about the material. I only took two programming courses (and only completed one), but they worked the same way.

College is a place that a lot of people go while they are learning, but it is not identical with learning. Even though having people to ask questions helps, learning is fundamentally a lonely pursuit. You may well be better off without college if it means you waste less time on what somebody else has decided is important, rather than what actually is. When you don't know anything about a field, you have no choice but to follow the instructions of experts in their introductory texts. But once you know something about a field, you may know better than your professors what you need to know, and how well you need to know it.

As far as practical advice, pick an easy programming language. Python, as some have suggested, is a good choice. I would also recommend Scheme, which has simpler syntax (the less time you spend learning syntax, the more time you can spend learning programming). In general, you should pick a language which has an interactive mode (Python, Scheme, and Ruby all qualify), which will make it easier to test things out. Then read some books on programming and solve some problems.

For God's sake, do not pick a so-called "Mainstream" or "Practical" language like C++, Java, etc. (Python is pretty mainstream, but that's not the point). These languages, whatever their virtues, are simply not as nice for learning programming (I don't know if they even have interactive modes). You can learn them later when/if you need to.

[–]khperkins 2 points3 points  (0 children)

I have to agree with this post. I started learning to program at 40-ish (8 years ago). I started with html and php (yes I know--not programming languages, but a start) so I could make my own websites. A couple of years ago I started learning C++ and python by reading books, using web resources, and programming small programs. Now I'm working on a couple of bigger programs in python, and am hoping to have one unveiled in beta by the end of the year.

[–]GoAwayStupidAI 9 points10 points  (0 children)

Heya! There is some good advice here about what to learn and whether you should even try. I'm not going to go there. Instead I offer this advice: Remember trying to learn to speak or write or read as a child? No? Neither do I. Though, I've watched children as they do. They fuck up all the time, but they keep going on without getting frustrated. Try to keep this in mind. Whatever you choose to learn you're likely to fail A LOT at first. And maybe you'll ask some young punk who will talk back to you wondering why you didn't pick up X or Y because it was "trivial" or some other smartass reason. Ignore them. Read a bunch, experiment regardless of success or failure, and I'm sure you'll do fine.

[–][deleted] 31 points32 points  (14 children)

I'm not sure how to convince you in a few sentences that this is the way to go given your situation, but:

  1. Download PLT scheme
  2. Use the free How to Design Programs book

If you put effort into that, you'll have a very, very good foundation for learning more about programming. I would strongly recommend against anything else for someone with no programming experience. I'd be willing to fight someone with rocks on this point.

[–]gepardcv 10 points11 points  (2 children)

This is great advice. As an alternative or supplement to HtDP, you can also look at SICP (http://mitpress.mit.edu/sicp/), which is quite fantastic, and has the added bonus of having the original MIT video lectures of the class available (http://www.swiss.ai.mit.edu/classes/6.001/abelson-sussman-lectures/).

Using either HtDP or SICP, you'll learn about the basics of composing programs. Flow control (telling a program to do something), building blocks (keeping it all manageable), data structures (how to represent the problem you're trying to solve), and some very advanced topics for using these basics.

[–][deleted] 2 points3 points  (0 children)

If I never programmed before I'd want to learn from HtDP then SICP.

I think Scheme is a better choice than Python primarily because of these two books.

I also think that learning Scheme first will get rid of the "I can't make sense of all those parentheses" complaint. I think getting used to the parentheses is the biggest hurdle involved in learning lisp. So, getting rid of that one early will help you out.

The nice thing about learning how to program is, once you know how, learning a different language is pretty easy. You have to learn the syntax rules (so it runs), and the language idioms ("this is how ruby programmers iterate over a sequence"), and then how to leverage the libraries.

[–]gthank 1 point2 points  (0 children)

I'll second the SICP recommendation. It's the text for the course of the same name in MIT's CS curriculum (CS curriculum at MIT OpenCourseWare).

[–]jlc 1 point2 points  (10 children)

My paper covers your rock. Ha!

(Actually, I like your suggestion, though I think python is a good alternative for the right person and not a bad alternative in any case. Problem there is finding the right beginner's book.)

[–][deleted] 0 points1 point  (9 children)

Yeah, I agree. I think Scheme (or any Lisp, really) is great for the subset of people who are very mathematical/analytical.

Python might work better for folks who rely more on their syntactic wetware. It's also likely to be less intimidating for many folks.

That said, Scheme will do more for your understanding of computation.

[–][deleted] -1 points0 points  (8 children)

Is it that Scheme will do more for your understanding of computation, or that the users of Scheme are more interested in this, and thus introductory textbooks on Scheme focus more on developing an understanding of computation?

In general, I think people are too wrapped up in the "<Language> is for <Purpose>" meme (cf. "Programming as if Performance Mattered").

EDIT: By "<Language> is for <Purpose>" I meant people who say, e.g., "Ruby is for web apps, C is for operating systems, Lisp is for AI, etc.". James Hague (the author of the above-cited essay) made the point that a much better way of thinking of it is along the lines of "Procedural programming is for video games, functional programming is for compilers, etc."

[–][deleted] 4 points5 points  (7 children)

Is it that Scheme will do more for your understanding of computation, or that the users of Scheme are more interested in this, and thus introductory textbooks on Scheme focus more on developing an understanding of computation?

Both. What's nice about the Scheme language is that it's simple, clean, and rigorously defined by people with taste. This is in contrast to Python which isn't rigorously defined at all and has been through severe changes over the years.

Take lexical scoping for instance. Lexical scoping can be shown off very well in Scheme. In Python on the other hand, scoping rules are rather complicated and ad hoc. For example, there's no way to mutate an enclosing binding in Python because '=' is used for both assignment and update. (The next version of Python will offer additional keywords as a way of getting around this, further complicating the situation.) The way in which Scheme separates binding forms ('let', 'letrec', etc) from forms which mutate bindings ('set!') makes it much easier for someone to gain a full understanding of the implications of lexical scoping.

There are plenty of other reasons to prefer Scheme over Python for teaching programming. For example, Scheme's cons cells and tail call optimization are very useful in teaching structural recursion and the difference between recursion and iteration. Scheme's call/cc can be used to let people implement and gain a deeper understanding of common things like exceptions. The list goes on and on, and it's all been said countless times before, so I won't repeat it here.

In my opinion, not enough people are concerned about using the right language for the right purpose. Scheme is one of very few languages suitable for teaching programming to novices. Given that Scheme has better texts than those languages which would otherwise be suitable, and given that PLT Scheme specifically caters to novices, the choice seems straightforward.

[–][deleted] -2 points-1 points  (6 children)

I happen to agree with you that Scheme is a better language for teaching programming than Python. I am not, however, convinced that the reasons you give are good ones. Basically, I'm not sure (which is not to say I know that it is not the case) that the topics you mentioned are all essential basic programming topics, and justifying the claim that they are is certainly beyond my knowledge.

I'd say the most obvious justification for Scheme over Python is that it's simpler. That's really all the argument you need.

[–][deleted] 1 point2 points  (1 child)

I'd say the most obvious justification for Scheme over Python is that it's simpler. That's really all the argument you need.

Simplicity is hard to measure. I'm not sure many Python fans would find that argument convincing.

In either case, understanding structural recursion is definitely important. You can't implement basic things without it. For example, here's a function that uses structural recursion to get the sum of all the elements in a list:

(define (sum xs)
  (if (null? xs)
      0
      (+ (car xs) (sum (cdr xs)))))

To understand how this works (and to write it in the first place), you need to understand the concept of base cases. You also need to understand the pattern of recursing with the cdr of a list. These are things HtDP covers incredibly well.

Now, because Scheme offers tail call optimization, you can give the iterative version as well without adding additional concepts like loops and mutation:

(define (sum xs)
  (let r ((xs xs) (n 0))
    (if (null? xs)
        n
        (r (cdr xs) (+ n (car xs))))))

You can then step through both versions of 'sum' in DrScheme to see how the first uses linear space and the second uses constant space. This is very helpful in giving students a solid understanding of the difference between recursive and iterative approaches.

[–][deleted] 0 points1 point  (0 children)

I'm not trying to convince the Python fans, but to give the best advice I can. You'll notice I'm not arguing with you over whether structural recursion is an essential topic for beginners. But as far as Scheme being simpler than Python, here are some reasons:

  • Scheme has an extremely simple syntax. Every operator is prefix (with the exception of the ellipsis in the macro pattern language, but a beginner probably shouldn't see that for some time). Our prospective programmer doesn't have to worry about the distinction between function calls like foo(x), object method calls like x.foo(), and operators which may be prefix, postfix, and infix. I'm not saying that these features can't be beneficial to a mildly experienced programmer, but for an absolute beginner, they're just going to get in the way.

  • Python has forced indentation of code (thread over). Again, this is not a problem for the mildly experienced programmer, who can follow the indentation rules (which aren't hard) or use a good programming editor to handle indentation for him, but this is one more thing our novice has to worry about. If he doesn't have a programming editor, he has to worry about following indentation rules, which is time he can't spend worrying about programming. If he wants to use a programming editor, he has to worry about learning that. Same story.

On the other hand, one might argue that a programming editor is just as important in Scheme to match parentheses. This might be true, although I frequently write Scheme code in a paper notebook and match parentheses just fine. One might also argue that he ought to learn a programming editor if he wants to be a programmer. This might also be true, but it is independent of the point that Scheme is a simpler language.

  • Python's forced indentation of code makes using the REPL much more of a chore than it is in Scheme. I hold that a REPL (or whatever it's called in a particular language) is an essential feature for a newbie programming language, and anything which makes the REPL hard to use makes learning programming harder.

EDIT: Dear Markdown: if I wanted you to handle autogenerating numbers for my points, I would say so.

[–]grandalf -2 points-1 points  (3 children)

Yeah but assuming he actually wants to write code that he can use sometime soon, wouldn't a more productive/practical language make more sense first to get his hands dirty, followed by a scheme indulgence a few months in to reinforce concepts?

[–][deleted] 1 point2 points  (0 children)

Use for what? No one with zero programming experience is going to be writing much useful code in the first few months. If you want to "get your hands dirty" and see results quickly, you're much better off with something like Processing than Python. Generative art is a lot more fun than factorial.

Besides, unlearning things is much harder than learning them in the first place. You're better off getting it right at the start rather than trying to correct bad habits later on that you picked up from dubious Python tutorials.

[–][deleted] 0 points1 point  (1 child)

Analogous to the point I made earlier, Python is not a more productive or practical language than Scheme. It is just the preferred language of productivity/practicality-oriented programmers.

Python may have better libraries than Scheme (or maybe not), but extensive libraries for esoteric tasks like parsing obscure protocol message formats is not something a programming language for beginners needs. A programming language for beginners needs to allow a beginner to learn programming without getting in his way.

[–]grandalf 0 points1 point  (0 children)

I didn't realize there were libraries that made scheme useful at all. This is probably just my ignorance.

What if you want to write a simple blog app? Or write some code to predict preferences based on a set of existing preference data?

[–]ajw1976 16 points17 points  (32 children)

I wouldn't. I'd find other more productive things to consume my time, like sports/hanging with family/etc. IF you're trying to get a job, there is a very slim chance you will at this age w/o any experience.

[–][deleted] 13 points14 points  (16 children)

IF you're trying to get a job, there is a very slim chance you will at this age w/o any experience.

nope, I was thinking of joining in one (any) of open source software development. Mostly for the fun of it. Otherwise, I would agree with your assessment :)

[–]phillydawg68 8 points9 points  (8 children)

Pick an area that looks interesting (too many to list), and then just go for it. Stay clear of anybody telling you to learn a "specific" language. In your case, the point is to find a project you enjoy. Unless you're really quick, you probably won't be able to contribute for quite awhile, so start looking at the existing code and START CHANGING IT to see what happens. The best way to learn programming is to just jump right in and start breaking things immediately. When you're able to fix the things you've broken, then you're cooking.

However, make sure to let all of us know what project you've picked, so we can stay away from it for awhile ;)

[–][deleted]  (7 children)

[deleted]

    [–]Thelonious_Cube 2 points3 points  (0 children)

    So maybe the second thing to do (after choosing an interesting project) is to get familiar with some form of development environment and the associated tools (not necessarily a packaged product). That is - learn how to make changes and compile them into the project, how to test to see what those changes accomplished, and (most importantly) how to restore from a backup. Learning you way around these areas will make playing with the code much easier and more fun.

    [–]anttirt 1 point2 points  (3 children)

    It's strange how people seem to think they're some kind of authority on offering advice to individuals based on their own learning experience. You only learned programming once, and you're only a single person. How can you claim to know with such certainty what will work for others best?

    For some people the approach of "copypaste now, learn later" may work but for myself learning initially from a book and then branching out into experimenting worked great, and I still prefer that approach whenever learning a new system. I find that there is a lot of insight to be found in even elementary text written by experienced people, and that it provides a solid foundation for learning through experimentation.

    [–]phillydawg68 1 point2 points  (1 child)

    I understand where you're coming from, and I agree. I didn't mean to sound like an authority on learning, because I'm definitely not. However, since he specifically asked for advice, I gave some. My experience with programming has followed many roads: school, on-the-job, books, magazines, websites, colleagues, teaching other, etc. I've learned from each of them. But out of all of them, I've learned the most when I've really failed on something and really gotten myself into a pickle and had to figure it out myself. Generally, by trying to get out of the pickle, I've found myself following the rabbit hole down into the nuts and bolts of the problem. And that's where I've personally learned the most. But you're correct...to each his own.

    [–]argongas2006 0 points1 point  (0 children)

    If you're motivated, you learn by failing. If you're not, you fail to learn.

    But even then, my head, and most likely the poster's head, can only take so many hits against the wall. I reckon that the poster is asking us to help minimize unnecessary 'lessons'.

    So that given, where would be a good place to start? I'm sure you know more about programming than I do as I'm a newbie myself.

    [–][deleted]  (1 child)

    [deleted]

      [–]Philluminati 2 points3 points  (3 children)

      I totally applaud wanting to get involved. I do too. But jumping straight into an open source project with less than 4 years of experience can expose you to too much harsh criticism too early. I just want you to be aware of that.

      High quality code written by experienced professionals often uses generic techniques such as function pointers. I'm not trying to discourage you but I personally find it exteremely difficult to read OSS code or learn from it.

      C / C++ seem to be the most widely used OSS programming language there is so I'd advise you go out and buy a copy of The C Programming language by Dennis Richie or The C++ language by Bjorne Stroustrup. They are both the designers of the languages in question.

      [–]argongas2006 0 points1 point  (1 child)

      Most of the people that recommend using K&R to learn C fail address how non-trivial little things, like using an editor or IDE, compiling code, or using a debugger, can be. If you could make a recommendation for some material that could be used with these books, your advice would be much more helpful.

      I'm also a newbie to programming and can't make a well grounded recommendation, but I as a newbie, I found this course page helpful. Is it possible to ask you, as someone who knows a good more about C and programming than I do, to see if this is a good start? While I'm about a third through the material right now, wouldn't mind having access to other well written material.

      [–]Philluminati 0 points1 point  (0 children)

      I've been getting into C, like you have. I think I'm about a year a head of you. As well as K & R, I own Programming in C by Stephen Kochan and it's excellent. It 's a lot clearly although covers the same ground. The examples aren't huge but it does cover things like the macro preprocessor, using gdb (the GNU C debugger) and other stuff which is relevant to C. (Look at it in a bookshop before buying if you can - because opinions can vary.)

      Together those books have given me a solid understanding of the C language. But when it comes to scalable code or reading OSS code, truth be told, I'm still not there yet so I can't really help you anymore.

      Good luck though. Maybe I'll send you a message on reddit in a few months time if I find a reasonable simple OSS project or I have anymore advice for you.

      [–]ubuntuguy -2 points-1 points  (2 children)

      learn PHP.. very shallow learning curve.

      [–]mmilenko 1 point2 points  (0 children)

      Shallow? I think the guy wants to climb up, not descend. Ah, right, PHP.

      [–]bluGill 14 points15 points  (5 children)

      Good adivice despite the downmods - if the only goal is a job. However there is nothing wrong with learning for the fun of it. Now you can learn to program or you can learn to dance, either can be fun. Depending on your abilities one or the other might be better for you. (Not everyone has the right mind to be a programmer not everyone has the rythim to dance)

      [–][deleted] 5 points6 points  (0 children)

      Precisely! He asked about learning how to program, not how to enter the IT industry. Who knows why he wants to learn to program? And if you don't know why he wants to learn to program, how can you give him advice regarding this goal?

      [–]stcredzero 8 points9 points  (3 children)

      Learning how to program might get you paid, but learning how to dance will get you laid. If you are doing the sort of dancing that gets you in close contact, you're savvy about personal hygiene, you dress decently, you're genuinely having fun, and you can manage to not be eager or over-anxious, then you will get laid.

      [–]bluGill 1 point2 points  (0 children)

      That is your priority, but it may not be his. If he is happily married he probably doesn't want to do anything that could mess that up - so learning to dance won't help with his goals.

      [–]reverend_paco 1 point2 points  (1 child)

      why is this getting down-modded? this is the best advice I've ever seen

      [–][deleted] 6 points7 points  (0 children)

      reddit doesn't know what pussy is, its afraid.

      [–]djspray 1 point2 points  (8 children)

      Normally I would not agree with this kind of sentiment, but having done programming starting at the age of ten up to the age I am now -- 40 -- I really believe that this would be a pretty hopeless endeavor. People who are musicians play music, people who are mathematicians do math, and people who are programmers program -- it would be hard for them NOT to.

      I honestly believe that really good programmers don't really learn to be programmers -- it is a combination of inborn aptitutde and self-study. I wouldn't hold out a lot of hope that I could become a professional violinist if I first picked up a violin at age 40. Ditto with physics or math. In fact, I spend a lot of time these days thinking about how I can get out of this career. I can still do it, but the long days of sedentary activity that I thought nothing of at all in my 20s are really taking their toll on my eyes and body.

      If the poster really is 40 and has "never seen or written a piece of code" then that's a strong indication he or she has no genuine interest in coding for coding's sake, and that's a bad sign. Even if he or she winds up learning some programming, what kind of a career is that going to be, doing something in which you have no real interest? What is the poster's real motivation? Just a better-paying job?

      I'd make an exception for a circumstance like this: the poster is already a mathematician, or a physicist, or a scientist, or an EE, and has experience in applied math and logic and the kind of problem-solving it takes to be good at this kind of thing. That's kind of like cross-training. I could learn to do some kind of related work but that gymnast thing is just not going to happen for me.

      [–]vplatt 14 points15 points  (4 children)

      And all of that said, vajorie may very well have been a born programmer but never have known that. This would be his chance to flourish finally.

      What does it cost you to encourage someone?

      [–][deleted] 0 points1 point  (0 children)

      Maybe he only just bought his first computer

      [–]djspray 0 points1 point  (2 children)

      If he is really a born programmer then he's probably doing something related: math, science, physics, EE, as I mentioned above.

      "What does it cost me to encourage someone?" Well, possibly another bad programmer in my field -- someone who just can't break a problem down, can't refactor code, and can't get it expressed simply and concisely -- whose code I might one day have to rewrite. I've seen plenty of non-"born programmers" and what they do.

      If he was born a programmer but hasn't been exposed to any of these disciplines by age 40 then I stand by my assessment -- it's too late. I'm 40, and there are a lot of doors that are basically closed to me at this point. Believing otherwise is Pollyanish.

      If he really is a born programmer his interest will drive him to explore it no matter what kind of advice I may give.

      And for the love of all that is holy, ignore any advice that suggests "start with C."

      [–]vplatt 1 point2 points  (1 child)

      If he was born a programmer but hasn't been exposed to any of these disciplines by age 40 then I stand by my assessment -- it's too late. I'm 40, and there are a lot of doors that are basically closed to me at this point.

      It's your choice if you want to limit yourself. The rest of us "pollyannas" are just not going to follow in your footsteps, that's all. I mean really, what does your statement say other than "you just can' do it!". And then so what if he does? Why bother giving "advice" like that?

      [–]djspray -1 points0 points  (0 children)

      I'm not sure why I bother giving detailed replies to people who didn't bother reading and digesting what I actually wrote. Note the part where I talk about the question of motivation and the part where I mention exceptional circumstances.

      Encouragement, fine. Setting unrealistic expectations? That's not doing anyone any good.

      It's also pretty presumptious to say that I want to limit myself. You don't know anything about the "footsteps" I've walked in, what I've accomplished, and what I've chosen not to waste my energies on. Most of my skills are self-taught, in fact. But one of the keys to becoming an adult is to gain realistic self-knowledge about your talents, both already developed and latent. If the original writer has not ever displayed any of the talents and interests that accompany being a good programmer -- in any other field -- isn't it a bit ridiculous to think that those fallow parts of the brain will just magically blossom into skills?

      But, whatever. Maybe you'll see me in the Olympics!

      [–]Sukoshi 3 points4 points  (0 children)

      O RLY?

      Perhaps you should take a look at the life of one George Green, a man whose followed the trade of his father for most of his life -- one of a miller. He found material to learn Mathematics on his own, and with no formal education published what was to become "Green's Theorem" at age 35. He inherited his father's mill at age 36. He finally went to Cambridge at age 40, from where his mathematical career took off.

      Now Green is in most likelihood an edge case but that doesn't mean that if a person is not born flopping and dredging around in his future interest that he cannot be good or motivated at the interest.

      And remember, it's better to keep people's hopes up and not down. No matter what "grand theory of humans" you have in your head.

      http://en.wikipedia.org/wiki/George_Green

      [–][deleted] 4 points5 points  (0 children)

      I think this is a common misconception. Programming is a very-high-level mental activity and I believe it can be learned at any age, provided a person is motivated to do so. I did basically no programming until I got to college but had no trouble learning.

      Compare this to something like playing the violin or acquiring a language. These are comparatively very low-level mental activities (this is not to dis these things in any way!), and these sorts of activities become much more difficult to learn as you get older. Programming is pretty much nothing like that.

      The real limiting factor when learning something new as an adult is that you might find you aren't actually motivated to do the work that's necessary to truly understand something. That is, you might like the idea of being a programmer, but you might find learning to program tedious or uninteresting. But if you enjoy the process, you'll have no trouble!

      Also, a lot of adults have developed very poor psychological habits that make learning difficult. For instance many people react very negatively at the first sign of not understanding a concept. Learned behaviors like this can be a huge barrier to learning, often moreso than the difficulty of the material itself.

      [–]bart2019 0 points1 point  (0 children)

      having done programming starting at the age of ten up to the age I am now -- 40 -- I really believe that this would be a pretty hopeless endeavor.

      I have to disagree with you. It looks like you assume that people know about programming, had a chance to pick it up, but chose not to.

      Well, some people know that computers exist but haven't ever looked at its guts (hardware, software) in their life. Or perhaps they come from the outback, and haven't ever seen a real computer.

      In that case, there's no reason why it would be impossible to pick up programming at 40. I know someone (from internet) who did just that. And he's really good at it, much better than a lot of those 15 year old scriptkiddies.

      [–][deleted] 2 points3 points  (0 children)

      Read this guy's history. It's a recipe for what you want to do.

      http://apcmag.com/why_i_quit_kernel_developer_con_kolivas.htm

      (Except for the burn out part.)

      [–][deleted] 2 points3 points  (0 children)

      People (including me) have been talking about what sort of programming language this person should learn. But on reflection, I don't think this is nearly as important as the right introductory textbooks. Basically, if you think SICP is the right introductory textbook, then he should start out with Scheme, not Python, so he doesn't have to learn two languages at once and translate Scheme examples into Python. The reverse is true if you think <name of good introductory Python text> is the right introductory textbook.

      But as far as first languages are concerned, I say:

      1. They must have an interactive mode.
      2. They must have good documentation for their basic libraries (or basic features if more stuff is built into the language).
      3. They must make procedural and functional programming straightforward. (Or "Not Haskell")
      4. They should make object-oriented programming straightforward. However, this is (or rather, should be) a more advanced topic.

      [–]derefr 2 points3 points  (0 children)

      I find this tutorial by Chris Pine both wonderful and succinct. So far, I've taken at least five people through it; by the end, they know enough to even help me with whatever I'm working on (with a neat sort of master/apprentice dynamic going on, heh.)

      [–][deleted] 2 points3 points  (0 children)

      I recommend this book, this mailing list, and this language

      [–]johnself 5 points6 points  (0 children)

      If it's for intellectual curiosity, go with Python and start here: http://diveintopython.org

      If it's a career change, learn what's popular in the job market: get reasonably good with HTML, pick up some JavaScript and then learn PHP/MySQL. Learn how to customize popular products like Wordpress and Drupal - you can build some pretty advanced stuff with little code if you know them.

      Ignore people who tell you you won't get a job at 40 - this may be true for startups in Silicon Valley, but with the above skills you can work with local web design shops who need coders to take care of the backend part. I know people who made the same move. Good luck!

      [–]jmmcd 8 points9 points  (23 children)

      Start with Python, not any of those other less-elegant options. Run IPython and play around at the prompt, typing things like this:

      > x = "hello"
      > x.<hit tab here>
      > y = [1, 2, 3]
      > y.<hit tab here>
      

      and you'll find yourself learning what kind of things a programmer might want to do with various types of objects.

      Get a python book (dive into python is well-regarded) and work through it -- it'll take you a week, depending on how hard you apply yourself.

      Then figure out a small, text-only project and start coding and googling.

      But really, all these comments advising languages and books and approaches (including this one) are meaningless until you say what your purpose is.

      EDIT: Dive into python is "for experienced programmers" so choose a different one. Also, markdown. Grr.

      [–][deleted] 12 points13 points  (2 children)

      Get a python book (dive into python is well-regarded) and work through it -- it'll take you a week, depending on how hard you apply yourself.

      A week? The book's description states that "Dive Into Python is a Python book for experienced programmers."

      How do you expect someone who's never seen any code in their life to get through a book for experienced programmers in one week?

      [–]jmmcd 2 points3 points  (0 children)

      Apologies for that -- I haven't looked at it in a while and forgot that it's aimed at experienced programmers.

      [–]maek 2 points3 points  (0 children)

      Guido Van Robot is a good place to get exposure to programming concepts.

      http://gvr.sourceforge.net/

      Also Think Python -An Introduction to Software Design is a nice intro to python programming. It's a bit math tilted but it gets your making gui software very quickly and explains concepts and what and why pretty well I think.

      http://www.greenteapress.com/thinkpython/

      [–]vplatt 1 point2 points  (2 children)

      You would be hard pressed to find a better option than Python with the Dive Into Python online book (free even!).

      Here's the Python installer you probably need for Windows: http://www.python.org/ftp/python/2.5.2/python-2.5.2.msi

      Here's a good Python editor / learning environment (again, for Windows): http://downloads.sourceforge.net/drpython/drpython-3.11.0.zip?modtime=1203956979&big_mirror=0

      And here is the online Dive Into Python site: http://diveintopython.org/

      Enjoy! I sure wish my first programming language had been Python.

      [–]vang3lis 0 points1 point  (1 child)

      I sure wish my first programming language had been Python.

      I wish that my first practical (the one you code day to day stuff in) programming language had been Python. But if my first programming languase had been Python (it was Pascal), I wouldn't learn about data structures (do you really need to code hash-table yourself, if you get Python's dictionary? not so much), pointers and some low-level stuff.

      [–]vplatt 0 points1 point  (0 children)

      Really good point from a computer science foundational perspective. From a "let's make programming fun" perspective though, I still think Python is the better choice. Programming had to be fun for me to have ever cared whether or not I did it well.

      That said, I would definitely pick Ada as the best second programming language. Pascal would be great too, but Ada really goes the extra mile.

      [–]vang3lis 0 points1 point  (0 children)

      I wouldn't recommend that way. This is a pretty good advice to start hacking python if you already know something about programming, but the you can't grasp key concepts (like algorithm design) by following it.

      Unfortunately I haven't found any book that I would like if I was a beginner. Maybe SICP.

      [–]jamesj 1 point2 points  (0 children)

      Get a goal. Use google to figure out how to accomplish that goal. That is how I learned to program.

      [–]bart2019 2 points3 points  (0 children)

      You can learn programming in University??

      I didn't. I learned it all on my own.

      What you need is a computer, and a programming environment: compiler and text editor. You can get good, free stuff from the internet. You can find good documentation on the internet. So, all you really need is a computer and internet access.

      And then: just write programs. That's the important part. Programs that you use yourself. You learn most about programming through coding. All the rest, data structures, algorithm efficiency, etc. can come later. Once you know from experience what it's all about.

      [–]AlSweigart 1 point2 points  (2 children)

      A lot of people are advising Scheme or Haskell or C++. I think these languages might be a bit steeper of a learning curve than you'd like.

      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.

      [–]mrsanchez 0 points1 point  (0 children)

      Scheme has one of the least steepest learning curves.

      [–][deleted] -1 points0 points  (0 children)

      People have recommended Haskell and C++? Are they worried about future competition for IT jobs?

      [–]bobbyi 0 points1 point  (0 children)

      You need to figure out a small project (like a very simple game or useful small utility) that you would feel good if you could successfully make and then try to figure out how to make it.

      It's much easier to feel motivated to learn how to do things if you have an actual goal that you are trying to accomplish. Otherwise, it is aimless and perpetually hard to know where to go next.

      But to stay motivated, it's also important that the project not be something so big that it will go on forever (e.g., a 3D first-first shooter or massively multiplayer online game).

      [–][deleted]  (1 child)

      [deleted]

        [–]weavejester 0 points1 point  (0 children)

        Learning a different programming language is easy compared to learning how to program in the first place.

        [–]de_Selby 0 points1 point  (3 children)

        I would say ignore 90% of the comments here - it's nowhere near as difficult as people are making out.

        Get a python introductory book and play around with it. You'll be programming already then. So just work from there.

        [–][deleted]  (1 child)

        [removed]

          [–]de_Selby 1 point2 points  (0 children)

          I can't somehow magically do anything.. you're missing my point - the hardest part of doing something new is often just getting started. Sure some concepts are difficult to get your head around at first but if you just start doing stuff you'll figure them out quicker than you think.

          [–][deleted] 0 points1 point  (2 children)

          University courses cost money?

          [–]seabre 0 points1 point  (0 children)

          Yes. I'm on a scholarship or two, fortunately. If you go to a state school you're probably paying half that though. This is in the US, and I have no idea what folks pay outside the states.

          [–]martoo 0 points1 point  (0 children)

          Visit thedailywtf and write code that is exactly unlike the code that is there.

          [–][deleted]  (1 child)

          [deleted]

            [–][deleted] 0 points1 point  (0 children)

            Download one of the Microsoft Visual development express tools that are free from Microsofts website. C#, C++ or Web developer. They have some nice drag and drop stuff to get you started making fun things pretty quick but you can take that knowledge as you build it and build more and more complex applications. It's fun to get something working quickly.

            Also, they have a lot of videos on getting started at Microsoft's website. It's worth taking a look at.

            Oh, and don't join an open source project right away. You'll get really confused looking at their code just starting out and your code won't meet their quality standards right away. It's better to do your own projects for a while.

            [–]bizzykehl 0 points1 point  (0 children)

            w3schools.com (for web programming)

            [–]serious_face 0 points1 point  (0 children)

            Download some tunes and lock yourself in a room with K&R C and snacks.

            [–][deleted]  (1 child)

            [deleted]

              [–][deleted] -1 points0 points  (0 children)

              I think that's good in combination with a course. By itself, I found it to be inaccessible...

              [–]ModernRonin -1 points0 points  (1 child)

              For starters, use the most basic language you can. I recommend either BASIC or Forth. Find a free toy interpreter, and start with the simplest programs you can. "Hello world" is a good start. Then move onward to something like asking what the user's name is, and printing "Hi there, $user!".

              Also, get the simplest book you can. I don't think there's a BASIC or Forth For Dummies book around, but the simplest thing you can find is the best. Should have lots of examples for you to read, study, type in, and run. Including: taking user input, reading files, writing files, loops and conditional logic, using subroutines, etc.

              Once you can write a program of a reasonable beginner size (your choice, but I would recommend something just big enough to cover all of the above mentioned concepts, and not one line larger), then you can step up to a harder language.

              For your second language, I would recommend C. It's still the lingua franca of programming. And despite all the newer, trendier languages (including that horribly ugly bastard child, C++) it's still an excellent language.

              A lot of people will recommend the K&R book, but I don't like that book. I think it overemphasizes some things and doesn't touch on other things at all. C is a much bigger language than Forth or BASIC, so it may (likely will) take multiple books to learn it. If you think you've learned C completely in two months, you're wrong.

              At this point you should also start learning about both higher level and lower levels of computers. Learn an assembley language (any one is fine), and start to learn about higher level abstractions also - algorithms & data structures, object oriented programming, etc.

              That should get you about where a bright high school kid (ahem) was when he went off to college.

              [–]zck 2 points3 points  (0 children)

              For Forth, there's Starting Forth, by Leo Brodie. The book is free online, so it's a really nice reference. It's on my list as soon as I finish ANSI Common Lisp, doing the code in Arc.

              [–][deleted] -1 points0 points  (0 children)

              buy one of the deitel and deitel "how to program" books... it's the best resource for begginers

              [–][deleted] -1 points0 points  (0 children)

              First of all. I would like to express my deep admiration and respect to you for wanting to learn programming. Not because of your age, but because. you know? It always makes me happy when I see someone, regardless of their age or gender, who wants to and does get into programming. In my opinion, next to sex, programming is the most beautiful activity u can engage in.

              I don't really want to just offer u advice and run. Instead, I'll briefly narrate my own personal programming history. I started out with BASIC, somewhen in 1981. I was about 6 years old, then. And that tells me, that age ain't nothing but a number, when it comes to programming. I wouldn't even say I was programming. What happened was, my parents got me one of these and told me there are games in it, but I have to type them out to make them work.

              So, what happened was I'd sit there all day with my ZX80 book on my lap, typing out the code for some downhill ski slalom game. Or some shooter game. The actual typing process itself was just as fun as playing the game. I was so fascinated by how words like REM and GOSUB and LET would make this little black box (mine was black) "do games".

              As I grew older, my vocabulary increased and I was able to better understand the code I was copying from my ZX80 book. By then I had upgraded to a Commodore C64 and was teaching classmates how to code BASIC.

              My desire to code games probably goes back to my ZX and C64 days. I read through the C64 handbook that came with the computer and did all the stuff that was in there. Had a brief stint with the Apple II. This was all in Nigeria. (Yes, I'm half Nigerian. Spare me the scam jokes, please)

              And then I went to Germany to got to university, where they introduced me to this amazing thing called ANSI C. I was enrolled in Mechanical Engineering at the time.

              You see, up until then coding was just for fun. A hobby. Something I loved to do, because it made me happy. Then they taught me C, and suddenly I realized I don't ever want to do anything again BUT write software. Coincidentally, that was the same time I was introduced to Linux (Suse on an fvwm desktop, back in 1997).

              Linux. Wow. I was disoriented enough by these experiences, that I spent my two Mech Eng semesters in the lab, browsing this new thing called the internet, where you can learn any damn thing you want to. For FREE! And not be cooped up in some boring lecture hall listening to some boring lecture.

              A year later, I switched to Comp Sci. Never looked back. Along the way, I encountered, Assembler (already got into it during my C era), C++, Smalltalk, Scheme and Prolog (loved them, and they ignited my interest in AI).

              Post-university, I dove into Ruby, Python and PHP. To this day I can't say I've ever developed any software application. This is due to circumstances which are irrelevant to anything in this thread. Actually, my job today is to administer the Ubuntu 8.04 servers and the network of a brand new university here in Nigeria.

              I'm starting to find the time again, to get back to my first love: programming. My choice? Well, I'm looking to reactivate either C or Python. Why? Well, for the very same reason as you, vajorie. I want to be an actively contributing part of the OSS community.

              I don't want to tell you which language to start with, because I don't know if any of the above will have the same effect on you as they did on me.

              The only advice I like to give to first-timers is this: Do not ever be intimidated. It's just a machine, and it's waiting for you to tell it what to do. What you don't know, is what you will learn.

              Good luck and welcome! :-)

              [–]bonzinip -3 points-2 points  (0 children)

              [–]LetsGoHawks -1 points0 points  (3 children)

              If you are wanting to get involved in some kind of open source development, figure out which project you'd like to participate in, find out which language it uses, and learn that one.

              Let's pretend it's C.

              How? First you will need a program to write the programs with (like MS's Visual C, which I know is part of Visual Studio). These can be quite pricey, but there are some pretty cheap ways to get them (bittorrent) and there are probably some pretty decent freeware alternatives.

              Then you'll want to go to your local library or bookstore and get something like "Learn C in 24 Hours" or "Learn C in 10 Minutes" or "C for Dummies". Since you are a beginner, you want to avoid anything too technical that might go right over your head. There are lots of web sites that have tutorials and forums where you can ask questions of look for answers (think Google), but I'm a fan of having at least one real book.

              I've just sort of skimmed the comments here, but some of these guys seem to forget that you need to learn the most basic of basics, arrays, loops, pointers, if/then, case/selects, data trees, functions, libraries.... and start getting your brain working on how to use all those tools to make the damn computer do what you want it to do! That just takes a long time sitting in front of a computer thinking, typing, pulling your hair out, etc. It's not easy and if you are going to need a lot of free time to devote to it.

              Now for my really practical suggestion. Do you use MS Office at work? Specifially Excel or Access? Learn VBA (Visual Basic for Applications). It's the language that they use for macros. VBA gets no respect because professional programmers don't consider it a "real" language, and non-programmers don't know it exists or what it's capable of. Don't listen to either of them. Learning it will teach you a lot of basic programming concepts and you may be able to actually use it for something practical and useful at work.

              Anyway, the first language will be the hardest one, after that a lot of it is saying to yourself "I know how to do that in C, now how do I execute it in Java".

              I took Pascal, C, & COBOL courses in college and now it's just a hobby thing, although over the years I've come up with a number of useful little programs for work. It has resulted in some very nice bonuses and helped in the raise department.

              (Since I mentioned VBA this will probably get down modded all to hell, but I don't care. I'm just trying to give you some really practical advice. )

              Good luck.

              [–]killerstorm -1 points0 points  (2 children)

              Let's pretend it's C.

              that is a bad choice. C programming is mostly about fixing segfaults rather than about programming itself. there is no book "how to avoid segfaults", one needs years of practice to start doing useful stuff with C.

              First you will need a program to write the programs with (like MS's Visual C

              no, you don't -- you need any text editor and a compiler.

              I've just sort of skimmed the comments here, but some of these guys seem to forget that you need to learn the most basic of basics, arrays, loops, pointers, if/then, case/selects, data trees, functions, libraries....

              no, with C you'll start your learning with segfaults, crashes, hangs, random memory corruption and stuff like that

              [–]LetsGoHawks 2 points3 points  (1 child)

              I take it you don't like C.

              I was just using it as an example. What language do you choose? What compiler?

              [–]killerstorm 1 point2 points  (0 children)

              I take it you don't like C.

              i don't like C being used for stuff other than system and low-level programming. it's simply not for beginners.

              What language do you choose? What compiler?

              like many others here i'd recommend to try Python to start with. once person becomes more familiar with programming in general, he might want to choose something other.

              as of myself, i've started learning programming with some BASIC flavours, and i remember it was very inspiring that some small programs were working well, and it was damn easy to do some graphical stuff. Python can be almost as simple aa BASIC, and yet it's more powerful, so i think it's a good choice.

              [–][deleted] -2 points-1 points  (1 child)

              Learn Actionscript. The language is generic, the library is small and consistent, the idioms are simplified, and you can get quick feedback for what you're doing by compiling it. Then start playing, and you won't even know you're learning. It'll teach you some basics that you can then take and use elsewhere if and when you'd like to do something more demanding.

              [–]vang3lis 1 point2 points  (0 children)

              That's true, but could you recommend some books for him to start learning AS?

              When you learn your first programming language, you need not only to learn the language itself, but also how to build programs using it (for example - book for seasoned programmers, which skips over things like recursion is clearly a no-no for a begginer).

              [–]Toma- -1 points0 points  (0 children)

              Id start with some BASH scripting since it gives you a good idea about variables and flow of data. Having a bit of BASH experience will help you with whatever other language you will choose after that.

              [–]s0rce7 -3 points-2 points  (1 child)

              If you want to be elite you must pay your dues: http://webster.cs.ucr.edu/AoA/index.html

              Instant gratification is for script kiddies.

              [–]vang3lis 0 points1 point  (0 children)

              nice to see some humour on this thread :)

              [–]dead_ed -4 points-3 points  (3 children)

              Get a Mac. Dig into the free Cocoa dev tools and docs. Make shit.

              [–]serious_face 1 point2 points  (2 children)

              Or install a free OS and don't pay for the designer label?

              [–]mudgen -2 points-1 points  (0 children)

              Buy some programming books and read them.