Recently a friend and fellow programmer asked me how I learn a new language or platform. I answered that I do it with specific task in mind. Basically, I bumble along googling every little step until I complete my task. But I forgot to tell her about the pitfall of this method… You’re clumsily toddling along on your specific task when you bump into a problem. Using your search engine of choice, you find a forum post where someone asked the same question. And someone kindly provided a solution. And several people chimed in with comments like: “Perfect!” “Thanks!” “Worked like a charm!”
You copy the code from the answer into your dev environment. And… it doesn’t work. You carefully check to make sure you followed all the instructions. Still not working. You hit the refresh/rebuild button again. Nope. You scan through the comments on the answer to see if anyone has any hints. “Worked like a charm!” Argh! Why isn’t it working for you?????
Well, my dear friend, here’s why: “Worked like a charm!” may not mean what you think it means.
Based on my recent attempts to learn certain web development technologies (which shall remain nameless), I’ve compiled a list of possible translations of the idiom. When a commenter writes “Worked like a charm!”, they could actually be saying any of the following:
- “I followed the steps in the answer, plus three additional very important steps that I will not mention here, and it solved my problem.”
- “The answer solved a problem. Not the problem in the posted question, but one I happened to be having.”
- “I pasted the code from the answer into my project, and it did not have any syntax errors.”
- “I pasted the code into my project, and it did not rupture the fabric of space-time (that I know of).”
- “I pasted the code into my project, committed it, went out for beers, and didn’t notice the subsequent commit in which my coworker actually fixed the problem. (Did I mention I’m a 10x programmer?)”
- “I tested the code from the question in Firefox and it worked. I know, I know, the question already said so, and asked for an equivalent that worked in Chrome, but I don’t use Chrome.”
- “I tested the code in a thought experiment and it worked.”
- “One of the other answers worked like a charm. I forget which one.”
- “Typo. I meant to write, ‘Did not work like a charm.’”
- “This answer was equally as effective as a rabbit’s foot, a horseshoe, and a four-leaf clover.”
- “I am an ad network and I get $0.05 for each person who views this answer.”
My dear friend, I hope this answer saves you a little time and frustration. Instead of getting stuck on some solution that allegedly “Worked like a charm!”, you can keep bumbling forward towards the next problem.