Slashdot Mirror


Slashdot Asks: How Did You Learn How To Code?

Last week Apple's CEO argued that computer programming should be a 'second language', and that it should be a required subject for all students starting in 4th grade. But a large number of professional programmers didn't learn how to code in a formal school program, either because they're self-taught or because they learned on the job. There's a lot of abstract discussions about the best ways to teach coding, but if there's any group that's uniquely qualified to answer that question, it's the Slashdot community.

So leave your answers in the comments. How did you learn how to code?

6 of 515 comments (clear)

  1. The usual way by russotto · · Score: 5, Insightful

    That is, the usual way for 1980s computer geeks. Self-taught BASIC on an Apple II using a few books on Applesoft and Integer BASIC. Later Pascal also on the Apple II with a few books including Jensen and Wirth's PASCAL User Manual and Report. Learned C (K&R, mind you, none of that prototype crap) on a Mac XL with the old Megamax compiler. Picked up 6502 assembler out of necessity in there, also 68000 and 6809.

    1. Re:The usual way by Moblaster · · Score: 4, Insightful

      Because back in the 1980s computers booted to the BASIC command line interpreter/REPL. Nowadays, there is, more or less, no such thing. Closest similar thing most non-geeks will get to is a browser console, and while that is reasonable debugging tool for pros, it's not a similarly friendly programming tool for beginners.

      In fact, you practically need to be an experienced developer even to get a modern IDE up and running. Eclipse? Xcode? Not for the faint-hearted.

      Not sure about hard statistics, but I'd say it's a safe bet most new developers these days need to be shown how to get going. Beyond that, they'll naturally self-teach and bootstrap themselves, or fail out early. Because at the end of the day, no matter how you learn, your practical knowledge (meaning libraries and frameworks and tools, if not entire languages) will be functionally obsolete within two years, formal CS concepts and emacs/vim godliness notwithstanding.

    2. Re:The usual way by Anonymous Coward · · Score: 2, Insightful

      Because at the end of the day, no matter how you learn, your practical knowledge (meaning libraries and frameworks and tools, if not entire languages) will be functionally obsolete within two years

      Sounds like you're investing in the wrong platforms. Java has been around for 20+ years. The Microsoft .NET platform has been around for 15+ years. Very large parts of both class libraries have been stable for over a decade now. A platform, library or programming language that's so poorly conceived that it's obsolete in two years doesn't sound like it's worth learning. Frankly, that sucks and I don't program on platforms that suck. Java or .NET might not be sexy Silicon Valley flavor of the month hot language or platform, but they pay the bills and keep getting used to get real work done year after year. Meanwhile Silicon Valley is basically still in the advertising business, with few exceptions. Save the world? Hardly. I don't either of course, but neither do I claim too. My advice to any new programmers coming along, especially young Americans, is to find an un-sexy niche platform that's integrated heavily into the economy and that nobody else wants to learn, like embedded industrial control systems or something like that. There's probably a Java interface to it too. Playing catch up with whatever flash in the pan technology that the hip startup of the month is using is a sucker's game.

  2. Coding, or programming? by Todd+Knarr · · Score: 5, Insightful

    I learned to code first in classes in high school (BASIC, FORTRAN, COBOL, Pascal) and then by reading the relevant books or documentation (C, C++, Lisp, Icon, Java, C#, Perl, Python, Ruby, PHP, Javascript et. al.).

    The more interesting question is where developers first learned to program (a completely different skill from coding). IMO we don't need to teach children to code, we need to teach them to program. Which means first teaching them to approach problems logically and analytically, which is going to cause the loss of about 75% (my guesstimate) of the educational establishment when they can't deal with students who know how to analyze material, do independent research and call teachers on incorrect classroom material.

  3. Re:What qualifies as coding? by Dunbal · · Score: 2, Insightful

    Gee do Word and Excel Macros count? How about doing Maya animation?

    Coding usually refers to programming a computer, not just using an app to get a computer to do stuff but writing the app.

    --
    Seven puppies were harmed during the making of this post.
  4. Re: All of the shitty code out there. by gmack · · Score: 3, Insightful

    I can tell your code quality by your arrogant post that just assumes people who don't understand your code aren't trained enough.

    Everyone knows that debugging is twice as hard as writing a program in the first place.

    So if you're as clever as you can be when you write it, how will you ever debug it?

    --- Brian Kernigan, "The Elements of Programming Style", 2nd edition, chapter 2

    I had this quote framed and put on the wall at the last place I worked were btw, some new guy wanted to tear up perfectly working C and replace it with SCALA so it would be more "modern" and tried to go over my head to do it.. At the job before that, I had to sit there for a week as a possible client went through my code and then decided it looked easy enough that they could re implement it themselves (turns out, no they couldn't)

    "Messy" is not about not writing complicated code messy is about being complicated when you don't have to be and not properly abstracting the complicated parts and not commenting the worst parts. Messy is about over depending on order of operations instead of using brackets to make things more clear (to top this off, many compilers screw up order of operations so the code may not be doing what you think). Messy is about doing the same complicated thing 5 times instead of making a function (or even a macro) to do the work. Messy is about not knowing when to split a function into a separate one rather than adding new parameters to the existing function to make it handle more cases.

    Don't even get me started on programmers who think cleaning up compile warnings is a waste of time or who split databases for speed reasons (hint: if you are always joining the same 3 tables in every query it's not faster any more)