Earlier quoted context omitted.
When you were in class, where you ever even introduced to the concept that sometimes it might be possible that O() notation might not tell the whole truth? I understand that for the most part you shouldn't have to worry about it, but shouldn't we still warn students about this?
Do you mean something like the case of quicksort mentioned in the post?[1] I was taught average- and best-case analysis along with worst-case analysis. Or do you mean some other fact not revealed by that analysis? [1] "Quicksort is a magical algorithm that theory tells us runs in O(n^2)"
Should CS students be graded on performance?
11–20 of 35 posts
Re: Should CS students be graded on performance?
#12First, find a better color scheme for something you intend people to read. That was painful. Second, when I was a CS student I expected to be graded on my response to a particular problem. If you wanted me to roll my own sort, I expect that to be specified. If you want me to explain in comments why I chose certain algorithms say something in class. I'm not going to waste time implementing an efficient sorting algorit…
Re: Should CS students be graded on performance?
#13Re: Should CS students be graded on performance?
#14It depends on the context of the problem: * If it's being framed as being applied to a small number of items on one machine, I'd mark down for premature optimization. Normally such assignments have a specific point, and going off the deep end with efficiency measuring often misses it. * If it's being framed as being applied to huge data sets, asymptotic complexity is the metric to go off of. * If it's being framed as…
When you were in class, where you ever even introduced to the concept that sometimes it might be possible that O() notation might not tell the whole truth? I understand that for the most part you shouldn't have to worry about it, but shouldn't we still warn students about this?
Re: Should CS students be graded on performance?
#15It depends on the context of the problem: * If it's being framed as being applied to a small number of items on one machine, I'd mark down for premature optimization. Normally such assignments have a specific point, and going off the deep end with efficiency measuring often misses it. * If it's being framed as being applied to huge data sets, asymptotic complexity is the metric to go off of. * If it's being framed as…
When you were in class, where you ever even introduced to the concept that sometimes it might be possible that O() notation might not tell the whole truth? I understand that for the most part you shouldn't have to worry about it, but shouldn't we still warn students about this?
With big O notation, you're not interested in how fast an algorithm ever actually runs (for that is the realm of constant factors), but rather how its running time changes as the size of its input changes.
Re: Should CS students be graded on performance?
#16Earlier quoted context omitted.
When you were in class, where you ever even introduced to the concept that sometimes it might be possible that O() notation might not tell the whole truth? I understand that for the most part you shouldn't have to worry about it, but shouldn't we still warn students about this?
Absolutely! I suppose when I speak of asymptotic analysis, I'm including average case/expected case/degenerate case analysis in the whole exercise. Perhaps "runtime analysis" is a better term - it can then incorporate latency analysis as well. But yes, that was integal to the treatment of the subject. I remember having to determine what the worst-case of quicksort looks like as a part of an assignment to exhibit, in…
Really, I think the issue with all the criticisms of asymptotic analysis is simply that too many people (even brilliant programmers and CS majors) just don't understand what big O notation actually means. If an algorithm is in, say, O(n lg n), that says nothing about how fast it runs with 10 inputs, 1,000 inputs, 1,000,000,000, etc. It merely says how its running time changes as its input size increases. The algorithm could literally take 1,000 years with an input size of 10. That doesn't matter. At some input size, it will run faster than a different algorithm in O(n^2) that completes in 1 millisecond with an input size of 10.
Re: Should CS students be graded on performance?
#17If you're doing web apps, application code is close to the last place I'd reasonably expect there to be severe performance issues. You're far, far more likely to either blow something architecturally ("We call a foreign API in the request/response cycle.") or flub settings where simple best practices produce repeatable results ("It is 2011 -- do you know where your gzip is?")
Re: Should CS students be graded on performance?
#18It depends on the context of the problem: * If it's being framed as being applied to a small number of items on one machine, I'd mark down for premature optimization. Normally such assignments have a specific point, and going off the deep end with efficiency measuring often misses it. * If it's being framed as being applied to huge data sets, asymptotic complexity is the metric to go off of. * If it's being framed as…
That said, some abstraction is useful too.
Re: Should CS students be graded on performance?
#19Performance is rarely on the most important requirement in software development.
If you don't believe me, watch Prof. Leiserson make this point.
http://ocw.mit.edu/courses/electrical-engineering-and-comput...
Re: Should CS students be graded on performance?
#20First, find a better color scheme for something you intend people to read. That was painful. Second, when I was a CS student I expected to be graded on my response to a particular problem. If you wanted me to roll my own sort, I expect that to be specified. If you want me to explain in comments why I chose certain algorithms say something in class. I'm not going to waste time implementing an efficient sorting algorit…
Will do for the color scheme. What I was trying to ask was: Should real world performance be more heavily weighed? I feel like right now all the CS curriculum focuses on is O() performance as the end all.