Welcome to Katy's Code! I hope you enjoy your stay and find my articles useful. If this is your first visit, head on over to the Categories menu in the right-hand pane to find the stuff that interests you. Have fun!

AJAX JavaScript Control (2012 Update)

May 18, 2012 Leave a comment

AJAX Control lets you quickly embed AJAX controls using text, XML and XSLT in a variety of ways to your web pages. Read more…

Complete Gaming Journalism archive now available

May 18, 2012 Leave a comment

Hi everyone!

The complete archive of articles from my time writing for TheSixthAxis is now online. This includes previously unpublished articles, and uncensored/unedited versions of existing articles.

In the Reviews and First Impressions sections you can find serious and professionally-written reviews and early impressions of various video games that I was tasked to investigate.

In Blog & Opinion and State of The Industry you can find serious commentary on issues that were prevelant on the games industry at the time of writing.

Finally, in Inappropriate Gaming Satire you can find all the humour articles. Please note that some of these articles contain topics that some readers will find extremely offensive, including strong language, adult themes, drug and sexual references and so on. Please do not read these articles if you are easily offended or shocked.

I hope you enjoy the posts!

Katy.

Why Google Chrome 17 is making small developers unhappy

May 14, 2012 Leave a comment

In February 2012 Google introduced Chrome 17, and with it, enhancements to its Safe Browsing technology (these enhancements have persisted relatively unchanged in Chrome 18). Read more…

Learn To Program 1: What It Takes

May 14, 2012 1 comment

A comment I hear from my friends and colleagues at least once a month goes something like “Programming sounds interesting, I wouldn’t mind learning some basic programming. What does it involve?”

An excellent question, and one with many possible answers. As the discussion evolves, the same set of issues tend to come up, so I thought I would try to address the main points over the next few pages.

Pages: 1 2 3 4

How to enable right-clicking with a buttonless touchpad in Ubuntu 12.04

May 13, 2012 Leave a comment

The buttonless touchpad, also known as the ClickPad – designed to allow greater flexibility in touchpads by treating the entire surface as one button with programmable click regions – is possibly one of the worst touchpad designs ever conceived. Unfortunately, it would seem that it’s here to stay. The last few versions of Ubuntu haven’t played nice with ClickPads, and one of the great touted features of Ubuntu 12.04 (Precise Pangolin) is vastly improved ClickPad support. Imagine my surprise, then, when I upgraded from 11.10 only to find that right-clicking and two-finger drag no longer worked. Read more…

Categories: Linux Tags: , ,

Printing numbers in binary format in C++

May 12, 2012 Leave a comment

The problem

You want to display or output a number in binary format. Iostream only has output manipulators for decimal, hexadecimal and octal.

The bad solution

People usually write a loop to do this that iterates over each bit in the integer:

int v = 0x12345678;
for (int i = 31; i >= 0; i--)
    std::cout << ((v >> i) & 1);

There are many ways to do this; the loop above shifts the bit to print into the least significant bit (bit 0) of a temporary and ANDs it with 1 to remove all the other (higher order) bits and leave a 0 or 1. It starts with the most significant bit (31) and iterates down to the least significant bit (0), ensuring that the bits are printed in the correct order.

The good solution

While a looping solution still has applicability in some other languages, there is a much more elegant way to do it in C++ that is often overlooked:

int v = 0x12345678;
std::cout << std::bitset<32>(v);

The C++ standard library includes a container type bitset whose first non-type template parameter specifies the number of bits to store. It includes an overload for operator<< and a conversion constructor for ints, making printing binary numbers a piece of cake! This is a much preferred solution to the messy for loop construct above.

To use bitset, remember to add:

#include <bitset>

at the top of your code.

Good luck!

Categories: C++ Tags:

Katy’s blog is back!

May 12, 2012 1 comment

Rising from the ashes of djkaty.com and 2 or 3 years of health-related downtime (and site downtime), I’m happy to finally put finger to keyboard again on this, my new WordPress site, Katy’s Code.

