Thursday, April 17, 2008

Week 10, Post 2.


Hello dear readers. Normally I would start with a Hello again, but since you probably read from top bottom, that wouldn't make sense. Anyways, on todays docket: mid-terms, programming, and random filler.


Anyways, first things first. Mid-terms. They are tomorrow, and hopefully my parents will read it and not beat the crap out of me (hopefully.) Have about a 88% overall I believe, unless my English mark is a lot lower than expected. Got a 92% in chem, 85% in calculus, which means I need to start doing my homework in that class. I have about 96 in programming, when it should be about a 97-98 but oh well. And no clue in English, hopefully mid-high 70s. Thankfully, since Mac looks at a few marks, this brings my average up, and within 90% overall range. All that requires is a 97-98 final in programming (hopefully Mr. C. reads this and helps me along the way), a 90ish + in chem which i can do, bringing up my calc to 90+ and my English to 80+ (half impossible) Not quite sure how I am going to pull that off, but it will involve many 5$ bills handed in with my essays.

On to other news, had a math contest on Tuesday. Not much to say other than pretty much everyone there got raped on it. It would really help, if you know, they gave us stuff that we know or had the abilities to do. Giving us random questions, ask us to use formulas we don't know and then give us a small time-frame is slightly annoying. Or maybe I am too stupid to do it, but who knows.

