Slashdot Mirror


How To Get Into Programming?

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?"

10 of 195 comments (clear)

  1. To steal a line from the sneaker company by jtev · · Score: 5, Insightful

    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".

    --
    That which is done from love exists beyond good and evil
    1. Re:To steal a line from the sneaker company by fm6 · · Score: 5, Interesting
      ...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.

    2. Re:To steal a line from the sneaker company by stanmann · · Score: 5, Insightful

      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.

      --
      Food not Bombs is a nice platitude but it breaks down when you notice that the Bombees are usually well fed
    3. Re:To steal a line from the sneaker company by pyite · · Score: 4, Insightful

      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.

      --

      "Nature doesn't care how smart you are. You can still be wrong." - Richard Feynman

  2. Take a class by araven · · Score: 4, Informative

    Most community colleges have beginning programming classes. It's a way to get started before branching out on your own.
    ~

    --
    "A foolish consistency is the hobgoblin of little minds." -Emerson
  3. Low cost of entry/decent return on investment... by COBOL/MVS · · Score: 5, Insightful

    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)

    --
    GOBACK.
  4. Perfect timing by MarkGriz · · Score: 5, Funny

    I've been wondering how to get out of programming.
    Do you want my job?

    --
    Beauty is in the eye of the beerholder.
  5. Doing it backwards by Otter · · Score: 4, Insightful
    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.

  6. Mod parent DOWN! by evilpenguin · · Score: 4, Informative

    Oh my God!

    I won't say this is completely wrong, because perl is a language where you can do an awful lot of useful things with a very small investment of time and effort, but the idea that one can learn "principles" of programming from our favorite hydra of a language is not a good one.

    IMHO (which is not H, BTW), I would start with a language that has a more coherent design.

    The big question is "objects" or "not objects." Secondarily, native compiler or scripted/VM language (which has more to do with getting used to the toolchain).

    I'm going to assume that you would like all the software to be free of charge.

    If you are going for objects, I would recommend starting with Java or Python. I would NOT recommend C++ because it is a complex hybrid of C and objects, doesn't have a single inheritance model, and gets enormously complex in its effort to cover all possible bases. Not that C++ can't be a great language, I just think it is not a best first stop.

    If you are going for non-objects, believe it or not, I would recommend C.

    Yes, C is full of pitfalls, but it is a simple language in design, easy to learn , but difficult to master. It can express powerful data constructs with simplistic data types and the experience of it translates well both "down" to assembly and "up" to other "safer" but more complex procedural languages. C is also a "classic native compiled" toolchain, which will stand you in good stead for all such similar toolchains.

    Java I recommend from experience, Python from reputation (people I know, respect, and trust like Python -- I haven't yet had occasion to go much beyond the "Hello, world" stage with it).

    As for how to start, for both of my "basic" choices, C and Java, I recommend beginning with a simple text editor and the command-line tools. Master using these for a few multi-file projects. In C, get used to writing and maintaining a Make file. Once you are comfortable with these basics, feel free to move to IDEs for simplifying/streamlining. But learn those low level skills so you don't become what I lovingly term a "tool junkie:" a person who can only be productive with a certain set of tools from a certain vendor.

    Back to perl for a moment: Please folks, don't think I'm trying to get religious about perl. I love perl. I use perl every day. But a programmer learning programming from perl is like a chemisty student learning the definition of "exothermic" with dynamite. Perl is, by Larry Wall's own admission (nay, boast) "pathologically eclectic." Perl's whole philosophy is "there's more than one way to do it." For learning, I like a language where there is one right way to do it. That way you don't develop bad or confusing habits. Once you have discipline and style, you move to the more expressive languages and you make good code with them. Bad perl code is just plain terrifying. In my 20 years of programming, once I got beyond BASIC, which is very much a toy, I went to Pascal. Pascal is a great (IMHO) learning language. But I don't see a lot of Pascal development these days (outside of variants like Delphi, which, I'm afraid, take you down the "tool junkie" path).

    Anyone got a great compiled procedural language suggestions besides C?

    1. Re:Mod parent DOWN! by belmolis · · Score: 4, Insightful

      These are good suggestions, including the one to avoid PERL. I think that where to start depends on the person's interests. If he wants to be able to write non-trivially useful code soon, one of the scripting languages would be best. On the other hand, if he wants to understand things at a fairly low level and is interested in hardware or operating systems, C is probably the best choice.

      Of the scripting languages, I suggest that Tcl deserves serious consideration. One reason is that I don't think that object-orientation is best for a beginner. OO languages are very useful for some things, but they aren't ideal for everything, and object-orientation adds complexity and additional concepts that it's best for the beginner not to have to worry about. So I recommend against languages like Python and Ruby that are obligatorily object oriented.

      Tcl also has a very simple syntax which makes it easy to learn. (Ironically, I think that Tcl is harder to learn for experienced programmers, who tend to make mistakes because they falsely assume that Tcl syntax is like that of Algol-class languages.) Tcl's other big virtue is the closely associated Tk toolkit, which makes it really easy to get started writing programs with GUIs.

      Finally, Tcl has a very helpful newsgroup comp.lang.tcl on which beginners' questions are welcome as well as a helpful wiki.