Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

2012-11-14

(Programming) Thinking up a turn system. (Part 1)

To get something out of the way real quick, I think I monitor my words a little too much while typing.  I mean it's good to make sure things come out as intended, but...it's already a bit of a time eater on top of sharing things, which could be time spent working.  It's a silly thing to gripe over when there's so many other activities I spend time that feel wasteful.  Another point is when I monitor my speech I don't think I convey my words the way I'd like to anyway.  I see people out there with much more colorful ways of expressing themselves, and I look at myself and...well, I can only be me, right?  But no, it's something I can and should learn to change if I really feel the need to.  For now I'll try not to pause myself too much to write down what's on my mind.  However, I'd like to cut down on "things" and "stuff," among other things.

So I put up programming as a description for this blog, and...what programming "stuff" have I talked about anyway?  I don't fancy myself to be an individual of ideas; I'm merely going through the book to know more and hope it magically qualifies me for a job.  Awful.  What ever happened to going above and beyond?  At least I'm capable enough to follow a book.


So about that RPG I brought up before.  After the initial rush of writing up whatever I could to stuff in there it's finally slowed to a crawl.  Burst of inspiration then run out of fuel, a common pattern.  The same could be said for my initial desire to learn to draw.  I guess the main thing that's stopping me is teaching myself to make something that's interactive and not stuck in the console or simple text boxes.  Sure there's other things that need working on, but...yeah.  That's where my passion slammed headfirst into a wall.

Programming is largely about using preexisting code.  I think that's what they say.  And I suppose you'd have to balance using other people's code while also knowing how it works to an extent.  Which I'm not doing right now.  Instead of searching for other works I wanted to think it up.  It certainly won't work like that all the time.  Let's see what this slow mind thought up, then?

Initially (way back then) when I was playing with the battle system I had an 'if' statement for whether or not the player is faster than the enemy.  If so the player gets to execute the commands first followed by the enemy.  Otherwise...I copied the entire block of code and flipped it so the enemy could go first.  Pretty clunky, and soon after when I got the idea of facing multiple opponents or even having a party system it would be guaranteed to be really ugly.  The idea for a queue system crept up, but I didn't feel I was ready to read up on that section.  It's a shame; I probably would have had fun thinking up how to do it with the arrays I had, but that code will inevitably become a relic when replaced with a proper class.  Just like my old inventory system that would shift back for removed items.

A few weeks ago I returned to the game to tinker with the battle system after learning about queues.  What kind do I want?  This is where it would help to have a lot of exposure to the type of game you want to work on, but I've holed myself up too much.  Even then I'm surprised at the number of games I've played, but that's by my standard.

At first I thought of the Pokemon games.  Each participant gets a single move each turn, to be spent in an order determined by speed or priority modifiers.  No, let's not stop there!  How about people who can execute more actions than others?  Golden Sun (only played the first) came to mind with certain bosses who could attack twice in the time it takes all four party members to make a move.  Won't it be tougher on balancing?  Sure, but who needs to worry about balance in a non-competitive game like this.  Plus it would be fun to see how it could be broken, and if no one is around to play it to even find out as is likely the case, well, at least I didn't spend all that time tweaking it.  A corrupt thought process, perhaps.

A visible queue system like in Final Fantasy X would be awesome (where the idea first came to mind).  It even shows the impact actions would have on the list when you have certain stuff selected!


If I was clever I'd put something clever here.

I forgot it had purple bars.  Let's read into the game later.

Next source of influence came from the semi-roguelike Elona.  Nice, plain speed stat.  Plenty of freedom.  I don't know the inner workings of it but since it had an ingame clock I think you'd be running on "standard" time with a speed of 100.  If I was brave enough I'd ask the people who worked on porting it.  In Java, no less.

Okay, we have a turn-based battle involving people of various speeds, some who can take more turns than another.  The first thought was to include an initiative stat that starts at 0 and is modified by speed.  Let's say you have:

Player 1: Speed = 50
Player 2: Speed = 25         

