Tuesday, 27 November 2012

Wednesday, 21 November 2012

The Importance of States (or, How I Screwed Up Quiz #6)

Blah, blah, blah, self-depricating introduction, woe is me, I don't understand, joke, etc. etc. etc. Now that the formal introduction is over, it's time for a confession:

Although I have a limited (although increasing) understanding, I'm doing alright. I'm not sure why. I feel like I'm not doing well, which leads to the tone of these slog posts, but I actually am. Somehow. I actually got over 100% on Test 2. Guess "let the answer be z" strategy worked out. Well, that and the mark adjustment. I'm not one of those people that keeps track of what their grades are, because I honestly don't too much care as long as I feel like I'm understanding content, so I can't really estimate what my final mark is going to be, but it's going to be alright. Much higher than I deserve as of right now.

That said, I'm consistently doing poorly on tutorial quizzes. Instead of blaming myself for not studying for them, I'm going to blame that they're on Monday. No but seriously, I always say I'll study later, and spend the weekend doing coursework for other courses. Then I don't get to studying CSC236. Then I go into the tutorial armed with only what I remember from lecture, and it rarely goes well. I think the last time I got full marks was in week 3 or something. If anything is bringing down my mark, it's this. But I felt good for quiz #6. Although I had most certainly still not studied for it, I was feeling good about the material, and seeing the tutorial problems taken up on the board, I followed along perfectly. I was delighted to see the quiz question be on drawing a machine. It seemed easy enough.

As I recall, the question was "Draw a machine that accepts binary strings with an even number of 1s and an odd length". I got ready to draw. And then I failed. Sure, I could draw a machine to accept binary strings with an even number of 1s. No problem. I could draw one to accept binary strings with an odd length. Both are pretty damn easy to do. But something about combining them... I just couldn't do it. I felt like what I felt like trying to do a STA247 program in R on the weekend (the reason I didn't study for this quiz) - wishing I had the ability to store data in some kind of static object. A bizarre thought for writing on paper, I agree. But I was trying to mash two machines together, and keeping track of information from a toggle between even and odd length, while also toggling even and odd 1s proved difficult.  As everyone else got up to leave, I kept working and working and ended up with a bizarre diagram that worked for any binary string starting with 1. Never did get it to work with the other half of all binary strings. I wish I could replicate it now, because try as I might, I can't re-create this horrifically wrong solution. I wanted to recreate it just for this slog entry, but I can't remember what nonsense I pulled. Now, having figured out the correct answer, I can't un-see the correct answer. I can't put myself back in the mindset of ridiculous, over-complicated solutions. I'll upload a photo of this embarrassment when I get my quiz back.

Today, I sat down to do it. Granted, I'd already seen the correct form in lecture, but I hadn't really grasped it entirely, and I didn't want to spoil it, so I didn't look at any lecture slides or anything. The answer just came to me. Maybe the lecture did trigger the answer from me. Maybe it had nothing to do with it. All I know is I came out of having solved the problem understanding both the tutorial problem, and today's lecture a lot more.

The key? It's all about the states. Where did I go wrong on Quiz #6? States. That's where. States are my static object storage I was looking for while writing the solution. It had been right in front of me the whole time, and I never saw it.



I didn't quite understand this in lecture either. I felt like the machine we settled on was more like a summary of the other two machines. But I now realize that it's actually it's own thing. The machine's states don't refer to the position in other machines like I had thought, but in fact, refer to what properties the string has. You know, like what a state should be. Here I've used notation XY for each state, where X and Y are either E or O, E indicating "even" and O indicating "odd". X refers to the number of 1s, and Y refers to the length of the string. And once that's defined, it's nothing to finish the machine. Reading a 1 takes you from EE to OO, adding a zero from there takes you to OE, and so on and so forth. It just makes sense, and all because I properly defined my states instead of leaving them with generic names "a1", "a2", .... , "an".

If only I had realized the importance of states. Or had realized that I should have been making a new machine that handled both pieces of information simultaneously instead of trying to literally mash two machines together, keeping track of both pieces of information separately, but still within the same machine. Hindsight huh?


Tuesday, 20 November 2012

A funny thing happened on Friday

I've mentioned before that I like regular expressions. Like recursion, and lamdas, they make me happy. Perhaps that's why I seem to be managing to understand what's going on in class. Because I really like regular expressions. That or they're just easy so far. Not really sure, but I'm just glad to be understanding something.

