Archive for February 24th, 2008

Midterms, Math, and My Major

Sunday, February 24th, 2008

So although I really don’t have time for it, I’m writing today in the interest of preventing this blog from becoming too stale. It’s amazingly sunny and warm outside this afternoon - 34 degrees. T-shirt weather, I think. Of course, as always, it will be short-lived; tomorrow and Tuesday we’re set to get five inches of snow. Wonderful.

It’s been two weeks now since my two-part “bandwidth saga,” and I’ve really been enjoying my new freedom. My seven-day usage total peaked around 30 GB and has now backed down to around 20 GB. It really is nice to not have to check the bandwidth meter every other minute to make sure I’m not in danger of getting dialupped.

The main reason for my silence recently is that I’m in the middle of midterm season, which looks like it will extend through the whole semester since the exams are so spread out that it takes nearly three weeks to get through them all. My classes this semester are definitely harder than they were last semester, though I guess that isn’t saying much since last semester’s were so easy. The hardest (and least interesting) by far is Math 240, a required course for CS that talks about logic and the math behind sets and trees and such. Though I understand that it could be beneficial to have a mathematical understanding of various CS concepts, I really can’t see myself applying that knowledge very often.

For example, last week we talked about algorithms and big-O notation, both of which I had plenty of experience with in my data structures class last semester. The professor went over some common searching and sorting algorithms, writing them in some crazy Pascalish pseudocode. (Pascal, seriously, in 2008?) Then, in talking about big-O notation, which is used to express the complexity of an algorithm, he proceeded to talk about the exact definition of big-O notation, and how you can prove that a polynomial is O(whatever), and so on. I guess this would be cool if I had any liking for math whatsoever, but mostly it just seemed confusing. Big-O notation is a simple concept. If you had the following code:

<?php

function loop($message, $times) {

    for($i = 0; $i < $times; $i++) {

        echo $message;

    }

}

?>

You would say that the function loop is O(N). N represents the problem size, which in simple cases is dependent on one variable but can sometimes be dependent on two or more. The function contains two major statements, the for loop and the echo statement, which prints the contents of a variable to the browser. The echo statement occurs in what is called “constant time”, or O(1), meaning that no matter what the value of $message is, the statement will take the same time to execute. The for loop, however, is not constant because the number of loops varies depending on what $times is set to. So the problem size N of the function is controlled by $times ($message doesn’t matter), and the function is O(N) because the for loop only contains constant-time statements. O(N * 1) is still O(N). If the for loop had contained another loop of some kind, also dependent on $times, the function would be O(N2). If the inner loop were dependent on something other than $times, the function would be O(N*M).

Going back to the Math 240 lecture, if you have a polynomial time function g = 2N2 + 8N + 1, representing it with big-O notation is easy. You drop all terms except the highest-degree one (2N2), and then drop that term’s coefficient. So the function g is O(N2). In Math 240 though, we take it further and prove exactly why that function is O(N2) using the definition of big-O notation. It’s rather abstract and confusing, and I really have no idea when I’ll need to know it in the real world. So far, this has been one of my problems with the CS program here in general. It feels very traditional, very by-the-book. You take classes like Math 240 because that’s just what CS majors do, not necessarily because there is much reason for it. It isn’t completely bad; it just feels like the curriculum is a little out of sync with what is really going on in the software world. You learn Java and C++, there is only one web programming course to take, software engineering concepts don’t seem to be taught much at all (or at least not officially). And yet people wonder why CS grads are often so woefully inadequate when they become software engineers….

The problem is that computer science is a massive and ever-expanding field. There really is no other field that is experiencing the kind of growth that CS has had for the past thirty years or so. And because of all this growth, it really doesn’t make much sense to have one giant umbrella CS major anymore. Instead, universities should have a separate school for computer science, where you could major in software engineering or computer graphics or assembly-language programming or whatever. At the very least, CS majors should be allowed to concentrate in one area. Trying to teach everyone everything just doesn’t make sense anymore.

Some would respond that the point of a college education isn’t to train you for a job - college is supposed to be more about abstract, foundational things that prepare you to be better in the long run. This may work for business or history, but in computer science even the basic things change pretty rapidly. In the past five years, we’ve seen a shift to multi-core processors able to run many instructions at once and superpowerful GPUs capable of doing far more than just generating 3D graphics. Programming either of these requires a very different manner of thinking that isn’t being taught today, and understanding them in an abstract, low-level way won’t be enough.

Hopefully I will be proven wrong and I will graduate with a great understanding of computers and software engineering, well prepared for the advancements to come. But, just as with the University of Wisconsin in general, I feel uncertain.