It has recently come to my attention that I get distracted too easily. This week especially has been difficult due to the massive distractions that have taken me away from my studying. For example, Sunday I planned on spending all day studying for my bio test. Unfortunately, my computer was sitting on my lap, and I had a sudden desire to read on on Qt for embedded devices. Specifically, I wanted to see if Qt had been ported to my MediaMVP, which it had. Then I decided I wanted to build the toolkit for the MediaMVP so I could hack on the firmware I used for it. This took more time. Then Catherine, Jerry, and Forrest came over to watch CSI, which took even more time. Eventually the clock struck midnight, and I hadn't really studied at all for the test at 9:00. I ended up studying until 3:00 am, at which point I gave up and went to bed. I'm pretty sure that I failed the test unless my guesses were more accurate than I think they were.
A similar thing happened on Tuesday night. I was supposed to be working on my OS lab. Instead, I was adding wraparound menus to my MediaMVP's firmware. It was really pissing me off that the file browser provided by the firmware would only let me scroll down when I was at the very top of the menu and wanted to reach something at the very bottom. I wanted a way to press up at the top of the menu and reach the bottom of it. So I did. It works pretty well.
As an aside (or distraction), the code I was working on was pretty awful. I use the MediaMVP Media Center firmware, which has some very cool features. I appreciate the hard work that I'm sure goes into the firmware, but I also get the feeling that the UI gets neglected in favor of working on the cooler hardware aspects of the firmware. Which is fine, as I'd rather people do that instead, especially since I know how to code GUI's and am not as fluent in the language of communication with hardware. But here's an example of the bad code I was working on.
You get the idea. In every single case statement, i gets set to the exact same thing. Why did they do it that way? I don't know. In this particular case the coding style's just very redundant and ugly, not necessarily horrible, though the #IFDEF 1 still confuses me. I spent Wednesday night trying to add a popup error message show up when the user tries to play a file they don't have permission to open when I should have been studying for my algorithms midterm today, and I should be studying for my OS midterm instead of writing all this. When will I learn?