View Single Post
Old 05-18-2009, 07:32 PM   #1 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Bug Game: Let's Develop Something Crazy!

Okay. Now, I have no idea how this is going to turn out, but I am all for giving it a go in the interest of meaningless experiments !
  • What we do: Each of us adds a single line of code (One line, no more than one).
  • Objective: At the start the code will be absolutely useless and not do much of anything, but over time we'll create some code that will do something. I'm not sure how useful it will be, but it will do something.
    Philosophy: I am thinking that after a while, each one of us will have a different idea on where the script is going. As it evolves, hopefully we'll be able to take one direction. Call it a consensus, if you will.

To summarise, you can only add one line of code at a time. And you must wait until somebody else adds another line before you post again.

You cannot edit another person's line of code, so ensure it works before you post.

You may place a line anywhere in the code. If you're creating a function or a class, please add both parenthesis. Adding this is okay, and is classed as one go:

php Code:
class Bleh
{

}

Please post only PHP code.

We'll see what mess we can make. It will be interesting to see if we can spot the direction the code is heading, and build upon it. Somebody may add code that goes against what everybody else is doing, in which case it is up to people to correct it. In the end, a leading majority should have an idea as we add more code.

You cannot discuss what people should add next, nor the direction it SHOULD head. Leave it up to people to analyse the code and see for themselves where it is heading. It will be an interesting experiment in spotting patterns, writing code to work with other peoples' code, and social cohesion ! I suppose.

This is not an experiment to see who writes the best code. ANYBODY can post, but don't be silly and add a meaningless loop. Code to the best of your ability, and don't add anything you wouldn't place in your own functional scripts.

Any questions, please do ask before posting. I will start us off with the first line of code:

php Code:
$aRange = range(1, 100);

Note: Add whatever you like as long as it's PHP. Classes, functions, inheritance, loops, conditionals, etcetera. All is fine!

To play: Take the last person's code (such as my range) and add a line of code to it (anywhere).
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote