PDA

View Full Version : When/Where/Why does the writing of ultra-compact but otherwise illegible code arise?



lordhaworth
August 27th, 2010, 04:13 PM
I write in fortran90 and C mainly, but am reasonably familiar with Python and some Perl (and VBA...).

Most code that I write reads pretty easily, I comment it, but even if I didnt you could get a good idea of what was going on pretty quickly.

Regularly I see, for example in programming challenges, uber-short code, take an almost exact example in J:


./8*/\"."0 r

I have no idea what this does...

At what point does learning such methods become appealing, i.e. to those who do it - why did you pick it up? I am not adverse to it, but it seems rather difficult and counter intuitive. It might be "clean" in the computing efficiency sense, but is it dirty to work with?

I acknowledge that regular expressions seem like the biggest hole in my toolbox at present (actually any good resources would be appreciated).

wmcbrine
August 27th, 2010, 05:54 PM
It's just done for hack value; i.e., fun. It's got nothing to do with efficiency, really, nor any practical consideration. If you don't see the appeal, you're not a hacker. But that's OK. :)

lordhaworth
August 27th, 2010, 06:04 PM
I see the achievement involved, particularly when I finally solve a problem and then see people do it a fraction of the code.