Infinite Monkey: Part Two

Saturday, August 23, 2008


Its been an extremely boring day at work so far, so I had plenty of time to crack open my editor and do a good bit of in-the-dark programming on my Infinite Monkey Development idea, which I can safely say is going to be the most horrible code I've ever written, bar none! For those that don't believe its as bad as I say, stare in horror! Having to think longer about each line of code since I was only ran perhaps two tests of the code I wrote before going to the blog to share the horror with the world. There are some glaring issues with that code as its incomplete at best but the real thing is what I learned about the whole process.

For starters PHP is extremely unhappy when I attempt to trick it into printing the traditional opening tag and so far I haven't figured out how to do this, of course that really is something I shouldn't be focusing on just yet. Initially I wanted to keep this as dumb as possible in terms of decision making within the code for the sake of keeping it as close to random as possible. Unfortunately there needs to be some logic in place to manage the knowledge of what each randomly selected function requires in terms of arguments and in what fashion the output is. While this of course seems to violate the idea of keeping things random it ends up being balanced out by randomly selecting the input data and also using rand() to determine what line receives the output data to further process.

Another problem that is plaguing my mind right now is how to determine which functions to put into the pool of possibilities; if I allow too much thought on the process it will undoubtedly diminish the overall goal of the project. However on the flip side things like database connections, drawing graphics, etc would complicate the code so much as to make it near impossible for it to even produce source code let alone be efficient enough to generate results that can be analyzed and examined. I suspect that with my limited programming abilities the initial options will have to be limited to the standard functions that typically deal with math and string manipulation, however there is a chance I can rope other friends into the project to expand the pool of possible functions to be used.

So to sum things up the future for this particular endeavor is looking quite interesting if not at least fun and education as a former roommate would say.

Labels: , , ,


posted by dword at 12:30 PM | Permalink |

[ back home ]

Comments for Infinite Monkey: Part Two