December 11th, 2008 chris
It’s pretty rare that I find a good programming language-video game metaphor, but after a bit of thinking, I think I’ve got something. For me, it’s a natural match between the C programming language (and C++) and Fallout 3′s Fat Man, a “tactical nuclear catapult”. They’re both super-powerful and exceedingly dangerous to your health if not used correctly.

Read the rest of this entry »
Posted in C++, Programming, Ranting, Video Games | 1 Comment »
December 8th, 2008 chris
Now that finals are over I can FINALLY return to writing like I promised you all a billion times. With that in mind, let’s look at a book I picked up for my security class, Exploiting Software: How to Break Code. But does the book hold up to the badass name behind it?

Read the rest of this entry »
Posted in Book of the Week, C++, Security | No Comments »
November 2nd, 2008 chris
Sorry about the incredible lack of posting lately. Have had too much time drained by a particularly nasty homework assignment. Now that it’s out of the way, I will hopefully return to the ‘regular’ posting schedule until the next vicious assignment comes up. For you masochists at home who have 20 hours to spare, here’s the specs for it from my teacher’s site:
Read the rest of this entry »
Posted in C++, Programming, Security, UCSB Projects | No Comments »
October 1st, 2008 chris
While reading new books for my security class, I stumbled upon a very well-thoughtout, well-explained article on how buffer overflows / stack overflows work. It’s got cool nerdy pictures and code along with it. And the best part is…it’s got assembly code! Yay! How long has it been since you’ve seen assembly code? Have you actually seen assembly code?
Smashing the Stack for Fun and Profit by Aleph One
Back in my undergrad days they taught us about the fun times of Pep/7, a language similar to assembly used to teach…assembly. It turns out to be surprisingly similar to x86, and once you know one you end up with a great handle on the other. But it seems there are not any links to it from Google, so you’re on your own if you want to dig it up and use it.
Posted in C++, School, Security | No Comments »
September 29th, 2008 chris
In having to research libnet and libpcap, I’ve found that there aren’t really a whole lot of great resources on them. But for those who, like me a week ago, have no idea what these things are, some clarification is helpful. Libnet is the standard packet construction library for C, which can be used to make TCP and UDP packets, amongst others. Libpcap does the opposite: it captures packets off the network. And now that you know the tools I need to pick up in a short amount of time, let’s talk about the resources I eventually found.
Read the rest of this entry »
Posted in C++, School, Security | No Comments »
August 20th, 2008 chris
A huge amount of buzz in the internets and especially cloud-computing land is about Amazon EC2. With EC2 you can go pay Amazon some money and get a nice little virtual computer with its own IP and all that fun stuff and throw up your web site on it. Other cloud computing vendors offer software that runs on it to make sure the apps you put on EC2 stay up no matter what (e.g., put a web site on it and make sure that no matter how much traffic it gets, it’s still able to stay functional).
But what if you wanted an open-source alternative? Enter Eucalyptus.
Disclaimer: Since Eucalyptus is a UCSB product and I’m at UCSB, I’m not entirely unbiased. But presumably you realize I’m biased and to some extent, you are too.
Read the rest of this entry »
Posted in C++, Cloud Computing, Java, UCSB Projects | No Comments »
August 11th, 2008 chris
Today we’re looking over a book that is oft-cited as a fan favorite for object-oriented design: Design Patterns. Many computer science students see it during their software engineering course, although my first exposure to it was relatively recently. But while many others love this book, it just didn’t hit me the same way.

Read the rest of this entry »
Posted in Book of the Week, C++, Patterns | No Comments »
July 14th, 2008 chris
As promised, today we’re going to look at SWIG. The basic idea of SWIG can be summarized as follows:
Got code in C or C++ that you want to use with your favorite language? Well then look no further! SWIG is the thing for you!
This is essentially the Wrapper Facade from POSA 2 in three sentences instead of many pages (although much less convincing than POSA 2 did it). We’ve been rambling about how they could only use C++ to make C code object-oriented, but that it’s not entirely their fault since they wrote the book in the year 2000. Last time we mentioned the ctypes library as an easy way for Python programmers to use C code, but the downside was you could only do this in Python.
Read the rest of this entry »
Posted in C++, Java, Programming | No Comments »
July 11th, 2008 chris
Last time we looked at an inherent problem in the book POSA 2: sometimes programmers want to use new fun languages to solve problems but have some legacy C code they need to use. POSA 2 claimed that the Wrapper Facade Design Pattern solves this problem, and it does if you’re programming in C++. But what about other languages?
Read the rest of this entry »
Posted in C++, Programming, Python | No Comments »
December 23rd, 2007 chris
Originally posted at http://cs.ucsb.edu/~cgb/stateOfTheCell.html, and thus, looks much better there.
The Cell Broadband Engine Architecture (which we shall refer to as simply the Cell architecture) was designed as a compromise between the general-purpose but slower CPU and the specific-purpose and faster GPU. It is a heterogeneous architecture: it contains processing units that specialize in different tasks. However, critics (and even some fans) of the Cell architecture claim that it is incredibly difficult to produce good, fast code on it. Having spent the last quarter working with the Cell architecture, we agree with this sentiment. But why?
Read the rest of this entry »
Posted in C++, Cell, Programming, RapidMind, School, UCSB Projects | No Comments »