PackageDescription: GolfPolynomDivision
Golf Polynom DivisionLast published: July 12, 2007 by 'nice'
Defines 5 Classes
Extends 4 Classes
This is based on a funny game at http://codegolf.com/polynomial-division
The goal is to solve a problem with smallest code as possible.
This is stupid because small is counted as characters.
That mean the code must be the least legible possible.
Here is a simple version that is not small (best score is 138 chars in Ruby, see http://codegolf.com/leaderboard/competition/polynomial-division/).
Lengthy xml output is around 10000 bytes, space included.
It could however be refactored to match required ugglyness:
- remove all comments (there are few).
- replace long explicit names with shorts un-understandable
- put all methods in a single category (if any is needed for fil out...)
- inline methods called only once
- remove the TestCase
And maybe, something more clever, find better algorithm for scanning/dividing/printing polynoms.
A factor 1 is really easy.
Class creation methods are verbose...
I don't fullfill the stdin/stdout requirement.
Easiest thing would be to compete using gnu smalltalk for that kind of game.
That's what is closest to this Ruby/Python/Perl/PHP oriented rules.
Have fun
ncellier at ifrance dot com
MIT licence