For homework, we had to make an object-oriented template in PHP. I made a class that will hopefully be used for my PComp final (see explanation in previous post), which will be automatically adding rows to a SQL database. The output can be seen here. There are arguments for nNumber, netID, timeEntered, and timeEaten, currently filled with arbitrary information. I’d like to figure out how to get them all displaying on the same row in CSV format, as I think that will be easier to enter into the database (not for sure, but I’m guessing), as well as figure out if the time() function is appropriate for the timeEntered and timeEaten variables. I didn’t worry about formatting the output as this information will never be visible to anyone.
Week 2 Web assignment – make a calculator using PHP and HTML. I chose to make a calculator that draws shapes based on the number of sides you input into the form. Originally, I was trying to draw the shapes in PHP but abandoned that fairly quickly. As of now, there are images stored in a variable, which are called using a switch statement. As of now, there are 6 options. 1-5, and one secret. Try it here
Result after entering “5”
One web project I particularly enjoy is Epic Exquisite Corpse. For those unfamiliar with the idea, an exquisite corpse is a drawing game. You and a friend would fold a piece of paper in half, and you’d draw on one side, with a few lines of your drawing overlapping the fold. Your friend only sees the overlapping lines, and has to draw something using those lines but without seeing what you drew. Then you unfold the paper to see the results. It’s a game I often play with my friends on long trips, forces you to draw a little differently than normal, and usually turns out pretty funny. Here’s an example (note the folds/drawing transitions):
This isn’t mine, by the way.
Taking that concept to a much bigger scale, Xavier Barrade created a website with 1 million available squares. When you choose to draw, you get a randomly chosen block with a various number of lines poking in. Your drawing must connect to all of those lines. When you’re done, it’s entered into the larger drawing.
It currently has ~50,000 drawings from 172 countries. I enjoy the idea of collaborative art, and this is a fantastic example of that. Drawing (and art in general) isn’t defined by language barriers. Anyone on a computer can add to this giant mosaic. At its best, the drawings flow seamlessly into one another, creating some fantastic images. It’s great to see a fun, tangible game make its transition to the web.
Week 1 assignment – hypertext art