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?

18 of 515 comments (clear)

  1. Picked up a book. by PhrostyMcByte · · Score: 4, Interesting

    Thank my Uncle for introducing me to DOOM when I was ~10 years old. -- immediate "I want to make that". And so I picked up some books from the library.

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

  3. 2 week FORTRAN short course at JC. Lied about age. by HornWumpus · · Score: 4, Interesting

    I was off and running. Self taught basic, 6502 and Z-80 assembler. Worked two summers to buy my first microcomputer.

    Learned a bunch translating various basic dialects. Typing games in from Creative Computing etc.

    Backfilled informal programming education with EE and CompE degrees.

    I can spot the potential future programmer among 10 year olds playing. The future programmer is working puzzles requiring thought.

    --
    John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
  4. Star Trek by dwywit · · Score: 3, Informative

    I first saw code on an Apple II - the Star Trek game.

    I read an introduction to programming, and proceeded to modify the Star Trek game to not decrement the photon torpedo count whenever I fired one - ditto energy levels for shields and phasers. After a while I wrote a bouncing ball game, similar to pong.

    Some time after I left school I found myself as the sysop for an IBM System/36, and I would play around with the application software source code to see how it worked - not the actual source code, of course - I made a copy to play with. The IBM programmer's and reference manuals are quite comprehensive and from there I was able to take on the source code maintenance and development roles. It was mostly RPGII, with a little bit of BASIC. Then we moved to an AS400, RPGIII, RPG400, and SQL.

    --
    They sentenced me to twenty years of boredom
  5. 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.

  6. hungry by ebonum · · Score: 3, Informative

    In the 1990's if you were a fresh grad with 80K in student and credit card debt, USD200 to your name and not a soul on earth to help you, coding for 30K a year was a way to put food into your stomach. The offer looked even better with no gas money to get to the next interview. Doesn't matter if you've never written any code. Any fool with a solid IQ and a fire under his ass should be able to get good at coding pretty quick ( finding out about Scott Meyers, Erich Gamma, Fowler, Aho, et. al. early on helped. Need to buy all those guys a beer one day. They saved my ass. )

  7. How I learn't to code: by TechyImmigrant · · Score: 3, Informative

    Books!

    First: The Apple ][ Basic Manual.
    Second: Rodney Zaks, Programming the 6502
    Third: Jeffrey Stanton, Apple Graphics and Arcade Game Design

    38 years later my bookshelves are heaving.

    --
    I should use this sig to advertise my book ISBN-13 : 978-1501515132.
  8. On an ALWAC IIIE by FredK · · Score: 5, Interesting

    Computer class in school, spring of 1959. Coded in Hex, 512 bytes of memory (recirculating drum), 32K mass storage that was so big one didn't know what to do with it. Solved differential equations, linear systems with rational coefficients, and computed root locus diagrams. When somebody came along to add an assembler I didn't see the point, as it wouldn't even let you use instructions as data, and made it more difficult to plan jumps to account for the rotation of the drum. If you used floating point you lost 128 bytes of the memory. It was a very different world.

    1. Re:On an ALWAC IIIE by Guy+Harris · · Score: 4, Informative

      For those curious about the machine, here's the manual.

  9. Programming, not coding by GreatDrok · · Score: 5, Interesting

    i learnt to program at school from a Ph.D computer scientist. We never even had computers in the class. We learnt to break the problem down into sections using flowcharts or pseudo-code and then we would translate that program into whatever coding language we were using. I still do this usually in my notebook where I figure out all the things I need to do and then write the skeleton of the code using a series of comments for what each section of my program and then I fill in the code for each section. It is a combination of top down and bottom up programming, writing routines that can be independently tested and validated.

    --
    "I have the attention span of a strobe lit goldfish, please get to the point quickly!"
  10. By Example by jfmiller · · Score: 3, Interesting

    The TRS-80 booted to a basic prompt if there was no cartridge inserted. My dad got a book with a few hundred programs printed out, and one of use entered them in by hand and ran them. Then I would make changes to the code to make it do other things as well. I learn mostly by trial and error. When we got an Apple ][ clone I got a copy of "1001 things to do with your Apple II" and I was off to the races.

    I finally took some formal classes in college, but spent most of my time lamenting the need to listen to things I had already learned.

    The thing is, I had this opportunity because my parents had the resources to get the computers, and I was encouraged by teachers and friend to continue to learn. It is pretty clear that the best programmers all started by forth grade, not high school or college. If only rich white kids can start that early and boy are more likely then girls to take up computers as a hobby the current demographic deficiencies in the industry are likely to continue.

    --
    Strive to make your client happy, not necessarly give them what they ask for
  11. Commodore VIC-20 by JBMcB · · Score: 3, Interesting

    I was interested in computers since I was around 7. My first computer was a V-Tech "Learning Computer" which barely did anything, but I played with it all the time. My dad bought a used VIC-20 from a friend, and I sat with this book and tape until I could program Basic:

    https://archive.org/details/VI...

    --
    My Other Computer Is A Data General Nova III.
  12. pretty standard by Gravis+Zero · · Score: 5, Funny

    I was on a school field trip, wandered away from the group and was bitten by a radioactive programmer. Pretty standard stuff.

    --
    Anons need not reply. Questions end with a question mark.
  13. 1st programming. self taught basic in 1976 by chromaexcursion · · Score: 3, Interesting

    Using a teletype on the school district mainframe, with an acoustic modem. There was no such thing as a personal computer at that time.
    I taught myself basic.
    Pascal was the language taught in college.
    Since then I've taught myself C, C++, Java, Python, Javascript, ...

  14. Re:Really? by Giant+Electronic+Bra · · Score: 3, Interesting

    Myself and most of my friends pretty much taught ourselves to code.

    Actually I can't even say that I learned at any one specific point in time. When I was a kid (this was back LONG before anything like a PC, or even DEC mini-computers) I'd go work with my father on the weekends. Before that he taught me electronics, but then at work he'd have me enter his FORTRAN programs on punch cards for him. I must have been 6, so that was the start. Then I remember playing with a PDP-11C a few years later, typing BASIC statements on the TTY and watching it print out answers to simple statements. Years later, around 1980 my uncle gave us a PACE based computer typesetter, and we played with that, read the assembly language book, burned some instructions into ROMS, etc (I think the thing basically ran CP/M, but it had no command interpreter at all). It was right after that when Commodore started pumping out affordable machines, VIC-20 I recall particularly as the first machine I really wrote serious software on (I recall coding a version of Moonlander for that).

    I did eventually take some programming classes in college, FORTRAN, Pascal, Assembly language, etc.

    Frankly I think this whole "teaching kids to code" thing is overblown. Its fine to expose kids to something like this, and maybe see if a few of them take to it. Imagining that it will do much for the rest or burning a lot of resources on it seems foolish though. Teach them to think and solve problems, they'll figure out the tools.

    --
    "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
  15. I don't code by myowntrueself · · Score: 3, Informative

    I hate programming/coding. Trying to think how to write a program makes me feel disoriented and nauseous.

    In the various 'autism' tests I've done I've come out as massively 'heteronormative', this may be connected.

    And I certainly wouldn't want to force my kid to learn to code, especially not as young as 4th grade. I'd find that almost as disturbing as forcing him to do religious studies or gender studies.

    Don't make coding compulsory, it suits a particular kind of mind. First let the mind develop, find what it likes to think about, then get the kid to learn into those areas.

    --
    In the free world the media isn't government run; the government is media run.
  16. 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)