Previous Entry Share Next Entry
Yay for open source, even if it's bad open source
device
jducoeur
Flash is, as all programmers know, Adobe's system for drawing pretty things on the web. Flex is Flash's library that adds the objects you need for serious programming. With that in mind:

- Flex 3 is OMG full of bugs. And I don't mean subtle bugs that you look at and go, "Oh, well, that's a third-order effect, and I completely sympathize." No, I mean bugs like the following. (Note that this is real code -- numeric and caseInsensitive are booleans.)
if (numeric == true)
  _compareFunction = numericCompare;
else if (caseInsensitive || numeric == false)
  _compareFunction = stringCompare;
else
{
  ...
Needless to say, the "..." runs another 30 lines, and is what I *want* to have happen, but is impossible to invoke, due to somebody failing to take Boolean Logic 101.

(Yes, I know that we should update to Flex 4, which probably fixes this bug. We eventually will, but circumstances prevent it right now.)

+ Flex got open-sourced by Adobe, and so long as you properly license the Pro package, you get the magic keys needed to read even the source code that *isn't* quite so open. So at least I was able to find this bug fairly quickly, and work around it.

Moral of the story: the moralistic arguments aside, open source is a good way to keep your customers happy. Because if I *wasn't* able to dig into the source, figure out what's going on and work around it when I hit problems, I likely would have thrown up my hands in disgust and switched to Silverlight ages ago. But being able to see the internals and work with them gives me a lot of extra power to really grok what's going on in these libraries and use them to their fullest, and not spend *too* much time roadblocked when I hit bugs...

  • 1
What is the relative precedence of || and == in Flex? Could be that the second comparison isn't doing what you think it's doing...

Hadn't thought of that, but I don't see it -- it seems to me that, either way you slice the precedence, one of the first two clauses will always invoke, so the third never will. (That is, if numeric is true, the first will invoke; if it is false, the second will regardless of operator precedence. Am I missing something here?)

  • 1
?

Log in

No account? Create an account