[Klug-general] Obscure C at saturday's meeting

David Halliday david.halliday at gmail.com
Mon Nov 29 14:35:52 UTC 2010


There is a reason why C as a language does lean beautifully to code
obfuscation. We all know that C was just a joke that has got out of
hand, alongside the base of all *nix environments:
http://www.asandler.com/jokes/computer/c.shtml

<http://www.asandler.com/jokes/computer/c.shtml>From The Article:
We stopped when we got a clean compile on the following syntax:
for(;P("\n"),R-;P("|"))for(e=C;e-;P("_"+(*u++/8)%2))P("|"+(*u/4)%2);

To think that modern programmers would try to use a language that allowed
such a statement was beyond our comprehension!



On 29 November 2010 12:53, Dan Attwood <danattwood at gmail.com> wrote:

>
>
>> And for exactly this reason there has been a policy in places I have
>> worked of running any C code through the C beautifier automatically as part
>> of the version control check-in process.  This has the advantage that coders
>> arbitrarily rearranging the code in their preferred style whilst editing
>> does not look like a change, and that all code retrieved is always in the
>> house style, which makes for easier debugging.
>>
>> someone at barcamp was talking about do just this. Although they went one
> step further where if it fell outside of some rules then they would stop it
> from compiling and spit it back at the developer
>
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/kent
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/kent/attachments/20101129/08bc3a74/attachment.htm>


More information about the Kent mailing list