On to programming, got a look up assignment today. Basically, the gist of the program is that you input text into two different combo boxes. Then you select the destination that you wish, choose starting location and receive the distance. At first, I thought this would be impossible, seeing as I had a similar error to my listView file. When I selected it, there was no way to get the selected index, but there is a way to get the selected text. This text could then be used to search (using binary or my own method of search, which I'll hopefully implement in my Winamp program) for the position of selected item in the index of the table.

The program was easy, and went down quite fast. Was a slight pain to finish seeing as I hate commenting and I have A.D.D. Got home today to look at the mark and noticed my partner, Mark, got 0 mark on it. Not quite sure why that happened, so I will ask tomorrow.

Anyways, not quite sure what happened in programming last night, since Roy won't pick up, so I guess I will find out tomorrow. On to other news, hit the gym last night. And I have a serious case of weak, weak core. I could work it out every other day, and just get worse and worse each time. My situps just never quite seem to get better, kind of like my English mark. Got a good workout though. And this sort of relates to my next topic, ENGRISH.

Went to a play of Hamlet today. And I was honestly surprised. Although i dun speek engrish gud and all that jazz, and I couldn't really follow the verse in the play, I actually enjoyed it. The play, given it's lack of funding, was still produced quite well, and the actors really seemed to do their job well. Only down side was, since people from other schools are d*********, and seem to enjoy coming an hour late, had to go home early without eating, and getting a drink. This combined with the fact that the person who was forced to sit beside me on the bus took up the entire seat, as well as being annoying about not switching seats with her friend, even though we aren't allowed to switch made the ride fun. Not to mention I had contacts on, so I couldn't sleep on the bus and her not talking , and being too large to let me turn around and chat with my friends made for one miserable bus ride.

The lack of water during the day really hit me hard. Come home and drank about a litre and a half of water, and passed out. When I woke up, I was really dizzy, and pretty weak, which basically means I couldn't work out tonight. Sucks, but ah well, what can you do. Going to play soccer tomorrow, hopefully getting new cleats for cheap in the process, and maybe baseball if my car gets home in time. That's all that interested me today, except for one last video. Please don't lose your respect for me, but I seriously can't get this song out of my head, and if you don't focus on the lyrics, this song is actually quite good, and may be the only good song of Britney Spears (*shudder*)



Goodbye for today dear readers, and see you in another episode of Blake hates people from other schools, annoying people and semicolons.

Week 10, Post 1.

Hello dear readers, and welcome to probably my shorted blog of this entire semester. Not really all that much going on. Quite a bit of chemistry, a little bit of math and mid-term madness. Hopefully, I shall get a good mark in Chem, because God knows I need it. Anyways, on to the meat of this blog, McDonald's style (some meat, mostly rat.)

Today we began searching for input. This relates a bit to sorting in that rather than sorting, you look for a item in a given table. It does not quite make much sense to me, because when we started off, we used bubble sort, which was quite elementary and not quite useful. Then we used shell, exchange and what not and it worked quite a bit better. However, then an issue came up. It was ridiculously simple. Even just looking at it, I could tell that it was a retarded method to do it. So I came up with a theory of using a weird kind of sort. Then the next kind of search was introduced.

Ironically enough (wouldn't it be ironic if we were all made of iron?) it was similar to what I was thinking of doing, just a little bit less efficient. The method I was thinking of was first getting right into the middle of the table, and calculate the measure of difference. (From a list of a-z, looking for a b) I would first give all letters a score, (x-y) and search= (x+y)/2. Depending on search, you would look higher or lower depending on how far it is from your average, and geometrically sort (I think that's the word). The method we were taught was somewhat similar and somewhat different.

We were taught to get a table. IE
1 a
2 b
3 c
4 d
5 e
6 f
7 g
8 h
9 i

Given the table, go to the middle. e. Then if one was looking for b, you would raise your minimum to just above your mid point, and take the middle of that again, And repeat until you find it or determine that said item that does not exist. Different from mine, but what I was thinking of was for a more large scale application that the scope of this course. (My video may use it though, so watch out!)

In other news, gyming today hopefully. Just starting to get into it again, slowly feeling my left hand come back from its brutal state earlier (having fractured it, I lost pretty much all muscle
mass in left hand). Getting it back in shape is painful when one can curl 20 pounds like a joke with your right hand, and about 17.5 with left struggling. Ah well, it will all be better soon hopefully. Only problem is I feel like I have M arms (I think you can figure that out). Quite painful. Also going to have to start training for soccer again. At last weeks practice although I didn't really have to stop, I could really feel my body being out of shape. Plus having no muscle means I am constantly cold. So off I go to save the daaaaaaaaaay. Or not. Later my peoples.

Wednesday, April 16, 2008

Week 9, Post 2. Arranged numerically.

Hello again dear, readers, and welcome to another post of awesomnes topped with chocolate icing. Or another blog post needing some filler. Anyways, away from that topic, and on to the real meat of this post:







*Ahem*. Don't blame me, I had to. Anyways, the other real meat. Programming. So, in recent news, it's raining. Oh wait, that is SNOWFALL. Snowfall program. L!o!L!o!L!11oneoen (pulling a Mark here.) We recently did a snowfall sorting program. It was really easy at first, since all you had to do was this thing called a pointer sort. Or so I thought. The pointer sort was pretty simple, and here is the concept behind it. When you have large tables of information, switching them around would be quite hard, especially if your switching books on the table just to switch part of what is on the table. This is where pointers come in.

You point at what you want, without changing any information of what you are sorting. This saves processor power and memory, making your program run faster and allowing the end user to have a more enjoyable experience. Sorting arrays, for snowfall. Must be quite fun. Anyways.

The only problem is, this question asked us to display the results on another form. I didn't realize that his sample example didn't have it. So me being me, wanting my 110% (WHICH I DID NOT GET *AHEM*) I spent about 3ish hours perusing the world wild web in search of a non retarded developer. Not to say they are retarded, but they seem to use the most ridiculously indirect methods I have ever seen, or just cheat instead of answering the poor stupid man's question.

Long story short, thanks to a little ingeniousness of my own, I found a method. I created a public void on my second form, and on it's creation, the first form would call it, sending over the grid to the second. It was absolutely beautiful. Then I found out Roy had come on MSN, so I decided to tell him that he should do it, or he will lose marks. And I, being me, was doing to ransom my answer for the cost of McDonald's. Then he sent me Mr. C's program, effectively shutting down my bargaining positioning.

To top it off, I had to completely redo my program at about 11 in the night because I had not used structures, and my program was ridiculously bulky. (Sorts, Quick sort, Shell all in first, and Shell on second form.) Thus did my weekend (more specifically Sunday night) sucked. Ah well, hopefully I shall get that 110% (if not, I hope Mr. C reads this and has a change of heart. Good bye dear readers.

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.

Friday, April 4, 2008

Week 8, Post 2. Strings are over, huzzah.

So another post, and the strings test has come and gone. And let me just say this, HURRAY. I passed this test. It was not quite as good as possible, since I made a few silly errors that made me lose 10%. Some of which I really shouldn't have lost at all. But on the whole, I still received 90% on the test, so there is something to be happy about when the class average on said test is 65%.

As mentioned earlier, the VIN number problem was no where near as hard as I expected it to be. It was actually manageable to be done in a rather easy manner, since we are not given anything similar to

1 M 8 G D M 9 A N/A K P 0 4 2 7 8 8

We are actually given all its numerical values, which are:

1 4 8 7 4 4 9 1 0 2 7 0 4 2 7 8 8

You then multiple each of these values by the digital assignment, calculate your check digit, then substitute the check digit into the actual VIN calculating the new one. Rather easy actually. That also just about sums up the strings test. I studied quite a bit for it, since it seemed rather difficult last year, and I remember bombing it.

As well, also had the programming contest. Which sucked, alot. I spent about 75-90 minutes working on the recursion question. At one point in time, I also had it working, but then it just slipped away from me. Sadly enough. Came in 5th still. Ah well, see ya guys later. Going to go cut my wrists now. Ciao.

Week 8, Post 1. Strings test preparation!

Hello world, and welcome to another week in awesome review. Lots of preparation this week, due to the programming contest coming up. As well as the strings test. We have gone through quite a few programs recently. Some of which, are actually kind of ridiculous. A.K.A. VIN program.

On the test, there are going to be a few problems. Like the VIN number problem, which is ridiculous. Knowing that most people probably won't attempt to look at it, I seriously wonder how Mr. Chiarelli thinks he is going to pull it off. Why is this I say? Because if one was too look at wikipedia, It is a ridiculous question to give to a first time user. This is more like a inclass assignment on the computer, or an assignment, since it is certainly difficult enough.

Why is this? Let us say we have a VIN number of

1 M 8 G D M 9 A N/A K P 0 4 2 7 8 8

Each number would retain it's numerical value, each letter is assigned a numerical value. However, to do this, first one must make a table of values, one of the location of the letter in its assigned value, and the value depending on location of each letter. Not to mention , you then multiply these numerical values of letters/numbers into the weighted numerical values depending on their location. Then one gets the check value. If the check value is correct, then it will equal the 9th digit. Really rather putting off, considering it took me about 2 hours to do this on the computer, and it is on a written test where you can't error check simple mistakes in code that make this program so ridiculously difficult. Ah well, at least I am done it for now, and am prepared for the test.

Week 7, Post 2. The continued lack of joy, from strings.

So, another few days, another post, another minute in time. And some more filler. But anyways, hello and welcome to another post in Blake's awesome blog which includes in this episode how much he hates running, hates strings, and loves The Onion. Anyways, first on to the main meat of this program.

I hate running. Trying to condition myself up to 60 minutes of continuous running is going to be impossible I think. Getting to 10 minutes right now is seeming like an impossible task. Talking to some of my friends, it may be doable in a few months, but I am starting to seriously doubt it. Been about 2 weeks now since I've started, and not really all too much improvement. Guess I gotta start taking protein. Ah well.

Onto programming news. We have been doing a lot of brand new programs recently. Some that are actually quite interesting. There are a ton of commands in the C# that make this whole process a whole lot easier than in VB. For example, If one had a string "asdfghjk" and one wanted to take everything past 3, in VB one would need to count all the letters in the string, and then take a section of it, after counting, or making your program count it.

Using substring, find the place of d, or use Indexof('d') and then take a substring including the index of it (randomletters.Substring(randomletters.IndexOf('d'))) would basically take everything including d and past it. There are tons of other cool little things like that , which make using strings in C# bearable, and actually somewhat easy. I am still not looking forward to this test, but at least it isn't looking too grim. Ah well, on to another week . Good bye readers, I leave you with an awesome video: