6 ms·
Here's a crazy idea. Let's teach Ruby in intro programming classes instead of C, so as not to frighten away 90% of the population with pointer dereferencing and
by clofresh 17y ago
Here's a crazy idea. Let's teach Ruby in intro programming classes instead of C, so as not to frighten away 90% of the population with pointer dereferencing and segfaults. You should teach C eventually to make them appreciate high level languages, but just not right away.
- eru 17y agoA few institutions teach e.g. Python, Scheme or Haskell as a first language. I agree C is a horrible first language.
- jcromartie 17y agoC would be great compared to C++, which my high school and my wife's non-CS engineering department taught as intro languages.
- Goladus 17y agoIt's not a crazy idea at all, nor is it even a new idea (see BASIC, Pascal, etc.), but it is not appropriate in all cases. I would never recommend trying to teach C to a group of high school kids that were otherwise indifferent to computers (eg not curious tech-nerds). Teaching methods and knowing your audience are important, too like recognizing that most of your class is bilingual and making an analogy that would be useful and relevant to them. I once explained Computer Science in a nutshell to my sister --a pianist, one of those self-proclaimed not-good-at-math people, but someone I know and communicate with very well-- in about 45 minutes; starting with binary logic and circuits and putting it all together with and ending with high level languages and the internet. She didn't retain it all of course but I pointed her at the Head First HTML/CSS book and she picked it up no problem.
- Shamiq 17y agoIt could help that Head First HTML/CSS is wonderfully written for someone who basically knows how to use a computer.
- bitwize 17y agoI think they should learn something like Z80 assembler. Get them used to the idea that computation on a von Neumann architecture occurs within a one-dimensional array of fixed-width, integer-addressed memory cells. When they are used to that, they can move onto things like C. A perfect geek toy for kids would be, to me, something about the size and form factor of a cellphone with a QWERTY keyboard. There'd be a switch on the front such that in one position it functions just like a graphing calculator, and in the other position it behaves more like a KIM-1 computer, letting you craft machine language routines for it directly. There'd be a low-level monitor of sorts that would let you examine memory contents, assign breakpoints, etc. and maybe some simple I/O routines to load and store programs from the attached flash storage. Otherwise it's a 1970s era hobbyist computer, except it has loads of memory, a sweet color display, an ARM CPU and you can fit it in your pocket.
- tsally 17y agoWe teach Shakespeare and Calculus in high school, though those are certainly not the easiest choices in their respective fields. For an introductory programming class, I agree that Python is a great choice. However for seniors in a computer science class, C should be a fairly important part of the curriculum. There are some fundamentals of computer science that are best grasped through experimentation with C (pointers, memory, etc). Note that several years ago the AP Computer Science exam got switched from C++ to Java. I personally support this change because most high schoolers are not mature enough to fully grasp the complexities of C++. Java is a bit gentler (Python would be better). However I don't see why C can't be the Shakespeare of Computer Science in high school. Everyone hates studying it, but it's probably better for the student in the long run. On a slightly related note, I don't hear of too many efforts to make Calculus more accessible to girls or Shakespeare more accessible to men. This whole women in programming thing is an interesting phenomena. Don't get me wrong, efforts like this are great, and I've even participated in a few myself. But let's be clear about the source of the 'problem'. Deeply embedded society pressures and bias in early education are two major factors working against women in programming. By the time they've gotten to high school we've already lost quite a few for good. Let's also be careful not to attribute every inequality in sight to socialization. That's a nice PC answer, but unlikely.
- mquander 17y agoBy the time students get to Shakespeare and calculus, they've been reading books critically and doing math in school for at least a half dozen years. If they have six years of CS/programming education, too, then I agree that they would be well-served by a course in C. There are a whole hell of a lot of concepts in computer science that I think are both more useful and far more educational than understanding how to do pointer math and learning how to carefully allocate and free memory for your data.
- tsally 17y agoI had to read Romeo and Juliet my Freshman year in high school. My understanding is that R&J is a fairly common Freshman text. Your point about Calculus doesn't quite fit either because you don't need an extensive foundation to start programming. That's why we see a lot more 14 year olds programming than doing Calculus. You're a genius if you're doing Calculus at age 14, but I bet a lot of people who read this site started programming that early or earlier. I'm sure we've got our fair share of accelerated math people as well, but they jut are not as common.
- fnid 17y agoI think traditionally, it is considered better to learn it the hardway first. It teaches you more about the progression of thought through which innovation leads and provides a better understanding of the content. That's why we learn Reimann Sums before we learn how to do the little tricks in calculus. There has also been a lot of discussion lately about how higher level languages are "dumming down" programmers. Colleges who have switched to Java for example are producing graduates that are having more difficult times in the "real world."
- sarahmei 17y agoTotal nonsense. "it is considered better to learn it the hardway[sic] first" Blatantly false. For a certain narrow class of people, this is the best way to learn. There are hundreds of other ways, and some of the people who have a different preferred style would make great programmers. "Colleges who have switched to Java for example are producing graduates that are having more difficult times in the "real world."" Also blatantly false. CS programs have always churned out a lot of mediocre programmers, a handful of good ones, and a few brilliant ones. Only the language has changed.
- philwelch 17y agoWhich is ironic because colleges switched to Java because Java is used in the "real world". Of course, Java with all its class-and-interface scaffolding adds too much accidental complexity too. It's not a matter of higher-level, it's a matter of verbose. Scheme is a high-level language but it's still "the hard way" in a very important sense.
- defunkt 17y agoAbsolutely. My high school taught C++ and it convinced me to not major in computer science. I was hacking on Perl and Visual Basic at home and couldn't imagine four years of pointers, segfaults, getters, and setters. I just wanted to have fun.