March 30th, 2008

another frog

boring C++ stuff

This has been a long week; I haven't read anything, work was bad and going to get worse (if I vanish for a week, that's where I am; arguing that, yes, the drop down on Page X is not working, really, promise, look at the fucking screencaps), and my program for class is officially late. I can afford the loss of five points (from twenty), but I don't like risking that. I also don't like the program very much. It works, but--it's not--aesthetically pleasing.

Mea culpa. I've been working on that pretty much every free minute, trying to make it work. I hate the repetition over and over reading an array, but there's no way to move it to a function and just feed in what I need read, and believe me, I tried. adannu tried. We just couldn't make it work. So it's not pretty and minimal and it has repeating for statements and I hate looking at it. It does follow the directions in word and spirit, but--right. No.

It's the same thing that's happening with the OTW Rails blog project--I did it correctly, but I can't just walk away to the next project. I can't--it's not quite perfect; I found a space recently when I was finally going to pry myself away and completely freaked out. Crashed my laptop with ten separate pages in Apana open trying to find how I'd put an entire line of space in.'s not even an unsightly space. It's just that I didn't put it in by my own will, and by God, it's not staying. Unless I want to put it back after I find out what unholy class I called that did that. Then it's okay.

The Darkness of Arrays and Classes (with beloved adannu gently keeping me sane)

One long weekend and finally wrestled two dimensional and one dimensional arrays into compliance. I glanced at three dimensional, but I couldn't think of a practical reason for them. Not yet anyway. I need to think more. The only thing i could think of was creating the Road Coloring problem in it, which is a.) useless and b.) I don't want to have a breakdown writing it.

Coordinates. Coordinates. Coordinates. Coordinates.

So. Arrays and Classes.

I took apart the Rock, Paper, Scissors one I wrote last semester and turned everything into a function that repeated more than once to work on my understanding of functions. It was fairly easy to use that one, since the program was all very simple, if very long and confusingly repetitious. Transferred everything to single and two dimensional arrays, which really helped cement the idea of array = address, then rewrote the play program to reduce it to basically two functions of a couple of lines each (three or four), which two dimensional arrays are fabulous for. The bulk is the cout statements at this point. Once that ran correctly (and a lot less confusing--I will say this, functions are freaking *clarifying* in what does what--I decided to try and turn it into classes.


I did it, but I'm not sure of what the point is. Blueprint, Volkswagon, whatever--I can't quite grasp how to organize classes. I ended up creating two--one for anything that required a char answer (y or n), and one for gameplay and all integers.

Collapse )