The first turn passes and player 1 will have an initiative of 50, and player 2 with 25.  This is sort of done on paper in the program so it's still figuring out who gets a turn.  We'll have an 'if' statement to check if either player has an initiative of 100 (the turn's standard), and if so that player will be added to the queue and have their initiative reduced by 100.  If more than one player is eligible for being added to the queue we'll go by their initiative levels in descending order.  If any of them have matching initiative levels we'll break the tie by speed.  If their speed is tied we'll flip a coin/roll the dice or give preferential treatment to the player.  And if we want to be super nitpicky we'll have the system remember who won the coinflip and give it to the other party next time.

Let's try again:

Player 1: Speed = 200
Player 2: Speed = 150

We'll represent them in parentheses (player1, player2) which will display their initiative levels.  The player who gets to be added to the queue will have their name printed in front and their initiative level will be subtracted.  Initiative level must be greater than or equal to 100 to qualify for a turn.

(0, 0)

<Turn 1>

(200, 150)
Player 1 (100, 150) wins by initiative
Player 2 (100, 50) wins by initiative
Player 1 (0, 50)

<Turn 2>

(200, 200)
Player 1 (100, 200) wins by speed
Player 2 (100, 100) wins by initiative
Player 1 (0, 100) wins by speed
Player 2 (0, 0)

<Turn 3>

(200, 150)

And so on.


Now let's try something more extreme:

Player 1: Speed = 600
Player 2: Speed = 300

(0, 0)

<Turn 1>

(600, 300)
Player 1 (500, 300) wins by initiative
Player 1 (400, 300) wins by initiative
Player 1 (300, 300) wins by initiative
Player 1 (200, 300) wins by speed
Player 2 (200, 200) wins by initiative
Player 1 (100, 200) wins by speed
Player 2 (100, 100) wins by initiative
Player 1 (0, 100) wins by speed
Player 2 (0, 0)

Okay, at least player 1 gets twice as many moves in a turn but it's sort of bad to let so many of them be up front.  So I was stumped on this for a few minutes (those were some long minutes) wondering how I could get the distribution of turns to properly scale. 

All right then, if we're basing this off of how many actions someone can perform in a given turn then why not let the person with the fastest speed set the pace?  If we have someone with 600 speed then everyone (including the turn which runs at 100 speed) would have to reach that before they can do something.  So it's like executing mini turns inside the actual turn because of relative speeds.

Player 1: Speed = 600
Player 2: Speed = 400
Player 3: Speed = 100
Turn: "Speed" = 100

The standardized initiative level to perform an action is set to the highest speed: 600

We'll have the format as (player 1, player 2, player 3) - (turn)

(0, 0, 0) - (0)

<Turn 1 begins>

(600, 400, 100) - (100)
Player 1 (0, 400, 100) - (100)

(600, 800, 200) - (200)
Player 2 (600, 200, 200) - (200) wins by initiative
Player 1 (0, 200, 200) - (200)

(600, 600, 300) - (300)
Player 1 (0, 600, 300) - (300) wins by speed
Player 2 (0, 0, 300) - (300)

(600, 400, 400) - (400)
Player 1 (0, 400, 400) - (400)

(600, 800, 500) - (500)
Player 2 (600, 200, 500) - (500) wins by initiative
Player 1 (0, 200, 500) - (500)

(600, 600, 600) - (600)
Player 1 (0, 600, 600) - (600) wins by speed
Player 2 (0, 0, 600) - (600) wins by speed
Player 3 (0, 0, 0) - (600) wins by speed*

(0, 0, 0) - (0) turn completes  

<Turn 1 ends>

*For all purposes the turn will always be dead last when initiatives are tied, even if the
player is slower than it (would come into play over the course of multiple turns).

The spread looks better now, doesn't it?

Actually, the very, very first idea was to have a large counter of sorts incrementing all these values at different rates, but that's sounds more suitable for realtime stuff.  I guess this would be comparable to an imaginary race to cross a 100 meter lap as many times as possible in 10 seconds.  You have one going at 50 m/s, another at 20 m/s...they'll cover different distances after a second (or fractions of a second if we want a smooth motion).  The second, minute, and hour hand on a clock would work, too.  Why didn't I think of that earlier?  

Cutting it off here.  I didn't intend for it to be this lengthy but then those examples came up.  Perhaps I should reformat the blog to be wider or figure out how to create a text area with a scroll bar to save space.  A few more things come to mind to cover.  There's the case of initiative levels "spilling over" because the speed of the turn didn't divide evenly into the standardized initiative.  And what if the player with the highest speed dies somewhere in there?  I've thought about it briefly but haven't put it into code yet because I'm forever a slacker.  I should have some to share when I post the second part.
  

2012-08-22

First Experiences with Programming (Part 3)

I'm always forgetting to mention things that should go with previous posts, like during the second part where the GUI project deadline was extended two weeks or something equally ridiculous.  Collective will, that.  Can't draw a conclusion from one occurrence, though.  It could mostly fall on the professor.  And then I'm sounding mean and elitist when I'm only looking at the smaller picture, and I'm only a trivial person.  Just cease those thoughts and keep learning.

"Find something to drive you along while you learn something".  I'm pulling that quote from nowhere in particular, but it sounds like a common piece of advice.  A goal, simply enough.  The chapters in the book were ordered so you'd be learning about classes following methods and receive a basic intro to GUI following classes.  I had just about finished reading chapter five on methods when the professor skips that and the next few to get into arrays in chapter eight.  Okay, learning about arrays now...and then something clicked.  I want to say I went crazy for the notion at the time.  I wanted to try and create an RPG.

(So unique.)

Creating games wasn't some lifelong dream I held.  I'd hear about it every now and then when I was younger ("Hey, you like playing games.  Why don't you get a job making them when you're all grown up?"), and in return I'd mentally roll my eyes.  They made it sound like I was capable of being a one-man team (playing only the larger titles in my younger days I wouldn't be aware such people existed until later).  It's not like I was brimming with ideas.  I don't have any plans for this to be anything more than a hobby; I'll have to wait and see what happens when I develop more skills.  Oh, but I'm always waiting and not doing.  Such a bad thing to practice.

