You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Left Right <ol...@gmail.com> on 2012/04/11 19:01:09 UTC
[OT] Pop quiz
~/flex/SDK/4.6/frameworks/projects/framework/src/mx$ find . -type f -name
"*.as" -print0 | xargs -0 -e grep -nH -e " == true" | wc -l
Guess without trying, how many? :)
Sorry, I just had to share this.
On a more serious note - is this in the codestyle guides yet?
Best.
Oleg
Re: [OT] Pop quiz
Posted by Left Right <ol...@gmail.com>.
Ah, OK, cool. I just bumped into one class (StyleManagerImpl) which is
relatively new... and it had plenty of these.
But your comments show it could be much worse :) It's actually only 17. Not
sure this was ever different in AS2, but I guess AS2-ers were more
superstitious then.
RE: [OT] Pop quiz
Posted by Gordon Smith <go...@adobe.com>.
My old guidelines at http://opensource.adobe.com/wiki/display/flexsdk/Coding+Conventions had this:
"Don't compare a Boolean value to true or false; it already is one or the other."
- Gordon
-----Original Message-----
From: Left Right [mailto:olegsivokon@gmail.com]
Sent: Wednesday, April 11, 2012 10:01 AM
To: flex-dev@incubator.apache.org
Subject: [OT] Pop quiz
~/flex/SDK/4.6/frameworks/projects/framework/src/mx$ find . -type f -name "*.as" -print0 | xargs -0 -e grep -nH -e " == true" | wc -l Guess without trying, how many? :)
Sorry, I just had to share this.
On a more serious note - is this in the codestyle guides yet?
Best.
Oleg
RE: [OT] Pop quiz
Posted by "Michael A. Labriola" <la...@digitalprimates.net>.
>Guess without trying, how many? :)
I would guess more than 50. If you look, you can also find things like:
x = 0;
if ( x != 0 ) { }
I am guessing some of this is left over weird type conversion stuff from the as2 code base, but shrug.
Mike