Code Irony

An Ironic Look at the State of the Art by Christopher Myers and Justin Davis

A More Satisfying Programming Experience

This week, we’re here to put the kibosh on a movement that’s destroying very core of our hitherto dysfunctional programming community. We’re out to stop the movement towards smaller, sanely-structured, compact, and readable code. It’s just too short and quick. More is more, people! Really… despite what anyone may tell you, it is the size of your program that matters.

A Prescription for Modulex?

Don’t worry. Thousands of other programmers just like you are experiencing the disease behind this movement that our medical laboratories are calling:

Software Constructile Dysfunction (SCD)

Not sure whether you’re stricken with this problem? Here are some questions to ask yourself to tell if you have SCD:

  1. Is your average module list only about 5 or 6 modules long?
  2. Do you find yourself writing programs that run too quickly?
  3. Is your pair programming partner unsatisfied with your performance?

If you’ve answered “yes” to any of these questions, then this post could change your life!

But how did we rid the world of this terrible affliction? We knew that if we were ever going to crack this nut, we needed to get to the core of the problem. How do you even begin to write a long program that’s complex enough to satisfy without expending time or effort? Well… why not import a tall, thick stack of third-party modules?

Let’s see how this would work. Consider exhibit A:

Program 1:Unremarkable

import codecs
import re
import sgmllib
import types
Program 2:Impressive!

import codecs
import cPickle
import itertools
import logging
import os
import math
import re
import sgmllib
import StringIO
import sys
import syslog
import types
import urllib

Now even in this simplest of examples, you already know which program is going to be better! Not only will the second program run with more substantial startup time, but it’s obvious that the second programmer is more experienced, richer, healthier, taller, drives a nicer car, and is more successful with the opposite sex.

Without further ado, we present:

modulex

Formulation

So what does it do? We cut right to the chase and increase your module import list length by generating an arbitrary number of “third-party” python modules for you, automatically! Some of your co-workers may not even be able to tell that the code doesn’t make any sense. Your management definitely won’t be able to tell. Only your confident swagger, or maybe your bigger raise, could give you away! But what does it all mean? It means that you’re now on the road to longer, more girthy programs. Hold your head up high–with Modulex!

Clinical Trials

You’re probably asking yourself, “how does it work?” Let’s run Modulex and ask it for 20 new modules and have it recommend 10 standard modules:

$ ./modulex.py 20 10

Poof… before you can begin to have second thoughts, you’ve got a enormous module list to import in your program. Let’s take a look at the output:

# Standard Modules
import cPickle
import codecs
import datetime
import decimal
import fileinput
import heapq
import itertools
import sha
import stat
import uu

# Modulex Modules
import beefy_frazzler
import brawny_aggregator
import brisk_swizzler
import cautious_crasher
import eensy_aggregator
import energetic_mangler
import fat_mapper
import femto_crasher
import forceful_mangler
import lethargic_roast
import mega_expander
import myghty_frazzler
import pico_indexer
import quick_cracker
import rotund_expander
import slow_infinator
import swift_infinator
import tiny_mangler
import turbo_mapper
import uber_infinator

forceful_mangler? brawny_aggregator?! Wow!!! It’s things like this that keep the python community importing with a purpose! Let’s take a look inside one of these modules:

#——————————————————————————
# Filename: eensy_swizzler.py
#——————————————————————————

def swizzle(*args, **kwargs):
    hurtless = 9114
    rather_ = 9909

    # again dingle cause hateful farmers sands
    for i in xrange(840):
        musters = 5881
        whereof = min(musters, 12)
        theres = sin(whereof)
        offers = 7956
        # thats again after
        whereof = musters
        # goneril changed discpassage monsters pinion servants
        though = 7430

    # british ignorant cannot
    for i in xrange(447):
        groom = 8261
        bring = though
        prolegomenon = 6826
        vengeance = 1434
        # patience ransom madam answer entreat
        # edmund doors wrongs henceforth
        beastly = max(12, 888)

        # argument remember remove there
        return 0

“# goneril changed discpassage monsters pinion servants”? Well at least we know, thanks to the comments that come standard with Modulex. This is real high-quality and syntactically correct python code. In a trivial amount of time, we were able to generate about 3500 lines of it! That’s productivity you can take to the bank.

