Design Patterns and Other Things University Did Not Teach Me

I am currently finishing up my Bachelor’s degree in computer science, and while I must say that I have in fact learned to program, the real world offers drastically different problems than what university does. As an example, Paul Graham mentioned on his blog that programs you write in class differ from real life on three main points, naimly; they’re small, you have to start from scratch, and the problem is usually predetermined. Three things I believe most people agree with.

I program pretty well in Java. And also in C++ and Python. You could probably even say I know Haskell, Prolog and SQL. Really though, that doesn’t seem to matter much while you’re out there, in the big bad world, coding to make a living. Once you get a hang of the foundations of programming, the next programming language will come easy, which is why I think it’s important to teach more than just programming to people.

One thing that immediately struck me on my first day of work was that I have never, through out all three years at university, seen “real”, professional code. Never. I have seen my own code and my friends’ code but that’s it. And boy, is there a difference. I recognize it would be a waste of university resources to have a course in “Reading real-life code”, however I actually feel that would be a fantastic idea, but also stupid.

Secondly, design patterns. They are indeed extremely essential to know. I ran into this problem not too long ago when I needed to create a class B. This class needed to fulfil a certain requirement. The good news were that another class, class A, already had this funtion. “Great” I think to myself, which is a classic rookie misstake because apparently, you shouldn’t count your chickens before they hatch, since I cannot just copy this code. That would require me to copy over 300 lines of code, granting me a business class ticket to first place in the Copy Hall of Shame. The question then arrises, what should I do? Design patterns, is the answer. Or, in my case, StackOverflow is the answer. My point being that I have never studied design patterns at university. So I am currently reading about them in my spare time instead, since I realised their true value. It would’ve saved me a whole lot of time and trouble if I knew them earlier.

Wouldn’t a programming post be incomplete without a rant about version control systems (VCS)? Nobody taught me Git or how to use it. I forced myself to learn it and, as it turns out, that was actually not such a bad idea. I know for a fact that universities around the world try to teach this, but if you’re in the same boat as I was in, they didn’t. But they should’ve. Git is used at every work place I’ve been to, which, granted, is only two. Still a good investment for the future, though.

I think most people agree with me when I’m saying that university isn’t preparing you for everything in life, that would be practically impossible. I do however believe that some things are important to teach people. In the case of programming ,I would’ve loved if I had a course in design patterns and VCS. But I didn’t. I guess you can’t have everything in life.