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!

Fri Oct 21
(You gotta admit that if Facebook was an actual brand of vacuum cleaners they’d be better than Dyson; they don’t leave a single grain of talent left.) Like putting a bird in a cage when it’s actually meant to live in freedom. Max Voltar (Tim van Damme) is upset. (FWIW: Alan Hogan : Tim van Damme :: Tim van Damme : Mike Matas.)
Thu Oct 6
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.

Fri Jul 22
Sun Jun 26
Every Friday the citizens of Bil’in, Palestine, advance — without throwing stones or using force — up to the separation wall against which they protest. Israeli authorities characterized this step as “bloodless terrorism.” That’s a good one …. Indignez-vousl
Sat Jun 25
How do you feel?” [Governor Cuomo] asked Senator James S. Alesi, a suburban Rochester Republican who voted against the measure in 2009 and was the first to break party ranks this year. “Feels good, doesn’t it? NY Senate votes to allow gay marriage
Wed Jun 8
Sun Jun 5
B&N has optimized the e-ink update method to not require the full-screen “blink” that the Kindle does on every page-turn, but the promo videos are misleading: the Nook does fully blink, but only on every sixth page-turn. If I were to buy an e-reader today, it would be a tough call. I already own Kindle books, but I can’t believe people don’t mind this “blink”. It’s truly ugly. Quote from Marco’s Nook review.
Sat May 28

Simulating the Ternary Operator

x = (falseValue, trueValue)[condition]

That’s how people simulated the ternary operator in Python 2.4 and less. It’s interesting because it uses a fairly unique feature of Python — tuples — to make up for its lack of a language construct equivalent to common C-like-languages’ ternary operator (condition ? trueValue : falseValue).

Of course, now you should never write such obtuse code, given the actual Python ternary has existed for a while (trueValue if condition else falseValue).

Tue May 17
Perhaps this will be used to affix a grocery list which you will forget because you have become absent-minded and, let’s face it, doddering, as you got older. Do not blame this magnet, blame your experimental youth. Magnets are fairly straightforward and this one is no exception. A real magnet you can buy
Mon May 9

[Tornado] ImportError: No module named ioloop

In case anyone is as dumb as I am:

If you are trying to run a Tornado server and keep getting the error ImportError: No module named ioloop, it means you shouldn’t have named your own file tornado.py. There can only be one tornado, and yours ain’t got ioloop. Rename your file to something like serve.py and get on with it.

Sat Apr 30
Now of course we’ll never achieve anything good if we simply walk around saying “Heil Hitler” all day. A Rough Guide to Social Skills for Awkward Smart People
Tue Apr 5
Sun Mar 13