Pretty Eventful Weekend

This past Friday I entered the ACM Programming Contest at Sac State that started at 5. I initially was hesitant about going because the email I got said that it would be in teams of up to 3 and I don't really know anyone at college that would be interested in it. I first thought it would be a simple optimization problem like "write this program, and the team that submits the most efficient solution wins." However when I showed up, they said it was programming multiple problems and the winner was the team that submitted the most correct problems in the shortest amount of time. So I partenered up with someone else that showed up stag like I did (who happens to be in my CS 28 class as well) and we headed over to the programming lab to start. Unfortunately he knew java while I don't know the technical aspects of it that well, like how to do anything in it. Neither one of us had used the IDE that was installed on the linux boxes there, so I convinced him that we should just use c instead since he knew c as much as I knew Java. Anyways I busted out vi(m) and started coding away along with a bunch of help from my partner. We started on the easiest one first since the tiebreaker was based on the time taken to submit each problem and incorrect solutions, and managed to finish it within 10 or so minutes. And so we got the first balloon awarded that night (probably because there were only 3 lower division teams, and the other 8 or so open teams couldn't do that easy one). The second problem we did (involving making change) was in the category for both upper and lower division teams, and it was a bit more difficult, but still fairly straightforward. After triple checking sets of data we were assured that it was correct, and catching a couple mistakes, we sent this one off as well. The third problem we attempted was in the lower category and it took us a lot more thinking. It involved taking the difference between two times. So we work on this one and decide that converting the times to military time and then subtracting directly and then making sure it was still within 24 hours would be the most efficicient. After shortly debating whether 12am was midnight or noon and then reading the problem description we solved this one. We submitted it and started on the next problem before we got our response. After a few minutes of it, we got an incorrect solution response. "How could that be?" we wondered and continued to work on the next problem. The last problem was really tricky indeed. It was to calculate the mean, median and mode of a list of N numbers between 1 and 25 inclusive. Or so I thought, and we wrote a clever program for that problem. However after submitting it and getting a "run time error" response it was immediately evident that there was some bounds problems since I relied on only numbers between 1 and 25 being sent in. After re-reading the problem, my partner noticed it was N numbers, where N is between 1 and 25 inclusive. This made matters much worse so we decided to figure out what was wrong with the time problem. After a short while of rereading the description I stumbled upon the fact that the second time was always after the first, and that triggered in my mind what about when the times are the same. So I got the input data where the times were the same and it reported that there was 0 hours and 0 minutes difference. Thinking. Wait! That should be 24 hours not 0 hours, so we patched it up and submitted it. Yes! It worked, so back to the stats problem. So we decided to store an array of the (up to) 25 numbers and sort them and then compute the mean, median and mode. So we submitted it. No! Whoops, forgot to change the bounds on a loop from 1-25 to 0-n instead of 0-25 as it was before. That must be our problem. No! Lets try printing out this sorted array. Whoops, it's not sorting it at all! In fact it was sorting it reverse order by the array position. Quick referencing of the pointers in the compare function required by qsort() fixed that problem, so we submitted it again. No! This can't be happening. More test data indicated that when the true mode was the last number in the list was the culprit for the problem. Whoops, we forgot to have a case outside the loop to check for mode. After fixing this we submitted it again... and got a yes response! Yay. So we check the leader board and notice that we are in the lead with 4 problems solved and the other teams would have to complete 3 of the problems in the remaining 15 or so minutes so we decide to just sit the remaining time out instead of attempting the other 2 hard problems, since we wouldn't finish them. Anyways we go downstairs and after a few announcements we claim our first place award which was a nice plaque and choice off the table of prizes. Anyways they announced that competetors should join the ACM if they aren't in it already, but after checking out the schedule on their web page I notice that I have classes for at least 75% of the times that their meetings are at, so I can't really join this semester at least. They are making a battlebot though which I have wanted to do for a long time since first seeing the show air on comedy central although I haven't watched in a long time. I probably will start watching them again when they run a marathon of them or I get a tivo so I can fast forward past the WWF-isms that they keep putting in to appeal to a younger audience. Oh well.

So I get home around 11:30 and decide to watch the Stargate episode my mom so graciously recorded for me. It was really good and makes you wonder about the ramifications of precognitive abilities in the universe. Likely not possible, but it is just science-fiction. I don't want to spoil too much for those that haven't seen it, and for those who don't even know what I'm talking about, you should watch stargate. It's on Sci-Fi Channel on fridays at 6:00 and 8:00 pst. Or maybe 6:00 and 8:30. Check your tv listings :). I then go to bed since I've got to take a stupid writing test tomorrow that I need before graduating from college. I awaken Saturday morning at 7:00 since I have to be to the place by 8:45 in the morning. On a Saturday no less. Who schedules these things? Obviously not college students like me who like to stay up late. I get to the test and after trying not to fall asleep proceed to follow the instructions and fill in the bubble sheet so they can accurately demograph how stupid white people are. Of course I fill in "prefer not to state" in the race/ethnicity form, so I've foiled their attempts! Mwahaha! IMO race/ethnicity shouldn't matter on anything. The fact that English isn't your first language should matter, but not what colour your skin is or whether you put a u in color. So I read the essay prompt and realize that it should be simple for me. I have to write about whether community provided by the internet is beneficial and useful. I immediately disassemble all my thoughts that fly through my head and establish what I really believe on the subject. I remember things posted on one of my [ex?]-coworker's site, as well as a book I read in High School, and had to do a book report on. Personally I think that the Internet is a good resource and is very useful, but I know how bad it can be to your personal life. I realize how bad of an essay it would be to sit on the fence so I decide to write a mostly negative essay. So I start the outline I usually do and write out "introduction," "everquest," "intentions," "the net," "brainstorm," and "conclusion." I notice I have 6 points and that one of them can be used as a nice hook for an opening paragraph so I start off by mentioning Sandra Bullock and the cheesy movie she was in claiming it could happen to anyone. My second paragraph cites "evercrack" and people whose vain girlfriends leave them. For the third I cite that IRC sucks for emotion and people that lie claiming they are girls when they are in fact not. Fourthly I acknowledge that the internet can be good for brainstorming, and then conclude with a conclusion. I know it's recipe-like, but it works and is [hopefully] all you need to pass these tests. Some of my paragraphs were a bit jumbled together, much like the flow of this paragraph here, but this is just my silly blog, so who cares! So I proof-read my paper and decided it was good enough so I put my jacket on and handed my stuff to the proctor and left. Fun stuff indeed.

Then today (sunday) I was driving to my grandmothers house on I-80 and on the way I noticed this sign with blinking lights saying "High winds." Hmm I think to myself, and then I notice what looks like a hay bail spining around up in the distance off the side of the road. I guess the sign was right, but what an odd place for a tumbling bail of hay. Upon closer inspection of my thoughts, I realized what I was looking at. It was not in fact a bail of hay, but a smoking tan car rolling off the side of the road and into the ditch. Uh oh. My mom in the passenger tells me to slow down because she realizes what is happening before I do, so I do and slam on my brakes and make the tires squeal because of this, although I really don't have to because the car ahead of me is at least 50 feet ahead of me and he wasn't slowing down that fast, but I just paniced. So I pull off to the side of the road since I saw it and notice that the car is smoking really bad like the engine is out. My mom tells me to call 911. Right I think, now how to I turn on my phone. In my paniced state it took me a while to remember, so I did, and the hold-9 for 911 thing didn't work. About this time I see a guy run from the car a couple ahead of us down to the smoking car in the ditch. So I dial the actual numbers and hit send. But all the lines are busy so I have to wait. I notice that there are no people inside the car, and my mom mentions the people got out and are walking around. How is that possible I think to myself. So finally the 911 person picks up about a minute later and she seems a bit rude to me and I tell her that a car flew off the side of the road and is smoking and she says "on I-80 and reed?" and I say "no, before reed on the other side of the river." and she responds that help is en route. I say thanks and hang up. So anyways just shortly after that I see the highway patrol/chp pull up behind me and the group of people gathered behind my car looking at the smoking car in the ditch. Somewhere in here a guy walks up to my window and of all things asks me to back up so he can get his toy that his kid dropped underneath it. After this we realize that there are more than enough witnesses that saw more than I did since we were at least a quarter mile back and just saw it falling off the road, and if the CHP needs my witnessing they have my cell-phone number since I called 911 with it, and my license plate # since they have cameras in the dash and he was directly behind me. One thing I want to know is if the 911 people get the location of the cell-phone tower that is being used to accurately pinpoint where people are calling from so that they can have people on response faster. So anyways, I turn off my emergency flashers and turn on my blinker and I pull out onto the freeway again after a minute of waiting for the outside lane to clear enough for me to get enough speed up the hill. Anyways, dinner was great as it usually is, even though we quite literally had to go over the river and through the woods to get there.

Wow this was a long post. Hopefully I will make more frequent shorter ones in the future so I don't take this long to do them. Anyways I need to get to bed, so thanks for reading!