2019-10-24 - Oh dear... C++
-------------------------------------------------------------------
I was looking into some old C++ code i wrote while ago. Well
actually, it's nearly 10 years old now. (Jeez time flies) This code
was written for a project to make a little 2d platformer game.
The fun thing is, reading it now, i understand why i never finished
the project. I ended getting trapped in something quite some other
programmer's seem to experience as a pitfall of C++; The trap of
Endless abstraction.
The thing is, once you start Object Oriented Programming, it's very
very tempting to get caught in making neat Classes, clever
interfaces and cool code patterns. The problem was for me, that i
never got around to finishing my actual platformer game. Making
classes with cool interfaces and class managers and factories was
just the thing i'd be happily doing. :D
Now browsing through this old code, i see piles of manager classes,
with really neatly abstracted interfaces. And a whole bunch of
parent/child inheritance cleverness. All very cool. But it isn't a
platformer game.
So maybe as a lesson for myself, i should try to reimplement the
same thing, but just plain C. And i should then see whether i am
just as prone to make managers for managers, and loaders for
loaders. Or if i just want to get stuff working.
First though, i need to create a makefile to properly compile all
this C++ code again. I think the last time i was writing this C++
code, i was either in XCode on a Mac, or in some IDE within Ubuntu.
So i don't even have a makefile for this project. Hehe, already
just the recompiling seems like a nice little project for a rainy
autumn weekend.