Cool Stuff vs Yak Shaving

This is a copy of a post I did recently in the LÖVE forums.

I don’t like using libraries

This is not the first time I hear that phrase, and I have been thinking about it for a while. I guess this is a good place to expose my views on the matter.

You see, for me there are two kinds of tasks in programming: there is Cool Stuff and there is Yak Shaving.

In a game, Cool Stuff is what your game is about - it could be a great gameplay. It could be a really neat set of graphics. It could be a really good story. Or very likable characters. Hell, it could be the sound, if you are doing a musical game.

But there is usually lots of extra stuff that you also need for your game to be considered “complete”. You need to handle the menu. The animations. You need to store and retrieve information from files, etc.

All that stuff that “doesn’t really make your game any cooler, but it’s still needed”, is Yak Shaving.

The problem is that lots of people (me included) end up not doing the Cool Stuff because they spend all their energy Yak Shaving. That is just sad.

In my opinion, anything that saves you from Shaving a Yak so you can spend time doing Cool Stuff, is good.

An example: you are using LÖVE instead of C++ and OpenGL, or direct machine code. And yet it doesn’t “feel like cheating”. That’s because all LÖVE does is Yak Shaving. But you still need to do your part - you need to do the Cool Stuff!

In the “cross the country metaphor”, using tween should not feel like friend giving you a lift. It should feel like a friend giving you a pair of good walking boots. You put them on and then, off you go! You are still doing the important stuff - which is walking that long, long path. It’s only that now you don’t have to worry about all the little pointy pebbles in the way.

But if I use libraries, I will not learn!

I think learning is great. I’m all for learning. And I think that it is a proven fact that learning from others is more effective than having to learn it by yourself. A good teacher will explain the Theory of relativity in one hour. A class full of students, however bright they are, will forcefully take much longer than that to come up with the theory all by themselves.

If you want to learn, that is wonderful - Just don’t try to go “macho” and do it on your own. Open up an existing lib, and see how other people have already done it! Don’t try to invent relativity, read a book about it! Be efficient!

I’ve learnt so much by reading other people’s source code. I make a o point to make my libs as understandable as possible, just because of this.

That’s pretty much it. Sorry for the long rant. I will shut up now.