image provider

Comment Malice


Here is an email I received in response to one of my essays.

Comment Malice : Stephen Griswold : griswold@csee.wvu.edu : 2000-09-26

loved that essay — some of those tricks are downright cruel.

I have a couple suggestions for messing with those use code beautifiers (in spite of attempts to ban them. ;) )

in the version we have at wvu there are some bugs that drive me crazy. (gnu emacs 19.34.1 (sparc-sun-solaris2.5, motif) of thu may 15 1997 on stat copyright (c) 1996 free software foundation, inc.)

  1. special characters in the single line comments (the double backslash //) are not ignored by the beautifier, so if you liberally sprinkle in braces and parentheses in lines or partial lines with // comments, the beautifier will be all over the place (emoticons could even be used to deflect initial attention ;) )

    I’ve learned to avoid //comments and instead use /*comments*/

  2. in ada and some of the other languages, it does a better job ignoring comments, but you can still mix in checks for the actual character. such as:
    OpenParen := (Char = '(');

    i've learned to get around that by mixing in complementary boolean expressions such as:
    OpenParen := ( (Char = '(') or ('1' = ')') );
    in a second semester Ada class, i was helping someone store an expression in a tree, and the above was the only way i could get the emacs beautifier to work correctly —, of course, for those who don’t use beautifiers would be rather dumbfounded as to why you would add an always false expression to an or statement :P It even could be used as a way to ban beautifiers ;)

I'm sure with experimentation, all sorts of other interesting bugs can be found in the beautifiers that can be exploited towards that goal of unmaintainable code :)


This page is posted
on the web at:

http://mindprod.com/feedback/unmain/commentmalice.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\feedback\unmain\commentmalice.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[18.217.208.72]
You are visitor number