3 ms·
I concur when it comes to lazy-evaluation. I once lost 10% of my grade in a project because I removed a debugging print statement, which in turn made a data-str
by lukeqsee 13y ago
I concur when it comes to lazy-evaluation. I once lost 10% of my grade in a project because I removed a debugging print statement, which in turn made a data-structure lazily evaluated, which in turn meant that a significant portion of my type-checking was never evaluated.
- dietrichepp 13y agoWhat? This means that you must have been using exceptions to communicate type-checking information. That's just a terrible way to write Haskell. Exceptions only have nice semantics when they're e.g. thrown in the IO monad. -- No, no, no, no! checkValid :: Int -> () checkValid x = if x >= 5 then error "Invalid number!" else () -- This works fine. checkValid :: Int -> Either String () checkValid x = if x >= 5 then fail "Invalid number!" else return () This may sound a bit harsh, but I think you deserved to lose that 10% if you had such a fundamental misunderstanding of "lazy evaluation".
- cliftonk 13y agoTelling a kid in college (I was a sophomore when I was writing Haskell) that he deserves to lose 10% over something like that is crazy. The obvious to us, many years into programming professionally, is not always obvious to newer folks.
- tensor 13y agoThe ideal purpose of grades is teaching. It's a way of informing you of the parts of the curriculum that you do not yet fully understand. This sounds like an entirely appropriate situation to lose grade points on. Unfortunately, grades now also serve as some poor measure of intelligence or competency in many people's minds.
- ubercow13 13y agoA grade is also how they decide if you get your undergraduate degree. It would be a strange shame if that decision had nothing to do with your intelligence or competency as you imply.
- Jtsummers 13y agoMarking work is a way of teaching, grades are used as a measure of understanding. I had a friend in college that, at the start of a semester, was typically a mediocre to borderline failing student if you looked at the marks on his assignments. By the end of the semester his understanding would be on par with mine (typically As in CS/math courses with the occasional B). However, his grade reflected his poor early start with the material and he'd end up with Cs. Now, that's good enough to pass to the next class, but it still helped to screw him over when he started applying to jobs after college.
- learc83 13y agoI think that depends on the project. If the project was the entire grade, then yes that's a bit much. But if we're talking about 1 of 10 assignments, then 10% really isn't that much. I've had plenty of assignments were the granularity was just something like excellent, good, pass, fail.
- Myrmornis 13y agoGrades are for showing (to teacher and pupil) which students can do the activity in question better than others. There's a lot of BS in modern education that would have you believe otherwise.
- lukeqsee 13y agoAstute observation; I agree that I should not have used runtime errors. I quickly converted the code to a Monad based solution. That being said, I was in the middle of trying to understand both Haskell and my task at hand, so I was quite thankful to have it working at all. With no one that understood Haskell enough to explain Monads to me, I had to slowly come to the understanding of them on my own.
- judk 13y agoIt's really not a bug in Haskell that you ran out of time to learn what you needed before an arbitrary unrelated deadline. I hope you didn't let a silly grade stop you from continuing to learn.
- lukeqsee 13y agoI didn't. I just completed the first phase in which we produce assembly code and will be finishing the project up this month. I hope to put the code up on Github. Perhaps someone else will find it curious and/or learn from my mistakes. This project has been the most learning-filled project of my college career. I wouldn't trade that for any easy A. :)
- deleted 13y ago[deleted]
- Dewie 13y ago> If this opinion is a reasonable example of Haskell programmers' attitudes, I would expect some significant portion of programmers would want to stay the heck away from it. The opinion that people should get less of a grade if they don't know what they're doing is unreasonable? I'm not a compiler writer, but using exceptions for regular control flow in a type checker sounds very iffy to me, Haskell or not. Why would exceptions even show up in a type checker, for that matter?