Friday, May 28, 2010

Three hours of debugging...

...for nothing.

My professor sent me an email this evening saying he had managed to get the application I'm writing for him running without much trouble but many of the important effects were missing. He only uses Ubuntu and I've been working in Windows, so I wasn't terribly surprised and resigned myself to installing Ubuntu somewhere and testing out the app in that environment.



I've had some trouble getting Ubuntu installed on this computer in the past, so I decided to try the Wubi Installer to install Ubuntu this time. Immediately after downloading it and trying to run the executable I'm presented with errors that seem to indicate that my hard drive is missing... and dismissing the dialog just causes another one to pop up. Eventually, after several attempts and a little web crawling, I discovered that the repeating dialogs would come to an end if I dismissed them enough. Then the installer seemed to do the right thing. It went on it's merry little way until it came time to restart the computer.

I restarted the computer... and it didn't come back up.

Not only did it not boot into Ubuntu like it was supposed to, it didn't even give me a chance to boot into Windows. Sigh.

My first thought at this point was to be sure I could save my Windows installation, so I grabbed my Windows 7 boot disk and rebooted into the recovery tools on it. Since my computer was out to lunch, I did a little googling on my phone to figure out how to restore the boot loader and restored the default Windows bootloader.

I figured at this point my erstwhile Ubuntu install was lost, since I wasn't using the Grub bootloader anymore, but to my surprise, when I rebooted again I was given options for both Windows and Ubuntu. After a quick boot into Windows to make sure everything was working well, I rebooted again, and this time selected Ubuntu.
Theme

Ubuntu finished up it's install and dropped me on a nice, clean, purple desktop. A somewhat irritating graphical glitch in the upper left portion of the screen, but it was liveable.

A few minutes later, I had installed the necessary tools in the environment and was ready to dig into the problem. I got all the dependencies installed and launched my application. Sure enough, the problem Ben was having showed up right away. At least it was being cooperative with me.

My first thought was that something I was drawing wasn't being drawn in the proper place -- it wouldn't be surprising since I hadn't done anything special to control it. So I started down that line of investigation only to discover that my objects weren't even attempting to be drawn. That's strange...

Oh... the SVG file I'm looking into doesn't seem to have my expected elements in it... am I generating it correctly?

Yes...

Oh, but Graphviz isn't writing the file correctly... strange, since it worked just fine in Windows. A few quick tests and I proved to myself that Graphviz had a giant bug that was preventing my code from naming elements properly. Ugh.

I started searching around the internet but couldn't find any reference to the bug. Out of options, I decided to uninstall Ubuntu's version of the package and install it from source instead. Ten minutes later I had the package re-installed from source and ran my application again -- and it worked perfectly!

So, the current version of Graphviz distributed with Ubuntu's has a bug introduced that prevents the "id" attribute from properly naming nodes, at least with the SVG output format. I'm not sure why no one else had run into that problem but it's fairly significant for anyone that's using that attribute, since they're probably using it for a reason.

All that to say, I just spent 3 hours from starting to investigate the problem by installing Ubuntu until tracking down the problem, only to find that it wasn't a problem with my application at all.

C'est la vie.

Tuesday, May 25, 2010

Graduate Studies at UCSB

As I mentioned in my last post, a week ago I took a big test that encompassed material from the time I've spent earning my graduate degree.

Today I was told that I passed.

Trumpets! Fireworks! Exclamations! After three long years of lectures and homework piled on top of everyday life I'll finally have some semblance of regular free time again! Thank you to everyone for your support, encouragement, and prayers.

(If you're considering working on a post-graduate degree while working full time... don't. Stop working, take out loans, whatever you need to do. Focus on the schoolwork if you're going to do it: you'll get more out of it, enjoy it more, and be done sooner.)

I've actually got about two weeks of "class" left in the quarter, which consists of:

  • One more meeting of my seminar (on Memorial Day)
    • Entails reading one more paper and a short analysis of that paper.
  • Two more meetings for my research project
    • Entails a laundry list of features to be implemented and fixes to be made.
After that, I'm done at UCSB.


