A word of warning: when learning a new language, never ever assume anything! Today for work I was trying to integrate a Flash frontend and Java backend using XMLSockets. Another coworker had been working on an XMLSocket’s server in Java and had some XMLSocket code working in Flash (basically a chat-like program). Also, the Java backend was setup to work with the XMLSocket’s program, so I was pretty much set to go. Of course, I had never worked with Flash before and had very little Java experience. So it was a frustrating experience. I had defined a communication structure between the client/server, but for some reason sections of the data was disappearing. I tracked it down to the function and then finally tracked it down to a single for loop. I almost went crazy trying to figure out why a single for loop would cause data to disappear. Then I had this realization: maybe my “i” variable was global! Sure enough, change the variable to “j” and bam, it works. Goes to show that even when you create a variable in a local function, it’s not really global. Lesson learned: never assume anything about a new langauge!