Naming conventions and obfuscation


Just fixed a nasty bug that was caused by the fact that we had added a new XML element and an ActionScript class that had exactly same names. This ifself wouldn’t cause any problems but when the code was run through an obfuscation software the problems started. The part of the code where we were actually referencing to this child element in the XML, not the class with the same name, got also obfuscated and naturally it then didn’t match the XML files read in.

The solution for the problem was as easy as to simply follow common naming conventions – start the names of the classes with upper case letters and the names of XML elements with lower case letters. After converting the names of the new XML elements to start with lower case also the obfuscated code started to work fine again.

Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: