Evan Martin (evan) wrote in evan_tech,
Evan Martin

  • Mood:

i ought to be more careful

I got a really bad grade on my compilers assignment, and I was sorta disappointed because I really should’ve put more time into it. I was proud when I turned it in because I was pretty confident it mostly worked, but when I got it back I saw that it didn’t.

Just now I looked at it more carefully, wondering what I had wrong. Was it the harder stuff, like arrays of arrays or pass by reference? No, somehow I failed simple things like the “if-then-else” test! I investigated further and discovered that I had inverted the meanings of the literals “true” and “false” (apparently my test to verify they worked was something like if true or false, which has the same meaning when they’re inverted).

Many of their tests relied on those working. Stuff like the test of break (while (true) { okflag = 1; break; }) was not producing the expected result for reasons other than my (correctly working) break implementation.

And the arrays? They worked fine. 20% of my grade was lost due to the simple inversion of two very important characters.

  • blog moved

    As described elsewhere, I've quit LiveJournal. If you're interested in my continuing posts, you should look at one of these (each contains feed…

  • dremel

    They published a paper on Dremel, my favorite previously-unpublished tool from the Google toolchest. Greg Linden discusses it: "[...] it is capable…

  • treemaps

    I finally wrote up my recent adventures in treemapping, complete with nifty clickable visualizations.

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 1 comment