:: Re: [DNG] C Obfuscated code: a virt…
Kezdőlap
Delete this message
Reply to this message
Szerző: Enrico Weigelt, metux IT consult
Dátum:  
Címzett: dng
Tárgy: Re: [DNG] C Obfuscated code: a virtue or a vice?
On 15.07.2016 07:23, Edward Bartolo wrote:

> The following is a program submitted to IOCCC:
> http://www.ioccc.org/2015/dogon/prog.c


nekrad@orion:~/src/x1$ cc prog.c
prog.c:10:22: error: ‘W’ undeclared here (not in a function)
 char J[1<<18]; int G[W*p],_,k,I=W/4+1,w=p/4+1; float C,B,e;
                      ^
prog.c:10:24: error: ‘p’ undeclared here (not in a function)
 char J[1<<18]; int G[W*p],_,k,I=W/4+1,w=p/4+1; float C,B,e;
                        ^


> At first, I was tempted to follow the path of writing obfuscated code,
> but thinking about it, with todays huge computers, it simple doesn't
> make sense to write difficult to read code. In the past there was an
> advantage of writing such code that saved on code size as RAM size was
> only a few kilobytes but definitely not today.


Most of the difficult-to-read code I came around was actually very
resource hungry.


--mtx