Merry Christmas[0].
--
[0] If you do not celebrate Christmas and you are still seeing the word "Christmas" here it is not because I'm an insensitive schmuck as you might imagine, it's due to your failure to properly configure your religion based localization support in your browser. Please contact Microsoft or whatever dev team is responsible for providing your browser in order to resolve this issue.
It's a little late for ordering Christmas presents (unless you're me, or half a dozen other people I know who live far apart from all their relatives and for who "it's all good as long as things arrive before Easter"[0]), but I thought I'd take a moment to plug the Doctor Who Store because I've been wanting one of their Dalek toys since I saw them at ComicCon. And while I am not quite willing to drop $124.95 on a radio controlled Dalek[1] , I have ordered some of the Rolykin Daleks as Christmas presents[2].
--
[0] There is a distinct cut off right around Easter. My ex-wife's mother once sent out Christmas presents proclaiming them as "An Easter Miracle". I am told she was teased about it for years afterwards.
[1] Sorry, I make a little bit less than John Carmack. Ok, a lot less. But the radio controlled Daleks are really cool... and I could get a radio controlled Dalek to shoot at the radio controlled R2D2 that one of our designers has... hmm...
[2] I also bought a Rolykin Special Weapons Gunner Dalek for myself. If you saw the episode with the special weapons Dalek you probably want one too. Unfortunately, I shipped it to my parent's house along with the rest of the order, that way I have to go visit. 4 years being a bit long between visits...
There was a 6.5 mag. earthquake this morning... that I slept through.
Well, not entirely. My cat was going crazy and he woke me up for a bit.
Either my apartment was in some kind of dead zone or getting the pillow top king sized bed really was worth the extra money.
It's weird, it doesn't feel very much like Christmas. It doesn't help that I live in L.A. and it was 72F the other day[0], but today was the first time anyone told me "Happy Holidays". Before I left on vacation last Thursday some people on one of our other teams had put up a Christmas tree.
Eh... probably it's symptomatic of being single for the first time in a long time. But it does seem like there are fewer Christmas decorations up this year than in the last few years.
--
[0] No, I don't want to hear about how lucky we are that it's not snowing, or how bad it is in Nebraska, Siberia, Hoth, or wherever else you might live that you claim to hate.
I picked up a bottle of Glenlivet 12 Year French Oak Finish. It's a pale gold scotch. Very smooth. Has a dry, delightfully oaky flavor. The finish is spicy and warming.
Definite thumbs up.
I do recommend everyone go see ROTK, I do not, however, recommend that everyone go see it in the second row.
Performance tips of the day:
1. If you have an exit condition, detected it before opening a file, reading it from disk, processing it, copying to an appropriately sized memory block and then throwing it all away due to the exit condition.
2. Linear searches are bad. Linear searches are almost always the sign you've done something wrong. If you're annoyed that it takes you so much effort to convert your array/vector/whatever from a linear search to some sort of binary search then what you've done wrong is to not write enough base classes, or to have written those classes badly.
3. Profile your code.
Fixing #1 halved our load time and fixing #2 seems to have smoothed out the occasional hiccup in my streaming code that I hadn't had time to track down yet. Doing #3 found something that was eating 15% of the frame time and then pinpointed the culprit that was eating 70% of the CPU ticks during loading .
So, without resorting to anything clever, we've dropped the load times by 65%. Now I just need to LART the bastard who wrote all that bad code...
A long time ago I lived in north Georgia. My parents bought a split level house with no air conditioning when my father transferred from the Wisconsin Kimberly-Clark facility to the one in Atlanta.
Now, the summers in Georgia are both hot and humid. So, years and years after we bought the house my parents finally capitulated to the needs of humans and had an air conditioner installed, and then an alarm system (to make my very paranoid (and possibly insane) mother feel safe when my father traveled).
The air conditioner always wound up with mold growing in it and my mother would invariably set off the alarm when she got up at 5:30 in the morning to let the cats out.
I hated that alarm.
All of us did, except for my mother.
But, there was that one day when it went off for no reason we could determine when none of us had been home, so perhaps it kept us from being robbed after all. I'll cling to that hope in order to banish the childhood embarrassment of knowing all the neighbors were being woken up far too early every morning by my mother.
Now, my parents had latched onto the idea that it would be good for me to earn money. So I mowed lawns. I was more interested in sitting in front of the television than mowing lawns, so it was mostly a matter of my parents telling me to go over to some neighbor's house and my mowing the lawn when I got there than any act of entrepreneurship of my own.
After a time a family moved into the house across the street from us. I was maybe in 6th grade and living in the south, where attitudes between children and adults tended to be a bit more traditional, so I didn't tend to notice many things about adults. So, when I tell you that the pair that moved in across the street were fat and ugly in a strange creepy sort of way, I'd like you to assume that I'm being quite accurate and probably being rather kind to them.
So life went on, and we had an agreement where they'd pay me for mowing their lawn and I wouldn't think that they were too weird for covering up their front window so that nobody could see in or out.
Now this rather unpleasant looking couple (who planted these scraggly rose bushes in their front yard in this long line that made it a royal pain to mow their yard) managed to defy natural order by producing a girl who was very cute. Like, little-girl cute. She was half my age and while I was an early bloomer in certain respects, I've never been one to go for a younger sister much less attempt to rob the cradle. My interest in her largely consisted of amazement that she could've come from such parents and a passing interest in the fact that her parents had given her a little black kitten to play with.
Only, their little girl wasn't very responsible, and we noticed in a passing sort of way that the kitten was scraggly and left outside a lot when maybe it wasn't the best idea to have a scraggly little black kitten left outside. Then one day we were unloading groceries from our car and the kitten leaped into the back and dragged away a 6 pack of the yogurt cups that my mom was rather fond of.
The kitten was starving to death. And pregnant. We gave the kitten food and I can only assume that when she disappeared a few days later it was because my mother quietly took her to an animal shelter where she'd have a shot at living for more than another month.
Now, when this happened it had been a while since I'd mowed the lawn across the street, and I began to notice that the neighbors never seemed to be home anymore. They had trash sitting out back, but it never moved. Leaves accumulated and blew away with the wind (not too many leaves though, most of the trees around us had pine needles), but nobody went in or out. About this time my parents decided that they needed to move back north so we started trying to sell the house. My mother ordered me across the street to mow the neighbor's lawn so that people wouldn't be freaked out by the foot high grass growing there.
It annoyed me that I had to mow both the neighbor's lawn and our lawn without being paid, but at the same time while I was edging around those scraggly rose bushes I kept wondering over and over again what happened to the people in the house. Did they all die in a car wreck? Were they evicted? Or maybe (in the wild imagination of my childhood) they were all dead behind that big picture window that they'd covered so nobody could see in or out of. Corpses turning to skeletons and nobody would notice for a very long time because my parents were making it look like someone lived in the house across the street.
Silly, really.
But not that much stranger than having everyone die in a car wreck and then not having any relatives come and sell off your house when you were gone.
So, every once in a while I think back and wonder what happened to them.
So, I get my code working that streams models off disk[0], my ex-wife leaves town, I run into a girl who I've been attracted to[1] for a long time but haven't seen in months (and spent a goodly amount of time flirting with her), my office party turns out to be not awful[2], and then I wake up after the best night's sleep I've had in months to discover we captured Saddam Hussein. And now my apartment is rapidly trending toward being clean.
I've had better weekends, but this one has done an awful lot to restore my faith in the world we live in.
Eh... probably Monday I'll find out that terrorists have killed thousands of people and the world is on the verge of collapse[4], but, Mondays are like that and I'll let Monday be Monday. For now I'm going to become pleasantly addled on wine and feel good about the entire world.
--
[0] My code rocks. I saved the game. Go me!
[1] Red hair, green eyes, thin, highly intelligent, energetic, outgoing, gainfully employed...
[2] 80s themed party. Was strangely fun[3].
[3] I blame the alcohol.
[4] Or, even worse, something's wrong with my streaming code.
I've lost over 40lbs, and I've kept it off for over a year.
I just thought I'd start with that so that you'd know that I wasn't completely talking out of my ass.
A great number of years ago I took some Aikido lessons. I enjoyed the lessons, but the location changed and I was unable to continue them. When I went to college I found more Aikido lessons, but the instructor was an ass[0] and I'm very glad to say that I did not continue taking lessons from him. However, in the previous location I did encounter a good instructor[1].
One of the most basic things that you do in Aikido is to stand up[2].
Not the standard motion that you think of as standing up. Normal people stand up by using their arms and legs in a step by step process where you slowly build your way from the floor up to a distinctly vertical position.
Not in Aikido.
You're supposed to do this graceful roll forward where you use the top of one of your feet to lift yourself up to a standing position. I tried it several times. I went (gracefully) from a position (gracefully) on my back to a position where I was sitting with one foot planted firmly (yet gracefully) on the floor and the top of my foot painfully (and gracefully) pressed against the ground... and my ass firmly (and quite gracefully) upon the floor.
The instructor looked at me and told me not to try to lift myself. He told me to try to roll forward and to just happen to let my front foot get in the way so that I happen to lift.
I tried it. And it worked. I gracefully rolled up into a standing position. It was almost effortless.
And that's why I want to talk about what's wrong with dieting.
Dieting is what's wrong with dieting.
If you're starving to death your body doesn't want to die. So it tries to hang on to it's long term food supply (fat) and burns the thing that eats the most calories that it can easily rebuild (muscle). Reducing your calorie intake is painful. It's starvation. You're biologically conditioned by millions of years of scarce food to not want to do it. It's like being told by the most sexually desirable person you've ever met that they like you very much "as a friend".
It sucks.
Now in my mind (and I am the guy who lost 7 inches off his waistline ) the two keys to losing weight are as follows:
1. Don't try to lose weight, try to alter your body composition.
2. Find exercise that you enjoy, and then do it.
Altering your body composition doesn't have the same "you're a fat person and therefore a bad person" psychological baggage attached to it as dieting. When you alter body composition you say: "I want to be strong. Being strong is cool and it means I burn more calories just by being alive." Losing fat is a side benefit of gaining muscle.
If you're seriously working out you can eat a bacon chilli cheese burger and a chocolate shake for lunch and you can still lose fat[4]. In fact, one of the weird things that can happen if you work out heavily is that you can find yourself not eating enough.
This isn't to say that you get to ignore what you eat and pig out on pasta & ice cream (although, hopefully, nobody eats those together as an entree). Rather, you start to focus on building yourself into something better.
And that's the key. You're building yourself up. You're not trying to tear your body down. You're not a bad person because you have %25 or %50 or %75 body fat. You're a highly adapted organism who needs to manufacture muscle in order to be strong. You don't need to lose 5 pounds. You need to lift 5 more pounds.
Needing to lift 5 more pounds is a goal, needing to lose 5 more pounds is an indictment.
I don't know you[5] so maybe my path isn't for you[6]. But I did gracefully roll to a standing position, and I did lose over 40 pounds without starving myself. So, even if you don't like lifting weights[7], you can start to look at your body as the complex machine that it is. Fat isn't a problem. Fat is a situation. It's a surplus of stored energy. It's an opportunity. Go cash it in.
---
[0] First of all, he didn't know what "Sensei" meant. Secondly, he was teaching a throw and he torqued my arm around and I didn't fall down. I calmly stood there while he twisted at my arm and he finally yelled at me "If you don't fall down you're just inviting me to twist harder and hurt you". I smiled, pretended to fall, left class and never went back.
[1] There was one incident where I fell and should have wound up embarrassed and possibly injured, but due to training I turned the whole thing into a graceful dive roll. For that I thank the instructor I encountered near Appleton, WI.
[2] This is my own personal experience. YMMV IANAL GALYPF[3]
[3] Get A Life You Pedantic Fuck
[4] By "seriously working out" I mean that you're hitting the gym 3-5x per week for an hour of exercise (or some equivalent). I know when I've hit that point because I get this intense burning hunger that I last naturally felt when I was in my last growth spurt as a teenager.
[5] Well, I know some of the people who read what I write.
[6] There are lots of valid paths. Some people I know (Kasia) run half marathons and don't like weight lifting and look amazingly sexy. The key here is attitude. You find a positive path where you want to go someplace and you go there. Don't try to change yourself, rather, pick a positive goal and go for the goal.
[7] Strictly speaking, I do not like lifting weights. I like being strong. It's like condoms. I don't like condoms, I like having sex without getting pretty girls pregnant or getting unpleasant diseases.
In case anybody noticed and was wondering, this site was down last night due to the server being physically relocated or some such.
In other news, in an ironic moment I did actually manage to implement streaming of models off disk in the original 3 days that was allotted to my schedule (this was a filler number that someone had dropped in during schedule creation). The debugging, restructuring, and general polishing that's associated with the streaming will easily eat the rest of the 3 weeks that is now on my schedule.
Incidentally, vehicle tires are now my favorite proxy object. They're much lower poly than a teapot, have discernable orientation, and (best of all) pretty much all objects look really silly when they're composed of tires.
Sadness is seeing a pure Abstract Base Class[0] that is the parent[1] to a vast number of classes, each of which have the exact same lines of code to implement the abstract virtual methods... with the exception of one subclass which implemented the abstract method as follows:
virtual MyClass* MyMethod() { return NULL; }
Happiness is finding an excuse to go refactor that crap into a logical design.
---
[0] Apparently there because, you know, it's, like, object oriented and stuff. And, like, all the cool kids are totally doing it.
[1] It was worse than that, the pure ABC was the child of another class that should've logically held those methods.
Go-Go Gadget Thought Police
I had an overprotective and decidedly republican[0] mother who kept me away from violent movies and video games. So naturally I'm the one who hacked the inventory system on my last game[1] so that when you threw a knife at someone it would stick into your victim, and bullet strikes to critical areas would produce bleeding wounds that would spurt blood until your enemies bled to death[2].
Of course if there really is a correlation between violence and video games (I would note that violence is very much not the same thing as aggression, which is what the studies sited by mediafamily.org are testing for), and there are now vast numbers of children playing violent video games then why has the rate of violence in schools not gone up?
--
[0] Yes, now you know my deep, dark secret.
[1] It's been cancelled. Sorry.
[2] No, my current title doesn't have any of this stuff.
You can always tell when you've worked too many hours over the weekend when you come in on Monday and discover that your trashcan is full of food containers.
On the bright side my streaming code seems to be working.
So I came in this morning and noticed that Taito is re-releasing Space Invaders.
Well, damn.
That just beats the crap out of the game I'm working on, I guess we'd all better give up this game programming thing and go program bank databases in COBOL.
I went to an art exhibition with live music that gradually turned into a burning man-esque dance type of thing as the evening went on. It was lots of fun except for the part where someone hit me in the head with a stick during the part where someone's artwork was being rhythmically disassembled[0] (by the artists and willing audience members), but that's the price I pay for participating in art[1]. And since it's likely that she's the reason I wound up going to the thing in the first place I'll plug Wonder's t-shirt. (Yes her name actually is "Wonder").
I'll tell you one realization I had tonight: I'd totally give up C++ in favor of an interpreted language if it could be done in front of a crowd and have a significant chance of impressing & interesting scantily clad women.
--
[0] Read: being hit... a lot... so that it breaks apart. Then take the broken pieces and distribute them to people who will rhythmically beat on more parts to make new broken pieces.
[1] We'll call it art. I don't care if you don't think it's art. I had fun hitting things with sticks along with 20 other people.
Every once in a while I find something that reminds me just how good life is here in the United States. And as bad as some people are, they could be so very much worse.
*ring*
"Hi this is <name> from <art related recruiting agency nobody's heard of before>, how are you doing today?"
"I'm fine"
"We've heard you've announced a new title with <publisher A>, um <title that we showed at E3 and isn't with publisher A>? Right, and you probably want to stick through the end of the project, but maybe you don't, and in any case I was hoping I could send you my contact info"
"I'd really rather not receive your contact info."
"Oh really?"
*click*