My time at UCSB has encompassed a lot of changes in my life. Before being accepted to the graduate program, I was:
  • Unmarried.
  • Living with my college friends in the Jesmary house.
(I couldn't find a Jesmary house group picture... at least this was in the Jesmary house!)
  • Working at CallWave.
  • A Yuk Gup (6th degree student -- green belt) in Soo Bahk Do (the specific type of karate I practice).
  • A "Layreader-in-charge" for my local Anglican parish.
Since then, a lot has happened:

  • I married Megan.
  • We rented a condo in Goleta and bought a condo in Carpinteria.
  • I left CallWave, worked at Cogi for a year and a half, and now work at The Trade Desk.
  • I have advanced to Cho Dan (1st degree black belt) in Soo Bahk Do (at Jang's Karate).
  • I am an average parishioner in my church.
  • I taught a course at Westmont.
  • My sister got married and had a baby. 
I love this picture of Kylie and Melanie!

So now it's onto the next set of challenges. As far as I can foresee, that includes: 
  • Helping to make The Trade Desk massively successful.
  • Spending more time focusing on karate (possibly applying and testing to be a Jo Kyo and then Kyo Sa -- which are ranks of instructor certification).
  • Seriously considering getting LASIK surgery. (I am so tired of wearing glasses.)
Finally, I'll be spending lots of quality time with my wife, who has been so amazingly supportive of me through this experience. 

I love you Megan!


Tuesday, May 18, 2010

The Test

So, do you remember the specific details of things you learned 3 years ago? I ask because that's what I had to do for the comprehensive exam I took this morning out at UCSB as one of the last remaining requirements of my master's degree in computer science.

In the UCSB computer science master's program, you have three "tracks" you can take to earn your degree:

  • Thesis - lots of original research, minimum amount of classwork
  • Project - some original or continued project, average amount of classwork
  • Exam - no research, maximum amount of classwork
Now, don't let it fool you -- even though there's more classwork in the exam, it's my belief that the project and thesis tracks require more work overall, it's just done on your own time, outside of classes. That's why I chose to take the exam track for my degree.

For the exam itself, you (the student) nominate four graduate level classes you took as a part of your studies in the program. The professors of those classes create a "single" question for your exam. When you take the exam, you're given two hours and fifteen minutes to answer three of your four questions (for an average of forty-five minutes per question). At the end of the exam, you turn in your responses and go home and wait.

That's what I'm doing now... waiting.

Over the next week, the faculty that created the questions will grade the responses on a ten point scale and decide if I successfully answered their question or not. (I'm not really sure why it's a "ten point scale" if the professors decide what "passing" is -- it doesn't really "standardize" anything...) Next week, any professors in the department that are interested (apparently it's usually only a handful) will get together and discuss the exam results. Once they're done, the results will be voted on and finalized. After that, I get to find out whether or not I passed (and thus get to graduate this quarter or not).

The four classes I chose were:
  1. Advanced Networking (Fall '07)
  2. Advanced Security (Fall '07)
  3. Program Analysis (Winter '10)
  4. Multimedia Networking (Winter '10)
(Notice the bookend-ish nature of those classes -- those were the first two and last two classes I took at UCSB. I chose those classes mostly because they were my favorites during my time at the university.)

Typically, I don't study all that much for tests -- usually only an hour or two. However, given the importance of this test and the breadth of material it covered, I devoted the bulk of a weekend to studying for this one. I think one of the reasons I typically don't feel the need to study much for a test is that I'm fairly good at predicting what material a test is going to contain and the types of questions that are likely to be asked. Knowing that, it's fairly simple to be confident about a test and not need to study for the test. 

In this case, while I was fairly well prepared, I anticipated the questions on the test much more poorly than usual. Maybe it was because the test was written by four different professors that hadn't just taught the class to me or maybe it was because the professors thought that this test should be particularly difficult -- either way, I misjudged the test content.

I was worried most about the Advanced Networking question going into the test, since that class covered a ton of material. (Seriously, I have like 500 pages worth of papers in my notes from that class!) When I read the question for that class, I sighed and put it down. I hadn't expected the professor to question me about minute nuances of specific implementations of protocols that we talked about in a single class session three years ago. The "single" question consisted of 5 or 6 sub-points discussing the inner workings of various internet protocols, of which I thought I could successfully answer 2 or 3. Ouch.

I next looked at the Advanced Security question... and thought I might succumb to panic. Another multi-part question and I didn't think I could answer the first part ("Describe a return-to-libc attack..."). The second part ("Describe a SQL injection attack...") I knew quite well and I could get through half of the third part ("Describe three ways to attack this SUID program..."). Since I had already given up on the networking question, I didn't really have a choice: I had to attempt this question. So I wrote down my answer for the second and third parts and set the question aside. 

I'm now somewhere around 30 or 35 minutes into the test, so despite having already used up my "pass", I was right about on schedule (since I still had to come back to finish parts of this question).

Next I picked up the Program Analysis question and nearly cheered -- there were 8 parts to the question, covering nearly 90% of the material in the class, but I knew all of them cold. I spent the next 45 minutes writing out my answer to this question in complete confidence.

One more question to go: Multimedia Networking. In hindsight, I should have realized that this was going to be an extremely vague, open ended question that tracked academic thought more than a particular topic or set of facts -- the entire class was like that, so why wouldn't the test question be like that. However, upon seeing the question I wanted to give up and walk out of the room -- it felt completely unfair.

To give myself time to think, I returned to the question for Advanced Security. To my surprise, I now knew the answer to the first part and knew how to finish the third part! Happy days! I quickly jotted down those answers and returned to the Multimedia Networking question and started writing...


...and writing...


...and writing...


...for the next 45 minutes. 

I think I filled 7 or 8 blank pages with writing pounding out a half-thought-out, linear essay describing research issues in the peer-to-peer streaming area and future directions and issues that research in that area will face.

And then I was done, with a couple minutes to spare.

All in all, I'm happy with how the test went. I'm fairly confident that I passed and relieved to be done with it all. Here's hoping that next Tuesday I receive the results and go out to celebrate.

Saturday, May 15, 2010

New Look, Fresh Start

Ok, I'll be the first to admit that when it comes to consistency, this blog has a pretty poor track record. Since its creation, I think it has been idle more than it has been active. But starting today I'm going to try to change all that.

To help kick things off, I've updated the template for the site to something a bit lighter, while still maintaining the same kind of feel.

Why would I even try to start writing again? The most immediate influence is probably Megan's new blog and the handful of thoughtful, well written posts she's put up there over the last couple of weeks. Also, the short time I had to write on the Cogi Engineering blog, which exposed me more directly to writing about software development. (By the way, Dave or Shawn, if you're reading this, it's way past time for you to write something there!) Finally, recently I have increased the scope of blogs that I follow online, and find myself wanting to take a larger role in those communities.

What makes me think that this time will be any different? In the past, I've encountered two major blocks in blogging: what to write and how to write it.

The problem of "how" to write has become much more clear to me lately. In the past, I've tended to write posts as if they should only take me a few minutes and then be immediately posted for the whole world to see. I'm not really sure where I got that idea -- it doesn't match with anything I've ever been taught or my real-world experience with how good writing works. Instead, I'm going to start writing more involved posts that will generally take me more than a single sitting to fully flesh out. The hope is that this style will help maintain my interest enough to produce something that you will want to read. 

There's still the problem of a topic, or focus, for the blog. Megan's Geeky Bliss and Sunshine leaves her with a decent amount of freedom while still focusing her thoughts and intent. Other blogs I read tend to be focused on a theme in software development (.NET, Python, etc.) or other general computing issues. So, what's the niche for blog.chphilli.net?

I don't know.

The hardest part is choosing to write things that I think my friends, family, co-workers, and wider community will want to read. There are certainly enough things about which I am passionate enough to write the type of posts I think people will want to read: karate, software development, philosopy, religion. Since I don't know ahead of time which posts will be interesting to readers, I guess I'll just keep writing about things that interest me.

So how about it?