Master the Hard Stuff: CS Edition

by rrusczyk, Aug 15, 2009, 5:43 PM

Just last night I was recalling (not fondly) the days of malloc and calloc and worrying about memory when coding in C. Then today, a parent pointed me at this article, which gives, I think, a pretty good defense of why it was a good thing for me to have to deal with. I think there's something to his argument that is a lot like the argument I make when I argue that rapid acceleration within mathematics to fancier and fancier tools is not the best route for a gifted young student to take.

Comment

6 Comments

The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Have you taken a look at the Scheme based course at eIMACS?

http://www.eimacs.com/Parent_CSAFCOverview.htm

by djcordeiro, Aug 15, 2009, 8:09 PM

The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Your post sounded like C memory programming is a bad thing!

by Poincare, Aug 15, 2009, 9:21 PM

The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
They don't teach pointers and recursion anymore? Very useful things there, and that's only scratching the surface. I hate to say this, but I still have the Pascal book I bought for my high school AP computer science class because it is to this day may favorite book on the topic of introductory computer science. I have yet to find another like it. It most definitely has recursion, and I'm assuming pointers, although we didn't use those much with Pascal - used all over the place in C though!

For those of you who do not know what recursion is, simply go to google.com and type in recursion. Look at the very first line of the response.

by levans, Aug 15, 2009, 11:14 PM

The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
@levans

i took AP Comp Sci and they did indeed teach recursion, but my teacher discouraged us from using it. we did not cover pointers in the class (as it was in Java) but I did in a C++ class that i took

by modx07, Aug 16, 2009, 7:44 PM

The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Two points:
1) This article exaggerates the differences between C/C++ and Java. The author laments the decline in the teaching of recursion and pointers and associates this development with the emergence of Java. Recursion is just as natural in Java as in C, and when I took AP Comp Sci, it was discussed extensively. It is true that Java programmers would not be as familiar with pointers, but implementing structures such as linked lists (which would be done with pointers in C) is just as easy and natural in Java. There are, I concede, important differences in usability. With Java, you do not have to worry about memory allocation, which is rarely interesting, and you are warned (as you should be) when you go outside of the bounds of an array. Some may think of these features as "dumbing down", but in fact, they let the student focus on the interesting things - for instance, the abstract features of the algorithm and data structures. This brings me to my second point.
2) The language doesn't really matter that much anyways. Beyond the first year, most computer science classes should be basically language agnostic (perhaps learning a functional language could be an exception to this). For instance, when you are learning about algorithms, the language is pretty much irrelevant; specifically, language choice does not impact run-time asymptotics. When you want to describe an algorithm more precisely than would be possible with plain English, you use pseudocode. If you have to implement something, you should be allowed to use whatever language is least distracting to you. At Harvard, CS 124, the course on Algorithms and Data Structures, is taught like this, and the method works remarkably well - you get a broader appreciation for the "big picture" that comes from not obsessing over the distracting little implementation details.

by themonster, Aug 17, 2009, 7:10 PM

The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
I tend to disagree with this article which basically states that learning a "hard programming" language makes you a better programmer and allows to differentiate between good and bad programmers.

A programming language is just used to implement a solution to a given problem. Regardless of the programming language, as a software engineer I am usually able to distinguish between an elegant implementation and a poor one.

As for C, yes it is a hard programming language and why not let the programming environment take care of some tasks (e.g., memory deallocation) if this can be done efficiently? And why not, learn 486 assembler?

As for pointer, Java does not have explicitly pointers as most objects are implicitly pointers. A linked list can simply be implemented by an object containing a reference to the next object... trivial...

by pascal_1588, Aug 19, 2009, 6:52 PM

Come Search With Me

avatar

rrusczyk
Archives
+ December 2011
+ September 2011
+ August 2011
+ March 2011
+ June 2006
AMC
Tags
About Owner
  • Posts: 16194
  • Joined: Mar 28, 2003
Blog Stats
  • Blog created: Jan 28, 2005
  • Total entries: 940
  • Total visits: 3313014
  • Total comments: 3882
Search Blog
a