Minify before you uglify, you stupid!
“You’ll have to ng-minify the code before you uglify it, you stupid git!”
– I have to make it smaller before I make it uglier?
– Stupid!! The ng-minify makes the code bigger, but the real beauty is in the ugly. What did you use to stich the code? Cram? Gulp’s Cram or Grunt …? And AMD-loader? Oh, curl.js … I like RequireJS better. Because of the upper case abbreviation of JavaScript and the nostalgic legacy code base. The Cobol of AMD-loaders. But you had a good look at those SHA1 hashes before you let that Bower cat drag any of that npm shit into the house, right? Those GitHub gists cannot be trusted with the simplest goto statement.
– I did some consulting work for npm’s PR department once. Came up with a couple of slogans. “If it works today, try tomorrow!” and “Ask again and you might get a different package even if the name and version is identical!” They didn’t use them. Or hire me again.
– The code got smaller, alright. But now it spews out errors impossible to understand.
– Source maps, dude! You’ll have to generate source maps and tell the browser so the code will look exactly like if you didn’t do any of that shit. Just pull it into your Node.js build pipes … There, there … Yea, there and there … and there. A reset there, yea! See, easy. Now set up a LiveReload server and a watch task, grab some pop corn and watch all those errors float by at the very moment your chubby fingers code ’em into the terminal. My answer on this very subject got voted The Answer Of 2013 on stackoverflow (notice: all lower case and the clever use of boldie) so this I know, this I know.
– But the application still doesn’t work!
– That’s because you didn’t test it, idiot! Grab BusterJS and you’re good to go. Made by those Norwegian geezers. Not to be mistaken with Buster the dog or the clown or any framework with lower case js. BusterJS. Or you can have a runsie with Jasmine or Karma. If you like pink … I’m now being told that it’s really named Buster.JS. That dot makes all the difference.
– Oh, you use AngularJS?! Yea, I know it’s got all the right upper cases, but it is the mother load of horse shit turning that nice markup into some turd Tim Berners-Lee’s mother wouldn’t love.
– So that is why it doesn’t work?
– No, it still would have sucked pineapples even if you used Ember.js or jQuery or, God forbid, Backbone.js. Or any of the other names I picked up from Wikipedia.
– …. so, how do I get the application up and running?!
– Well … you could give Clojure a go. Yes, with j, not s. And with a whole new set of problems. It has ClojureScript. That generates … JavaScript. And you will make Rich Hickey even richer.
– You really believe all that name dropping will give you any SEO creds with the algo Gods at Google?
– A man got to dream the dream. Even uglified. And minified.