Vanity overtook me in the summer of 2004. I rose from a mild mannered student to someone who had an opinion and the will to use it, and occasionally impose it on others, including my instructors who often didn’t know anything about the topic being taught (Flash ActionScript for instance). My times at Swallowbush were becoming overly composed of discussion on the forums about the game I was modding at the time, and less of functionality and education. This was when I realized that my life had changed, some for the better and some for the worse. When the dust cleared I felt like a super hero; I will refer to myself in the transition between student and coder as CodeMan.
Nuh nuh, nuh nuh, nuh nuh, nuh nuh CodeMan. Crash…
I always wanted to do that.
I had already had a few classes under my belt. Converted from VB to C, thank god that I had a beautiful teacher because without her I don’t think I would have taken to it so well. Without fail I would always be in the top 3 people in the class and would constantly be laughing and poking fun at those who weren’t able to wrap their minds around the topics we were covering. “You must be spending hours reading and writing the code!” Nope, I was just listening. I learned at an early age that I can’t really know anything, and decided to start letting people talk around me and just accept their views as facts until something better came along. This is why I stopped believing in god, let me explain.
Dilism – a belief set centering on Dillon Anderson, the guy who liberated me from Episcopalian beliefs and showed me that in reality there is way too much contradiction to be caught up in religious discussion and killing. This conversion from semi religious to no religion was rather easy, but it was the first in the long tedious steps into math and then… computers.
My eyes light up when I enter a classroom where I am going to be learning something, especially if the topic itself is interesting. Anthropology, a class I am currently taking, has been fucking amazing and I wouldn’t pass it up for just about anything. I particularly take to programming classes for the same reason that I like Math and English, there are often many ways to get something to work, but in reality only one or two are suitable.
CodeMan was the idiot who made the promise to beat a teacher at writing effective code, and CodeMan was the idiot who won. For what It’s worth, I had an ace up my sleeve; I read a lot, and often. I have read just about everything there is to write on Perl for instance, and my teacher had only used Perl, and thought he was hot shit. Well I may not have the years of experience with it ever since it was version 2.0 or whichafuck, but I sure as shit know how to make Perl do what I need it to do, and in short notice if need be.
Our challenge was as follows – given a table of information dropped in to a comma separated file, CSV for short, calculate a series of statistics and report them to the user of the script, the more efficient of the two with the correct answer would win and get to teach the class for a week. Efficient is defined as best possible use of the language, avoiding side effects or useless variables etc., and includes application statistics such as size when running as well as runtime.
The class was a bit mixed about the idea of me taking on my teacher. Most of them didn’t know me and thought I was just an asshole with no chance in the world to be able to win. Those that knew me were all dead set on finally getting good instruction from the class, and pushed me to win, knowing they would get just that. We had a week to work on this tool and this is where I shined. For those of you who don’t know, Perl is great for pulling code together when in a bind, and will often come down to a simple fix to most any issue. I had the initial build of the application built in about 2 hours that night and I was able to relax and think about the logic behind it. The next three days my teacher took his class time to work on this tool, and there were a couple times when I caught him looking at me and wondering what I was thinking, but believe me, my brain had already been picked dry from the two projects we were developing over that week.
I went home on the Friday realizing that I had to find a way to secure my applications seat at the head of the class. Enter dprofpp. This is an application that is able to benchmark and profile your application. Apparently It’s an application my teacher didn’t know about, because he failed to use it.
We entered the class on that fateful Monday morning and sat our laptops up in front of the class. My face was considerably more worn than his, because I was up late the night before studying for a midterm I had later. He had his smug look on, convinced that he had already won. We queued up the apps, opened task manager and displayed the necessary information, and things were off. We had identical laptops coincidentally, so it was much to his surprise when my application was completed after only three minutes of running, statistics displayed and code up for review. 32000 records categorized, averaged and ready to roll. A full ten minutes later his app came up and displayed the same information. It was clear that there was a comparison break here. His eyes squinted at my code and then back at his; his face softened and a frown over took it. He had lost, and was not satisfied with the results. My application was smaller, faster and miraculously not using any of these terrible Perl quirks that seem to flow from the minds of those without the formal training. He shook my hand and took his place at the back of the class to observe my teaching suggestions and habits.
The moral of this story is not that I am vain; yes I am perfectly aware of that. I am vain for a reason, and I am not planning on stepping down from this cloud any time soon. I may not be the best programmer, but I am perfectly capable of putting up a good fight with most anyone else, save Ed, who I still am utterly petrified of seeing on the programming arena. The tools that I bring are the same as everyone else, ie there are no super ratcheting wrenches in this field, but I do bring that thing that few seem to have. Drive. I am interested in seeing what some of you are able to bring to the table, and if any of you would be interested in starting up a coding challenge here on gneu.