So here I am, coding yet another function in my part time hobby project and I think I've come to a realisation. I've made this thing waaaaaaaaaayyyyy too generic.
Looking at LOC count for my project, I'm currently sitting just shy of 4k lines :
Yet, this thing does nothing aside from a few NSLog outputs and some very basic "Intro" views being displayed. Every class, every line of code, I've made sure to make everything "configurable". There is no assumption about anything in the data structures, meta-data is first parsed to get the "structure" loaded and then these structures are populated. All dynamically from XML.
Maybe I'm just being too pedantic. As this ever happened to anyone ? I'm pretty sure this thing would probably be done by now if instead I'd just bang out static data structures and made plenty of assumptions about fields just "being there". Of course, then what I'm making (a game engine/a game from that engine) wouldn't be all that powerful to being with.
Sorry for the rant. I've just had a long day and I hate functions with more than 3 imbricated ifs, which I just wrote and got depressed over.
Looking at LOC count for my project, I'm currently sitting just shy of 4k lines :
Code:
$ wc -l main.m Classes/*.[hm] | grep total
3683 total
Yet, this thing does nothing aside from a few NSLog outputs and some very basic "Intro" views being displayed. Every class, every line of code, I've made sure to make everything "configurable". There is no assumption about anything in the data structures, meta-data is first parsed to get the "structure" loaded and then these structures are populated. All dynamically from XML.
Maybe I'm just being too pedantic. As this ever happened to anyone ? I'm pretty sure this thing would probably be done by now if instead I'd just bang out static data structures and made plenty of assumptions about fields just "being there". Of course, then what I'm making (a game engine/a game from that engine) wouldn't be all that powerful to being with.
Sorry for the rant. I've just had a long day and I hate functions with more than 3 imbricated ifs, which I just wrote and got depressed over.