Friday: Stupid interview questions
I'm sure most people who care figured out i had an interview on friday. I actually thought it might go rather well for the first few minutes when the first questions he asked me was how the compiler handles virtual functions. I think it's rather a silly question, but i'd coincidentally just read up on virtual functions a few days earlier, so i thought i'd gotten lucky. Then i found out it was an even sillier question than i first thought because he wasn't happy with my initial naswer about the compiler making a vtable list for each class that was used to look up a pointer to the virtual functions for that class, and after i stumbled through a couple more attempts to make a more detailed explanation he told me what he apparently was looking for, that four bytes are added to each variable and function in the class to point to where they are. Which seems like a pretty fucking useless bit of trivia to know off the top of your head.
Then he asked me what the pros and cons of Templates were, which i'd also read up a little on but not as much as virtual functions. The best i could come up with is the obvious pro that it lets you make class independent functions, and had to pretty much totally guess on the con part. I said something about being more limited, and possibly taking longer to compile and maybe being longer at run time as well but i didn't know.
Then he asked me about how to tell if a point is inside a triangle. This is also something i read about recently, but a couple weeks ago instead of a couple days ago like the previous two questions, so my memory was kind of dim. I haven't looked up the algorithm since then, so i still don't remember exactly how it worked, but it was something like traversing the points of a polygon in counterclockwise order, and adding the angle at each vertex and then checking the sum and checking the total once you get back to the first point, but i forget what sums for the total signified which result =/
He then asked me when you'd want to use matrix math and when you wouldn't. This question completly floored me. I had no idea what the hell he ment. I said matrix math was pretty much good for all 3D stuff which didn't seem to impress him. I told him that you'd want to use just dot product and cross products if all you were dealing with was vectors, rather than the full matrix multiplication for spaces, however i was pretty sure even when i told him that it wasn't what he was looking for. Finally he asked me what i knew about quaternions, and i told them that i'd heard about them but never really studied or used them, so i guess quaternions was important to the answer he wanted for that question.
The last question i remember was an algorithm for reversing a string in place. I asked if i was allowed to have a single char to use as storage, and he said yes, so i told him the simplest explanation i could come up with in a few seconds, check the length of the string, then loop and move element i to the char, element n-i to element i, and the char to element n-i, etc.
At the end he told me a little about the studio and what games they're working on, and then asked if i had any questions, and i couldn't think of any good ones. So then he said that they'd probably let me know about the results of the interview in about two days (and he didn't say if that counted the weekend or not) but that sometimes they waited until they had a stack of interviews to go through and review all at once.
Oh, and at the begining he asked me if i was interesed in Engine programming, Game programming, Tools programming, or Console programming. I told him that i had the most experience with game programming, and that i was definitely interested in that, that i was interested in getting into Engine programming and Console programming but that i didn't think i had enough experience to jump straight into that, and that i'd only done a little bit of tools programming but i'd be willing to get more into that. That's part of the reason why i think the questions were so stupid, you could argue that a lot of them are important for engine or console programmers, but i would claim that it's important to know that virtual functions are slower than normal functions and that there are techniques for finding if a point is in a polygon or not, but you can look up the exact details when it's important. A game programmer doesn't need to worry about those as much and a tools programmer doesn't really need to worry about them at all.
Okay, done ranting now, i promise :)
Kialyn had asked me earlier in the week if i could give a friend of hers a ride to the airport on saturday, and i said yes as long as i got to hang out with her afterwards. So i picked them both up at 10 and drove them out to Ontario, after which kialyn and i came back to claremont and had brunch at the BC Cafe and then went back to my apartment and watched an episode of Dark Angel and talked for a bit before she needed to be elsewhere.
After i dropped her off at her place i decided to try and find the La Verne library, because the LA county library website claimed that they were the closest ones with a copy of Robin Hobb's Mad Ship. I finished up the Farseer trilogy earlier in the week and started the Liveship Traders trillogy, but was distressed to discover that the second book was nowhere that i could find it.
I'd checked the address on the website earlier and did a mapquest, but not directions, so i had a general idea of where it was. After driving past it one and a half timed i finally found it. Went in and did some searching and thought the website had lied to me until i found they actually had a science fiction section. I would have figured it out earlier if i hadn't found several other science fiction books, though not the one i was looking for, mixed in with the normal fiction books.
Went to check the book out and there were two cute girls at the counter, the one that helped me said that she liked my bracelet :)
Spent most of the the rest of the afternoon/evening reading, with a little bit of tv-watching thrown in i think. Oh yeah, found a new version of "Kiss Me Kate" on PBS.
Went to bed about 11 or midnight, and got woken up by the thunder sometime after it started. I vaguely thought about getting up and checking to see if i could see any lightning, but i was tired and after lying there listening to the thunder and rain for awhile i fell asleep again.
Got up at 9ish and spent most of the morning curled up in bed reading and listening to the rain.
Morna called at 2ish and asked if i wanted to come over and watch one of the DVDs we'd rented with her while she put together some of the furniture she and Bricriu had bought at Ikea earlier in the day.
So i went over that and we put on "Jersey Girl" and Morna started putting together the table, and needless to say it wasn't very long before i felt compelled to help out. The table was a real pain to do because they hadn't drilled the holes for the screws big enough and we had to spend forever jamming them in by brute force and strength of will. After we layed the table on it's back i finally figure out that if i leaned directly on the screwdriver with most of my upper body weight while turing it that the screws would actually go in. The bookshelf was a lot easier and quicker to put together and by the time we finished it the movie was over. We spent another hour or so putting together the last thing, a chest of drawers, which was a lot easier but took quite awhile because there were so many parts. About 6:30 Bricriu declared that he was getting hungry and took us out to dinner at Chili's since we'd been doing so much of the work with the furniture. After dinner Morna and i finished up the drawers and she gave me the old plastic drawers that they were replacing with the new ones.
So now i'm back home and not feeling very tired despite having somehow gotten into the habit of going to sleep "early." (Probably due to a combination of a silly net game i've been playing with some IRC friends, putting the cat back on her somewhat diet, causing her to poke at me in the morning so i'll give her food, and an attempt on my part to get on a more work-like schedule in the process of trying to make myself get more studying and job application stuff done)
Perhaps if i go curl up in bed and try to read i'll fall asleep instead.