Python obfuscation

Alex Martelli aleax at mail.comcast.net
Sat Nov 12 01:40:03 EST 2005


Steven D'Aprano <steve at REMOVETHIScyber.com.au> wrote:

> On Thu, 10 Nov 2005 21:41:52 -0800, Alex Martelli wrote:
> 
> >> Obfuscation has it's place.
> > 
> > What I think of this thesis is on a par of what I think of this way of
> > spelling the possessive adjective "its" (and equally unprintable in
> > polite company).
> 
> Aside: given that "it's" is "it is", how would you spell the possessive
> case of it?

As I was thought and have always seen it spelled in good literature --
"its".  I'm not at all tempted to affix "'s" to make possessives out of
pronouns -- "I's", "you's", "we's"...?!-)  Remember, English is not my
native language, so what I have internalized are _rules_, not a native
speaker's magical communion with the language...;-)


> Not that I disagree with you about obfuscation in general, but I can think
> of one particular usage case for obfuscation which is neither useless nor
> morally suspect:
> 
> "Now listen carefully class, your homework for this week is to write a
> program to blurgle a frobnitz. As a test of correctness, your program
> must return the same results as the test function blurglise. Before you
> get any clever ideas of copying the code from blurglise, keep in mind
> firstly that the source code is obfuscated, and secondly that I am not an
> idiot, I will recognise my own code if you try to pass it off as yours."

Sure, that's one example -- but the instructor SHOULD really consider
placing burglise on a secure server on the intranet instead, making it
available (via CGI, webservice, whatever) to check input/output
relationships, rather than making the obfuscated code available and
raising questions of obfuscation and reverse engineering.


Alex



More information about the Python-list mailing list