Become a fan of Slashdot on Facebook


Forgot your password?
Programming Technology

How To Get Into Programming? 195

writermike asks: "Like many on Slashdot, I practically grew up with computers. I've had one or more since 1978. However, unlike a lot of people here, I simply never learned how to program. Twenty-seven years later, I still know nothing about 'programming.' I'm a fairly successful technology troubleshooter, having been in that role for 15 years, and I find as I delve deeper into why programs fail, my interest in programming rises, and I feel that not knowing the principles is a hole in my knowledge that hampers me a bit. There are so many books and courses out there that seem to focus less on principles and more on specific languages and/or the 'career-track'. I don't really want to code the next great web service. I want to learn principles, then begin to learn a language. Where can I begin the adventure I should have started back in 1978?"
This discussion has been archived. No new comments can be posted.

How To Get Into Programming?

Comments Filter:
  • by jtev ( 133871 ) on Monday October 24, 2005 @01:49PM (#13865241) Journal
    Just do it. The first step to learning to program is to just start programing. I know that sounds a little trite, but honestly, unless you just start programing the theory of programing isn't going to mean much. Then once you've learned a little about how to program you can start thinking about the "One true methodology".
    • Building on that thought, I'd say you might want to get your feet wet with Perl. There are many ways to structure Perl code, and it'll make it reasonably easy to move to C or C++ later on. Dink around with it until you find something you want to do, but can't, and then delve into C to find out if you *really* want to know how to do it. You can make useful programs, get help from plenty of people, and learn a bit at the same time. Just remember "#!perl -w" and "use strict;"
    • by fm6 ( 162816 ) on Monday October 24, 2005 @02:50PM (#13865711) Homepage Journal
      ...just start programing.
      I'm reminded of the joke: "How can I make money in the stock market?" "Easy: buy stock at a low price, sell it at a high price." Strictly true, but not very useful. Exactly how do you "just start"?

      The answer to that depends on what you hope to learn. Programming is a big topic and there are a lot of ways to approach it.

      Probably most Slashdotters will answer this question with something practical and job-oriented. "Get a copy of Kernighan and Ritchie [], C is a language everybody should know." "Download Perl." "Download the Java SDK." "Use the VBA engine in Word to write macros." Etc. All worth doing if you're looking for a career as a programmer. But I sense that this guy is motivated more by intellectual curiousity than by career development. (As he should be — the developer job market is a tad oversupplied.) He's used computers most of his life, but has an unsatisified curiousity about how the suckers work.

      One good way to satisfy that curiousity would be with the very basics: machine language [] and assembly language []. These are not useful skills for most programmers, who only need to know the high-level abstractions of the systems they work with. (Some people would disagree with me on that.) But for satisfying your curiousity about just what computers do, it's a nice exercise.

      Or instead of going very low level, you can go very high level, and learn some basic computer science while you're at it. That the route if you read the classic Structure and Interpretation of Computer Programs [] and work its Scheme [] programming exercises.

      Then again, learning programming on your own is not for everybody. If somebody has managed to be around computers for a long time, but has never go around to learning programming, he probably is the sort of person who needs some initial handholding. Community colleges often have good classes.

      • by stanmann ( 602645 ) on Monday October 24, 2005 @02:54PM (#13865742) Journal
        Buy some books from the 90s with source code, documentation and specs. Doesn't matter what language or environment particularly. Basic is OK, C is OK, Pascal is OK. type in the code, or scan and OCR it. Kick the tires, see how it works. Change it. Break it. Fix it. Make it do something different. Make it do the same thing differently.
      • Don't forget The Art of Computer Programming []

        If you want to learn how to *program*, then you need an itch you want to scratch. Taking a programming course, or reading a book and working the samples will teach you about programming, and maybe computer science (depending on the book), but won't teach you how to program. And learning about programming, or computer science, or computer hardware and engineering might be what you want - it's an interesting topic. But if what is bothering you is something like "

        • by pyite ( 140350 ) on Monday October 24, 2005 @04:23PM (#13866388)
          Don't forget The Art of Computer Programming

          Wow. Umm, throwing TAOCP at someone who's never programmed but wants to is a bit like throwing an aerodynamics book at someone who wants to fly. Sure, it will tell you how to fly, but it won't get you much anywhere unless you have a solid mathematical background and really good machinist skills. Seriously. I postulate that someone who has a decent math background has also seen some sort of programming in their life. That said, the amount of Sigmas, Pis, and Integral symbols in TAOCP is enough to scare someone way away from programming if they haven't seen such notation before. Don't get me wrong; I love the stuff, and I own and read all three volumes, but it's not something you want unless you have programming experience and/or strong interest in mathematics and preferably both.

  • ANSI C (Score:3, Informative)

    by Shads ( 4567 ) * <> on Monday October 24, 2005 @01:49PM (#13865250) Homepage Journal
    Is probally the most valuable programming language to learn. It may not always be the most commercially viable but it definetly provides the most insight into programming really. If you're going to learn a language don't learn some gui version of it first. Learn the low level stuff and build up to gui interfaces.

    • Languages to Learn (Score:4, Insightful)

      by DavidNWelton ( 142216 ) on Monday October 24, 2005 @02:13PM (#13865465) Homepage
      It's hard to say exactly what language is the right one without a better idea of this guy's goals, but here's a shot at it:

      C: like the parent says, it will give you a good insight into how computers store things at a low level, and of course it's useful if you want to do low level things yourself. If you really get into programming, you'll need to learn it sooner or later, but it might not be the best if you just want to learn a bit and get something done.

      Tcl/Python/Ruby: Pick a scripting language and learn it as a good way to get things done quickly. Each has its advantages.

      Smalltalk, Forth, Scheme: less useful, but mind-benders that will open your eyes to different ways of doing and thinking.
      • I like your suggestions very much. However, in my experience, there's a lot of C voodoo that might make it unsuitable as a first language unless one has personal instruction. I'm referring to the comiler chain, libraries, and other technologies that mighting appear to be unduly important to the novice. Indeed, when I first tried to learn C, I ended up trying to read through the gcc documentation because K&R suggested that I should get to know my compiler. Obviously, at that stage, it was a tremendou
        • Oh, I just put C first because I was responding to a guy who mentioned C. I completely agree that a scripting language is probably better as a first language. It really does depend on what he wants to do, but most likely a scripting language will be more satisfying in that it's more immediately applicable in the short term.
    • Re:ANSI C (Score:3, Insightful)

      by AuMatar ( 183847 )
      I'll put in another vote for C, and list my reasons:

      1)The syntax is simple, and is the basis for every major language today.
      2)It has most of the major features of other languages except inheretance and generics, both of which ought to be skipped until you understand procedural anyway.
      3)It doesn't force you into OO, allowing you to examine other paradigms. Whatever some people will say, OO is not the best way to do everything.
      4)It has good, freely available tools.
      5)It forces you to deal with resource alloca
  • Take a class (Score:5, Informative)

    by araven ( 71003 ) on Monday October 24, 2005 @01:53PM (#13865282)
    Most community colleges have beginning programming classes. It's a way to get started before branching out on your own.
    • Re:Take a class (Score:3, Insightful)

      I would agree with this. If you haven't been able to learn programming over the years of messing with computers you will need some impetus in the form of a homework assignment.

      Also, you should take a class in using the CLI if you haven't already picked up much proficiency yet. Using the CLI on *NIX as a serious tool will provide more opportunities to learn programming. I just recently decided to learn a little BASH programming to manage all of the CLI aliases I was putting into my ~/.aliases file -- so I
    • I'd like to agree, but there are many teachers out there who teach bad programming.

      As an example, Comments are good, but many teachers take that to mean each line needs a comment. So you end up with:
      a = a + 1 # add one to a
      Which should take off points, but instead is the only way to get points. A real programmer will know from the first part what it is doing, but will be wondering why add 1 to a right here.

      If you can find a good course, yes you should take it. However at the beginner level you a

    • I'm not at all sure that is the right approach. This person wants to learn the principles of programming. Community colleges, in my experience, specifically DO NOT teach you the underlying theory, they just teach you the syntax of that particular language.
      • No, the OP is looking for a way to get into programming. That doesn't mean learning the principles, it means getting his/her hands dirty and actually *doing* it.

        That said, colleges are pointless. The *best* way of learning is to pick a language and buy 3 or 4 tutorial books relating to that language off Amazon. It really doesn't matter which 3 or 4, because each will have their advantages and disadvantages, so with 3 or 4 you should get a good overall coverage. Just make sure you choose ones with good r
        • There are so many books and courses out there that seem to focus less on principles[...] I want to learn principles[.]

          He certainly seems to think he wants to learn principles first.
    • Classes cost money, the value from said money could be great or nothing, with my slant towards nothing.

      I can say that I learned to program by reading code (the non-closed source kind) to figure out how existing programs, the Linux kernel, its build system, etc worked. I never took a class.

      If you're interested in programming, then figure out what kind of things do you want to program. Do you want to do dynamic web pages? I did, so I learned Perl and CGI, and then C, C++, and company. I did things like p
  • ...I'd say here: []

    and here: []

    and maybe here: []

    And although a lot of people around here would probably disagree, I think it would be worth your time to go back and try to get a Computer Science degree. Programming != Computer Science, but it's helpful to understand the scientific principles that modern software development is based on.
  • For a really low (and I mean low) cost of entry into the programming world, why don't you start with your web browser, a text editor and a good book on Javascript.

    Javascript is not the world's best language to get started with (not sure what is really), but it's good for instant graphical gratification. Make a .js file and an html file and simply load the html file into your browser. Any changes you make to your code would be viewable by simply refreshing the page.

    Another good language to start off with assuming you have a Windows setup is VBScript. This would be a better option teaching you control flow and how to structure a program. In spite of its reputation, it's a good "starter language". (Please, no replies about viruses or other results given from VBScript over the years--I'm being serious. As a teaching tool, it's a good start)

    • In line with the above poster, web is the way to go for beginning programming. Just stick to one platform; dealing with cross browser compatibility issues won't help you learn programming basics. I like Firefox, it has a great little js console.
    • I agree with that. Developing web pages and scripts is the most natural way to learn to programming. No barrier to entry for most folks. Everone has the tools and there are lots of docs free on the web.

      Actually, I would suggests starting with HTML. It's not programming per se, but it is a close relative, and many of the same skills are required. Just make sure you use a text editor to write your code, not a crutch web page generator, at least not for this purpose. Vi, emacs, or even something like notepad i
    • "Low cost of entry/decent return on investment" - i like that.

      i got hired by a fluke into my first programming job. knowing what the job market was like at the point it was either learn programming fast or get fired and go hungry. i chose programming.

      it is not the way i would recommend learning to program.

      just look at different languages, find one that is pleasing to your eye, and learn it. buy more than one book on it, by more than one publisher, read through them while you manually type each example, a
    • Hell no.

      JS is enough to make someone stop programming and never look back. You need a compiled language first so the student can begin to understand syntax. After syntax you need to understand data types and flow. Then you can begin to create a program.

      Browser Javascript provides little/no guidance in any of these persuits. Nor is there a truly coherent reference on just how each of the JS engines are implemented.

      Compiled, well documented languages are a good place to start. Pascal or C are good bets.
  • Personally, I'd suggest learning Javascript since it is quite accessible on your desktop in the form of a browser. All you really need is a text editor and the web, but you could go and buy almost any random beginners Javascript book and just start on page 1.

    If you're looking for something more meaty, perhaps check out Python or Ruby. Both have some pretty good tutorials around (linked from their homepages - use Google). Python in particular was designed to be a learning language anyway.
  • Take a programming language class at a small college. Any language!

    Syntax is easy, structure is hard. Any language will teach you the basics of conditions, looping, branching, subroutines and procedures, etc. Once you get the gist of algorithmic design, you're set to understand what programming is about.

    Once you've done that, you may want to pursue learning object-oriented vs. non-oo languages (if that's what you started with) so you understand both paradigms.

  • Don't. Or at least, not as resume fodder or in an attempt to make a living. Coders are a dime a dozen these days.

    However, I agree it could help you in other areas if you understood more- but don't go for it from a business or career standpoint. Pick your favorite form of art: drawing, music, animation. Once you have one of those three, pick your favorite artist: a painter, a composer, an animator. Then pick a language that has strong instructions in that arena, or a library you can take advantage of
    • Coders are a dime a dozen these days.

      I don't know where you live, but where I live that is most certainly not the case. One of our clients is a recruiting firm and they have literally 50 .NET/Java programming jobs they simply cannot fill. They pay $75,000 to $150,000 (in the midwest, where that is a very good salary) and are more than willing to accept applicants with "zero" college if you can prove you have actual coding skills. Still, the jobs sit desperately unfilled because of the small number of "rea

      • Typical HR drone. Any "real" programmer can pick up a new dialect in a few days. Oooooh, .NET/Java! Buzzword monkey.
        • Any "real" programmer can pick up a new dialect in a few days.

          It takes 5 minutes to learn how to drive a clutch, a hell of a lot longer to learn how to drive it well.

          Theories from one language indeed can apply to another, but the nuances and awareness of an entire framework and what works "well" versus what "works" are what seperates the wheat from the chaff.

          • Theories from one language indeed can apply to another, but the nuances and awareness of an entire framework and what works "well" versus what "works" are what seperates the wheat from the chaff.

            True enough- but that alone offers a gret way to turn chaff into wheat. *Offer training*. Don't just assume because some guy has .NET and Java on his resume that he either knows the entire framework OR the subset your company is using. But any good programmer is also good at *learning* or they wouldn't be a goo
          • Same old BS to justify head-hunting fees.
      • I live in the midwest. Last I checked, most places looking for java and .net wanted 10 years of the latter, and 5 of the former. (Java was released in 1994, .net in 2002, you figure out how many people can have that much experience with either)

        I'm slightly interested, though I prefer to stick with hardware. Post some user info or something.

        • I'll let you in on a secret: The idea behind excessive requirements in any job posting is to cut out those without the motivation or ability to prove why they are fit for the job irrespective of the requirements. ie. It's a way to filter out the weak.

          Looks like it's working.

      • Well, considering that nobody learned .NET because it came out just as the .bomb bust came and companies were outsourcing to India like crazy- I'd say what they need to do is look in Bangalore or Hydarabad. Either that- or start offering training again...
    • by egomaniac ( 105476 ) on Monday October 24, 2005 @02:56PM (#13865755) Homepage
      Don't. Or at least, not as resume fodder or in an attempt to make a living. Coders are a dime a dozen these days.

      Sure. My team is trying to hire a couple of Java programmers right now. We're talking about a very well-known company (hint: there's a Slashdot category for us), a Silicon Valley office, and a six-figure income.

      And we're desperate. We finally (after much searching) managed to find a really great candidate for one of the positions, but the other one remains unfilled. I'd rather leave the position empty than lower my standards enough to pick some of the people we've talked to.

      So, I suppose I agree that coders are a dime a dozen if you're looking for an idiot that doesn't even understand the difference between "a == b" and "a.equals(b)", but if you're looking for competent programmers, they're tough to find at any price.
      • So, I suppose I agree that coders are a dime a dozen if you're looking for an idiot that doesn't even understand the difference between "a == b" and "a.equals(b)", but if you're looking for competent programmers, they're tough to find at any price.

        And given the Ask Slashdot that this is in, which do YOU think a guy who's spent the last 20 years doing tech support is going to be? Competent programers- what you're looking for is software engineers. A decent programer in a given language isn't going to kno
  • basics (not basic) (Score:3, Insightful)

    by yagu ( 721525 ) * < minus cat> on Monday October 24, 2005 @01:59PM (#13865346) Journal
    • learn and have great command of an editor (vim?)
    • play with something interpretive (not basic)... forego the hassle of having to learn compilation and compile debugging to start. (I suggest perl, if you can master some simple concepts in perl quickly, you're likely to have some programming aptitude or be completely looney.)
    • step up to some 3GL... I prefer C or C++, but you'll have to learn about compiling, executables, etc.
    • invest all time necessary to be fluent in the debugging facilities of ANY language you choose, and by that I don't mean learning "print" statements, they're totally useless, take too much time, and perturb code you think you're debugging. (NOTE: this investment will be dear, but the Return on Investment is a windfall).
    • avoid "IDE's" like Visual Studio if you can, they start you out with a crutch you may never throw away and keep the underpinnings of languages opaque. If you AREN'T interested in learning how languages work, skip this bullet.

    A couple of points: I can't stress enough achieving fluency in your editor of choice. Create a sample file, write down a list of changes, navigations, etc. and DO THEM ad nauseum... until it's second nature. The last thing you want in programming is the noise that is editing.

    Also, learning debugging techniques is off-the-scale important. I was the pariah on a team I worked with because I fell a few days behing on some "assignments". The team was incredibly hostile. I was new to the environment and was spending up-front time learning the debugger of the environment. The team demanded I use print statements and I refused. Within a week (when I had caught up), team members asked how I was doing things looking over my shoulder. I soon had the rest of the team using the debugger and establishing that as the standard (I know, I know, what kind of team was that in the first place???, no comment).

    • invest all time necessary to be fluent in the debugging facilities of ANY language you choose, and by that I don't mean learning "print" statements, they're totally useless, take too much time, and perturb code you think you're debugging.

      No -- a programmer with real skill can debug without a debugger. It may not be the most efficient way to debug, but in some cases you just can't use one. If a print statement "perturbs" your code enough to alter a bug's behavior, that in itself gives you a lot of informa

      • No -- a programmer with real skill can debug without a debugger.

        Yes a programmer with real skill can debug without a debugger. I do it all the time. As for perturbed code altering a bug's behavior and giving information about the bug, I agree. But that can be nuanced behavior and I consider it more sophisticated detective work.

        Print statements and trace logs may seem antiquated, but they can get the job done. It sounds like you don't know how to use them and instead rely on a debugger as a crutch. A

    • Debugger-wise, it depends on what you're doing.

      If you have the buggy code in front of you, and you can reproduce the problem on your machine (or a machine in your office), then great. A debugger will get in there like a scalpel - clean, precise and no damage to the rest of the body.

      But if the buggy code only manifests itself on one guy's machine in Romania (seriously, this has happened to me in one of my home OSS projects!) then you're screwed. Your Romanian friend is unlikely to have a debugger, and even
  • by MarkGriz ( 520778 ) on Monday October 24, 2005 @02:00PM (#13865353)
    I've been wondering how to get out of programming.
    Do you want my job?
  • If you really want to learn a 70's language, you can start with Fortran77, it came hot off the press just a year before you got your first computer. However, I recomend learning in C if you are already computer literate. It's not the most modern programing language but there are lots of resources available and until recently it has probably been the most popular programming languages. With C you will learn all the nasty things like "pointers" and "memory allocation" that the modern langauges tend to hide.
  • Firstly, it's better if you start with basic programming logic and algorythms, and an industry-standarized language like C right afterwards; once you have the basics of these things, you can move on to other languages, both simpler and more complex. A few good reference books are these:
    Teach yourself beginning programming in 24 hours []
    Beginning programming for Dummies []
    C for Dummies []
    The C Programming Language []

    Those could serve as a good start. If you need further help, I can get you a basic manual of ho
  • 1. Use a LOGO interpreter to make a little triangle leave trails of doodoo all over your screen.
    2. Get a KAREL interpreter. Make the computer pickbeepers and putbeepers.
    3. --- Apple ][ ---
    4. 10 PRINT "HELLO WORLD."
    5. 20 GOTO 10.
    5. You cheated. You should stil be doing 4 and 5.
    6. Get Turbo Pascal and learn to write a breakout game.
    7. ...3 years later... OK, you can stop playing that now.
    8. int main (void) { printf("Hello world.") }
    9. Write some classes. Reuse some code.
    10. Yeah, I know, you took more time m

    • Get out of my head damn demon!

      Seriously, those are almost exactly the steps that I (and, apparently, many others) took to get to where we are now (I would place 2 after 5, but whatever). The unfortunate part is that I can't really tell you, in all good conscience, to leave any one of those steps out. They were all invaluable in teaching me how to become a good coder. You have to start out with something that makes you *think* like a computer (LOGO), then write something that's logical and linear (BASIC),
    • This is genious. Believe it or not, it describe quite accurately my path.
    • Turbo Pascal? Man, you're new-school. I wrote my Breakout game in Commodore Basic. Then I got sick of it moving at about 1 step per second, so I got into assembler and started recoding in assembler. At this point I would have been about 13-14, so I was discovering coding at about the stage other kids were discovering the opposite sex. God that's depressing. :-/

      And step 15 is just too cruel, because it lets people think they might reach it...

  • Doing it backwards (Score:5, Insightful)

    by Otter ( 3800 ) on Monday October 24, 2005 @02:10PM (#13865439) Journal
    I want to learn principles, then begin to learn a language.

    Some advice from a casual, self-trained, hobbyist programmer:

    1) You need an itch that has to be scratched. Find something you need, and code it. Outside of a classroom, you need to be extraordinarily self-motivated to learn in the absence of a defined project. Pick something, and *complete* it, despite the unexpeceted directions it will go.

    2) Don't worry about principles now. Learn to hack a bit, get some feel for writing working code, and maybe then start working through real CS books. Honestly, half the "programmers" graduating with CS degrees are inert to the underlying principles. You can have plenty of fun without them.

    3) For me, Qt/KDE was the tool that made it intuitive to jump from reading about objects and GUI programming to doing it. YMMV, obviously, but I'd recommend that as a place to start. Qt also has *the* best documentation in the open-source world.

    • by Arandir ( 19206 )
      It's like learning a spoken language. You can study all you want about nouns and verbs and tenses, but until you actually learn some vocabulary, it's all meaningless. Your first step in programming is to learn a language, because the principles are pointless without a language.

      p.s. I also second the Qt recommendation. To learn C++, I would recommend Practical C++ Programming []. This is one of the very few C++ books suitable for a programming newbie.
  • I recommend getting some book for a programming language (e.g., Java?), such as Learn Java in 30 Days (if you like, I can find a cute book I was trying to learn Java from). Go through the motions of learning the language according to the book.

    Type in the examples. Actually type them in - you'll learn what syntax errors look like ;-)

    Do the questions. Do the practices.

    Sure, you'll feel dumb for typing "print("Hello World");", but that's the way to learn it. Granted, there are other ways to learn it, but t
  • What I have always found is that I need a goal in my mind. I can't just say, "I want to learn PHP." It needs to be, "I need to write a webpage for automating google searchs.

    Of course, learning to program is all about the concepts, the rest is just syntax. If you know C/C++, it's nothing to learn PHP, javascript, python, etc. So once you get started and get some real knowledge under your belt, it will get easier and easier.

    Ask yourself what you want to accomplish, then learn what you need to meet t

  • I wonder if the definitive book has been written yet on this?

    Basically, it sounds like you're smart enough to read code but would like to know the why not the how. You don't want to learn all about design/editing/debugging but rather why is there a iteration used here.

    Programming is abstractions, prgrammers take reality and then model that within the computer. The more types of abstractions available to a programmer the closer he can model reality. The easier the abstraction can be used the more likely a
  • by adamy ( 78406 ) on Monday October 24, 2005 @02:39PM (#13865646) Homepage Journal
    The post about Turbo Pascal made me realize one of the key tools for learning programming, a good IDE. While I agree that learning a program from the ground up using vi/emacs and the command line compiler is a valuable experience, there is nothing like a good intergrated debugger and statement completion to aid you on your way to understanding.

    My advice, download eclipse and get yourself a copy of Bruce Eckel's "Thinking in Java."

    I originally learned on a C-64, moved to Pascal in highschool using a line editor and UCSD Pascal on an Apple IIe. In College, I got Turbo Pascal and the added advantage was extreme. There is nothing like stepping through your code in a debugger to really understand how it works. There were still a lot of things I didn't understand, the big one being memory management.

    Once you learn thingsd in a high level language like Java, you can move down into the nuts and bolts of memory mangement, pointer math, and all those things you need to know to poke at the operating system.

    At the same time, you might want to learn a scripting language. I tent to use Bash a lot, and it is not a bad place to start.

    One of the most useful courses I took in college was comparative programming languages, where we learned how to learn a new language. But to get there, you need somewhere to start, and I would advise Java. It is designed for inexperienced programmers, and yet for accomplishing serious programming tasks. Once you know a language that has training wheels, you can take them off and attack things in C and assembly.

    Good Luck, and may the source be with you.
  • This is just my experience -- take from it what you will. I took a couple CS classes in college, but my jobs were always LAN Administrator type jobs. At one company, they needed someone to maintain a simple script on the servers. I did that. I hated the way it worked, so I made it better. And better. And even more better! (heh) After awhile, I decided I wanted to do programming instead of system administration and I've been happier since.

    Above all, have fun with it,
  • A couple ideas (Score:4, Insightful)

    by ctr2sprt ( 574731 ) on Monday October 24, 2005 @02:41PM (#13865652)
    First, start with a full-featured interpreted language like Python, Perl, Ruby, or Scheme. Interpreted languages give you instant gratification that you won't get with Java or C. And because the languages I named all have big libraries, you can start writing some nontrivial programs with them too. As for which of these to choose, I would say Python, because I like it, but it's up to you. The Scheme syntax is cake to learn, but "the Scheme way" (actually the Lisp way) is unlike most popular languages so transitioning to something else would be harder. It's too easy to develop bad habits in Perl, especially if you don't know enough to have any idea what habits are good and what aren't. I've never used Ruby, so I have no idea how good it is. All four of these languages are full-featured, well-supported, and popular. None of them are toys: they are all used for serious work. So don't worry that you might be "wasting time" by learning one or more of them.

    Next, once you get past the simple tutorials, try to think of a simple program you'd like to write. My personal favorite target for learning exercises is reimplementing well-known Unix programs, or parts of them at least. So I might design a version of "cut" that does some things I want it to, like treat contiguous whitespace as a single delimiter. But maybe you already have something in mind, like a simple web app. If so, you should tailor your choice of language to what you want to do. Like if you want to make a simple web app first, you probably want to use PHP. (Which I didn't recommend earlier because it's a little harder to debug.)

    At this point you can hopefully write nontrivial programs - programs 100 lines or so long that mostly do what you want on the first few tries. Now you should learn Java. The main reason for this is that you will need to learn C, or at least a C-like language, at some point, but you don't want to get into the complex parts of C yet. Java will handle most of them for you. It's also a compiled language, so it adds an extra step to the process (code-compile-test instead of just code-test). This is probably where you ought to learn most of the intermediate programming concepts, like basic data structures and algorithms. What you may find helpful is going back and forth between Java and the language you started with. Sort of sketch out the app's framework and decide how you want to do something in e.g. Python, then rewrite it in Java. This will not only let you use the language you're most familiar with, it will give you a valuable understanding of how programming languages work.

    Finally, move to C. C++ would be an easier transition since it's much more like Java than C is. But what you want to learn is memory management and all the other hard shit, and there's no way to escape it in C (there are lots of ways to escape it in C++). Plus, once you have a solid grasp of C and Java, you will almost by default know C++. Then you can learn the advanced features of C++ without having to worry about anything else.

    Once you're at this point, you will be able to pick up the basics of any new language in a week or two. If you still want to learn and didn't start with Scheme, you should learn it now. It's a very different way of programming than you'll be used to, and it'll teach you even more about how languages work and how to be a good programmer.

    I'm assuming you want to do as much of this as possible on your own. The first two steps - learning your first language and writing some simple programs in it - can be done with books and online tutorials. Past that, however, I would advise taking classes. You will know enough by then to have questions which might not be answered in a book, but which an instructor could answer easily - maybe before you even know to ask. Instructors will also be giving you assignments which are neither too easy nor too hard (hopefully), which is really hard to do on your own. You'll quickly find that you can read a book and understand every word in it, but not be able to write a program that says "Hello, world!" on your own. You need to be practicing this stuff constantly as you learn it or all the books in the world will be useless.

    • First, start with a full-featured interpreted language like Python, Perl, Ruby, or Scheme....
      (much deleted) ...Now you should learn Java. The main reason for this is that you will need to learn C, or at least a C-like language

      Yikes! I think I'd recommend doing it in the opposite order. Certainly Perl is not a good first language (though it may be a good last language)--it's not terribly readable, and even when you're fairly experienced it can take more than a little digging through reference books to fig
  • Here's my bias: I've written code in over a dozen languages, ranging from BASIC back in the 70s to the usual big ones (C, Java, C++), with a few of the weird ones too (Lisp, Scheme, Smalltalk).

    I'd say:

    First decide why you're doing it. If it's for money, don't bother.

    If there's some specific niche you're interested in, pick the appropriate first language for that niche. For example, if you build web sites, start with JavaScript. If you work in an all-Microsoft shop, learn VB.NET. If you want to help with ope
  • If you want to learn how computers work from the bottom up and really see how your operating system interacts with hardware, you should check out "Computer Systems: A Programmer's Perspective". [] It assumes some understanding of *nix and C, so you need to get familiar with them before or while you read CS:APP. You can't learn "programming" without learning a programming language, and although something like BASIC might be easiest, I suggest starting with C or assembler because they will give you a more com
  • A couple of books. (Score:3, Insightful)

    by jsantos ( 113796 ) on Monday October 24, 2005 @02:50PM (#13865710) Homepage
    If you have good math foundations you can try: Structure and Interpretation of Computer Programs - 2nd Edition []. Which will teach you a lot of sound principles. Otherwise you can try: How to Design Programs: An Introduction to Programming and Computing []. Which is also a good book for learning principles of programming but it's intended for a more general audience. Or you can try both. They are both worth owning.
  • python (Score:4, Insightful)

    by bluGill ( 862 ) on Monday October 24, 2005 @02:50PM (#13865713)

    I recommend you start with python, for two reasons: there is a good book How to Think Like a Computer Scientist [], and because the enforced whitespace will start getting you into good habits as far as code formating from the start.

    Note that I said start. Python is a great language, I use it a lot for my real world stuff. It is not the be all, end all of programing. Programmers I trust strongly recommend Ruby. (I have not got around to learning it yet) You will need to learn both LISP (Scheme is great) and assembly (any assembly, doesn't matter which, x86 is about the worst choice you could choose to learn though) at some point if you want to become a good programmer. Do not get stuck in the rut of thinking that your first language is perfect for everything.

    While you can learn perl, php, C, Java, C++, C#, basic, etc, I recommend you avoid them until you need them (though I have different reasons to not recommend each). Unfortunately all are fairly popular, so odds are you will be called upon to use one. They are however ugly, so you should avoid them until latter.

    It has been said that it is impossible to become a good programmer if you start with basic. While this isn't strictly true, there is a lot of truth behind it.

    Real programmers do not think about language. Real programmers know that all languages are Turing complete, and thus if you can do it in one language you can do it in another. (though sometimes the language will try to get in your way) Real programmers are concerned about data structures, algorithms, and other such things that have nothing to do with the syntax of the language. While you are learning the language keep in the back of your mind that the language itself isn't what is important.

    I'm torn about the recommendation that you take a class. While classes can be good, there are a lot of teachers out there who know nothing about programing, but think they do. If you get a good teacher, take the class. However a bad teacher can teach bad habits. (Comments are good, but run from any teacher who makes you comment every line) Sadly as a beginner you will be unable to tell the difference between a good teacher, and a bad teacher.

  • Dave Thomas' Code Kata [].
  • Why not make the jump with RAD and start with something like VB(6 and earlier) or Delphi.
    You can simply just get some pretty windows displayed which just do nothing, just for the kicks
    and then start working on things like a simple calculator
    Might sound crazy but you can get yourself familiarised with different aspects of programming without getting pained a lot and once you feel comfortable take the plunge into the world of C
  • One way to start programming is by using something you are familiar with - your web browser. Most all browsers have a Javascript implementation (be aware of MS's JScript and VBScript with proprietary functions though) which you can use to begin learning the basics of input and data manipulation. Might I recommend Firefox for its nifty little JS console.

    Sure, buttons and text boxes for input aren't the total representation of data input/manipulation, but like I said, its the basics. You only need to know wha
  • It seems that the prefered beginners languages here on /. are (in no particular order) are Python, BASIC, and ANSI C. All are IMNSHO, good choices for a beginner. A few have mentioned Ruby, which is a very approachable language. But the best advice I've seen here so far is "Find an itch you want scratched". That is, find yourself an interesting project, and code it. Decide which platform its gonna run on, pick one of the above mentioned languages and do it! The only way to learn to code is to code! Oh
  • by Don Knuth
    it's not for the faint at heart though,
    but it will teach you WAYS more than any of those
    "programming for beginners" courses and books.
  • I was born in 1978 and I didn't even get into programming until 4 years ago... ;-p imagine how good I'd be if I'd started way back when....
  • I see the language as just a medium. And when I say medium, I mean it in the sense that the painter uses canvas as his medium. The programmer uses a languages like a medium. Don't get hung up on which to use; the "best" one is entirely your opinion.
    So if you wish to learn programming, the medium isn't as important as the problem you're trying to solve. If I were in your shoes, I would try approaching a classic computing problem (eg generating Fibonacci sequence) using several of the languages that app
  • A language guaranteed to stay for long.

    You can download dev-c++ (or even better, codeblocks IDE) for free (they're OSS), and get a c++ tutorial from the web. You know, hello-world stuff and the like.
  • I won't suggest a programming language because that's not what you're asking...

    A good theoretical undergraduate computer science degree should teach you things like algorithmic complexity, finite state machines and automata theory, sets and group theory (if your middle or high school didn't do that already), graph theory, data structures, and a bunch of other groundwork.

    As other have said, you can pick up the MIT coursework for free, but what you can't get is the sessions with a tutor, the late-night hackin
  • C=64 BASIC
    AmigaOS QBASIC
    translate AmigaOS QBASIC to MacOS QBASIC for a simple word processor (yes, a number of idiosyncracies in both)
    a little AREXX
    ... insert 10 years of no programming ...
    BASH (this installer [])
    C (current hobby)
  • I found a cool little teach-programming game called CeeBot [] (has been featured on slashdot before I believe), and it would be excellent for teaching you the basics. I've played it myself as a programmer as a puzzle-game since some of the later parts are challenging logic wise. In the end though as many posters have indicated, 'just do it' is the main course of action and learning based off your needs to start with. Think of a very simple application and then code it, whether its an address book or a small ca
  • I'm curious how someone owned a computer in 1978 and never learned to program. There was little else you could do with them back then. Even in the mid 80's most people were still copying their programs out of magazines.
    • I got my first computer a c64 in 83, no problem finding software or shareware. The lack of an SDK and GUI widgets really kept me from entering programming, doing a BBS with ansi/petascii graphics was a chore. Wrote a BBS, compiled with blitz basic, never did much after that.

      Now, I use perl/expect/bash for work, to make things easier for admining boxes. I guess its programming, but I never create much more than simple statistical .csv files from data.

      BTW, Have been tempted to start programming after seeing
  • Python is a great language for learning general programming concepts, not syntax. The major philosophies of programming are all present in one form or another. And it's all highly readable, meaning you don't have to be a pro to understand the pros.

    I'm teaching a weekly night class on Python to beginning programmers in my areas and they are picking it up very quickly.
  • by hey! ( 33014 ) on Monday October 24, 2005 @05:44PM (#13866962) Homepage Journal
    the main skill you needed to program was programming.

    It's simply not true anymore. Any intelligent person with a knack for logic can program. The big issues now are in the domain of design. Much of your life isn't figuring out how to do something, it's figurign out how to make something somebody else has created (typically a framework or API) do something you want it to do. Keeping these things in mind, I'd say that programming langauge is not the issue. You can't get a sense of design until you've been deeply involved in one, either as a creator, or as somebody who has extensive experience in somebody else's design.

    Therefore, I'd do this:

    Make a list of some projects you'd like to get involved with.

    Going down the list, look at the kind of things you'd like to do on them. Example: suppose you have something like JOE (Java Outline Editor) on your list, and you remember lots of things from a product like In-Control that you really liked that no outliner around seems to have. If you can't think of anything to do on the project, cross it off the list (Linux Kernel -- Hoo yah! Err, maybe not).

    Pick a project that has lots of things you'd like to do with, and has at least one or two things that seem dirt simple enough. Look to to keep yourself invovled part time for a year (not as an official contributor -- yet), and diverse enough that if you're bored with A you can try B. Now find out more about it. Check out its developer mailing lists, find out what kind of reputation it has for design.

    Examine the languages and tools you would have to learn, read some books, download the code. If things look like they make sense, dive in for a year or so.

  • A good way to go is to start with a nice, high level language and then learn C. For a high level language, I would recommend Python. It has a simple syntax, good introductory guides, and you can run it interactively to try things out instead of trying to track down errors from a compiler. You should become familiar with loops, branching (if/then/else, etc) and recursion (programs which call themselves on a subset of the problem. It is often hard to find good examples of what to program when you are star
  • I realize this may not be an option in your situation, but if it's at all practical consider going back to college. At Georgia Tech (the only institution I'm fit to speak about from experience) they don't even teach you a language the first semester, because -- at least this is what I was told when I attended a brief talk about the differences between available intro courses -- they want people to learn the principles of programming, not a certain implementation.

    I wasn't particularly concerned about this, h
  • try this

    Squeak: Learn programming with robots []

    Or at least, read the reader comments on amazon. Squeak is a Smalltalk implementation, which if you don't know, is a complete proramming & graphics environment designed to be easy enough for kids to learn. Check it out. And if it isn't interesting to you, then my advice is in the absence of any other specific direction, find a great book that appeals to you first, and let that decide for you what specific topic/language/environment you first learn. One of the
  • for a newbie, it's overly short and the succinctness leaves you scratching your head.

    It's good for the experienced programmer but gave me ulcers when trying to learn from it as a brand new programmer. I always thought it was overrated for learning C (yes, I know who the authors are) when I was in college. The same goes for Bjarne Stroustrop's book on C++. These books are much better for someone who already knows the language reasonably well and wants insights to the language, not to learn it from scratch

Help! I'm trapped in a PDP 11/70!