Two caveats:
- A lot of this knowledge might be kind of useless (for example, how to create unreachable code which nevertheless compiles), but I expect it would be difficult to demonstrate equally thorough understanding of the syntax of a language using exercises or looking at previous work (which ideally uses the minimum of sophistication to achieve the necessary functionality).
- It proves mastery of the syntax, but not of idioms, security, maintainability, speed, or any other metric relevant for production code. These might be correlated, but I'd rather see/present some examples of these as well to be sure.
Your question has another angle: why would I care to work for an employer who looked down on my IOCCC win? It acts as a filter both ways.
gcc -w 1990/tbr.c
1990/tbr.c: In function ‘main’:
1990/tbr.c:7:50: error: void value not ignored as it ought to be
7 | e(-8) ,gets (1+( c=q) )|| exit (0); r(0,0)
| ^~~~~~~~~~~~~
1990/tbr.c: In function ‘e’:
1990/tbr.c:22:43: error: void value not ignored as it ought to be
22 | 3 ;}e(x){x<0?write(2,"?\n$ "-x/4,2),x+1||exit(1):
| ^~~~~~~
Similar for clang. I'm sure there is an easy fix, but I don't know what it is.The program in question, if anyone is wondering, was the 1990 winner of IOCCC "Best Utility" award. Source is here:
https://www.ioccc.org/1990/tbr.c
The authors explain in rot13: "Guvf cebtenz vf n ehqvzragnel furyy." clang -std=c89 -Wno-implicit-function-declaration -fno-builtin tbr.c
Compilers are fussier (with good reason!) than they used to be.[1] https://mame.github.io/ioccc-ja-spoilers/patches/1990-tbr.pa...
But there's a catch. Second kind of engineer is not only better, but also much more desirable and highly paid, so may be it's an indicator that you should check whether your salary range is high enough and your tasks are challenging enough for someone like that. For some (if not most) roles, 9-to-5, grunt work engineer that just closes tickets and doesn't write new languages in his spare time is really the best fit.
I also failed an interview (or rather was not offered a job) at one of the FANGs, and I thought I did good enough on the interview portion, but it was the only interview where I didn't have the opportunity to drop some obscure trivia.
I ended up doing some readability related work at my current job because of (in spite of) my IOCCC experience.
Yes, but typically as a passing mention. In that way it causes no harm for those who don't know IOCCC and gives me a plus for who know it.
Code should be written to be understood by humans first and foremost. The person who can understand such deliberate garbage clearly and explain it well to those who don't understand, well, those people are the perfect human debuggers, in my opinion.
Since its "hiring day"; I'll ask: If you were interviewing someone and they listed an IOCCC win, would you count that as a plus? would you have to go look at the entry first?
And turned around: if you've won (or even submitted an entry) to IOCCC, would you mention it when applying for work?