News for hackers. Stuff that matters.
Re:Ask HN: What is the most unethical thing you've done as a... by SamReidHughes on Sunday August 05, 2018 @03:38PM (#17693064)
I built my computer graphics final project in Haskell so that the TA wouldn't be able to run it and grade it. Then for our presentation, I babbled on and on about the math and went over time so we wouldn't have to give a really crappy demo.
Re:Ask HN: What is the most unethical thing you've done as a... by huhtenberg on Sunday August 05, 2018 @05:36PM (#17693677)
Reminds me of

    int main(int args, char ** argv)
    {
        static int foo[640*1024];
        return 0;
    }
This compiled into a valid MS-DOS .exe, but spit out "Out of memory" and exited when attempted to run. Was quite handy for getting an extra day to work on lab assignments back at school.
Re:Ask HN: What is the most unethical thing you've done as a... by dopeboy on Sunday August 05, 2018 @06:41PM (#17693967)
You got an extra day for an out of memory exception? I wish I was that lucky
Re:Ask HN: What is the most unethical thing you've done as a... by huhtenberg on Monday August 06, 2018 @04:08AM (#17695897)
It was a bit more nuanced.

These were basically home assignments that we would demo at a lab for a grade. The lab machines had several "resident" programs running on them (some legit, like basic AV, and some installed by lab admins for their own questionable purposes), so the amount of available RAM varied wildly, sometime dipping as low as 300KB. The TAs knew that, but didn't care enough to do anything about it.

So when an assignment that you did on your own machine failed with "oom" at the lab, it was plausible that it was due to all the junk taking up too much space on the lab boxes. The assignments themselves were math-heavy physics modelling tasks, so you they did actually need a lot of memory.

All that said, I think only once someone used this "trick" to get an extension and it was because his truly needed few more hours to hammer its sim into converging.

Re:Ask HN: What is the most unethical thing you've done as a... by krapp on Sunday August 05, 2018 @07:22PM (#17694110)
Yeah, not successfully compiling and running was an automatic fail in my school.
Re:Ask HN: What is the most unethical thing you've done as a... by api_or_ipa on Sunday August 05, 2018 @09:03PM (#17694482)
If it didn't cleanly compile and run on linux, it was a autofail. I found a discrepancy in MPICH2 the hard way: it would correctly implement my leader election on my mac, and on my little raspberry pi, but not on a Solaris linux!

Lost 5% of my grade to that bug.

Re:Ask HN: What is the most unethical thing you've done as a... by dorgo on Tuesday August 07, 2018 @01:36PM (#17708715)
Once, I implemented an interpreter/compiler for a toy-language in Opal (a functional language developed and maintained by my prof). A compiler for Opal was only available for Linux. I had zero experience with Linux and no intention to gain any. So I wrote my code without compliling/testing. Suprisingly, I got a good grade with a remark that the grade would have been even better without syntax errors :D
Re:Ask HN: What is the most unethical thing you've done as a... by londons_explore on Sunday August 05, 2018 @05:54PM (#17693757)
I looked at that code wondering how on earth it could run out of memory. Surely 640*1024 couldn't OOM a machine, even an old one...

Then I re-read is as 640k and went "Oooh"

Re:Ask HN: What is the most unethical thing you've done as a... by dirkt on Monday August 06, 2018 @03:15AM (#17695711)
Wouldn't have worked back when I was TA ...

First, I'd have been able to run it (or grade it even without running it). And yes. I've seen a lot of crappy Haskell code. I've written a good amount of that myself when I was learning Haskell back then.

Second, assuming I didn't know Haskell, I'd have stopped your babbling in the presentation at some point and asked you to run it.

Third, any student that does unusual things is either very good or very cheeky, so those students deserve special attention. So 10 minutes at your and my convenience to run the demo in my office would always have been an option.

(But then, teaching at my university probably was quite different from teaching at your university).

Re:Ask HN: What is the most unethical thing you've done as a... by pc86 on Monday August 06, 2018 @10:25AM (#17697805)
I'm not sure how you think this comment makes you come off, but it's certainly not good.
Re:Ask HN: What is the most unethical thing you've done as a... by wean_irdeh on Monday August 06, 2018 @04:07AM (#17695892)
What does crappy Haskell code loook like?
Re:Ask HN: What is the most unethical thing you've done as a... by kaku_s on Monday August 06, 2018 @10:22AM (#17697783)
The most common thing I can think of is putting everything in IO/ST, also known as "C++ in Haskell".
Re:Ask HN: What is the most unethical thing you've done as a... by kimdotcom on Sunday August 05, 2018 @06:04PM (#17693802)
I think I work with you.