Fri 8 Jun 2007
Everybody loves Google because they do a great job at everything, but there are two things I noticed on YouTube.com that my fellow flash developers should avoid in their Flash applications.
While watching a video I noticed debug statements appearing in my FlashTracer window. Although it is pretty common to see similar debug statements on websites that have flash content, it should not be common and it is very easy to remove these statements for production content.
99% of these statements were typical, but there were a couple that irked me; look at the two lines of text I highlighted in the left column of this screenshot:

Although it is hilarious to see these statements in code from a reputable company, they still irked me. Not because I was offended by the “bad” fucking language, but because most people know a developer who has been burned by writing these type of statements and they never learn. Google can get away with this because nobody is really going to be offended and they’re their own client. But, when I’m working for a client I follow these two rules:
- Never put anything in your code that you don’t want your client or boss to see.
- When you do comment your code, be professional enough to omit them when you compile for production! Not because the content of the statements might be unprofessional, because having any statements at all in your production code is unnecessary.
Here are some other funny examples of code I have seen in applications that should be omitted for production…
- The connection just got tea bagged - reset and reload
- Fuck bandwidth detection script its taking too long or not working so fuck it hard
- This feature does not work and crashes the player fix laterz
- HACK HACK HACK HACK HACK this scuks
When you compile/publish in Flash, remember to select “Omit Trace Actions” in the publish settings to prevent your trace statements from appearing in the compiled swf.
The best part about the google debug statements, is that you can see them for yourself by installing the FlashTracer add-on for Firefox and the Debug Flash Player, then browse over to YouTube.com and watch a video. And, although I named this post after Google, you could also look at another example of what not to do in this article. It’s about a bunch of unprofessional comments from some Microsoft Win2K source code.
June 8th, 2007 at 4:06 pm
You are aware that this is from the YouTube guys, if this is the old player I can’t tell, and they were a startup. It’s not necessarily Google who is putting in these comments. Nice find though. By the way, can you tell us which player it was? It would be interesting if it is the new one which would be made under the Google name.
June 8th, 2007 at 4:44 pm
Matt, ya you’re right… it could have been the original YouTube guys who put it in there, but it’s Google’s responsibility either way and I’m pretty sure Google compiled the latest player for 2 reasons:
1. It has code in it that is only supported by flash player 9.0.28 (which is a few months old at the most).
2. I did a search to see if anyone else has noticed this and I found someone else blogged about this on Feb 21, 2007 and didn’t mention the “fuck yeah” comment. Then there is a comment at the bottom of the blog from a later date where someone mentions the addition of the “fuck yeah” comment. And of course, Google has owned YouTube since long before Feb 21.
June 13th, 2007 at 9:57 pm
if you don’t like foul language, don’t go into the garage
June 14th, 2007 at 4:48 pm
Seriously, you should stop being such a nerd and get over it. As far as I’m concerened it doesn’t matter and will never matter, beyond the fact that if it just works, no one GIVES A FUCK!
June 14th, 2007 at 7:29 pm
The Mad YouTube Engineer…
Flash developer Chad Upton noticed something unusual about the debugging comments in YouTube’s video player when watching a video on YouTube. While 99% of the debugging comments are “typical”, he said, a few irritating ones got caugh…
June 15th, 2007 at 8:11 am
Meh, a lot of programmers do those things… nothing to get all upset about. Besides, who cares?
June 15th, 2007 at 3:27 pm
Funny catch, but I agree, it’s probably the YouTube guys and nothing Google could have done to catch it. They probably found out here.
I’ve been guilty of this type of mistake a couple times. Once at a big meeting I had a disagreement with the developer team who wanted to release our product w/o a “delete folder” feature. We were using the Sales Manager’s machine to demo @ the meeting. They usually didn’t give me what I wanted (as they didn’t have to deal w/ customers..& their motto was the user is the enemy). They felt the “feature” would delay the product and why was Delete so important? So I gave them a demonstration.
I created a new folder. Typed FUCK. Then sat down.
The CTO was a Hasidic Jew so it kind of shocked everyone in the room that I typed a profanity in middle of this big meeting, but he cracked up laughing and said “Add delete folder to the feature list.”
After the meeting the Sales Manager said he will never let me touch his machine again, as he had a meeting w/ a client and couldn’t do the demo :)
June 15th, 2007 at 6:20 pm
meh. linux guys have had cursing in their kernal source for years. i don’t see how its a problem. i think what you discovered is that “humans” work at google.
June 16th, 2007 at 3:16 am
“but it’s Google’s responsibility either way”
so what is google suppose to go through every single line of code?
simple mishaps so fucking what
June 16th, 2007 at 3:19 am
lol, someone is going to get fired
June 16th, 2007 at 3:22 am
Chad, you’re an idiot
June 16th, 2007 at 4:22 am
It sure is a terrible thing when we find out our software was written by actual human beings. I hope we can fix that soon with robot programmers who will never be so naughty. Can we lighten up?
June 17th, 2007 at 1:18 pm
Thanks Chad!
Being an ex-programmer I can totally understand your point. I don’t think any of the previous commentators “got it.” Its not about the shock value, the words used or anything comparable. It is the simple fact that they used messy programming.
You can have a dirty office, but don’t make your code dirty!
Cheers and thanks!
Jesse G.
Houston, TX
June 17th, 2007 at 6:06 pm
what if a kid read that kind of comment? get rid of them, now
June 17th, 2007 at 7:43 pm
Unprofessional, quite true. But rather amusing, I think.
I know in some of my programs I’ve wrote big explanations of how things aren’t working like they’re supposed to.
June 17th, 2007 at 8:55 pm
Who cares.
June 17th, 2007 at 9:09 pm
In response to the Chad’s an idiot comment, yes I agree, this is what you get now for being a billionaire by selling people content. =D
June 17th, 2007 at 10:46 pm
I can’t agree with the statement “When you do comment your code, be professional enough to omit them when you compile for production!”.
These “comments” seem to be somewhat more like debug statements; Debug statements should not contain bad language if they can possibly be seen by anyone outside the development team.
June 18th, 2007 at 8:23 pm
Quoting jason above, Chad, you’re an idiot.
June 18th, 2007 at 10:26 pm
What is really funny is when the app is developed in india and they are curse in sanskrit…
June 20th, 2007 at 5:34 pm
That’s not funny Dustin, that’s plain sad.
June 20th, 2007 at 7:08 pm
Chad, you’re right. This sort of thing shows a lack of professionalism. The people who want to hide behind “human-ness” are missing the point. The ipod, you-tube generation will need a few decades to understand a few things. Forgive them, for they know not what they do.