Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm just starting out with some articles and tutorials.

I am looking for some guidance on which languages to start with and what is the best way to go about learning code, books, tutorials, classes.

Which tutorials or books are best?

Is it possible to learn this stuff online? If so how?

Thanks for any help!

share|improve this question
    
possible duplicate of Please guide this self-taught Web Developer –  Caleb Oct 26 '11 at 5:54
add comment

closed as not constructive by Caleb, Walter, ChrisF Oct 27 '11 at 8:52

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

6 Answers

The most important thing is to get cracking. Pick a language, find suitable resources online (there are plenty of those for all the mainstream languages), install the programming environment, and start playing with it.

As far as languages go; there is no wrong choice, really, but I'd like to mention a few languages that I think are especially suitable for your first language.

  • Python. The basics are easy to learn, yet the language is quite powerful. It has a fairly consistent design and few gotchas.
  • C. It's still the de facto lingua franca, the language that has influenced all current mainstream languages one way or another. It's also so close to the metal that you'll be pushed towards learning how things actually work. The initial learning curve is a bit steeper though, and certain tasks are really hard in C.
  • Javascript. A language full of little peculiarities, and with quite a few gotchas, but the huge upside is that you already have the development environment (you're looking at it right now). Javascript, being embedded in the browser, gives you a number of things 'for free': text rendering, downloading images from the network, etc. Another big problem with javascript is that even though there is an abundance of tutorials and guides available, most of that is outdated, buggy, or plain out wrong. Finding good resources is fairly hard, especially if you don't know what you're looking for.
share|improve this answer
    
Best way is to just start doing it. Start with fundamentals and simple programs and work your way through more and more complex concepts. If you enjoy it, you'll excel. If you don't, find another career. –  Yatrix Oct 25 '11 at 19:31
    
@Yatrix: That's what I'm saying ;) –  tdammers Oct 26 '11 at 6:12
    
you're tdammed right it is! –  Yatrix Oct 26 '11 at 13:13
    
I agree with Python. It is a very powerful language and you can accomplish a lot with it. C is exactly as tdammers stated.. very close to the hardware, very powerful, and very easy to shoot yourself in the foot with. Probably not a great first language, but certainly worth learning later. (No experience with JS). I would recommend you come up with little programs to write..the smaller the better in the beginning. If you're at all into math, I would recommend projecteuler.net which will also teach lessons about computer/language limitations. Good luck! –  MattG Oct 26 '11 at 15:02
    
Isn't it tough to pick up Javascript if I don't know the fundamentals of HTML or CSS? –  stanigator Oct 26 '11 at 17:32
show 1 more comment

The easiest way to learn is by doing.

The only way to motivate yourself to do something is to make something that interests you.

Think of something interesting that you WANT to make and COMPLETE within a given time frame. Remember that the words in uppercase are key.

It has to be something you really WANT to make so you will have the motivation to not give up once you meet the first hurdle (of which there will be many ).

It should also be something you want to COMPLETE for at least three reasons.

  1. A desire to complete something makes you push harder. More motivation is a good thing.

  2. People that can't consistently deliver projects aren't coders, more like random typists with too much time on their hands

  3. You get to experience the complete cycle of development. From basic design/planning to coding to delivery to maintenance. Trust me, if you are going to develop software for a living down the road, these are the most important things to learn. Experience design/planning because that's what sets your imagination free. Experience coding to a target because that is how all coding should be done. Experience delivery because when you do it for a living, that's often the most important part of your job. Lastly, experience maintenance, cos that will teach you how to do the first three parts better.

Once you decide what you want to do, people here will be able to tell you if the time frame is feasible and they can also recommend the right language for you to use. If you get stuck, I'm pretty sure some of us will be more than willing to help as well.

Let your desire guide you. Don't worry too much about whether a language is too "strict", too "loose", OO, procedural, etc, etc. Some of the most complex concepts are often the easiest to pick up for a beginner because you haven't been "contaminated" too much, haha.

Also don't worry worry about learning the "best" language because there is no such thing.

Just pick a project and start learning.

share|improve this answer
add comment

Having "programmed" for nearly 35 years I would say that, with all I know now that I wish I had known then, go functional, at least part of the way to start with!

If I had to point you at some languages to get started with I would say:

