Tuesday, September 22, 2009

Before I really get started...



They can cure cancer, make Chuck Norris green with envy, send Jack Bauer running away screaming, and can be used to help defeat that pesky death god living in the moon.

...of course, it also helps the sound on these babies is freaking awesome.

Remember how my old "new" headphones broke? The cord snapped when it got caught on something?

Good luck breaking a braided cord, suckers!

Yeah, you can tell I'm really happy.

Now, onto the events of Sunday and Monday.

On Sunday, I performed at an optional band performance with about (sadly) twenty other people at this local car dealership called Rydel's. Why? Because they were the ones who pretty much gave us our truck. Technically, it's theirs, but we don't pay a dime on it. That truck brings all of our big and heavy instruments to our games and to rehearsals that are at "our" field, which is pretty much every marching band rehearsal until later October.

I was one of four clarinets, there were two trombones, a tuba, a tenor, two bass drums, a snare, two tenor saxes, and three or so trumpets, counting my band director. We wanted more people to come, but they didn't. Bah. On the other hand, it makes me look good.

On Monday, it was a normal school day, except for the fact that I had tests in Space Studies and Computer Lab. The Space Studies test was open-book and open-notes, and I had spent the night before getting the last of the notes typed up before importing all of the rest to a Word document and printing it out the following morning (a whopping 23 pages...though it's in outline format). The fact that typing up the last of the notes helped me memorize them helped me on the test, and I was one of the first people to finish. It consisted of "true/false, but justify if false"; unfortunately, all but two were true. That's fine by me, I loooove justifying my answers. The short answer was easy, too.

The computer science lab, surprisingly, was not. I can finish a lab in twenty minutes, tops, but I spent the entire two hours on this, partially because this was something I had never done before.

Basically, the program has to make a pyramid of asterisks show up after the user enters in a number for how many rows it has. The problem is that asterisks can only be "string", or normal text, variables, thus making them much harder to format in terms of spacing, than number variables, because math operations won't work behind the scenes for them. For instance, the pyramid adds two stars per row; if they were numbers, I could fiddle around with the variables behind the scenes and add a "+ 2" somewhere, but this won't work with a string variable.

I was able to get the input to work with the looping (piece of cake) and get the right number of stars to show up (it's the number the user inputted, squared), but I couldn't format it. Luckily, the fact that I was able to get those two things done meant that I at least passed with a C. I still don't know how other people did it, though. I want to find out, rargh!

And then I walked home and promptly went to sleep. Because my brain and eyes were fried.

1 comment:

Sevesteen said...

It has been literally decades since I have programmed--my last class was BASIC on a time shared mainframe. (obsolete at the time, we are talking about 1983 or so)

My inclination (in BASIC) would be brute force line by line--Set foo to 39 (assuming 80 columns) bar to 1, baz to whatever the user inputs. A loop to print a space foo times, a loop to print a star bar times, decrement foo by one, increment bar by two, new line. Do that baz times.

(Here via IRC)