5 ms·
When I think about all of the problems with the education system I am not sure that "teaching coding" would top that list. The bottom line is that coding is a
by tpatke 15y ago
When I think about all of the problems with the education system I am not sure that "teaching coding" would top that list. The bottom line is that coding is a profession which is not suited to everyone. I remember being a TA at university in the late 90s when IT was booming. Everyone wanted to learn to program. Once they learned enough to realize it meant sitting in front of a computer alone all day - most moved on to something else. Few people have the concentration / (lack of :-) social aptitude. I believe most people have the intelligence.
Basic computer skills need to be taught. Coding? It should possibly be a required semester in university for all majors. ...beyond that? Does everyone really need to know about recursion?
- Jach 15y ago> Does everyone really need to know about recursion? Yes, and I'd argue indirection as well. If you teach coding without recursion, you're just teaching basic logic coupled with arithmetic, we have classes for that already. (As an aside, I think iteration should be introduced as a special case to recursion.)
- _delirium 15y agoOne proposal, which I'm somewhat sympathetic to, that a general cognitive skill of being able to think procedurally or computationally is important in the 21st century, even if the craft of being able to program is more specialized. Some papers on that: http://www.bogost.com/writing/procedural_literacy.shtml http://www.bogost.com/writing/procedural_literacy.shtml http://dm.lcc.gatech.edu/~mateas/publications/MateasOTH2005.pdf http://dm.lcc.gatech.edu/~mateas/publications/MateasOTH2005.... http://www.cs.cmu.edu/afs/cs/usr/wing/www/publications/Wing06.pdf http://www.cs.cmu.edu/afs/cs/usr/wing/www/publications/Wing0...
- bad_user 15y agoDoes everyone really need to know about recursion? Does everyone really need to know the basics of calculus? Or how about genetics? Does everyone really need to know French? I had classes for the above in my high-school. In fact I can't think of any class I took in high-school that isn't useless to a large portion of high-school graduates. And I can't think of many examples that are more useful than grasping the concept of recursion.
- jlind 15y agoMaybe they do, or maybe they don't. In many cases, I'd argue that it's more about teaching how to think and learn, rather than "an understanding calculus will be required for everything you do in the rest of school / career / life"
- bad_user 15y agoWell, if judging from that perspective, I don't think how anyone can argue against teaching programming in high-school.
- jseliger 15y agoI think everyone needs to be at least introduced to those fields so they have some shot of figuring out what they might like while learning something that might serve them. Also, if you replace "calculus" with "statistics" and "French" with "English," I would say yes.
- bad_user 15y agoYou're not dissagreeing with me here.
- tapertaper 15y agoEveryone who spends their day on a computer would get a productivity boost if they learned to code.
- derleth 15y agoEveryone who spends at least part of their day interacting with programmable devices would have their lives improved if they learned to code. Now... how many people in the industrialized world don't spend at least part of their day interacting with programmable devices?
- randomdata 15y ago> Does everyone really need to know about recursion? Recursion is taught in gym class through the game of dodgeball. Consider the following C-like pseudocode: void throw(int *ball, int hits) { if (hits < NUMBER_OF_PLAYERS) throw(ball + angle(), hits + *ball); else return; } The question then becomes, do people need to learn specific computer languages, or is teaching the underlying concepts in abstract ways enough?
- Bostwick 15y agoI would argue that dodgeball is better expressed as an iterative algorithm. Consider the following pseudocode: def dodgeball(players, balls) until players.all? { |p| p.is_hit? } throw(nearest_ball(balls), nearest_player(players)) end end Most people think like this. Dodgeball teaches while loops, not recursion.
- wcarss 15y agoEdit: I began writing this before a different post appeared with the same point. Alas! I'm sorry to be a jerk, but I found your code pretty tough to decipher. Here's my thought process: NUMBER_OF_PLAYERS could be, say, 6. the caller calls: throw(ball, 0); 0 < 6, so throw(ball+angle(), 0+dereference(ball)); So, what is ball? It's either an integer and you're just passing its address around for no particular reason, or it's an integer array and you're using angle() to move around inside the array somehow? Then what exactly is stored in that array, the positions of people? Let's imagine it's 1s and 0s to denote a person or not. After making that leap of logic, your code starts to make sense. You're adding "some amount" to the address, and then whatever is at that address (1 for hit, 0 for nothing) to hits, and passing them into the next invocation, as long as it's less than the necessary number of hits. Could easily be a while loop, but I'll get to that in a minute. I have some other points: - Ball isn't a great name for the list of the positions of the players. - It isn't clear that ball is an array. - There's a pointless 'else return'. - You never address the "I don't have a ball" situation! This code requires explanations of arrays, pointers, and addresses before you can talk about recursion. I'd express how to play dodgeball to a new programmer as follows: throw(angle, enemy_positions): # This function takes an angle and a list of # the spots where other people are, removing # them from their spot if it registers a hit. # Returns true if it's a hit, false if a miss. find_ball(): # Tries to find a ball; returns the number # which you found -- 0, 1, or 2. load_enemy_team(): # Returns a list of the spots where other players are enemy_positions = load_enemy_team() players_on_other_team = enemy_positions.length() ball_count = 0 # all balls start in the middle! while players_on_other_team > 0: if ball_count > 0: angle = get_throw_angle() # user inputs this hit = throw(angle, team_positions) if hit: shout("Yahoo!") players_on_other_team -= 1 # they're down a guy! else: ball_count += find_ball() # reload That should cover it - though I'm sure there's problems with my code too. :) The biggest point I want to make is that this example is trivially easy to represent without recursion. While recursion can be used in place of any loop, a non-programmer's mind will likely arrive at iteration first for tail-recursive examples. And once someone understands how to solve a problem one way, teaching them a totally different way can be tough. I personally think people do pretty well at understanding how recursion applies with respect to exploring a maze, which is almost as universal an experience as dodgeball.
- marshallp 15y agoThat kind of attitude (i can/could program but it's boring sitting alone) will change soon enough when you can't feed yourself unless you program all day. The only debate is in how soon that occurs.
- sethg 15y agoRemember that a lot of people who don’t code as a profession end up doing it as part of their work (just as a lot of people who do not have “writer” in their job titles, and who didn’t major in English, end up doing a lot of writing for their jobs). One of the most horrifying pieces of Perl I had to work on was written by a biologist who knew just enough Perl to translate certain information from File Format A to File Format B. Or at least, he thought he knew just enough Perl.... A lot of businesses depend on complicated Excel spreadsheets whose authors don’t realize that they are programming.
- Jun8 15y agoThe answer to your question is a very easy YES! Think about it: isn't your question isomorphic to "do all students need high school algebra", "if you're not become a historian do you still needs to know all those details from the history class" and countless others. Some of these questions do have merit (how many among the HN crowd remembers or cares about how photosynthesis works or sin^2 + cos^2 = 1) bu they miss the point: those topics are there to open your brain to ideas, mental weigh lifting if you will. In this sense you most definitely need to teach recursion and coding concepts. Coding (especially for high schoolers) doesn't have to be "sitting in front of a computer alone all day", in fact if this is how it's presented that's totally the wrong approach. That comes in the pro stage. At he early stage you have to stress the creative and social aspects of coding.