LISP (or Scheme and there is Clojure which gets you into JVM arena) (A sad day for LISP people today, its creator passed away today... http://www.guardian.co.uk/technology/2011/oct/25/john-mccarthy)

or

Smalltalk, specifically Squeak as it is very well supported and also has e-toys to play with which can help to give a grounding in programming basics.

Why those two? Simply because the syntax is so damned simple to pick up... LISP dialects have exactly ONE syntax rule to be learned and Smalltalk is a close second. IIRC, Smalltalk only has five reserved words: self super true false nil and the entire language is based around sending messages to objects.

In LISP the syntax rule is this: (function arg1 arg2 ...argN) and that's it!

So, when learning the "concepts" of programming for the first time I would say that it frees your mind to not be fighting the compiler or interpreter for your chosen language by making sure they are very easy to work with. Java or PHP have a lot of reserved words.

Once you have picked a language, start hacking furiously until you understand the simple concepts such as variables and bindings, functions, I/O etc. My way of learning a new language used to be to write a version of "Pong" as you need to know how to read keyboard, save and load high scores, draw stuff etc.

Start small though, even printing 2+2 and getting the right answer feels good. Then get the user to input numbers. Read a list of numbers from a file, print the sum of those numbers.

Build on small successes all the time and if you make an error, enjoy figuring it out! I found that the more mistakes I made early on the faster I picked up the language I was learning.

Best of luck, it's a lifelong learning process!

:)

share|improve this answer
    
I actually considered including a functional language in my list, but didn't. Why not? Because I believe FP, as much as I love it, is a fairly high-level abstraction, and one should at least have a rough idea of what it is we're abstracting away before using the abstraction. Also, I can't think of a single FP language that has an abundance of beginner resources available that is comparable to those on my list. –  tdammers Oct 26 '11 at 6:16
    
Hmmm. Interesting point BUT computing IS abstract and FP can he as low-level or high-level abstracted as you make it. Just because I use Haskell doesn't mean I have to use all the advanced features. Start small, grow big over time, like a wart! LOL The key is "start" with something that feels easy for "you" and go with it. Once you learned one language the rest are pretty similar, and the concepts are identical in the sense that loops, branches, decisions, subroutines / coroutines are ABSTRACT concepts that are made real by the specific language you choose. –  Emacs The Viking Oct 27 '11 at 8:23
add comment

I would start by learning CONCEPTS. For instance, what constitutes a file definition? What is a string? What is a loop?

Once you've mastered the underlying concepts (in any language), the code will come much easier. At least in my case, when I've had trouble understanding code, it's because I didn't fully understand the concept behind it.

share|improve this answer
    
Abstract concepts won't make sense unless you can use them. And for that, you'll need a programming language. –  tdammers Oct 26 '11 at 6:13
add comment

I'd like to take a slightly different tact than the old 'learn a language and do stuff with it' approach. Over the past 2 years I've developed an apprenticeship program at a software consultancy, and we discovered that there are 2 main factors to how easily a non programmer/beginning programmer becomes competent:

  1. The innate desire they have to learn to make magic with computers
  2. The amount of time they spend working directly with other programmers

If these 2 criteria are not fulfilled, you wind up with programmers who never get past the advanced beginner stage. Hopefully this is not you :)

Now, some people will recommend python as a first language. Others will recommend ruby. Some horrible people will recommend you learn Assembler first, that way you decide not to become a programmer and they can reduce competition in the field.

Here is my rule of thumb for guiding someone to their first language: * Python is great if you are already mathy (statistical analysis, etc) or you come from a highly technical background (*nix server administration, powershell, etc). The language is absolutely beautiful if you already think in terms of formulas and algorithms (a word I still struggle to spell). * Ruby is fantastic for everyone else.

Assuming you're not already a math genius, I'd recommend the following:

  • Work through tryruby.org. This will get you started with writing code! Woohoo! CODE!
  • Work through rails for zombies, as this will get you started making a very basic web application
  • Do the ruby koans. These are great for teaching you all about how the ruby language works.
  • Grapple with Learn Ruby the Hard Way. This is the hard way ;). But it's not too terrible.
  • If you want to continue to play (something I'd highly recommend!) rubywarrior is a very fun dungeon crawl game where you write an AI to crawl the dungeon! I am not sure I'd recommend starting here, but it's definitely a fun time! I have the first few levels up as videos on youtube.

Once you are familiar with how to make computers do math and play with variables, I recommend digging a bit into some books:

  • Growing Object Oriented Software Guided by Tests
  • Clean Code
  • The RSpec Book
  • The Rails Way

And Remember: PLAY! Code with people! Share your source code! Ask for review! github.com is a wonderful place!

share|improve this answer
add comment

There is a resource I found few days ago http://www.codecademy.com/, there are two courses introduction to programming and javascript.

I test it and the level is for beginners, I like the way that the system allow interacts in the browser.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.