Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I approach obfuscation more as an excersise in terseness than perhaps unreadability (although that is a byproduct).
I do them as a mental excercise to keep my brain actually having to think about things i don't normally have to - i agree with djantzen about it being partly "mental masturbation", but at the same time if people want to do that then who's to stop them? And by writing hard code in a terse manner i now understand functions i wouldn't necessarily have used or certainly understand as well (vec, pack/unpack, splice, map, grep etc etc)
Also it's nice to make something that people are surprised and pleased that it can actually be done in that space.

I started off doing them entirely for email signatures, so i almost always use a 288 char limit - 4 lines of 72 chars each.
I use Vim and a script which formats the code into 4*72 lines, removes whitespace and counts chars for me
(you can see it in my scratchpad - usage sizer <name of script to check> <char counting 0|1> <chomp whitespace> <width>).

The process usually starts with an idea - something i've seen that i think i can do in that number of chars (or more likely can't do - but want to try). I'm starting to do bigger ones - like Balls! as the problems i approach get harder to fit in.
For example: The first one i posted here was this - a pair of sigs to generate and then solve a maze. This became an obsession and i kept working at it till i got it into 4 lines.
After the idea i tend to write it in semi-long hand, then start shortening it - spotting shorter ways to do things etc etc.

er, that's it really!

apologies for the rambling post!
al


In reply to Re: Principles of obfuscation? by teamster_jr
in thread Principles of obfuscation? by McMahon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-24 13:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found