http://behindeyesonly.livejournal.com/ ([identity profile] behindeyesonly.livejournal.com) wrote in [community profile] fandomhigh2007-03-13 01:59 pm
Entry tags:

[Computer Science - Week 10, 4th Period]

To the Journalism classroom again, and Logan smiled as everyone filed in, the desks had all been pushed to the sides of the classroom to leave a wide open space - except one, which had a handout on it for everyone to take.

"Welcome back, guys. Today we're going to program a robot," he said, gesturing towards his desk, where there stood a half a dozen or so robots, each about a foot tall.

"Inside the robot is the computer and the robot's body carries out the program you give it - you can think of the computer as its brain and the program as a set of commands it has to follow. Computers can be programmed to do just about anything, though the more specific a direction or fine-tuned the action you require, the more language it takes to make up the program.

"Computers have their own languages, even, which simplify the process of creating programs - even if the languages themselves can be a pain to learn. But if you were to write out exactly what you wanted a program to do in English, you'd end up with programs that took so much effort to store, the computer would have no energy left to carry them out." Logan leaned over to press a button on his laptop, the screen at the head of the class blinking on to show a bit of computer code.

// my first program in C++

#include
using namespace std;

int main ()
{
cout << "Hello World!";
return 0;
}


"Now all that? Would make the computer type out this-" Logan pressed another button and the screen turned black, typing out:

Hello World!


"Imagine how much code it would take to create a program that, say, balanced your budget." Logan smiled and gestured to the robots again.

"I'd like you all to pair up and take a robot. Between the two of you, decide what you want the robot to do, a simple goal, and then you have to give the robot your program. To make this a bit easier, your program just has to be a list of oral commands - stand, sit, turn around, for example. But keep in mind, the robot - or this one at least - doesn't think like a human. So whatever you tell it to do, it'll do that exactly.

"I want your program to be at least five separate commands long and then turn it in to me at the end of class. Those of you who already know and love programming? Write me a short Lisp based program as well. Have fun, guys."

[OOC: So I forgot to actually post the class after writing it. Here it is! Bear with me for a little bit of slow play on the robots and a break of an hour or so from 5pm PDT to 6pm PDT while I commute home.

Oh, and the extra programming is completely handwavey, just gives the superhackers a little more to keep them busy. Like I know Lisp? Pfft.]

[Syllabus/Attendance]