Blog: Keogh Code: And then there was maths
I am not a mathematician. Do I have to be?
Siobhan Keogh | Thursday, May 10 2012 | 2 CommentsI'm not bad at maths. Really, I'm not. I was always pretty good in school, and I continued taking stats in seventh form - or year 13, I suppose - even though I didn't have to. It's just that since I left high school, and went on to complete an English degree followed by a year of Journalism, I haven't exactly had to do a lot of it. And algebra? I haven't done any serious algebra since I was maybe 17.
Anyone who's learned how to program in any in-depth way will understand why this is a problem. While the C++ book I've been working from insists that I don't need to be a mathematician, I know that I'm not going to be able to get away with avoiding the topic altogether for much longer. This become abundantly clear when on Saturday I began to learn about the different variables I could use in C++, and how many bytes of RAM the different variables would use.
Granted, seeing as I'm a complete beginner and everything I'm making at the moment runs in the command prompt, how much RAM a program uses is not going to be of huge importance just now. But at some point, eventually, it might be. And I think that my lack of mathematical prowess might be my biggest hurdle in the weeks to come.
Thankfully, I've recently discovered Khan Academy, a helpful resource with loads of maths help.
For now, though, my problems are simpler - because of my success in making a calculator two weeks ago, when I last wrote a blog, this week I started turning other programs into calculators. The goal was to do it without having to check my old code, and without looking at the book. In other words, I'm teaching myself to code from memory, because while it's a skill I might not need now, it's definitely something I want to be able to do.
While I can now write that 'Hello World' program I struggled with a few weeks ago from memory, I have trouble with things I've learned more recently. It took me an age to change a program that calculated the area of a 10 x 13 rectangle into a calculator that would allow you to input your own numbers to figure out an area. Fortunately, my Assistant hinted that maybe I needed to use a standard other than cout, and eventually I got there. My brain may have come close to exploding in the meantime, but I got there.
Another, more specialised programming book arrived for me this week. From now on, I'll be mixing up my learning switching between my two books, depending on what I think I'm capable of and what's going to be fun to do. This second book gets you started on making basic games in C++, so next week I'm going to have a crack at making my first game.
Windows vs. iOS vs. Android:How to choose the best tablet for you
101 great websites:
You haven't heard of yet
DIY desktops:
We ask the pros for building tips
Hot Products || PC World editors iPhone 4S launch pics and unboxing
The iPhone 4S launched at midnight through both Vodafone and Telecom. ... READ MORE
Tux Love || Geoff Palmer Google : Starting to be evil?
Google recently deleted AdBlock Plus from its Android Play Store. This is ... READ MORE
Tech Guy || Juha Saarinen Small balls of solder
The idea that desktops might change forever is enough to send geeks into a ... READ MORE
In a Nutshell || Zara Baxter Logging, not login
At an event in Singapore yesterday, Seamus Byrne, the editor of CNet ... READ MORE
Harley O'Gyver || Harley Ogier Pay for internet by-device? Not on my watch.
So as those of you who follow my twitterstream will know, I'm currently in ... READ MORE
The Arcade || PC World editors New Year, new games
You'er going to laugh. Or at the very least, you're going to scoff and ... READ MORE
Dumb Terminal Live! || PC World editors New Zealand memes: We think we're real funny
We New Zealanders love the internet, and we have a pretty good sense of ... READ MORE





Posted by Cleggy at 12:43:07 on May 10, 2012
Flag abuse
Posted by Siobhan Keogh, PCW at 12:45:25 on May 10, 2012
Flag abuse