All of the comments and some of the articles from the old blog were lost long ago but I shall painstakingly try to re-format the ones that remain and post them bit by bit on the new blog so they are finally online again. Bear with me!

Categories: Blog Updates Tags:

Review: SingStar Guitar

October 20, 2010 Leave a comment

This is a re-print of an article originally posted on another site, included here so that the blog is a complete repository of my written work. The article is reproduced without pagination, formatting, images or editorial changes made on the original site prior to original publication.

I know what you’re thinking. When SingStar Guitar arrived, I was thinking the same thing. We have Guitar Hero and Rock Band in a billion incarnations, is there really any need for this? How can SingStar Guitar possibly compete with an existing line-up of thousands of songs, full instrument sets and the impending release of what will likely be the all-conquering music game of all-time with 17 fret guitars and MIDI keyboards that is Rock Band 3.

SingStar Guitar

SingStar Guitar (Photo credit: Wikipedia)

The answer is, SingStar Guitar is aimed at a different market, and I was shocked and dismayed to discover that the game is really rather fun.

The gameplay is the familiar highway that you would expect, with the chaff stripped out: there is no star power, no multiplier and only three difficulty levels (using 3, 4 and 5 of the buttons respectively). The presentation is very clean and SingStar-like and I actually prefer it to Rock Band’s highway. Obviously, the emphasis is more on pop music.

Regarding the logistics, SingStar Guitar is basically like any other SingStar disk: you get 30 songs you can sing, but this time you can play them on the guitar as well. Wisely, London Studio have implemented support for all existing Guitar Hero and Rock Band guitars so you won’t need to gunk your house up with even more plastic junk peripherals. The SingStore has been enhanced to allow selected songs you already own to be upgraded for guitar playability for a small fee. These upgrades are being released fortnightly along with the regular SingStore song releases. If you already own SingStar, your game will be patched to version 5.0 next time you play, which will allow you to use your guitar, so there is technically no need for the disk. The only difference between SingStar Guitar and other SingStar disks after patching is that the Guitar disk includes 30 guitar-compatible songs out of the box.

Now that’s out of the way, why should you bother to buy this, or upgrade your existing songs?

  1. Roles: any combination of one or two players can be assigned to any combination of instruments, ie. One player can both sing and play the guitar at the same time, or two players can sing, or play the guitar, or both. The single player singing and playing guitar simultaneously mode makes for some very tough challenges and is a lot quicker and less hassle to set up than in Guitar Hero or Rock Band which requires you to fudge it by creating two players. Also it’s not possible to have two people singing at the same time except in the latest Guitar Hero and Rock Band releases supporting 3-part harmonies.
  2. Load times are instant – load times in Guitar Hero and Rock Band are considerable.
  3. You get the music video. Which turns out to make quite a difference.
  4. Every song is scored out of 10,000. This means your scores are comparable across songs – something you can’t do in Guitar Hero or Rock Band, which may be important to you if you are competitive like me.
  5. You can’t fail. The song won’t stop if you play poorly, which is much better for social players and parties.
  6. No need to change disk during parties.
  7. If you prefer pop music, SingStar is clearly going to be a better choice for you, musically, than the other games.

Of course, there is no career mode, no character customization, no bass play or drums, no challenges. And right now, there are only the 30 songs on the disk plus another 8 or so released on Wednesday 20th October on the SingStore which you can actually play – however this will change pretty quickly in the coming months. Your desire to play therefore will have to come from self-motivation to beat your own scores and those of your friends.

There isn’t much more to say. As usual it’s another solid SingStar disk release, more of the same, but with added plastic. I didn’t think the guitar element would be much good, but in fact it was, and made me inclined to upgrade some of my other songs for guitar play.

You can find the full track list here: http://www.totalmusicgaming.com/vbulletin/showthread.php?t=1158

7/10

Follow

Get every new post delivered to your Inbox.

Join 317 other followers