Found 6 blog posts for the month: February 2009




(Thanks Stephen!)

Nested Templates

We have two IDEs at work: the awesome Visual Studio .NET, and the extremely incompetent "why the hell would anyone use this, oh, wait, we are because it compiles our PlayStation and Wii code" CodeWarrior. CW is a world of pain of its own, and here's a handy little tip for you.

Templates in C++ have the angle brackets as delimiters. That is, std::vector<int> or std::pair<int, int>. In Java and C#, they are refered to as generics, but for the sake of this post, they are essentially the same concept. (Check out the differences here).

Anyway, say I require a map of ints to a vector of ints. I would declare it as so:

std::map<int, std::vector<int>> mapping;

Looks okay? Wrong. Look again:

std::map<int, std::vector<int>> mapping;

That's the bitwise shift right operator. Of course, the fix is easy:

std::map< int, std::vector<int> > mapping;

Thanks Codewarrior.

Worst. Law. Ever

New Zealand's new Copyright Law presumes 'Guilt Upon Accusation' and will Cut Off Internet Connections without a trial. Join the black out protest against it!

In The News

Alright, so I finally finished that piece of crap game called Final Fantasy III for the DS, and let me tell you, the final dungeon would be infuriating if you had died and had to start ALL over again and beat ALL those bosses. It's utterly ridiculous. And it had the lamest ending ever. It wasn't even a proper FMV. It was just them running around dropping all their friends off around the world. Sigh.

Anyway, there's been two things that have really been pissing me off lately.

First is the Australian forest fires, and the fact that they've been started by arsonists. I mean, for crying out loud, do they KNOW what the hell they've done? Do they comprehend the number of deaths they've caused and the number of lives they've ruined? Do they feel any remorse for what they've done? I don't understand what goes through the minds of these retards when they decide to have a bit of "fun" at the expense of a thousand lives. It's tragic, it really is.

Second is the story about a thirteen year old brat who has become a father. I quote from the newspaper article:

Asked what he would do to support the child financially, Alfie asks in a small, high-pitched voice, "What's financially?"

Does this guy even understand the responsibility of bringing up a child? Will these freaking brats stop breeding like horny rabbits and creating evil spawn that are there to steal our oxygen? Why the hell would you even have SEX with someone who has BARELY gone through puberty? Not only is this morally wrong, it's also incredibly disgusting.

NOTW also says that there may be as many as eight possible fathers, including 14-year-old Tyler Barker, who claims to be terrified at the possibility.

If you're so freaking terrified, why don't you STOP HAVING SEX WITH THESE SLUTS SO THAT YOU DON'T GET THEM PREGNANT? And furthermore, EIGHT possible fathers? What the hell is wrong with this sex-starved girl?

And the fact they're getting so much bloody media attention isn't helping. The guy is completely oblivious to the responsibilities he faces in bringing up this kid, but yet there's suddenly this incentive of tens of thousands of dollars from these moronic tabloids offering him money for an 'exclusive' documentary. Isn't that some kind of INCENTIVE for him to breed more? What is wrong with this world?


There is such thing as a "Free Lunch". And free dinner too.

Mel organised lunch at Great India today, so Jono, Rosie and myself bundled into the car that Andrew had so kindly left for us and headed to Courtenay Place. As we were walking, we stumbled across something rather peculiar on the ground.

It was a small piece of purplish paper.

It was just sitting there invitingly.

I picked it up quickly. It was a $50 note. That pretty much paid for lunch for the 6 of us at Great India. And a delicious lunch it was too \o/

And then again, at Central this evening, we had a "light meal" to welcome our new pastor.

In other words, I had two very good meals, and didn't pay a cent for them.

That constitutes an awesome day in my books!

Friday Fail

Okay yeah, I've been pretty much working on the BIG SECRET EXCLUSIVE SITE every night of the week, so of course that means blogging gets pushed out.

Anyway, Friday Fail is a term used by our senior programmer, Steve, on Fridays when we meet for our daily meeting at the couch area at work, and browse FailBlog. Steve left us on Tuesday, and now there is a failure of Friday Fail, and as a result, team morale was lower than usual and heaps of things ended up breaking.

Last week, in recognition of Steve leaving, we booby trapped our game for his last Show and Tell. He demonstrated our progress on the game and spoke about the various changes we made. As he wrapped up, we got him to go back to the main menus and *bam*, we sprung a picture of him in his "underpants costume" from Halloween (this was from his old work place), accompanied by Marvin Gaye's "Let's Get It On". Needless to say, his mouth gaped open for a good half minute and he scurried off stage. We'll miss you, Steve.

Show and Tell usually happens on a Friday, but as you're all aware, last week was Waitangi Weekend, so immedately after Show and Tell I had to rush to the airport and catch a flight back to Auckland. As tradition stands, I made a beeline to Momo Tea in Mt. Albert, and hung out with my youth group, having some hearty food and some delicious drinks.

Friday morning I had music practice, and following that, Bob's unsurprise barbeque at Ray's place. This pretty much lasted the whole day, with some awesome food and lots of Rock Band. No Stephen, this was the PS3 version so we didn't play Still Alive. We played some outdoor badminton too, until we started getting attacked by the mosquitos. Towards the end of the night, we hung out for more drinks at EasyWay and played last card, until we were pretty much sick of last card and headed our seperate ways.

On Saturday I pretty much lazed around, but in the afternoon I met up with Mat and Will and took a stroll around Albert Park, just observing the lanterns and inhaling the wonderful aromas of the roadside food. It was a gloriously hot day, and I am often reminded about the surprisingly large temperature difference between Auckland and Wellington.

I spent Saturday night with family for our reunion dinner, which I would say was the main purpose of the trip. I dunno, I kinda feel very sentimental about these things, I was a bit disappointed about missing Chinese New Year last year. Family's important to me, and reunion dinner is just one of those symbolic meals that you share with family, a bit like how Christmas is so important to some people.

Sunday was pretty much church and lunch at (where else) Ha Long, before I caught up with my sister, who insisted on showing me various painted windows, her coffee table, her new laptop and her photo board. And before long, it was time to head back to the airport and start the journey back to Wellington. Sigh.