Software, Multithreading, Excitement

The Software Engineering class here at Virginia Tech is nothing to scoff at. Homework accounts for 80% of the grade for the course this semester. Don’t let that title fool you though; we don’t get homework, we get projects. On the first day of class professor Plassman said that the average assignment will be about a thousand lines. This might have been an underestimate for some people though; just my source code (no headers) for my last assignment was almost 1,600 lines. Even though the assignments require plenty of work, they are some of the most interesting I’ve ever.

In this class, we learn to program in C++ using the Qt framework. Initially using Qt was frightening to me (although perhaps it still is). Learning to use the massive number of Qt classes and functions and features is an undertaking. They empower you to do so much though. Our latest assignment was to computer simulator with a GUI interface. Once all is said in done, it is quite amazing to see how pushing buttons on my GUI asynchronously updated the state of the simulator. To think that our processor – a unit notable for sequential execution of instructions – can react accordingly to a variety of inputs at random times. This is the power of using a multitasking operating system like Linux and multithreaded applications.

Just today, we began learning how to use QThreads (a part of Qt) to give us even more fine grained control of our programs’ threading. I can already think of a bunch of fun projects that I can take on now with QThreads. Perhaps I can start on a parallel linear algebra library or N-body simulator. Multithreading is quite an interesting topic to learn.

A Playground for Python

Not too long ago I was introduced to a website called Project Euler:

http://projecteuler.net/

Once you create an account on this website you are free to tackle hundreds of creative math puzzles. They are wonderful because they not only require solid mathematical analysis to solve, but also generally require one to write programs to perform the task at hand. The early problems are incredibly simple, but they get progressively harder as you go on; most of the latest problems look like complete gibberish to me. To solve these problems, I decided to go with Python as it is very simple and quick to develop with and it includes many useful features right out of the box like arbitrary precision arithmetic (a must for many Project Euler problems). Using python my solutions are generally no more than a mere 10-20 lines of code, but generally a fair amount of time is spent crafting those lines as I analyze the problem. Once a problem is complete, a forum thread opens up to you that is visible to all others who have solved it. This way, you can share your solutions with others around the world. Looking through these threads I find a variety of different languages being used: C, C++, python, Java, and others. Sometimes I find x86 assembly solutions (Those people must be a little insane). Overall however, this site was a wonderful way for me to program in Python with a more mathematical feel; I would suggest all of you to try it as well.