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

41 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 drakaan · · Score: 2, Insightful

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

      --
      "Murphy was an optimist" - O'Toole's commentary on Murphy's Law
    2. 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.

    3. 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
    4. 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. ANSI C by Shads · · Score: 2, Informative

    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.

    --
    Shadus
    1. Re:ANSI C by AuMatar · · Score: 2, Insightful

      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 allocation (memory management). This is a major concept in programming, and if you do not learn and understanad it early, you will never understand it at all.

      --
      I still have more fans than freaks. WTF is wrong with you people?
  3. 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
    1. Re:Take a class by dr_leviathan · · Score: 2, 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 relearned how to write functions in BASH -- it was a fun little sidetrack from my normal day.

      --
      Religion is poison to rationality, and we lose sight of that at our own peril. -- Lurker2288
  4. 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.
  5. Don't. But if you must, try this method by Marxist+Hacker+42 · · Score: 2, Interesting

    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- graphical primatives (all the better if they use Hexadecimal in some form), sound instructions (polyphonic if you can find it), Sprites or large memory move instructions of some sort that can access video.

    Once you've found your art, and your language, I suggest reading Godel, Escher, and Bach, the Eternal Golden Braid along with the reference manual for your language. This will give you mini projects that are very visually or audually responsive. From there, you can move on to Boolean math, game theory, and expert systems. After that, you can get into methodologies, though object oriented design might be a good help from the begining, it isn't the only methodology out there.

    But most of all- make it fun for YOU, rather than a chore.

    --
    SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
  6. basics (not basic) by yagu · · Score: 2, Insightful
    • 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).

  7. 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.
  8. Just dive right on in and hope you can swim. by rgbe · · Score: 2, Insightful

    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. You also get to learn a very well structured language.

    A good place to start with C is: http://www.cs.cf.ac.uk/Dave/C/CE.html It is a good intro.

    Then you will also need a good IDE (integrated development environment) and development platform, for Linux there is Anjuta, Eclipse, Emacs (for those who are not affraid), and many more.

    And the thing I most recomend, is just search the web for interesting bits of code, compile and run them, then discect them.

    But most of all, Enjoy :)

  9. Get a few reference books, for starters. by DominicanZero · · Score: 2, Informative

    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 how to start programming in Visual Basic from the stuff I used at college; contact me through email (it's in my url) if you're interested.

    --
    120 char limit? How the hell am I supposed to cram my favorite sig quote and make it fit in here? =p
  10. 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.

    1. Re:Doing it backwards by Arandir · · Score: 2, Insightful

      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.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
  11. Languages to Learn by DavidNWelton · · Score: 3, Insightful

    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.

    1. Re:Languages to Learn by poopdeville · · Score: 2, Insightful
      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 tremendous waste of time.

      My suggestion is that an autodidact should learn the basics of a scripting language first. I abandoned my initial efforts to learn C and picked up a copy of "Learning Perl." There's a minimum of "black magic" -- just a line at the start of your program telling your operating system where to find perl. It takes about a week to get through Learning Perl at a relaxed pace. Granted, it does not cover the entire language. But it does cover Perl's procedural fragment in depth. From here it is straightforward to move on to more advanced Perl, or laterally to C and other procedural languages. I would image Python and other scripting languages would be similar.

      --
      After all, I am strangely colored.
  12. You need a problem first! by Bootle · · Score: 2, Insightful
    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 that goal

  13. Use and IDE to start by adamy · · Score: 2, Insightful

    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.

    --
    Open Source Identity Management: FreeIPA.org
  14. A couple ideas by ctr2sprt · · Score: 3, Insightful
    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.

  15. A couple of books. by jsantos · · Score: 3, Insightful

    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.

    --
    This signature intentionally left blank
  16. python by bluGill · · Score: 3, Insightful

    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.

  17. Re:Don't. But if you must, try this method by egomaniac · · Score: 3, Interesting

    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.

    --
    ZFS: because love is never having to say fsck
  18. Re:Don't. But if you must, try this method by Proc6 · · Score: 2, Insightful
    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.

    --

    I'm Rick James with mod points biatch!

  19. Summary of whats been said (and a critque) by cypherz · · Score: 2, Insightful

    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 yeah, it helps to read code. Reading source is a huge help to see how others solved problems.

    One problem with this discussion is that you never said what platform you use or want to write for. This lack of information about what you want to do is really common. Almost _every_ one of these "Ask /." articles leave out information that respondents need to adequately answer the darned question! At any rate, if you're a M$ kinda user, I think you should get ahold of VB 6 or VB.net and start with that. Lots of books etc available to make getting started easy. If you're a Linux/UNIX sorta person, then the ANSI C recommendations really start to make more sense.

    I think the bottom line is this: If you just want to learn some more about programming "in general", then you probably won't learn much. If you have some sort of persistent interest in solving some problem or other, or you want to make your life easier by automating something, then just code it! /* this post is really disorganized. i'm in the middle of debugging a headless batch process on HP-UX, so this post is only getting spare clock cycles */

    --
    This sig kills fascists.
  20. Re:Low cost of entry/decent return on investment.. by jhoger · · Score: 2, Informative

    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 is OK.

    Then JavaScript, then Java or C# or C. Eventually, you must get to C. It will probably take a while to "get" C pointers, but it is so for everyone.

    General advice: you're the programmer. Everything is *your* fault. This is a mistake fledgling programmers make: they tend to be ready to blame the interpreter, the computer, the disk drive. But 99% of the time, the problem is your code. The other side of that coin is most of the software challenges you will encounter are doable if you put the effort into it. Always have Google handy to look things up and find the easy way to do it.

    On that score: good programmers are usually interested in "The Right Way" to do a thing. If the way you've chosen seems klunky and inefficient and that there is a better way: well, that's because there probably is a better way. Seek out the "best ways" (there is usually only one best way... yes, it's weird). It takes time, but that's how you learn.

    Oh yeah, laziness: if you aren't maximizing laziness (in the sense of putting extra effort now to avoid work later) you aren't a Real Programmer.

    -- John.

  21. Language not important as the Problem. by jcwynholds · · Score: 2, Informative

    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 appeal to you. I use Python and C/C++, but that is simply my preference. But seeing a similar problem solved by different languages (and if _you_ do all the coding), then you would get a much better sense as to why to use one language or set of methods for a solution to a problem. I solve the same problem over and over to learn new languages and to get a better sense of new features of a language.
    And as far as other suggestions I have seen here:
    * Don't use IDE's. They're fine once you understand (fully) what they're doing, but when you're learning the window dressing can be confusing, and can become a crutch that many cannot do without. I'm not saying that we should go back to punchcards, but if you want to learn, begin from the beginning.
    * Get used to using a good text editor. Vi is my choice, but I have seen alot of Emacs stuff that is also very handy. I recommend Vi.
    * Steer clear of M$ Dev stuff. Perl, python, and gcc (and just about every other language) are all available for win32, so use those unless you're getting paid to develop with Vis Studio.
    * Use interpreters *AND* compilers. Learning when to use one and not another helps with the "everything looks like a nail when holding a hammer".
    In conclusion, at University, classes showed how to solve many problems with one language, but I found myself learning more when I solved one problem with several languages. It gave me insight as to how to structure things, and the inner workings of each language.

  22. Re:Don't. But if you must, try this method by Marxist+Hacker+42 · · Score: 2, Interesting

    Anybody who's been to Oregon Institute of Technology knows how to learn a language in a weekend- and Hello World has NOTHING to do with it.

    My favorite is writing text editors and calculators.

    Take your website for example; it looks terrible, is poorly organized and uses HTML that is long out of date.

    Maybe to you- but to the people that website is marketed to, it does a lot with very little bandwidth, which *used* to be a key in web design (and damn well still should be).

    Add up the facts that you admittedly have poor communication skills and no skills outside of coding "Hello World" applications, what exactly are you expecting?

    You're the one who mentioned "Hello world"- currently I'm on contract to ODOT working on a team doing a .NET client-server program to keep track of civil rights information for 6000 contractors statewide. But what I was expecting was actual techies (that is, people who can see past *appearances* to reality) doing hiring, instead of idiots. I no longer expect that- in fact, I no longer expect anything. Coding is now a job better done in Bangalore or Hydrabad at $2.50/hr. If you want software engineering, flow charts, and the ability to make the machine do REAL things deeper down than the user interface layer, hire me. If you want flash and coding to spec- go there. In no way should any American be going for a career in "programming" in this day and age- it's not worth it.

    --
    SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
  23. 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 Philip+K+Dickhead · · Score: 2, Funny

      "But a programmer learning programming from perl is like a chemisty student learning the definition of "exothermic" with dynamite."

      These words deserve to be enshrined in the quotes database.

      --
      "Speaking the Truth in times of universal deceit is a revolutionary act." -- George Orwell
    2. Re:Mod parent DOWN! by Peter+La+Casse · · Score: 3, Insightful
      I agree that C is the compiled procedural language most suitable for a beginner. As others have pointed out, it's simple to start and exposes you to a lot of pitfalls that will increase your understanding of how things work "under the hood" (and you'll really appreciate things like garbage collection that you're exposed to in other languages.) There are tons of C resources out there, and a knowledge of C will let you understand many open source projects.

      That being said, I'd almost be inclined to start off with something like Python. It's a quick and easy way to be productive, it has good docs and it's more fun than C.

      For the record, my language learning sequence went something like this: Fortran, C/C++ (beginner C++ is mostly C), MIPS assembly, Lisp, Perl, Java, C (for real this time), misc UNIX shell scripting, Python, Prolog. I'm planning to work through a Haskell tutorial this weekend.

    3. Re:Mod parent DOWN! by evilpenguin · · Score: 2, Interesting

      Yes. I was surprised to find myself saying so, because C is, in a sense, terribly advanced. But I'm hard pressed to think of an alternative this is more suitable. If you stick to straight C, "stdlib.h" "stdio.h" type stuff you can learn and do a lot of useful things, and it is portable to virtually every C/C++ compiler on earth, and you will get some of that "close to the metal" experience that teaches you how these machines *really* work. Then you can go on to the world of IDEs and VM languages and GC and appreciate all that they do for you (and all of their overhead!)

      My experience went timeshare BASIC, Z80 Assembly (to write a bootstrap for my Dad's homebrew S-100 bus machine - he was a EE, and I got to do the code), various BASIC variants, Turbo Pascal (for CP/M! How many have *that*!), C, more C, still yet again more C, C++ (haltingly), perl, Java, PHP.

      Various less important scripting language along the way. Also did some lex/yacc work, wrote my own "compiler" (compiled a pseudo-code representation of reports into runnable perl code).

      Did a lot of embedded work with the Z80. A local amateur radio repeater uses my code, as does a local school's hockey scoreboard. There is also something to be said for being forced to keep an entire program below 4k in size (2732 EEPROMs). I'd also say that some experience writing interrupt service routines is helpful, although learning to use a multi-threaded process library like pthreads gives you somewhat comparable experience.

      Beyond that, you need to learn referential data structures and some of the algorithms for handling them, linked lists, queues, stacks, dequeues, binary trees, hashed lists, etc. If you've got that, recursion, reentrancy, and threading, well, you've got the tools to confront most common programming problems.

      Of course, these days you don't really need to know how to do most of these things because the big object libraries contain them all, but I still think you need to know how to write them, how they work, and how to quantify their performance. You need to know *why* you would choose a given container for a given application. You need to know why you might use one for structure of a certain size, and use another if the structure grows, etc.

      But I do think it is a-ok to merely dabble. To just do if-thens and a couple of fors. I think owning a computer without learning any programming is like buying a jet airplane and only taxiing around the airfield.

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

  24. Re:Don't. But if you must, try this method by Proc6 · · Score: 2, Interesting
    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.

    --

    I'm Rick James with mod points biatch!

  25. Re:Yeah, VB.Net if by evilpenguin · · Score: 2, Interesting

    Not really flamebait. Yeah, it's written in a "flamy" way, but I think there is a serious point being made that VB.NET skills will not be very helpful in programming in a different language/environment.

    I would not recommend VB.NET as a "first language" to learn programming.

    That said, I wouldn't discourage someone from learning it. There's a lot of work to be had developing in it.

    But I wouldn't make it either the first or the only language I learn. It comes from one vendor and runs on one platform (Mono notwithstanding!)

  26. When I started out over twenty years ago by hey! · · Score: 2, Interesting

    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.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  27. Re:Please, what ever you do... by Richard+Dick+Head · · Score: 2, Informative

    The binary opposite of the color 'black' is 'not black'.

    I dunno bud, if your defining black as something other than the opposite of white, then your doing something bad. Even if you consider that you might have other slots available in the bit slice you are considering, you really should make them Don't Cares for sanity.

    !white = !00000000 00000000 00000000 = 11111111 11111111 11111111 = black.If you're having to think about things some other way, something is wrong. Or you're a mathematician :P

    Anyway to stay on topic, here's my particular path so far in the quest for coding:

    Walk through this online course:
    http://www.eskimo.com/~scs/cclass/

    Now write at least 3 different (as in technique) programs that crash your computer before you continue. You can boot into Windows if you're feeling lazy. :)

    Buy C++ Primer Plus, and go as far as you can till you're bored out of your mind and itching to code something real. (Optional)

    Get this library, then go thru tutorials. Then frolick and play:
    http://www.opengl.org/resources/libraries/glut.htm l

    Make a xxeyes program. Like xeyes but looks away from your mouse. (That way you can get outside crosseyes dammit! :D)

    Make a program that scrambles an image into 10x10 blocks.

    Reimplement pong.

    Make a program to play wav files. Brownie points if you can get a spectrum analyzer or some other representation working with GLUT. (Read up on fast Fourier transforms, which is what you'll be using. Don't use a library for it, thats cheating :) )

    Check out wxWidgets. Walk through the tutorials.

    Make your own text editor.

    Make a basic sound player app with a spectrum analyzer. Make it echo/reverb output. (Read up on FIR Filters)


    I'm sure I've forgotten things...oh well. Just tackle whatever sounds fun.

  28. 0, REDUNDANT by FireFlie · · Score: 3, Interesting
    "Oh, a couple more things. First, I'm not really suggesting that the grandparent post be modded down! I'm just disagreeing with it! It's a good post in and of itself. And totally intended to be helpful to the questioner, so please don't mod down the poster who first suggested perl!"
    Looks like it's a little too late for that, buddy. Thanks anyway, though.

    To one of your main points, however, yes perl doesn't exactly force you to use good programming habbits, but certainly C does not abide by your "there's one way to do it" philosophy. Plus, I try not to suggest new programmers to use C right out of the box because of it's uncanny ability to allow you to shoot yourself in the foot. I am not saying that C is bad, I have done a lot of C programming and as a language I absolutely love it, but dispite it's power, speed, and ease of use it may not be a great choice for a beginner who is not in a classroom setting (I would suggest it to either someone who has a little experience or someone who has a teacher to show them when they are doing something that is incredibly stupid). It is not always easy for someone to learn to program by themself, even someone that is experienced as a user.

    Perl may not be the best choice, but as I said, it sounds like it would probably be a great choice for someone in his specific shoes. He didn't sound like he wanted to change careers to become a programmer for a living, so many other languages may be quite unnecessary for him. Yes, perl doesn't exactly force you to program by the book, but it is something that he could get his feet wet with and possibly create something that could be of use to himself relatively quickly. Sorry, don't mean to rant, it just pisses me off sometimes that there are so many mods that don't understand the moderation system. I also would have modded my original post redundant if it would have read "ME TOO!!!!! PERL IS UBER L33T!!! LOLOLOL!!!", or something to that effect. I may not have added much info to the post before it, but I don't think modding it down was unnecessary.

  29. Re:Low cost of entry/decent return on investment.. by Zebra_X · · Score: 2, Insightful

    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.