Maths + Programming = x
Some programming friends have been talking about whether having good maths skills makes you a better programmer. My gut reaction was to say yes, it does, especially with games. But, after thinking about it, maybe having maths skills doesn't necessarily make you a good programmer, maybe it just makes you a faster one? Or am I just talking bollocks as usual?
I know that while making games I use maths a lot. Distance between points, simple arithmetic, circle equations, interpolation, etc. Maybe the people who think they're terrible at it just don't realise how much they actually use it? Maybe, for example, knowing to check the distance between two points to check collision (in a simple circle based collision), instead of googling to see how other people do it doesn't really make much difference other than saving you a few minutes? Maybe you don't actually have to know how it works to use it, as long as it works? Maybe I should stop asking so many questions?
So, either maths does make you a better programmer and people just don't realise how much they use it, or it just makes you a faster programmer because you can debug problems faster if you understand the maths better?
Having a logical mindset probably has more impact on how you program rather than what methods you use to achieve a result. Even if you use a convoluted method to achieve what could be done with a simple equation doesn't necessarily make you a bad programmer, it might even make you a more creative one!
A recent example in my own code was when I was attempting to write a String wrapper to wrap text to fit inside a certain number of pixels. I was trying to find the objective-c equivalent of a StringBuffer in Java. I found a few examples on how to do it it C++ without having to create new Strings for each word added to the line. I couldn't figure out how to get it to compile because the compiler was complaining about not being able to find the header files (I think it was something to do with compiling as objective-c++ instead of objective-c). I opted for a less optmised version, that worked just as well, but will likely use up more memory. Fortunately that's not a huge problem in iOS as it has proper memory management, but I will have to go back to it later and fix it.
My point isn't that I have no idea what I'm doing when it comes to objective-c, but more that just because I do something a different way doesn't automatically make me a bad programmer (well, maybe in this case it does, but I'm hoping you see my point!). Having the logical thinking skills to figure a way around a problem are a much greater resource than advanced maths skills - you can always learn maths, it's harder to teach logical thinking!