DHMO is something that most of us are in contact with on a daily basis, but we often don't consider the dangers. It has now come to my attention that there exists one UEAC DHMO Research Division, a group of upstanding citizens looking out for our best interests. Just as a snippet of the data within, did you know that...
- DHMO can cause death even in small quantities when inhaled
- Prolonged exposure to DHMO can cause severe tissue damage and burns
- DHMO is a major component of acid rain
- DHMO leads to corrosion and oxidation of many metals
- DHMO is often associated with disasters such as hurricanes and other disasters
- DHMO is present in the vast majority of beverages
- DHMO is found in substantial quantity wherever people live
But here at Ruminations of a Wanderer, we're not all about sensationalism and scare tactics. Well, ok, maybe just a little. We prefer you to Make Up Your Own Damn Mind (TM). For those who don't like clicky text links, the upstanding citizens at dhmo.org have provided us ith the following banner:
2006/11/29
2006/11/28
Programming Evil #143
I hope everyone had a good holiday weekend but that's not why we're here. Oh no. We're here to talk about programming evils and in true rant style I'm going to number these but not in any rational way.
I've found a simple piece of code that seems benign enough (details hidden to protect the guilty):
Astute readers might note that if szGetMapName() happens to return a really big name or a NULL, that bad things might happen to the game. Me, in an attempt to be a good worker bee and concerned with security, decided I'd change it thusly:
except that this now errors out on every overrun rather than crashing. Better, but still not what I was going for. Note that standard C snprintf does not error out or anything weird. It is, in fact, quite a well-behaved function. We've overridden snprintf to our own crazy version of snprintf that errors on buffer overflow. Our version is not quite so well-behaved.
I hereby christen this as Programming Evil #143: If you override standard functions, don't change the functionality!
In this particular case, the chance of buffer overrun is almost nil and the function played by szGetMapName() can't return NULL and the define played by BUFFER_SIZE is pretty big making it exceptionally hard to overrun it. Regardless, I wanted to make it more bulletproof--an attempt that has been quite thwarted.
I've found a simple piece of code that seems benign enough (details hidden to protect the guilty):
byte buffer[ BUFFER_SIZE ];
sprintf( buffer, "map_path/%s", szGetMapName() );
Astute readers might note that if szGetMapName() happens to return a really big name or a NULL, that bad things might happen to the game. Me, in an attempt to be a good worker bee and concerned with security, decided I'd change it thusly:
byte buffer[ BUFFER_SIZE ];
snprintf( buffer, sizeof(buffer), "map_path/%s", szGetMapName() );
except that this now errors out on every overrun rather than crashing. Better, but still not what I was going for. Note that standard C snprintf does not error out or anything weird. It is, in fact, quite a well-behaved function. We've overridden snprintf to our own crazy version of snprintf that errors on buffer overflow. Our version is not quite so well-behaved.
I hereby christen this as Programming Evil #143: If you override standard functions, don't change the functionality!
In this particular case, the chance of buffer overrun is almost nil and the function played by szGetMapName() can't return NULL and the define played by BUFFER_SIZE is pretty big making it exceptionally hard to overrun it. Regardless, I wanted to make it more bulletproof--an attempt that has been quite thwarted.
2006/11/18
I Suck At Colors
I used to play WoW--a lot of WoW. I got better. My first character was a paladin who I took to 60 followed by a 60 mage and a 60 priest, the latter two hordeside. Alena was my paladin, retired around August of 2005 after 10 months of nearly constant play.
Yeah, I played a girl and no, I don't have a problem with that. I'm in fact stunned and amazed at how many people do. Go here if you really need an explanation.
People don't believe that I was an artist once. It was a long time ago, but still. I'm way out of practice and there's a mess of things I never learned to do correctly (like colors) and I figured it was time. My art tends to go in spurts much like my other hobbies. This is a doodle I did in a margin of some other piece that I liked. It took far too long to clean and color and, sadly, most of the interesting details seem to be missing after resizing.
Yeah, I played a girl and no, I don't have a problem with that. I'm in fact stunned and amazed at how many people do. Go here if you really need an explanation.
People don't believe that I was an artist once. It was a long time ago, but still. I'm way out of practice and there's a mess of things I never learned to do correctly (like colors) and I figured it was time. My art tends to go in spurts much like my other hobbies. This is a doodle I did in a margin of some other piece that I liked. It took far too long to clean and color and, sadly, most of the interesting details seem to be missing after resizing.
2006/11/14
I *HATE* the Fine Print
I don't care about street cred. I don't care about particularly making any money off of anything I publish myself from now until I'm no longer gainfully employed. What I do care about is learning about my craft. In particular, I want to know what it takes to bring a personal project to market as a product and I'm certainly not going to learn that at my day job. There is a tremendous amount of effort involved there. Beyond my college comic book misadventures, I haven't ever seen that. I'd bet that most people haven't and that's a damned shame. I think that if more people had experienced shipping a product--their product--that we'd see a lot more consideration from the general populous. All too often we assume that things we don't understand are trivial and that is very often not the case.
For those not intimately familiar with my past job decisions, the last time I changed jobs I chose this one over the other largely due to issues with their non-compete clause. It basically read "you can't work in the games industry for two years after you leave our employ" which was not at all acceptable (this is why I read everything). They gave me every assurance that this wasn't something they'd ever do except in very particular circumstances and that the chances of my ever being held to that were exceptionally slim. If it was such a statistical improbability, I wanted it out. They wouldn't budge. I now work elsewhere. I was informed that this policy was changed to only apply to a small geographic area as a direct result of the stink I made. I'd like to think I did the others in my chosen field a good deed but, honestly, few people read or really understand the legal and binding contracts they sign when they take a new job.
Today I learned that any programming work I do is owned by my corporate overlords including those done outside the scope of my employment. The legalities of this are sadly unarguable even if they are imprecise and likely unenforceable. At the end of the day, if they want to put legal pressure on me they sure can and there's no way that I'd be able to survive that financially.
Given that my current employer can fire me at any time with or without reason, I don't particulary see a strong need for them to also be able to take anything I do outside of work. That just seems...wrong--especially when you consider mandatory overtime and a stagnation of professional skillsets that myself and my co-workers tend to suffer. I do on the other hand, understand what it is that these policies are trying to protect, it's just that I think they a) aren't really true to the intent, b) are a little intrusive and thus disrespectful to employees, and c) kind of do a crappy job anyway.
Learning that all programming work I do is owned by my employer comes as news to me--I thought I understood that part of the law. It all hinges, I suppose, on what the "scope of my work" really is. If that includes my hobby work at home then I think I might be entitled to more than I currently make (I write a *LOT* of code at home). I don't think that this was the intent of the law but I'm also not a laywer. I think it's silly that I'd need to be to answer the question: "who owns the work I do outside of work".
Next time around (if there is one) I'm going to be a lot more careful. But I suppose that's how we learn: screw something up bad enough and you'll know to watch for it next time.
For those not intimately familiar with my past job decisions, the last time I changed jobs I chose this one over the other largely due to issues with their non-compete clause. It basically read "you can't work in the games industry for two years after you leave our employ" which was not at all acceptable (this is why I read everything). They gave me every assurance that this wasn't something they'd ever do except in very particular circumstances and that the chances of my ever being held to that were exceptionally slim. If it was such a statistical improbability, I wanted it out. They wouldn't budge. I now work elsewhere. I was informed that this policy was changed to only apply to a small geographic area as a direct result of the stink I made. I'd like to think I did the others in my chosen field a good deed but, honestly, few people read or really understand the legal and binding contracts they sign when they take a new job.
Today I learned that any programming work I do is owned by my corporate overlords including those done outside the scope of my employment. The legalities of this are sadly unarguable even if they are imprecise and likely unenforceable. At the end of the day, if they want to put legal pressure on me they sure can and there's no way that I'd be able to survive that financially.
Given that my current employer can fire me at any time with or without reason, I don't particulary see a strong need for them to also be able to take anything I do outside of work. That just seems...wrong--especially when you consider mandatory overtime and a stagnation of professional skillsets that myself and my co-workers tend to suffer. I do on the other hand, understand what it is that these policies are trying to protect, it's just that I think they a) aren't really true to the intent, b) are a little intrusive and thus disrespectful to employees, and c) kind of do a crappy job anyway.
Learning that all programming work I do is owned by my employer comes as news to me--I thought I understood that part of the law. It all hinges, I suppose, on what the "scope of my work" really is. If that includes my hobby work at home then I think I might be entitled to more than I currently make (I write a *LOT* of code at home). I don't think that this was the intent of the law but I'm also not a laywer. I think it's silly that I'd need to be to answer the question: "who owns the work I do outside of work".
Next time around (if there is one) I'm going to be a lot more careful. But I suppose that's how we learn: screw something up bad enough and you'll know to watch for it next time.
2006/11/13
2006/11/12
Broken Tools Redux
So...
I'm not a fan of Visual Studio 2005 by any means. Before I started this recent round of home programming, I had about a week when I thought that maybe just maybe I should finally upgrade past VC6. So amongst other options, I downloaded VC2K5 Express, the C++ version and was almost instantly disappointed. It doesn't do plugins. It doesn't do source control integration. I'm pretty attached to VisualAssist and no plugins kind of kills that, but no source control is where I draw the goddamn line. I realize that VC2K5 is free but come ON. No source control? So that was pretty much the end of that.
Fast forward to today, now about 2.5 months later...
I'm trying to do some sound stuff. I have the DX9 SDK installed. All of its samples have 2K3 and 2K5 solutions and not a dsw in sight. "Aha!" I say. "I've got 2K5 Express installed! I knew I didn't uninstall that crap for a reason!" Yeah. As it turns out, the express edition also doesn't come default with some important headers that you just might need like, say, <windows.h>. I'm dumbfounded even more than I was.
As it turns out, I totally missed the part in the installation instructions to install the Platform SDK. I dunno how I managed that but hey, I'm not good at following instructions. They even have a page with instructions on how to do this but it does involve hacking up files in the Express install. No clue why they don't install the basic stuff with it but then again I may be insane and the cab download is 400 megs.
Don't want to burn a disc (my burners are flaky) so I download the 17 cab files conveniently in 25 meg chunks and then the extractor which doesn't work. You need to give it a parameter which the extractor doesn't have, oh, and you have to rename it if you want to run it from the command line because it's got a - in it which isn't kosher. And forget trying to put it on your desktop--the extractor can't handle spaces (thank god it spews paths so I could find the extracted installer). And insult to injury: the 2K5 solutions for the samples I was trying to compile were missing libraries.
As it turned out, it took longer to make my dev environment do what I need than it was to write the code to load WAVs and play sounds.
I'm not a fan of Visual Studio 2005 by any means. Before I started this recent round of home programming, I had about a week when I thought that maybe just maybe I should finally upgrade past VC6. So amongst other options, I downloaded VC2K5 Express, the C++ version and was almost instantly disappointed. It doesn't do plugins. It doesn't do source control integration. I'm pretty attached to VisualAssist and no plugins kind of kills that, but no source control is where I draw the goddamn line. I realize that VC2K5 is free but come ON. No source control? So that was pretty much the end of that.
Fast forward to today, now about 2.5 months later...
I'm trying to do some sound stuff. I have the DX9 SDK installed. All of its samples have 2K3 and 2K5 solutions and not a dsw in sight. "Aha!" I say. "I've got 2K5 Express installed! I knew I didn't uninstall that crap for a reason!" Yeah. As it turns out, the express edition also doesn't come default with some important headers that you just might need like, say, <windows.h>. I'm dumbfounded even more than I was.
As it turns out, I totally missed the part in the installation instructions to install the Platform SDK. I dunno how I managed that but hey, I'm not good at following instructions. They even have a page with instructions on how to do this but it does involve hacking up files in the Express install. No clue why they don't install the basic stuff with it but then again I may be insane and the cab download is 400 megs.
Don't want to burn a disc (my burners are flaky) so I download the 17 cab files conveniently in 25 meg chunks and then the extractor which doesn't work. You need to give it a parameter which the extractor doesn't have, oh, and you have to rename it if you want to run it from the command line because it's got a - in it which isn't kosher. And forget trying to put it on your desktop--the extractor can't handle spaces (thank god it spews paths so I could find the extracted installer). And insult to injury: the 2K5 solutions for the samples I was trying to compile were missing libraries.
As it turned out, it took longer to make my dev environment do what I need than it was to write the code to load WAVs and play sounds.
2006/11/09
Broken Tools
Nothin' in the world like a good rant...or a bad one. If you're squeamish, you might want to look away.
To go with the 360 we use VS2K5 as is required by Microsoft. Since then I've noticed the following things that are broken which annoy the bejeezus out of me:
Bookmarks will sometimes persist even when I remove them even through reloads/reboots, often in completely incorrect places.
Go To Definition often does not function properly. Going to the declaration of the pure virtual method is not what I want! It used to give a list to resolve ambiguities; I'm not sure why that's not proper now.
It will randomly reset all my keyboard settings. I'm very particular about these and rather than reset them (sometimes every 10 minutes) I've accepted the loss in productivity vs. using the annoyingly user-hostile keyboard configuration dialogs to reset them yet again. The annoyance is especially apparent when I go home and work there where VC6 suffers no such issues!
It will randomly reset my toolbars. This would not be such a problem if my custom one was saved. I gladly heralded the return of the Pop Context widget but I end up having to hunt for it in the mess of other widgets to rebuild that toolbar on a semi-weekly basis.
Breakpoints will often be randomly added, sometimes in illegal places. I can't get these to go away except by removing all breakpoints in the project--some of which I actually need. Merely disabling them does not work reliably. This is especially irritating when it halts program execution or crashes because the bookmark is in a Bad Place (TM).
If I ever stop compilation to fix an error (can't save a file in the project during compilation and our project can take up to 10 minutes) I have to do a full build--it will corrupt the intermediate build files in non-obvious ways and I'll end up trying to track down an obscure bug that doesn't really exist.
I have a dual head system at work and I put some of my windows on a different monitor. The program will sometimes randomly move those windows around between runs, between starts, and sometimes even when I get back to work in the morning. I spend a ridiculous amount of time re-positioning and re-adding tabs.
It is extremely unstable. It will often take 10-30 minutes to crash even if I kill it from the task manager. My days tend to not be productive anyway because of poor workflow and environmental concerns but this is clearly not helping.
Some of these may have solutions but I sure as all hell can't find them (and yes, I've looked quite extensively). The IDE is a tool that I rely on to do my job. Developers tend to be NOT HAPPY when it doesn't work a lot of the time.
Along the same lines, we recently upgraded to IE7 for security reasons. IE7 is far less mission critical for what I do but still has the annoying habit of completely losing some of my bookmarks! They're not 100% lost--oh no, that would be far too easy. They're still there in my favorites list with the correct name and everything. They just have completely lost the URL they were charged with safeguarding.
I've got dozens of places that I go to look for stuff and I often can't remember all the URLs--I'm old, it happens. If only we had the tools and technology to keep a proper list of URLs inside our browsers!
To go with the 360 we use VS2K5 as is required by Microsoft. Since then I've noticed the following things that are broken which annoy the bejeezus out of me:
Some of these may have solutions but I sure as all hell can't find them (and yes, I've looked quite extensively). The IDE is a tool that I rely on to do my job. Developers tend to be NOT HAPPY when it doesn't work a lot of the time.
Along the same lines, we recently upgraded to IE7 for security reasons. IE7 is far less mission critical for what I do but still has the annoying habit of completely losing some of my bookmarks! They're not 100% lost--oh no, that would be far too easy. They're still there in my favorites list with the correct name and everything. They just have completely lost the URL they were charged with safeguarding.
I've got dozens of places that I go to look for stuff and I often can't remember all the URLs--I'm old, it happens. If only we had the tools and technology to keep a proper list of URLs inside our browsers!
Subscribe to:
Posts (Atom)