When I went into class on Friday, I thought I would be at a disadvantage. See, I had been in Wednesday's lecture, but I hadn't really been paying attention - I was busy studying for a CSC207 quiz (all content which didn't even end up the quiz I might add >_>). And I hadn't had time yet to go over the material. So I was expecting to be utterly lost. And yet, I wasn't. Everything was making sense. In fact, I wasn't just following along, I actually felt a step ahead at times. Then there was a question posed and something shocking happened.

I put up my hand and answered it.

What universe is this? I'm not sure. Like I said, perhaps it's because this material is just easy. Perhaps it's because I like it a lot more. Or maybe the way that I approach the class is starting to pay off. I think it's time to double down and really focus on this class now. I feel like if I just put in a bit more effort it's going to make a big difference. I am on the verge of doing very well.

Saturday, 10 November 2012

On notes

I think one of the biggest steps towards my goal of not failing the course, or better yet, doing well in it, is to stop taking notes. Counter-intuitive at first, but it makes sense in the end. Allow me to explain.

I've found that lately, while taking notes on the lecture material, I fail to absorb any of it. It's all m = e - 1 + b, where I don't know what m, e, or b are, or why they have such a relationship. Some people pick up on this stuff better. They can write notes, and keep up with the lecture, while also knowing what everything means. And they can even think ahead, as evidenced by the seemingly super-human ability of some people to actually answer questions that are posed in lecture. I don't know how they do it, I haven't even had time to comprehend the question before someone has answered it.

Furthermore, especially with recent material, there isn't a lot to really even take notes on. It's a lot of examples and strategy for proofs instead of real concrete notes about proofs that one can write down and study for later reference. There's the odd thing here and there, but more than anything, I've figured that it's just beneficial for me to watch, and absorb as much of the lecture content as I can. It's often not stuff I'll want to later refer to, but general thinking that will help in the future.

Plus, what notes there are are posted online, with helpful annotations. So, I can copy them online after. As such, I've gotten into the habit of copying any necessary notes from the last week, on Sunday. It also serves as a convenient refresher for getting ready to study for the Quiz come Monday in tutorial.

So far, this strategy has been wildly successful. Sure, I don't get everything in lecture - all it takes is thirty seconds of zoning out, thinking about food, the weekend, a significant other, or any other manner of things to become entirely lost with the lecture content. But in a few minutes I'm back up to speed and following along. And in any case, it's still a net positive over the absolute nothing I was getting out of lectures before. I definitely encourage anyone else who, like me, was struggling with understanding the material to take the big leap and just stop taking notes.

Monday, 5 November 2012

Term Test 2 - A Postmortem

It could have been better, but it could have been a lot worse. While 11th hour studying isn't the best of ideas, it's better than no studying. If I passed, or even did halfway decent, my last minute studying between 10:00 PM and 1:00 AM last night can certainly be given almost 100% of the credit.

After a mad dash to Bahen after having mistakenly thought the test was being done in the lecture room in Lash Miller, I sat down with the thing, and opened it up. Unwinding. Cool. Generally good at that. I get it. I like recursion. It makes me happy, much like lambdas and regular expressions. My mood was dampered however when I realized that it was going to contain a sum. Expletive! I don't actually know how to convert summation notation into a geometric series or whatever it's supposed to be represented as. I encountered that problem while studying last night, but couldn't figure out what the steps involved were. I suppose I ought to have looked into it more, because it came back to bite me. I couldn't fully unwind. Which was a shame, because had I known what it was, I could have easily proven it.

I said I'd let the closed form I should have found be equal to z, and outlined a proof of z step by step. Hopefully that will be mostly sufficient. It has to be. That's what I had.

The second problem went a lot better. There's something immensely satisfying about finally learning material that one is being tested on, during the test itself. I finally truly understand why we set n-hat to be 2^ceil(log(n)). I found myself struggling to define n-hat in my proof, and then I figured I'd just throw in a 2^ceil(log(n)) since that's what I'd seen before. Then I thought about it. I looked at it. And I finally got it. It comes out to the next highest power of 2 after n.  I probably should have known that already. Confession: I don't know a lot of stuff that I should know. Especially about log.

 I realize that I don't paint an especially glowing picture of myself. I am most certainly far from the ideal CSC236 student. Frankly, I don't know how I'm not failing. Luck has been kind to me. But I can't rely on luck forever. And so, I have a plan, which has conveniently started with starting this SLOG; something I've been meaning to do since being reminded that it was a thing I was supposed to be doing. And then I'll be ready for Term Test 3 when it rolls around!

What's that? Oh, there is no Term Test 3?

...

Damn.


Sunday, 4 November 2012

Better late than never...

I was supposed to start this about a month ago wasn't I? I guess this doesn't look too good on me then.

Last week after lecture, I in passing asked a friend in class about what we were supposed to do for SLOGs and when. He looked at me with shock. "You haven't started yet?" "Uh... no... should I have?" was my reply. Which was met with the affirmative. Great. I'm not entirely sure how I missed that. I guess I never scrolled all the way down the course webpage to see the SLOG info sheet. I'm going to blame the fact that I keep my Firefox page settings to default at 170% zoom. Yep. That's my story. It certainly wasn't that I just wasn't proactive at all in keeping on top of what I should have been doing and failed in taking responsibility for knowing what needed to be done. Absolutely not. Really. I mean it. Stop looking at me like that. Please?

So yeah, got to get on this now. Thankfully, I keep a journal for my personal life, and it has a fair bit of stuff about CSC236 in it, so I can pull some from the archives to hopefully make up for the time I've missed. And write the slog up a little more frequently. Please deduct gently.