It's great that this contest has been running for so long and still produces interesting new approaches, but I wish there were more work being done in the field of underhanded code contests, e.g. [0].
One area of technology that seems to have continued the work of discovering underhanded techniques is the realm of cryptocurrency, specifically the "Solidity Underhanded Contest". The results for 2020 are here[1], which links to (spoiler alert) a great trick on line 65 here[2] (select the line character by character with a mouse to reveal it).
Great example of why Unicode and source code do not mix well... it reminds me of when I taught CS courses and had a few instances of very confused students who managed to somehow get one of those "invisible formatting characters" into their files. Fortunately, a hexdump --- or even just an "old school" ANSI-only editor --- reveals all.
One of the strange things I've encountered is bare \r (i.e. no accompanying \n) in the middle of a line from a windows-sourced file. Don't know how they got there, just that redshift didn't like it one bit.
I think how it happens with windows is one windows editor adds \r\n and then the file is edited in an editor that isn't properly aware of the windows line ending and the \n gets deleted. I've seen this happen before. It's especially likely to happen if the file has mixed line endings.
It’s quite a common problem with pasting commands from emails (or I guess some other webpages.)
Two spaces when writing an email get converted into at least 1 non-breaking space and these make bash sad. Unfortunately there isn’t really a good way to have bash treat them as white space which is annoying.
Compose Space Space on Free OSes. It’s useful sometimes, though I wish there was a default binding for zero-width space — I resorted to a non-breaking one to unbreak a link followed by an apostrophe yesterday.
I had a problem like this at work just before Xmas break. A script wa returning "command not found" for 'chmod' because of an invisible Unicode character. The guy who asked my help refused to believe it, untill I showed him a hex dump of the script, he got convinced when he saw 2 byted between the command and parameters.
One of my favorite programs was one where every single variable looked like 'K' but was different (there's K, Κ, K, 𐌊, 𝖪, К, Ꮶ, Ⲕ, etc.), and all of the strings were encoded in Roman numerals, e.g. ⅲⅰⅶⅺⅲⅶⅳⅰⅰⅳ.
I agree wholeheartedly- found about the Underhanded C Contest through an HN thread and enjoyed reading through the submissions every year. Sadly it seems to have not been run since 2015.
One area of technology that seems to have continued the work of discovering underhanded techniques is the realm of cryptocurrency, specifically the "Solidity Underhanded Contest". The results for 2020 are here[1], which links to (spoiler alert) a great trick on line 65 here[2] (select the line character by character with a mouse to reveal it).
[0] https://en.wikipedia.org/wiki/Underhanded_C_Contest
[1] https://blog.soliditylang.org/2020/12/03/solidity-underhande...
[2] https://github.com/ethereum/solidity-underhanded-contest/blo...