Grading

As it’s my first semester T.A.’ing, it’s also my first semester grading. I picked up the first homework from Prof. Qiu this morning, and I just got done grading it. There are about 40-45 kids and it took about 3 hours. So, 4-5 minutes per homework – I can live with that.

Tonight was also the first time that a student in the class scheduled an appointment to get help with her homework. I hadn’t looked at the upcoming homework as they just finished the first assignment, but I was very pleased when I was able to jump right in and know exactly the problem. It’s a great feeling to know the entirety of a class without needing a refresher, and being able to take any section and just go.

In short, so far so good.

Tagged with:
 

Chess

For Artificial Intelligence, in order to satisfy the final project requirement, I wrote a small chess-playing agent. It’s not horrible, but it’s not going to win any awards. Still, despite its simplicity, I’ve noticed that in games against itself, it exhibits some seemingly second-order behaviors, like forks, pins, skewers and so on. I found that interesting.

I did write a text-based interface for playing against it, but it’s tedious to actually use, and so, having done well in graphics, I decided to write a simple GUI in OpenGL. You can click-and-drag your pieces to where you want them, and then wait for the computer to play. Here’s a screenshot of a game’s conclusion:

A game's conclusion

A game's conclusion

I’d like to give the piece icons transparency on the border so that you can see the underlying square, but that will be a job for tomorrow. Even as it is, I’m pleased with it.

Tagged with:
 

Sex and Engineering

There’s a guy who’s perpetually in alamode (the lab of choice for the C.S. major of discerning taste) named Feineman. It was through him that I found failblog – he was tearing through the archive and it had some pretty funny stuff.

Yesterday he found yet another gem. Apparently there’s a mutex (mutual exclusion) on sex and studying engineering:

Its my future! I want to be an engineer... sex can wait!

It's my future! I want to be an engineer... sex can wait!

Tagged with:
 

KAUST Email

I received an email this morning with my login credentials for new KAUST email address. Those of you who would like this address, please email me at the current address you have for me.

At any rate, it really solidifies the KAUSTiness, and is oddly gratifying. I’m very excited for this.

Tagged with:
 

Scientific Computing

A couple of weeks ago now, I spoke to a professor about the possibility of T.A.’ing next semester’s CSCI407 – Scientific Computing. It was one of my favorite classes at Mines, and I’m really looking forward to it. The professor will not be on campus from March onward, and so it will be an online class from that point, but I’ll likely be holding regular class hours during that time. Exciting!

This is all because one of my few regrets about KAUST is that I wouldn’t get a chance to T.A. or teach there as a student, so, I’m pursuing that here.

So, if you’ve still got Sci. Comp. left to take, take it next semester. I hear they’re going to have a sweet T.A.!

Tagged with:
 

Memory Leak

Memory management is a notoriously difficult aspect of coding in C++. Generally, the problems one runs into with pointers is that you get rid of the data you’re pointing to while you still need it. Gdb has become a good friend for finding segmentation faults.

For those of you who aren’t computer scientists, here’s a quick explanation – we need space to store variables and information. So, one way to do this is ask the system for some space, and then the system gives back an address. Imagine mailboxes at the post office – you don’t have the stuff stored in your mailbox with you at all times, but rather the way (the key) to access it. One problem that arises when you tell the post office you don’t need the mailbox anymore, but you don’t give back the key. Someone else is assigned this mailbox, and his mail starts arriving in there, and when you go looking for yours, it’s not what you expect (this often causes a segmentation fault). The other problem is when one patron keeps requesting mailboxes, and you’re only allowed to hold one key at a time, so you discard the old ones. If you request too many, no mailboxes are left (this is a memory leak)!

At any rate, I don’t have much experience tracking down memory leaks, and so when I came across this problem, I asked an open question to everyone in the lab of the best way to do this. Someone suggested I put soapy water on my program and look for bubbles.

I ended up looking through my code for places where this might be happening, and I happened to find it pretty quickly. That’s pretty lucky.

A memory leak gets out of control

A memory leak gets out of control

We get our memory back when the program is terminated.

We get our memory back when the program is terminated.

I got gdb to seg fault!

I got gdb to seg fault!

Tagged with:
 

Graphics Project 4

It took me about three hours, but I got my fourth graphics project pretty much done. A little polish in terms of user interface, and one little feature, but that’s it.

The project is dealing with Voronoi diagrams, and so the first part was to generate a random set of points, and then the associated Voronoi diagram:

A Voronoi diagram

A Voronoi diagram

The next step was to actually create a mosaic. The idea is that the whole Voronoi region should be the color of the point on the picture that corresponds to the associated Voronoi point. At any rate, what it comes down to is pretty pictures. I’ve included the original and mosaic version for some of the pictures we were provided.

Some Columbines

