Thursday, September 21, 2006

Global warming, oxygen deprivation, and autism.

Global warming is a fact that scientists and most other educated people have come to accept. We hear people all the time talking about increases in the levels of greenhouse gasses in our atmosphere, however there is an interesting side effect of increased levels of CO2 and other gasses in our atmosphere and that is a relative decrease in the amount of atmospheric Oxygen. I've always wondered why nobody talks about this. It seems so obvious to me that I'm surprised I couldn't find anything on this topic when I did a Google search. Any time you have a mixture of something, then add a bunch of something else, you end up diluting the overall concentration of whatever was in the mixture to begin with. This is true for liquids and gasses and anything else that is subject to brownian motion and/or fluid dynamics. So I've been wondering when I would start hearing people talking about the decreasing levels of Oxygen in our atmosphere, relative to CO2. I've also long suspected that this decrease in atmospheric Oxygen will begin to manifest itself as a variety of human health problems. Well, here's my first stab a finding a link between a human disease and lower Oxygen levels. I recently stumbled upon this article, which describes a potential link between Oxygen deprivation and Autism. I also found some articles on using Hyperbaric Oxygen therapy to treat autism, with much anecdotal evidence to support its efficacy. So, if there is a link between oxygen deficiency and Autism, could it have something to do with a decrease in the concentration of atmospheric oxygen? I don't know, but I suspect that we will begin to hear more about the link between oxygen levels and human behavior. Autism is just one of many potential symptoms of oxygen deprivation. Many previously unknown illnesses have been springing up over the last century, notable for their idiopathic qualities. It is becoming increasingly common for large numbers of people to report constant feelings of fatigue and other symptoms that could be attributed to Oxygen deficiency. Doctors have no clue what is causing most of these problems despite decades of searching for viruses, bacteria or other pollutants that could be causing them. Of course nobody has even bothered to see if the actual composition of the atmosphere could be causing these things. Changes in Oxygen availability have long been known to have direct effect on metabolism. So why isn't anyone talking about this? Probably because it's just too damned scary for most people to deal with. I've always been against child birth due to the massive overpopulation problem facing current and future generations. I think Bill Hicks said it best when he said, "Can you calm down on your rutting just for a couple of seconds until we can figure out this food, air deal?" Apparently not. Even my supposedly well educated friends insist on perpetuating this global catastrophe that is "the miracle" of childbirth. I guess it's only fitting that their children will be the ones to suffer the most as we run out of food, water and air. Okay, we probably won't run out of water...hell, practically all of Greenland is covered in potable water, but the whole food/air issue is definitely in everyone's future, that is, eveyone who plans to be alive in 20 years. I think it's about time we started talking about it and doing something about it. I'm all for doing what the Chinese did when they couldn't feed the ridiculous number of children they used to produce. As far as I'm concerned, anyone with more than one child is an outright environmental terrorist. When the sheer number of your babies starts affecting my ability to breath air, that's where I draw the fucking line. But first we need proof, so atmospheric scientists of the world, I call on you to figure out what the hell is going on with our Oxygen levels and to start sounding the alarm if my suspicions are correct. I would also love it if someone could disprove my theory, because this shit keeps me up a night and I'm starting to feel a bit short of breath.

Tuesday, September 12, 2006

The Macromedia Flash Docs are utterly reprehensible!!!

I've been a Flash developer for over 9 years now and throughout that time, I have longed for acceptable documentation from Macromedia. Each new version of Flash adds a myriad of poorly documented features while generally failing to improve the documentation on existing functions. I will now provide a perfect example of what I mean. The (relatively) new v2 component architecture specifies that you should not set the depth of new component instances the way you used to using getNextHighestDepth(), but instead should rely on the new DepthManager class to instantiate and manage components on the stage. Well, here are the docs that explain that. We will assume for the moment that you actually managed to find the Macromedia Component Language Reference after your failed expedition to the regular Actionscript Reference. After finding the docs for the DepthManager class and then stumbling upon the actual function you need to use, you would finally end up at this page:

http://livedocs.macromedia.com/flash/mx2004
/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00002429.html


Which gives this information....

DepthManager.createClassChildAtDepth()
Availability
Flash Player 6 (6.0.79.0).

Edition
Flash MX 2004.

Usage
movieClipInstance.createClassChildAtDepth(className, depthFlag[, initObj])


Parameters
className A class name. This parameter is a of type Function.

depthFlag One of the following values: DepthManager.kTop, DepthManager.kBottom, DepthManager.kTopmost, DepthManager.kNotopmost. All depth flags are static properties of the DepthManger class. You must either reference the DepthManager package (for example, mx.managers.DepthManager.kTopmost), or use the import statement to import the DepthManager package.

initObj An initialization object. This parameter is optional.

Returns
A reference to the created child. The return type is UIObject.

Description
Method; creates a child of the class specified by className at the depth specified by depthFlag.

Example
The following code draws a focus rectangle in front of all NoTopmost objects:

import mx.managers.DepthManager
this.ring = createClassChildAtDepth(mx.skins.RectBorder, DepthManager.kTop);


The following code creates an instance of the Button class and passes it a value for its label property as an initObj parameter:

import mx.managers.DepthManager
button1 = createClassChildAtDepth(mx.controls.Button, DepthManager.kTop, {label: "Top Button"});
The first example they give, isn't even testable without first creating a bunch of other code. And if you are dumb enough to try the second example, you'll quickly see that it DOESN'T FUCKING WORK! In fact, it's so far off base, that I spent an ENTIRE FUCKING WEEKEND trying to get it to work as documented. Rest assured it does not.

Now please visit my post on Flashkit.com to see how it is acutally done:
http://board.flashkit.com/board/showthread.php?t=702902



So you can hopefully see now, why it has taken me 3 days to display a progress bar and then destroy it when I'm done with it.

Adobe has a major problem on its hands with these docs. As Actionscript 2 is now evolving into Actionscript 3 with different flavors for Flash 9, Flex, Flashlite, etc... it is going to become increasingly impossible to code actionscript. Adobe should fucking drop whatever they are doing on the development side and put 100% of their efforts into fixing the doc system before writing another line of code. I honestly can't believe they've made something so simple into such a complicated mess. What the fuck is wrong with a single centralized HTML-based documentation system like PHP uses? Instead of spending hours combing through one of 4 different language references depending on whether you're looking for component docs, or core docs, or remoting docs, etc.....why can't I just go to a fucking web page with the name of the function I'm looking for and get ALL the docs related to it? Imagine a world where you could go to http://www.adobe.com/actionscript/createclasschildatdepth and actually find what you are looking for along with actual working examples contributed by users? When was the last time you found something useful in the Macromedia user comments on a specific doc page? More often than not there are NO comments whatsoever. This is why I can write a complete application in PHP in a day and the same application takes me a month to do in Flash. It's absolutely pathetic and unforgivable. Is anyone at MM/Adobe listening? Have they ever tried to use their own software? I can't say enough bad things about the Actionscript docs, so I won't continue this tirade. I just wish they'd hire someone that knew what they were doing and didn't treat the act of finding a function reference so much like a god damned treasure hunt!