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.
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:
- Is your average module list only about 5 or 6 modules long?
- Do you find yourself writing programs that run too quickly?
- 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:Unremarkableimport 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:
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.