On magic: "Magic" in programming is something I really disapprove
of. By "magic" I mean all of the lines of code that are required to
set up a trivial program like "Hello World." In Python it takes 1
line to write "Hello World"
print "Hello World!"
while in C++ (with tolerable style with
regard to whitespace) it takes more like 6-8.
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
}
All of the extra lines are needed for reasons that only make things
easier for the compiler, not the student. In Java it is even worse,
not in terms of line count but sheer amount of "magic" garbage:
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); //Display the string.
}
}
This is miserable! And yet there are rumors of Java becoming more and
more the "vogue" language to teach beginning students. Many of our
students have rarely used a computer before, and the notion of
programming is filled with
unfortunate
pop
culture
references to programmers and such. Some of them have somewhat
inaccurate
ideas of what Computer
Science is all about. Coming from this exciting background of
misguided pop-culture ignorance, if the VERY FIRST thing we
expose them to is a completely unintelligible bunch of
techno-muble-jumble, we are killing off their interest from the very
beginning. If what we want is a crop of students that really
understands things from the bottom up, we have to keep their interest
for longer than the first 10 minutes of CS 1.