Wednesday, February 16, 2011

Binary Heap! splaying of emotions

So I've come to realize, after my data structures class today. That the method of modelling a Binary Tree with an  Array that I was doing was in all actuality, a binary heap. Granted I came up with the methods of index access and such a week into my class when I didn't even know what a binary heap was, but still, I was on the right road. It's awesome. I'm decently happy with myself that I actually fundamentally understood and created a structure that was conceived of by brilliant minds who've come before me. And in fact, maybe even be alive today. It fills me with excitement for the future possibilities of my life.

Also, after discussing splay trees and studying their runtime and structure. I've determined that if someone would try to model the human emotion. They would use a splay tree. Because emotions that are accessed often, are often accessed again. For example, if someone is angry. Even if you cheer them up and calm them down, we all know it doesn't take much more to set them off again. And a person in a happy mood will be hard to get out of easily.

Another idea I had today was to write a python program that would export a picture of a binary tree. Using the height of the tree as it's measure, it would create a picture that would scale the tree so that it would fit neatly onto the picture. I've already a few ideas on how to do this. The cool thing I think, would be to have it read from a text file, specified to be in a specific traversal order, and then export the picture. Or perhaps even read from the text file and organize the data itself?

All these ideas, and so little time to actually implement them.

Oh! Also, my sister visited me and brought me a very nice 88 key keyboard. Using this I've begun learning Mandy by Barry Manilow. I'm 16 or so measure in now, 10-12 or which I can play quite comfortably. I do love making music!

The other day I started messing around with my webcam. Specifically on Video Feedback. Aka, pointing the webcam at it's output on the computer screen. Creating an infinite loop of awesome. I created a couple videos as well. There were some really cool effects.

Thursday, February 3, 2011

Binary Trees and Time

So, I've learned from my class, and from my own musings that to maintain a self balancing tree, you need to do rotations. When I was brainstorming on my whiteboard I knew what I'd want to be doing, but after learning about zig-zig, zig-zag and the variations of (there are only 4 in an AVL tree)  I feel like I would have arrived at such a conclusion after another week or so of pondering.

It would have taken only a matter of days or maybe hours had I been able to actually have some time to really think about this stuff. But my schedule this semester sucks, I've got way too much/little time in between classes. And while I do my homework between classes, I almost always have to immediately go to another class before I can start anything new, or explore my brain a little bit. Once my classes are over, I have about an hour or so before I need to go to bed so I can wake up for an 8:30 class. You'd think weekends would be better? But I need money, so I work. Which is really nice, you know money and all. Except for the fact that the check from the company is overdue by a week at the moment. And I'd love to know why, because if I'm not getting paid, then my time is wasted and there are many things I need to do with my time.

Ugh, I hate not having time and feeling pressed for time like this at the time. Especially after a semester of a very very nice semester.

I've started working on the Latimer-Zerachiel System again, and I've gotten the chat boxes talking to each other, but for some reason they're not executing the commands. The problems more than that, but my time is pressed so I gotta stop writing. Ugh.