Tuesday 2 April 2013

Weekend & Monday Learning

11.50pm Scary Pointers And Nice Reference Variables

Ok so I AM listening to Scary Monsters And Nice Sprites by Skrillex right now (it's actually one of my favourites), hence the name, but it does also have something to do with what I've been doing recently (in the past 20 minutes). I suddenly realised that I didn't really know when was the best place to pointers. I've always thought of myself as a pretty good programmer, but I definitely won't be until I work out where the best places for pointers are. *searches google* Ok this question has been asked quite a few times, and in every instance the highest-rated answer said that the best place was "only where necessary". Obviously pointers can be dangerous and can cause bugs that are difficult to find, but I'd never really thought about it before. Well, time to go through a fairly large amount of code and remove as many pointers as possible. It won't take too long, and it's actually quite relieving finally knowing that it's best to avoid pointers if at all possible. I mean, they have their uses and advantages (for example, they are theoretically faster to pass into functions than just normal variables because they don't have to copy all the data in), but they can be so much more confusing that it's not worth it. Anyway I now have a MUCH better grasp on the concept of pointers and the way data is handled in C++ generally.

Over the weekend I did little work on CubeScape, mostly because I decided that the weekend should be my days off from CubeScape. I played BioShock Infinite quite a bit since my brother (whose name is Lachlan aka Megaman1574, btw) bought it on Friday. He's finished it already, but I still have probably a quarter of the campaign to go. Maybe I'll finish it tomorrow so I can uninstall it to free up some disc space (I have only 10GB free out of 700GB).

Today being Easter and a public holiday in NSW (and possibly elsewhere), Mum didn't require that I do my schoolwork (I have no idea why she lets us off school on public holidays....did I mention I'm homeschooled?), so I finally got stuck in and did some decent work on CubeScape. I wrote the loading queue that desperately needed writing so that when I finish the spreader system (I'll explain how all of this confusing stuff works in detail when it's all working properly) it can actually be used.

Also today we discovered a new game called StarForge which is chocca-block full of potential but so far isn't hugely well executed. It's getting better with every new version, though, so I have high hopes for it.

12.20am Signing Off

I just spent that last half-hour writing this blog post and since I have to go to Armidale tomorrow at about 2.00pm for Cadets (google AAFC) and I have schoolwork as well, I really need to go bed right now. Lachy (my brother, in case you hadn't got that yet) and I also have to get haircuts and I'm going for my green Ps, so it's a busy day tomorrow. Oh, for those of you who don't live in Australia and have no idea what I mean by green Ps, it's third stage of the graduated licensing scheme that we all have to go through to get our full driver's license. Learners, red Ps, green Ps, full license.

Ok this post is way too long now anyway so goodnight.

No comments:

Post a Comment