Lurker News
There was an article a while back about how cell service providers were selling extremely granular location data, and some of the programmers working on those systems immediately showed up on HN to comment on their moral dilemma. I suspect it's not an isolated case.

Comments (494) 112 threads

Show all comments

Showing thread 15 of 112

SamReidHughes3 replies#
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.
huhtenberg2 replies#
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.
londons_explore#
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"

dopeboy2 replies#
You got an extra day for an out of memory exception? I wish I was that lucky
krapp2 replies#
Yeah, not successfully compiling and running was an automatic fail in my school.
api_or_ipa#
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.

dorgo#
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
huhtenberg#
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.

kimdotcom#
I think I work with you.
dirkt2 replies#
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).

wean_irdeh1 reply#
What does crappy Haskell code loook like?
kaku_s#
The most common thing I can think of is putting everything in IO/ST, also known as "C++ in Haskell".
pc86#
I'm not sure how you think this comment makes you come off, but it's certainly not good.