Wednesday, April 16, 2008

Week 9, Post 1. Recursively posting.

Hello, dear readers, and welcome to another episode of Blake hates broccoli....or strings...or semicolons, or mentally handicapped curly brackets, or all of them at the same time, all being totalled up to my hate for C#'s stupidness.
So, we recently began recursion. More specifically, I began recursion early due to trying to get prepared for the programming competition. And I did, and it worked. Well, I might add. I hoped to do this perfectly in the programming contest, and it did work. Sort of. We had to count shaps in a file similar to below:

...........X........
....XXXXXXXXXXX.....
....X.........X.....
....X..XX..X..X.....
....XXXXX..X..X.....
...........XXXX.....
.........XX.........
........XXX.........
.........X..........
...................X
.............XX.....
..............XXXXXX
....................

Once, you found a shape, you erased it, and kept counting. however, I did not know that if one does not dim an array in a void, but do it in a button, its value does not change if it is changed outside of the button. What does that mean? If i put a edit value statement on my array in a button, no void can change the value, regardless of how it is passed to the method. however, if one dims it in a void, and uses it in a button or another void, it will change and stay changed. Thankfuly, C# is stupid and it's help file sucks, and does not disclose this to the general public. This is basically the reason why we didn't get first place in the programming contest. Because I was done the question in 15 minutes, then spent 60ish minutes in vain making it work. Anyways...

We also had a recursive maze problem. It wasn't all that challenging to edit Mr. C's code, so I thought, hey I am Indian, I can code anything. Which is not true. by any sense of the word. Spent quite a while making a maze that did not work, and when it did, the return path would not work. If it did work, it worked everywhere. Didn't quite get it to work, so I just pulled a Mark and edited his code. Oh well, I am off to the races (gym) to not really run, nor walk. I'll just enjoy the scenery and work out vicariously.
G'day mate.

No comments: