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?

8 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. All of the shitty code out there. by Anonymous Coward · · Score: 0, Insightful

    Just look at all of the shitty, shitty code that's out there. Any professional programmer will have encountered it. It turns out that nearly all of it is the product of these untrained programmers (they like to call themselves "autodidacts" to try to sound better than they are).

    What's worse is that they'll try to blame properly trained professional programmers for this shitty code. Yet often it's the professional programmers who are burdened with fixing this broken, awful code written by untrained programmers.

    It's really disappointing to see how much software out there is written in, say, JavaScript, just because that's the only language that some untrained programmer knew of. Or how many software systems use NoSQL databases that lose or corrupt data just because some untrained programmer didn't want to learn SQL and didn't know how to use a relational database. Or how these untrained programmers try to sort collections of millions of items using bubble sort only to wonder why it's so slow. It's all so unnecessary. If trained professionals had written the software in the first place, then all of this waste would've been avoided.

    All of that code is the citation you're looking for.

    1. Re: All of the shitty code out there. by Anonymous Coward · · Score: 0, Insightful

      When an untrained amateur programmer accuses a well-trained professional programmer of creating "bad code", it's usually because the untrained amateur programmer doesn't understand the code.

      The untrained amateur programmer sees that the code from the well-trained professional programmer is written in C++ and thinks, "UGH! That's ugly!" and has an urge to rewrite the code in a language like JavaScript or Ruby. But the untrained amateur programmer doesn't realize that it was written in C++ because it needs to be portable to more platforms than JavaScript and Ruby support, plus it has to run extremely quickly.

      In other cases the untrained amateur programmer won't understand the algorithms being used. The code will look "messy" because they don't have the knowledge and skills to comprehend it. They won't understand that a more complex algorithm was chosen because it gives better average-case and worst-case execution times and/or memory usage.

      In yet other cases the untrained amateur programmer won't even realize what they don't know. When they don't know what an index is, or don't know what data consistency is, or don't know that sometimes it's necessary to write complex queries, they won't see the need to use a relational database. When they see a well-trained professional programmer using such a database, the untrained amateur programmer won't realize why it's being used.

      The untrained amateur programmer will likely go on Slashdot and make asinine comments like,

      i (sic) have been in this industry for over 20 years and the amount of bad code i (sic) have seen as (sic) increased linearly with the amount of "professional" programers (sic) involved

    2. 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)

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