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?
So leave your answers in the comments. How did you learn how to code?
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.
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.
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.
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)