So back to the arrays, I was having my little epiphany.  "With this power I could store stats for a character!"  And so I built it up from that, asking myself what functions one would expect to see and making use of my accumulated knowledge to accomplish the task.  As I went further in the book I'd look for ways to apply new concepts to the game.  Man, look at that synergy!

After concentrating on it at full force for a short while I'd run into some road bumps soon enough.  Like...oh, I don't know, the creative aspect of the project.  I felt compelled to engage in creative writing at two instances in my life.  One when I was six or eight, creating a book about the kiwi bird, complete with illustrations.  Another when I was 14, stopping after 20 or so typed pages for reasons I don't remember, and they're probably gone (I wish they weren't).  I might share the kiwi story later, just because.   

I have several ideas floating around to see through the general progression of the story, and right now it would be a matter of jumping into the writing and making changes as seen fit.  Initiating the writing, simple as that.  Shouldn't it be?  But here I am facing a number of untouched plans.  Habits.  Need to learn new habits.

More on the side project (and a few others) will be set aside until a post arises to be dedicated to them.

Classes started this Monday.  I planned on finishing the rest of the programming book before then (what a great use of money for the course), but my work ethic isn't up to par yet and I'm left with four chapters to go.  All fired up since I'm around students again.  There's no telling yet what skill level they're at; I'll have to try my best to leave a good impression on the assignments so I'm not crushed under my sense of worthlessness.  Out there in the world I wanted to be no one so badly, but not here in this class.  I'm not going to be just an invisible student this time.  Not if I can help it.

Small-time problems for small-time people.  Downplay everything.

I guess this will be the last part.  Left out some interactions but they can go under a different title.

Oh right, and the professor from the previous class gave me an award certificate thing.  I think it was more of the "feel-good" type of achievement rather than something special, though.  Even though I was the only one in the entire course section to receive it (and two others who took the course above me) there was this huge list of a few dozen people for some math course when I looked at the pamphlet at the party.  What's the mantra?  Downplay everything (no seriously, I'm pretty sure it's valid this time).     

2012-07-29

First Experiences with Programming (Part 2)

I forgot to mention near the end of the previous post that the Korean girl pulled out a yogurt drink from her bag and gave it to me as thanks.

One of the better activities in class involved reading code in a previous student's program on the same ATM machine assignment and debugging it.  It compiled, but that's about it.  Something would go awry with the balance or reading from the text file after saving.  The initial hurdle was of course following the code which I found a little too compact for my liking  (and then the solution was to follow it more carefully).  It was rather easy for me to lose my place even though the blocks were indented...with like one to two spaces.  The program also received some hate for making use of try-catch statements which the course didn't cover yet (actually, this course would never get to that part of the book).  "All these comments are in the way!  Why did this guy do all this just to catch an exception and leave a comment saying to do nothing!  What an awful programmer!"

The professor releases the class early (he's done that several times), but we're free to stay and make use of the computers for the remainder of the regular period.  About five or six students were left.  When the professor isn't lecturing he'll usually walk around and check on people as they're engaged in small exercises that are supposed to take five to ten minutes but end up taking way longer than that.  When he arrives at my computer he starts talking about the student's program he gave us and even makes a correction on mine, something he said he found after spending half an hour on it.  It wasn't enough to fix everything, and now I don't know if I would have been perceptive enough to catch what he found.


When I get home I fire up the program and get to work on formatting the code to my liking (which I would recognize way later as the Allman style as presented in the book's code samples, but I've been experimenting with mixing in 1TBS as of late).  I'm sure I won't have that luxury in the future.  It's another two hours of re-reading before I spot the mistake I had been skimming over.  One misplaced line of code.  I send an email to the professor identifying what I fixed along with a before/after screenshot of the problem area.


We received the assignment on Thursday.  Tuesday rolls around, and I can't remember if the debugging task was ever an official assignment.  Maybe he gave up and turned it into a point of extra credit when no one else in the class showed up with an answer.  You'd think a classroom of mostly CS majors would be more enthused about something like this, but they may have merely been trying out the course just like I was.


The final project we did went over a chapter we skipped previously: the GUI, also called the fun chapter by the professor.  He said we'd get to learn about it if we did well on tests and whatnot.  I think he went over it anyway because there was hardly anything left to fulfill in the curriculum.  The topic was straightforward enough: create a GUI version of the ATM assignment everyone supposedly finished.  The professor came to me after class (I usually stay glued to the computer working on something) and offered an alternative assignment of creating a course grade calculator/manager.  I said I'd give it a try.

I drew some pictures of the interface with notes on the side describing the role of each screen and its components.  Saving/loading classes, adding grading categories and weight (along with an 'X' to remove it), forms of leaving notes for individual assignments or automated warnings for missing grades, and of course a grading calculator.  These were all fine and reasonable given the tools I was aware of, but I erred as soon as I pictured different screens.  I couldn't do it.  The book made use of private fields and methods and I didn't want to resort to using the static keyword with everything.  When I tried searching for something similar to what I was looking for I'd be smacked with new terms described by other new terms.  I was burning time, and after a few days I gave up and went back to the ATM assignment.  Which was a little good, because the people I helped earlier needed help again, and now my interests coincided with theirs.


There's a bit I didn't mention about the Asian guy.  Back when it was about the basic ATM machine program I said I didn't do much other than answer questions since he was busy.  Late assignments were still accepted, however.  We met up and I helped talk him through the project.  He had standards and wouldn't let me type the program for him, but I did type alongside him.  It was around this time that a third student would talk to me after seeing us in the study hall and later ask me for help.  This one will be the Indian guy who sits directly to my right.


I think I have some dates mixed up.  I remember receiving the ATM assignment on a Thursday and it was due a week later.  I wouldn't meet the Asian guy until the following Tuesday and then we'd talk over IRC.  When we got together for the assignment I'm sure it was on a Friday, but also before the assignment was due.  And he still turned it in late.  I think the professor gave an extension on it.


Back to the GUI assignment.  I helped all three and pretty much wrote the program three times, not including my own.  We even met together at one point, all four of us, while I typed out the Asian guy's project and answered questions about what I was doing.  I know he objected to me doing it directly previously, but he followed along very well.  As for the Indian guy, he sends me his small bit of code with new opening windows that don't replace the previous ones and expects me to finish it.  Well, he only asked me.  It wasn't a command or anything.  I didn't feel like I was in a position to turn him down, though.  You just want something that properly executes the functions?  You want a GUI full of static fields and endless pop-ups?  Fine, I'll give you that.  Less thinking for me.  It lands him a 95 anyway, and the professor asks him if he enlisted an upperclassman to do the work.


Not much to say for the Korean girl.  Made a version for her and moved on.  There's actually one more person I helped, and this time I'm the one who approached him.  He sat to my left and struck me as a decent and amiable person.  He seemed more easygoing and learned to do tasks well, but neglected to read portions of the book and didn't appear in class a number of times.  Still, I think it was his quiet nature (though he didn't strike me as a deep introvert) that drew me to him.  That makes the final assignment completed four times over.


Overall, it was excellent practice for spotting different mistakes and thinking up new ways to handle algorithms.  I enjoyed attempting to teach the material and asking them to figure out what to look for based on the compiler error messages.  I warned myself not to get dragged into doing other people's work next time, though.  Also just as important was the wealth of social experience that came with it.  I made a point before in the keyboard cleaning post about eating out sparingly, but there were a few exceptions this spring.

It was strange for each of the three people who approached me to treat me out to lunch.  Aside from the free meal I'd normally skip it was a great opportunity to learn about, well, other people.  The Asian guy talked to me about his previous jobs, his daily routine, and his relationship of several years with his girlfriend and what to look out for.  The Indian guy talked about his concurrent jobs, his dreams, and how I should pick up girls (even as a casual friendship) seeing how I admitted to keeping to myself.  "It's easy, man, just ask her if you want to hang out.  See those two girls I was with earlier?  I don't even know them that well.  We just hang out."  He smiled quite a lot and held an optimistic view.  Also, the Asian guy didn't like him because he asked for math help in the past but didn't seem to care about learning.

The Korean girl went into a brief story of her life starting with the move to the US at 14.  She took ESL classes during high school, and what happened during college is fuzzy to me.  She mentioned cliques during high school (and probably college) comprised of people speaking only Korean, but she wanted to distance herself away from them and understand English better by making friends with pretty much anyone else.  Ah, my memory really is terrible.  I can't remember things people tell me that are important to them.  Why she said she didn't have any friends (or she had at least one?), why she worked for a few years before returning.  What job was it, again?  I was just there to listen.  Should I send a message and ask how she's doing?  I don't really send messages to people I've seen in real life.  I think I'll do it soon, before the fall semester is here.  I think.

Still more to go.  Another time.



Also, just because, I want to put up the original debug assignment.  The main program and the account class to go with it.  Aside from a few things it really is quite nice, I think.  The thought process and all.  I would have liked to meet the person (maybe I can ask the professor about contact).  There should only be two problem sections as far as I recall.  Maybe some extras concerning bad practices.

2012-07-25

First Experiences with Programming

Well, this time it's not so much about the subject as it is about everything that happened alongside it.

I don't remember ever growing up with a dream job in mind.  The most concrete thought I ever had was something to do with raising caterpillars.  I excelled in math, but maybe because I merely enjoyed calculating numbers in my head and finishing tests before everyone else.  Later on (around high school and up) I would harbor no love for it, but that was entering a period where I started to lose interest in everything to do with academics.  Anyway, I grew up with the vague notion that whatever job I'm taking, it'll be something math related.

Computer programming felt like a subject I naturally would have been willing to invest in, but I never had (created) the opportunity to be acquainted with it.  I finally took my first computer science course in the fall semester last year, and I can't say I remember most of it.  There were simple algorithms, a brief introduction to assembly language, a single class session on Python near the very end...and a whole chunk I've forgotten about that came before those.  I'm sure I'll pay dearly for that.  I have the book and study sheet somewhere.


Signed up for the next course under the same professor in the spring this year, and this one was all about Java.  In an attempt to change myself and build up new, good habits I read and answered the first chapter before the semester began.  It was all concepts and stuff; no coding save for one exercise at the very end which only served to make sure the IDE worked.  Of course, I just had to jump into the next chapter following that, and then a very peculiar thing happened: I cared about learning again.  From then on I made sure I stayed at least a whole week ahead of the course schedule (that teetered off near the end when I found more programming projects to occupy myself with).


The class experience was very different this time.  Normally I'd take care to be invisible to others, even neglecting to show up for my senior photo in high school.  I'd be fine sitting in class as a part of the silent majority while a select few answer all the questions.  The silent part held true for the first few class periods when I still lacked the courage to speak up, but there was no one consistently jumping up to answer the questions.  None.  If answers did come out they'd usually be incorrect even though it's right there, clear as day, in the chapter you're supposed to read before coming to class, but I'm a hypocrite to complain about that.  I've always neglected to cover the book, let alone thoroughly, until now.  After the dead silence the professor would sigh with disappointment.

I should describe the professor a little more.  He was a little short, likely in his 50s, and he came with an Indian accent.  I can't call it that bad but those who were vocal with their opinions seemed to think so.  I'd miss a word every once in a while.  He had a good sense of humor and definitely held a deep passion for the subject.  His ability to teach it is another matter, which I can't provide an accurate estimation of as I always treated the class periods as a review session.  I could probably place some judgment if I paid careful attention and tried to imagine myself in the shoes of someone who didn't read the material, but that wasn't a concern at the time.  General consensus from the talkative groups would be that he does, in fact, suck at teaching.  Some of them would admit the book was great, though, but they didn't have the time to read through so many pages.  I guess it is a lot, but the pages aren't densely packed like a few other books I know of.


I eventually speak up to solve some of the problems.  Or attempt to speak up.  Without raising my hand, but that's like a weird thing now since no one else in the class is doing it.  I'm sitting in the back of the room one seat away from the corner, and it's a strange experience to articulate yourself when you normally don't utter more than 50 words a week.  A generous estimate.  I'm sure it's more like zero when there aren't any parents to greet.  Or two to say "excuse me" to that older gentleman while walking through the shopping aisles within the nice and spacious Costco.  It could be more as well if we count whispering fragments of words to yourself.  Probably not suitable practice for speech, though.  Sometimes the professor and I will be holding our own conversations since he doesn't receive the entire message from me. 


Pretty soon I'm regularly answering stuff, but I'll usually wait for the more interesting scenarios because I still don't want to be that deeply involved in talking.  If I raise my hand early and already solved some problems on the main computer before then I'll offer the spot as a last ditch effort to not hog all the fun.  There were certainly other brilliant students in the class (I remember one was a business major), but...it just wasn't their style to take the mantle.  They'd go up from time to time.  Performed wonderfully.

One of the later course assignments was to construct an ATM machine and interact with it through the console.  The professor wrote down on the board features to be included, and it was then that I opened my stupid mouth to ask about a function he mentioned earlier but didn't write down.  So he adds that and it's met with groans from the class.


Interacting directly with my classmates isn't something I would do.  It's a pleasure to talk about something you're interested in, but that only happened when they approached me first.  In light of the trouble I caused I sent an email via some online classroom thing that I wouldn't expect anyone to check, but someone did post a message there earlier.  I offered help explaining the concepts we learned and how it could be applied to the assignment (we weren't allowed to work together). 

I sent the message the same day we received the assignment which was on Thursday (Tue/Thur schedule).  No replies over the weekend, but while wandering the hall about an hour before class on Tuesday someone called out to me.  He had replied to my message half an hour ago and stumbled upon me in person.  We'll call him the Asian guy.  It was a busy week for him so I didn't do much other than answering questions over IRC.

The next person came to me Thursday that week when the assignment was due.  I picked up a new pair of shoes the day before so I'm getting used to the little settings, and on my way to the campus one of the shoelaces become untied.  I'm no shoe tying expert, and being the self-conscious person I am I didn't want to take my time trying to fix it out in the open.  I bend down to quickly tuck them in and walk carefully as to not whip them out and get them dirty.  I proceed inside the building and up two flights of stairs to the floor for teacher offices, then sit on a bench.

As I'm tending to the shoe someone comes out from the hall at the far end.  I think nothing of it; I'm sort of close to the stairwell doors and there's other hallways around me.  That doubt starts to go away as she walks past the doors and slows down in front of me.  I didn't know if she was looking at me but since I'm looking down I could tell her shoes were pointed in my direction.  She speaks up after a short pause.  It sounded like a small struggle for her; the words began with "um..." and her speech was timid.  I don't recall the exact details of the conversation, but basically she asked me for help with the assignment.  And forming words to send back without much planning is bad enough for me.  I end up redoing the shoe tying twice and slowly at that.  The conversation is over and we're waiting on me to finish up.  I'm not doing that bunny ear method or whatever either; I just somehow fail to give equal spacing for the tail ends of the shoelace and one of them will slip out while I'm adjusting the first knot because I apparently can't think and make use of my hands at the same time.

We travel to the library and I take a look at the work of my classmate now known as the Korean girl.  For the record, the Asian guy is Chinese, but...I don't know, it sounds worse to refer to him as the "Chinese guy."  Probably due to old encompassing stereotypes?  Anyway, the assignment covered the chapter on methods which she said she didn't get to fully read.  I try my hand at teaching the material (the IRC episode doesn't count) but there's 45 minutes until class.  I ask her if she wants to turn it in late.  No?  Okay, I'll finish up the program myself.  Nothing fancy.

The professor was really lenient about late penalties, though.  Like a 90 / 100 for something weeks late.  Perhaps it was the collective will of the class?  I'll continue later.