Since this is the internet where everything is free, Code Irony is running a promotion for a free sample of Modulex without a prescription. To redeem your trial, download the code here: Modulex.

Modulex is not for everyone. Ask you doctor if you’re healthy enough for software development in a Modulex environment. Do not use Modulex if you are weak of heart or mind or if you are taking MAOI inhibitors as this could increase your risk of clot or stroke.

13 Comments so far

  1. Andy March 13th, 2008 10:58 pm

    I don’t get it. Am I missing something, or is this just not funny?

  2. rjp March 14th, 2008 4:36 am

    It was funny the first time someone did this.

    Back in about 1957.

  3. the 'schaf March 14th, 2008 8:52 am

    This is excellent, but I’m a little worried about the use of “xrange” which is, if I remember correctly, faster than “range”. Perhaps an improvement for Modulex 2.0, or does the FDA approval process take too long for even such a minor change?

    Otherwise, this is, indeed, the solution to all my problems. No longer will I be plagued with premature program completion!

  4. […] Code Irony » A More Satisfying Programming Experience - Increase your code size! Never again leave a coding partner unsatisfied! […]

  5. Ricardo Montalban March 20th, 2008 4:50 pm

    How can you NOT find this funny? For one thing, all the code on here works! And, second, look at the name of the site - it contains two words: Code Irony. Focus on the 2nd word… the one that spells, “irony.”

  6. habnabit April 9th, 2008 3:24 am

    The code doesn’t work! It generated a module that tried “break = 7262″ which clearly is invalid syntax. I was a little disappointed, because that module also had indention that was almost to 80 columns in. More code is better code.

  7. cmyers April 9th, 2008 5:07 am

    You see, in medicine we can accept a few “casualties”. We have a team of rabid, high-powered lawyers for a reason! Frankly, I’m surprised that anyone’s even running the program… I mean.. “taking the drug”.

    As for the nested loops, there is a chance of a certain side effect: programs that last too long.
    Please contact your doctor if you experience a program lasting longer than 4 hours to avoid serious complications!

  8. Антон Павлович March 25th, 2010 3:17 am

    Спасибо < a href=”http://sputnikmedika.ru” > < /a >…

  9. Alex Gordon April 8th, 2010 5:25 pm

    Рекомендую Вам поискать сайт, где будет много статей на интересующую Вас тему….

    верстальщик, специалист препресс It’s just too short and quick. More is more, people! Really… despite what anyone may tell you, […….

  10. Kylie Batt April 21st, 2010 8:40 pm

    Верная фраза…

    Бухгалтер главный It’s just too short and quick. More is more, people! Really… despite what anyone may tell you, […….

  11. Kylie Batt May 3rd, 2010 1:46 pm

    Можно бесконечно говорить на эту тему….

    Электрик It’s just too short and quick. More is more, people! Really… despite what anyone may tell you, […….

  12. BRUCE July 15th, 2010 3:05 pm

    < blockquote >< a href=”http://pillspot.org/”>PillSpot.org. Canadian Health&Care.Special Internet Prices.No prescription online pharmacy.Best quality drugs. No prescription drugs. Buy drugs online< /a >…

    Buy:Lipothin.Lipitor.Benicar.Ventolin.SleepWell.Wellbutrin SR.Nymphomax.Lasix.Cozaar.Acomplia.Prozac.Female Pink Viagra.Zetia.Amoxicillin.Seroquel.Advair.Female Cialis.Aricept.Zocor.Buspar….

  13. DARRYL July 21st, 2010 11:15 am

    < blockquote >< a href=”http://medicamentspot.com/”>Medicamentspot.com. Canadian Health&Care.No prescription online pharmacy.Special Internet Prices.Best quality drugs. Low price drugs. Buy pills online< /a >…

    Buy:Seroquel.Zocor.Buspar.Aricept.Cozaar.Advair.Prozac.Lipitor.Lipothin.SleepWell.Ventolin.Acomplia.Benicar.Lasix.Female Cialis.Wellbutrin SR.Amoxicillin.Female Pink Viagra.Nymphomax.Zetia….

Leave a reply