Some Columbines


A mosaic version of the same columbines

A mosaic version of the same columbines


Guggenheim Hall

Guggenheim Hall


A mosaic of Guggenheim Hall

A mosaic of Guggenheim Hall


A picture of a couple of squirrels

A picture of a couple of squirrels


A mosaic of two squirrels

A mosaic of two squirrels

I’ve got others, but they are less than impressive. If you’ve got a square picture that you’d like to see made into a mosaic in this way, and I like you, send it along. Or, use any number of image editors.

Tagged with:
 

Graphics Project 3

Not long ago we got our third graphics project assigned. In the first we wrote our own raytracer, and in the second we got familiar with OpenGL and implemented a trackball interface that would load a model and allow the user to rotate it around to see it from different angles. This third project deals with texturing, however.

The first part was to generate a torus and texture it with a tile-able pattern (we were given a few wood textures and one brick). Same trackball interface applies.

A torus made of bricks

A torus made of bricks

Next up was to add a way to render a model that’s seemingly made out of mirror, reflecting a virtual environment, provided to us by a teacher. This one seems to be the inside of a building near a window.

Bunny of mirrors

Bunny of mirrors

Lastly, given a 3D texture (marble), we were to “carve” a model out of that material. See Isis and the shark made of marble.

Tagged with:
 

KAUST

This summer I submitted my application for the Discovery Scholarship at King Abdullah University of Science and Technology in Saudi Arabia. It would pay for my last year of school here, cost of living, travel, tuition there, and a stipend to buy a new laptop. Well, when you have the fifth largest endowment in the world, I guess you can afford to do that sort of thing.

At any rate, I nit-picked an essay (they wanted an essay of 50 lines or less detailing academic achievement, international experience, statement of purpose, etc., so it’s bound to be a paced a certain way), and got letters of recommendation from three of my professors. Specifically, Graeme Fairweather, the department head, Mike Colagrosso, a recently tenured professor who just left us for the private sector (you’ll be missed, Mike), and Yong Bakos, a first year professor. All in all, I felt pretty good about my application.

Well, earlier this week I got an email saying that I had been selected as a finalist. Of the 2300 who applied, they whittled it down to 672 students (of whom they’re saying they’ll accept 500); 99 of these are from the US or Canada. Making it to the finals means that they’re going to fly me out to Washington D.C. for an interview this weekend, about which I’m very excited. I’ve never been back east, and it will give me a chance to see my cousin Elizabeth and her husband Wess, who live in Arlington, VA. The KAUST people even let me delay my departure so I could spend Labor Day weekend with them. Hooray!

At a recent dinner, my mother mentioned that she was praying I didn’t get accepted. Something about the perceived danger of living in the Middle East for two years. At any rate, things are looking up, and at the very least, I’ll get a trip to D.C. out of it.

It really looks like a beautiful campus and a unique opportunity. I would be in their first graduating class, getting my Master’s when I finish. I have a knack for being in the early graduating classes for schools. I was in the second class out of my middle school, and I was in the second class to graduate from the IB program at Niwot.

For more on KAUST, visit their website.

Tagged with:
 

A friend of mine (Andrew Ferguson) posted some reasons he thought it sucked to be an engineering student.

Yes, sometimes it’s difficult, but I think we often have a head start on our counterparts in a lot of ways by engineering.

Some of my favorite professors have been from computer science. Granted, that is what I study, but even from high school, many of my favorites were in math / science. My high school calculus teacher motivated me very much, and would spend hours with me after school talking about various proof-projects we had going on (yes, I’m apparently that kid).

Textbooks can be rough, I’ll give him that, but I think that’s in large part symptomatic of the information engineering textbooks must contain. They have to catalog a lot of things, and for my money, I think they generally do a pretty reasonable job.

While other disciplines may have inflated grades, I haven’t been denied opportunities because of my grades. I don’t have quite the GPA I’d like, but people know how difficult sciences are and appreciate it when considering you for positions.

Sometime the beatings the assignments put us through do tend to blend together; I don’t know about Andrew’s coursework, but this semester I’ve had some of the most exhilarating assignments I’ve ever had. We wrote our own shell, we downloaded and parsed RSS feeds using only shell (unfortunately not our own). For Scientific Computing, I admit there was a lot of work, but they were assignments that kept me up at night, out of pure curiosity.

This doesn’t even include the job market situation. Other engineering disciplines don’t feature the growth that computer science has seen in recent years, I admit, but Mines certainly has fantastic job placement. Of my closest high school friends, I have two in international relations, three in linguistics, one in liberal arts, and one in chemical engineering. The engineers enjoy the jealousy of the others with respect to the prospect of work.

All things considered, I’ve really my collegiate career up to this point, and I imagine I will continue to.

Tagged with: