Archive

Archive for the ‘Programming’ Category

Fun with PHP

August 12th, 2010 8 comments

Okay, all of you actual programmers out there, get ready for amateur hour. I have been working to understand programming better for a while now, and have made a teensy bit of progress. I learned HTML and CSS the natural way–I gleaned it bit by bit off of instructional web sites and peeking at other people’s code (a lot of CSS I learned, in fact, came from editing the themes for this blog). But I wanted to get beyond simple scripting and into some actual programming, something I hadn’t done since I took that BASIC programming class back in 1982.

I figured that my best chance would be to take advantage of the online classes from the college where I teach, free to faculty. Intermediate Algebra was a prerequisite, and though I passed it back in the 80’s (one of my few “B” grades in college), I figured it was time to freshen up, considering that (a) it could help in programming, (b) I have a bit of a phobia about anything more complex than basic math, and (c) I hadn’t used any of it since I took the course and remembered pretty much squat. So I took that class, aced it, and went on to take the next class, “Introduction to Computer Programming.” Which it pretty much was–just an intro course. We never got beyond making little C++ command-line programs. Alas, another Math class–Discrete Math–was required before taking any other programming courses, so I bore down and signed up for that. Problem: the text was horrific, requiring about 30 hours a week to get past the atrocious writing so I could spend another 10 hours learning the material. It was just too much on a full-time schedule, so I reluctantly withdrew.

Not wanting to just give up (our local Math professor has kindly agreed to arrange a private independent-study course that might get me the credit for Discrete Math, but not this year), I started studying PHP. I want to re-write my Introduction to Computers web site from the ground up anyway, and I figured that knowing some PHP would help. Well, now that my August break has started, I started diving into it. The result so far: a crude, basic understanding… and a result. I figured out how to add a much-needed feature to my web site. My students crave feedback at every step, and I wanted to add little exercises after each page or two of study. PHP gave me a way to create very slightly interactive quizzes, very simple–choose the answers from drop down menus and check to see if you got things right.

Pleased with my little success, I figured I’d have a bit of fun and add a quiz you might want to take–not on computers, but on some basic political points. Just click the link below, choose what you think are the best answers, and then click “See Results” to find out how many you got right. Since I like my students to figure out correct answers, I don’t give the answers on the results page; you have to go back and try again. Enjoy!

Quizy01

Categories: Programming, The Lighter Side Tags: