Okay, I am having an issue. I am trying to take a direction vector <x,y,z> and another direction vector <a,b,c> and finding the change in angle between each set of planes (x,y),(x,z),(y,z). Not sure how to go about checking that out. I can make them each into Unit Vectors, which I think is necessary for this, but am not sure how to find the change in angle 
angle = acos( [dot(Vector1, Vector2)] / [length(Vector1)*length(Vector2)] )
Unit vectors make it easy, as the lengths are both 1 by definition, so it becomes:
angle = acos( dot(Vector1, Vector2) )
acos can be found in every math library imaginable, dot product is just the sum of the piece-wise multiplication of the vectors;
for example:
Vector1 = 1, 2, 3
Vector2 = 4, 5, 6
dot(Vector1, Vector2) = 1*4 + 2*5 + 3*6
This same method can be used to find the angle between planes assuming you have their surface normals; which you probably do. The angle between the surface normals is the angle between the planes. Depending on what sort of planes you are working with, you may or may not have the normals from the plane equations. If you don't, normals can be found for a plane by taking 3 points on the plane, creating 2 vectors with them, and then finding the cross product.
Cross product is harder to memorize, but generally goes along the lines of:
ResultVector.x = V1.y*V2.z - V1.z*V2.y
ResultVector.y = V1.z*V2.x - V1.x*V2.z
ResultVector.z = V1.x*V2.y - V1.y*V2.x
With the pairs being multiplied swapped around depending on whether you are using a right or left handed cross product.
Dot products are really useful for all sorts of things; so reading up on them is good. Cross products are useful for finding lines perpendicular to 2 others in a 3D space and for 3D rotations.
I might like that Dark thing though, if there's one thing that bugs me about doing computer stuff, it's staring at a white screen all day.
In Visual Studio 2010 you can change the
colors everything for everything. Tools -> Options..., Environment->General
You can change all the fonts, font size, background colors, and foreground colors. For every piece of text and such. It may be a bit tedious to get all the settings how you want them, but it may be worth it if you are one of the people who get eye strain from staring at blaring white too much. It will also put those changes into a config file somewhere, never bothered to find out where myself, but if you found that you could also drag said changes around to where ever you needed to code.
In fact, keeping a log of actions could make for a very interesting AI with learning capabilities. Maybe a sort of final boss that can watch the whole dungeon, and "takes notes" on what the PC does.
Implement an AI which utilizes bayesian reasoning combined with some expectiminimax, and you can do such a thing.
Why would they ask that? o_o
To test your approach. In my experience, when you're asked a question like that, the correct response is to talk your way through your entire thought process from beginning to end, and don't stop
Very much this. Though even after you reach an answer, go back through and think about it some more, as they often want that too. Probably the most infamous question of this sort, though the manhole covers is a common one, is an old one Microsoft used to ask. "How Would You Move Mount Fuji?" It even has a book about it:
How Would You Move Mount Fuji? Microsoft's Cult of the Puzzle - How the World's Smartest Company Selects the Most Creative Thinkers Working through such problems shows that you are capable of thinking through unexpected problems rationally and without panicking, as well as demonstrating your ability to pull other background knowledge about the way the world works in order to supplement your reasoning ability. Other variants I've heard of include estimating the number of gas stations in the United States.
Though whether you get these sorts of problems or mathematically based programming problems will vary from place to place. One company someone I know was looking at asked for applicants to create a program which would efficiently find the solution to a certain problem; he created use a brute force method, as the underlying mathematics was hidden enough for him to miss it. His brute force method took up to 25 seconds to compute an answer to the most complicated input, as it was essentially just a tangle of brute force and special cases. By finding a mathematical isomorphism and simplifying that into a much better algorithm, it can be found within a few dozen operations for any given inputs.