That was the question asked by one of the almost 20,000 students in my Coursera course. He wanted to know the purpose of this mess. A perfectly legitimate and good beginner question to ask!
However, I must admit that I’ve never heard it expressed that way before: a mess! So, today being Friday (and April 1st!), my overactive humor gland started pumping out all kinds of ideas for how I could have answered that question.
So, here are the TOP TEN REASONS with which I could have answered the question of For What Purpose Is jQuery’s Min Code Such a Mess?!
#10. That code was written before there were code style guides.
#9. It IS a mess! I’ve created an issue for the jQuery team to fix this immediately!
#8. That’s John Resig’s URL-encoded soul… DO NOT. CHANGE. ANYTHING!
#6. Are you using Windows? Try restarting the computer and see if that issue goes away.
#5. If you get good enough, you’ll be able to write code like this one day. For now, just use spaces, I guess.
#4. Do you use anti-virus? That looks like the Minification Virus at work. That’s been going around lately.
#3. Oh, I fell asleep on my keyboard while looking at that file. I roll around in my sleep. Sorry!
#2. It’s an encrypted message to the browser to behave itself. That’s why jQuery works so well across all browsers.
And the #1 reason is…
#1. The purpose? Job security! We cover that in the “How to Write Code For Job Security” lecture in the next module.
Do you have an answer you want to share? Leave it in the comments below!
Happy End of the Week! 😃