Interview Style Questions
The Following Code samples are my answers to some typical questions used in programming interviews and code tests
Here is some code dealing with string manipulations
Some standard implementation of Fibonacci's Sequence
Here is some code that allocates memory and keeps it Byte aligned. In general, byte alignment is done in powers of two. This function Assumes arbitrary byte alignment so it doesn't clear bits to align memory addresses and instead uses a divide
Personal Code Samples
This code is a snippet from the memory manager I wrote for use in my project Froggle. AllocatePage() is a function used to load a large page of memory at once. This is used to front load all the memory loading in our game. AllocateObject() is the function that is used in place of new when allocating managed objects. It will grab some of the already allocated memory and return it. Finally Free() takes an object and reclaims ownership of that memory.
LUA Script Code Sample
If you've played Froggle then you'll remember the first tutorial level where you learned to eat the flies. This code the is the LUA script that controled the logic of that level. Of course Froggle had huge libraries of helper and Glue functions that we wrote, but this function brought all of those elements together to create a fun and cute tutorial for the player to start and learn the fundamentals of Froggle.