97 points · by mrbbk · 13y ago · 63 comments
To suggest "everything is a tradeoff" is a sort of moral relativism. It implies that all code has value and is a shield for criticism to even the poorest work.
Computer Science is a branch of mathematics. It consists of axiomatic systems. There are many, many, many sure things in computer science.
Unless you can prove that those axioms are sure things then how can anything be a "sure thing"?
To the larger point: everything is a tradeoff once we refuse to consider the "stupid solutions." Yea, bogosort is absolutely stupid, but we don't really think about it when seriously designing software. Instead, we're left with the smart solutions, none of which can be considered optimal for all applications.
Everything is a tradeoff is a tautology. Because if one algorithm was proven to completely dominate another algorithm, we would no longer seriously consider the weak algorithm.
EDIT: Made microeconomics more explicit.
Then again, I'm probably showing my age...
Unfortunately, the other end of this CS guarantee is that there are not enough credit hours to provide a foundation that everyone would agree with. University restrictions prevent 'high-unit' majors from exceeding the credit hour requirement for a degree.
We just went through a long process that ultimately resulted in adding a requirement for CS students to take a course which involves concurrent programming. Unfortunately, this came at the cost of removing a requirement for numerical analysis. Even with this update, you can still graduate without ever hearing the term 'OSI Model' or ever being exposed to anything dealing with the interwebs.
There are, however, amazingly good opportunities to expand the horizon outside of the department that also nicely tie into general education requirements, if students are made aware of them. In addition to economics, philosophy is another rather nice area to take courses in. Our philosophy department has a rather nice course in symbolic logic.
It's all about the tradeoffs though.
[Amusingly, networking was one of the optional 4th year classes - but in the pre-intraweb days nobody seem to regard it as very important...]
Said education also included a class on macro- and microeconomics, incidentally.
I disliked how overly simplified micro and macro 101 were. The models were counter to what I knew was obviously true, so I didn't go any deeper until graduate school. Once I took some advanced courses, I realized how valuable the topics were.
Being an econ major is also very different from being a business major. I view it as analogous to being a math major versus being mechanical engineering. One is more theory, the other is more practical. Neither is better or worse in an absolute sense.
Was my university a special case, or is the oft-repeated claim that engineering is less theory and more practice actually just a false generalisation?
I should of course note that after graduation the stereotype probably does hold true - engineers spend much less time worrying about formal proofs, or highly-accurate physics calculations, approximations are generally fine for what we do. But that is not the case whilst studying, at least not in my experience.
Really, a CS education is just preparing you to pick the right solution for the problem/constraints at hand. For example, you can loop through a list. That approach works fine. However, when you begin to scale, you may find that look-ups against a tree-based data structure or perhaps a hash table are much more time efficient at the cost of more complexity, more space and more educated programmers.
We need look no further than the existence of the programming profession to see that there ain't no such thing as a free lunch.
CTMCP is the bible for Oz. But it's more than just a language reference book. It is an exploration of this trade-off between language expressiveness and ease of comprehension. CTMCP outlines how programming concepts can be layered to form gradual steps between functional and OO languages by controlling the use of mutable state. The Oz language like Haskell, starts in a functional paradigm and makes the use of state explicit, but unlike Haskell it also tries to make the use of state easy and intuitive, rather than overly verbose. CTMCP advocates an avoidance of using a single paradigm to solve all problems.
Oz also has concurrency built in natively, and one of the overarching themes of CTMCP is that the use of concurrency greatly benefits from an understanding of this trade-off between expressiveness and ease of comprehension. Concurrency doesn't have to be difficult, and in the case of functional languages (think dataflow concurrency, as seen in Unix pipes) can be quite easy to use and comprehend. CTMCP posits that as one moves from functional to OO, concurrency analogously becomes both more expressive and more difficult to formally reason over. The use of concurrency therefore can become more tractable when programmers are made more aware of these trade-offs.
(CTMCP actually goes further and classifies the programming paradigms into an elaborate branching hierarchy, as can be seen here http://www.info.ucl.ac.be/~pvr/paradigmsDIAGRAMeng108.pdf)
and so on. I often struggle with competing desires in naming. Code Complete dedicates an entire chapter to variable naming.
It follows that shorter names should be reserved for more restricted scopes where additional context is available. i.e. the use of "i" and "j" as a conventional names for counters, "x" and "y" for arithmetic operands, and "N" for the number of elements in a collection is a good thing. On the other hand, the use of terse names like "atoi" in standard library is terrible, because its scope is in all existing programs (or at least in all C modules that directly or indirectly include stdlib.h
finite resources implies tradeoffs
A or not A