Alan Hogan

Things Alan Hogan feels like sharing.

These are my comments on music, movies, books, web development and programming, Mac tips, and life in general. Enjoy!

Mon Aug 15
2 layers on top of JS (coffeescript & jQuery), on CSS (Sass), on HTML (Haml). When did programming have to be “pretty” to be good? … CoffeeScript is for people who are too lazy to use their shift key [a reference to typing curly braces and parentheses] and remember what this does.

A PHP programmer (name withheld to protect the ignorant).

This kind of glib comment gives PHP developers the bad reputation they have earned over the years.

  1. CoffeeScript is a layer over JavaScript, but it does more than make code “prettier”. It can seriously reduce repetition and lines of code, while generating highly readable output. After using it for a couple weeks, I get just a bit annoyed when I need to write real JavaScript and find all the parentheses are necessary again.

  2. jQuery is not a layer on top of JavaScript — it’s mostly a wrapper for the DOM — one that makes more sense, is more memorable, is quicker to type, and allows for greater conciseness. Who doesn’t like jQuery at least a bit?

  3. Similarly arguing that Sass (and Compass!) aren’t huge wins for anyone who writes CSS is merely an argument from ignorance. Prettiness?! The preferred, popular Sass syntax is now .scss, which is a superset of CSS. Additional prettiness: Zero.

  4. Haml is more debatable but also reduces repetition and eliminates some opportunities for errors while authoring markup.

  5. Do I even need to comment about this baseless criticism of CoffeeScript?

Comments like this a knee-jerk reaction to the justified language superiority enjoyed by the likes of Python & (especially) Ruby users, for PHP devs to bash anything “pretty”.

The seemingly inescapable conclusion is that a lot of PHP developers are still PHP developers because they are not motivated enough to start using a language that is better designed, and guys like this who pretend their language is “just as good,” if not as “pretty” as others, do nothing more than reinforce such a perception.