Archive

Archive for September, 2009

Bitwise operations

September 13th, 2009 No comments

While you don’t see them every day, bitwise operations are important. Everything at the hardware level is represented in binary (base 2, 1 and 0). Bitwise operations allow programmers to operate directly on the bits used by variables. This is very useful with enums, since you can have one variable be multiple values.

To understand how one enum variable can be multiple values, you need to understand the bitwise AND and OR operations.

An OR operation compares two sets of bits. If either bit is 1, the result is 1, else, result is 0. In the below example, set 1 is the value of enum option 1, and set 2 is the value of enum option 2.
Read more…

Categories: Uncategorized Tags: ,

Grid computing with Linux, Game engines

September 6th, 2009 No comments

If you have several old PCs lying around, you could turn them into a grid, a single computer that uses all their resources together.

I haven’t found a good use for a grid personally, but I found a nice piece software to setup a SSI (Single System Image, basically means one OS running on multiple machines) grid, and a nice tutorial.

If I had a grid running MySQL, the 35 million row DB table I use would probably search pretty fast.

In other news, Panda3D (a game engine, usable from C++ or Python) looks like it has excellent documentation, something that a lot of engines are lacking. I’m also wondering if I should buy a Mac now that Snow Leopard is out (that’s when I said I’d buy one)… I wonder if I’d really use the Mac applications…