adambard/nurblizer-php — pull request #1 by dbernar1 (2013-03-26 14:35:56+00:00)
Title: Debugged and refactored PHP version of the nurblizer

Hello Adam,

I've debugged and refactored the PHP version of the nurblizer.

Please feel free to not pull in the commit that removes the ads ( or any other commit I guess :).

The debugging mainly entailed pulling in $nouns into the function, since otherwise it was not accessible from within function scope.

The refactoring involves a few different things, but mainly making the algorithm self-documenting. It explains in english what it does - see nurble() to start. This is a language-agnostic technique I've been playing with over the last while, and it looks like it has great potential. I suppose it is quite similar to 'DSL's.

Another item to note is the 'aliasing' of functions, which is something you might be able to do within languages/libraries, whose function names you find to be 'inconsistent' with what you expect, or internally - see change_to_uppercase(), change_to_lowercase(), and replace_newlines_with_br_tags()

I look forward to hearing your thoughts if you decide to share any.

Bye for now.