Finals are over, and I’m going to rant
Well, I took my last final of the term yesterday. This was easily the hardest semester I’ve taken yet. (And I’ve had a semester where I took quantum mechanics and mathematical physics at the same time.) Here’s the projected outcome.
PHY290 - Research in Physics No final. Just wanted to finish up my physics minor. I helped a professor in the department parallelize a simulation of a solid-state something-or-other. Note that physics people write the worst code you can ever imagine. In Fortran.
ITK327 - Concepts of Programming Languages Pretty sure I did well on the final, although the professor is way behind in grading. Only one of the seven assignments I turned in throughout the semester has been graded. So my grade is in limbo at the moment, but I’m betting he’ll just throw in the towel and give me an A. If you’re curious as to why ML never caught on beyond academia, this course will tell you.
ITK375 - Data Communications Easiest class I’ve ever taken, and it was educational to boot. I get the sense that the professor didn’t care about tests or grades but that the department was mandating some sort of exam system. If it was up to him, he probably would’ve just lectured. Either way, anyone who didn’t get an A in that class should seriously reevaluate just how much effort he puts into his schoolwork. I aced this class without breaking a sweat.
HIS104.04 - History of the Middle East Great class. I crushed the final. I’d be shocked if I didn’t get an A.
ITK225 - Computer Organization Whoever made this a 200-level course was a dipshit. It used to be a 300-level, but I have no clue why they changed it. This was one of the most difficult, time-consuming courses I’ve ever taken. We covered everything about computer architecture, going from logic gates all the way up to assembly. Personally, I think it was entirely too much information to cover in a single class reasonably well. Everyone complained about the professor, but I thought he was a reasonable guy who just made a terrible choice of textbooks.
Computer Organization by Andrew Tanenbaum is not a textbook. It is a reference manual. Tanenbaum jumps around through different topics with no logical connection between them. On the surface, the book appears well-organized, but the sub-sections in particular are atrocious. For example, the chapter on parallelism actually delves fairly deeply into networking issues for clusters. While this information is necessary to implement a cluster, it’s not necessary at all to understand the concept of how a cluster works. Only very basic networking should have been covered, but he spent many pages on the subject.
Each of the chapters in that book almost warrants its own course. The review questions in the book are often poorly-worded and ambiguous, which led to more than a few complaints from students. For some reason, Tanenbaum finds it necessary to trade clarity for what he thinks are clever turns of phrase. I had an argument with the professor over a question which dealt with the probability of the CPU’s branch prediction being “on the right track”. I gave a perfectly justifiable probability tree model based on the information given, but it was marked wrong because the model gave the probability for a single randomly-selected instruction being a correctly-executed one rather than the probability that the CPU would have guessed all previous instructions correctly. He still wouldn’t give me points after I showed him that my model could be used to approximate the correct answer within 3 significant digits. Other students thought I was insane for having sustained the argument as long as I did. (I even typed up a 2-page justification for my answer.) All this because Tanenbaum couldn’t choose clearly choose his words.
Anyway, my grade going into the final was around a 91%. Depending on how he curves, I could walk away with an A, but the final was fairly difficult. The new stuff since the last test was a cake walk for me, but the review stuff wasn’t quite as clear in my mind as it should have been. At this point, I’m not going to sweat it if I get a B in the course. I’m just glad it’s over.
ITK279 - Algorithms and Data Structures I needed a 50% on the final to maintain a B in the course. I was surprised to find out that the minimum B was a 3.75 / 5 and not a 4 / 5. So that made my day. It was a challenging course, but I learned a lot and am satisfied with my work. The professor is very intelligent, but I sometimes think she’s a little bull-headed about her grading. Not terribly, but I think I deserved higher grades than I got on some programs.
I felt badly for all the people in the course who came in knowing only Java. The language used in the course was C++. The Java programmers coming in had absolutely no clue how to properly manage memory, and it’s not their fault. It’s the department’s for making the dumb-shit decision to change the two introductory programming courses to Java from C++. As a result, the courses which are supposed to teach fundamentals of programming never even touch on pointers.
I know a lot of people think that Java is the “new wave” and that everyone everywhere should know it, but history should have taught them by now that every “miracle” language that’s come along to replace C has fizzled out because people realize that they can’t get any actual work done without the lower-level access to memory that C provides. While it’s true a lot more applications are being written in Java these days, they’re all slow as shit, and frankly the UIs all suck. Yeah it’s great to be able to deploy on multiple platforms with one code-base, but Java merely shifts the portability problem to the virtual machine level instead of the hardware level. It’s easier to control a virtual machine, but different virtual machines on different platforms can act … differently! Java is a sloppy, interim solution to the portability problem. If machine hardware ever gets truly virtualized, as Intel is looking into doing, Java will become a miserable memory.
And did I mention that Java’s syntax is fucking ugly? The dot syntax works for one or two levels of object access, but after that it just gets unreadable. If you’re going to claim to make the successor to C, you could at least take some hints from Objective-C and Smalltalk. It amazes me that Microsoft and everyone else making these popular new development frameworks and languages have never thought to add parameter labeling to their functions. What’s more readable?
color = Color(0, 128, 32, 1);
or
color = [NSColor colorWithRed:0 Blue:128 Green:32 Alpha:1];
The former is C++ code for instantiating a new “Color” object, and the latter is Objective-C. Why Java took syntax and naming conventions from C++ is a total mystery to me. C++ naming conventions are fucking terrible. Again, what makes more sense?
value = object.getValue;
or
value = [object value];
The former is C++; the latter Objective-C. The C++ statement, in English, would be “Set value equal to get the value of object.” The Objective-C statement translates to “Set value equal to object’s value.” This is why Objective-C is called a self-documenting language. Its statements read as English more easily. It’s possible to code C++ with some Objective-C conventions, but C++ makes it difficult. Believe me, I’ve tried. I once experimented with implementing a bastardized form of parameter labeling in C++ by underscoring in the method name, like so
sortArray_InDescendingOrder(int *arr, bool descendingOrder = false)
But this gets really awkward as more parameters are introduced. And you can’t break the method call into multiple lines easily, like in Objective-C.
Also, C++ does not allow for varying constructor names. In Objective-C, the statements
color = [[NSColor alloc] initWithColor:anotherColorObject];
and
color = [[NSColor alloc] initAsBlueColor];
both initialize and return NSColor objects, yet they have totally different method names and parameters. In C++, a design like this is impossible because of the clumsy constructor implementation.
If there’s one lesson that the computer science community should learned by now, it’s that the successor to C has to be able to do everything that C can already do and more. You can’t succeed something by removing features from it. Java will never be the successor to C because it can’t do low-level memory accesses. Period. And by the way, I count being able to write a structured, non-object-oriented program as a feature. Object-oriented programming is nice, but Java forces you to use it. Having to instantiate an entire god damn object, with its entire method table, just to print “Hello World!” to the screen is completely insane.
So I’ve ranted about the stupidity of replacing C++ with Java in the curriculum (and C++’s own inferiority when stacked up against a good object-oriented language like Objective-C), but could I do a better job designing a curriculum? Here would be my approach.
- Start students with C. Not C++. Not Java. No objects. They will take their first programming course in purely-structured programming, and they’ll like it. They’ll be introduced to problems that don’t require object-oriented programming to solve. Give them one bitch-ass assignment where they’ll basically have to simulate objects in C with structures and method libraries in order to solve it. This will whet their appetite for a proper object-oriented language. Fail any student who doesn’t use spacing and tabbing properly. Seeing
for(i=1;i<5;i++)should get the student kicked out of the program until he realizes that a space bar exists on the keyboard for a reason.Make them use Unix and gcc, not fucking Visual Studio. Command lines aren’t going anywhere, Windows snobs. Better get used to them. My introductory programming course required that all projects be submitted as Visual Studio projects, which pissed me off to no end.
- Introduce students to object-oriented programming in the second-level programming class in C++, not fucking Java. I don’t like C++ all that much, but its popularity across platforms makes it a good choice. Even though it sucks. They’ll walk in with a solid foundation on which to build and develop an proper appreciation for object-oriented programming. They’ll know which problems are easier to solve with objects and which ones don’t require them. Again, make them use Unix.
- Let students take Java as an elective, if they wish. It should not be required. Anyone with a solid grounding in C++ could pick up Java in a day anyway. Both of the languages share many poor design choices.
- Cover
makein the courses. It’s a great tool. - Teach a debugging course. Yes, that’s right. An entire course devoted to debugging other people’s shitty code, even if it’s only half-a-term long. I’m pretty sure I’m the only student in the entire program who knows how to use conditional compilation to generate debug code. Everyone else runs through and comments out debug code before submission. I change a compiler flag. Cover things like
assertandgdb.
So those are some rudimentary suggestions. I’m done ranting for now. I’ll be seeing Chronicles of Narnia tonight.