Re:Magic is often used to describe confusing code
by btilly on Monday March 28, 2016 @12:16PM
(#11375132)
You underestimate the bias caused by our initial language. If you're an imperative programmer who has seen some OO, you can learn what map and closures are, but still have no idea what design patterns fit with them. And will be taken aback the first time you encounter them.
The first time I encountered a program that used them in an interesting way, I spent 20 minutes of utter confusion trying to figure out where anything HAPPENED. When I finally found the magic line, I went to the person who wrote it and said, "Why didn't you at least leave a comment!??" He looked at me, slightly puzzled, and said, "What comment would have helped?"
Today these are much more widely understood than they used to be. Mostly because JavaScript forced people to learn it. Though at one point I did have a role in popularizing the concepts in the Perl community with http://www.perlmonks.org/?node_id=34786.
The first time I encountered a program that used them in an interesting way, I spent 20 minutes of utter confusion trying to figure out where anything HAPPENED. When I finally found the magic line, I went to the person who wrote it and said, "Why didn't you at least leave a comment!??" He looked at me, slightly puzzled, and said, "What comment would have helped?"
Today these are much more widely understood than they used to be. Mostly because JavaScript forced people to learn it. Though at one point I did have a role in popularizing the concepts in the Perl community with http://www.perlmonks.org/?node_id=34786.