Hacker Blogs
Work in progress: 15,409 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #2367

B

Ben Alman

Personal blog · benalman.comprogrammingweb

Ben Alman's personal blog at benalman.com covers programming and web. Since 2009, 35 different Hacker News readers have linked it 39 times, most often “Ben Alman » Immediately-Invoked Function Expression (IIFE)”. The last post was in 2013, but the archive is still widely read.

Visit the blog
39mentions?
35HN people?
2009–2025first – last linked?
Links on Hacker News per year · peak 8 in 2010

Most-linked posts?

  1. Ben Alman » Immediately-Invoked Function Expression (IIFE)
    7 people · 7 mentions · first linked 2010-11-28
  2. JQuery BBQ: Back Button & Query Library
    5 people · 5 mentions · first linked 2010-04-09
  3. There's no such thing as a "JSON Object"
    3 people · 3 mentions · first linked 2010-10-09
  4. A Bit of Advice for the JavaScript Semicolon Haters
    3 people · 3 mentions · first linked 2013-01-22
  5. /code/test/jquery-run-code-bookmarklet/
    3 people · 3 mentions · first linked 2010-05-24
  6. JQuery Special Events
    2 people · 2 mentions · first linked 2010-04-18

What Hacker News says?

  1. Yes, if I were forced to use JS for loading the primary content I would do that too. There are a couple of options for doing so if you don't want to roll your own (and you don't - it is actually a very complex thing to get working cross browser), JQuery History [1] which is nice and simple, and JQuery BBQ if you need a bit more control. Personally I think it's a little early for pushState, and degrading to #! is rea…

    Comment linking /projects/jquery-bbq-plugin/

    on “Breaking the web with hash-bangs”
  2. Submitted JQuery BBQ: Back Button & Query Library as a story · 57 points

    HN discussion
  3. Only evil people put their return value on a second line... Regardless: http://blog.izs.me/post/2353458699/an-open-letter-to-javascr... Although to be fair: http://benalman.com/news/2013/01/advice-javascript-semicolon...

    Comment linking /news/2013/01/advice-javascript-semicolon-haters/

    on “How to Become a Great JavaScript Developer”
  4. Submitted Immediately-Invoked Function Expression (2010) as a story · 17 points

    HN discussion
  5. I've been looking for some real-world examples of how currying might be useful in javascript. Haven't not used a language which supports currying for any real world project, I'm interested to know how it can help. I found a page [1] which talks about currying in javascript, then says "Are there practical uses for currying in JavaScript? Not really." Can you point me at anything which will help me see why it's useful…

    Comment linking /news/2012/09/partial-application-in-javascript/

    on “Lodash v3.0.0”
  6. Submitted Star-wizzity-wipe in Webkit as a story · 12 points

    HN discussion
  7. You can do it with IFRAME and postMessage communication. (Have the internal IFRAME send out resize data, and that's all you need to handle from the host page.) http://benalman.com/code/projects/jquery-postmessage/example...

    Comment linking /code/projects/jquery-postmessage/examples/iframe/

    on “Every Major Advertising Group Is Blasting Apple for Blocking Cookies in Safari”
  8. Submitted Multiple var statements in JavaScript, not superfluous as a story · 7 points

    HN discussion
  9. This one bit me the other day and forced me to switch JavaScript compressors because the one I was using (it was python-based) didn't get the IIFE ( http://benalman.com/news/2010/11/immediately-invoked-functio... ) right when appending files together. In this blog posting Jacob writes: The majority of lines however don’t end with semicolons because they simply aren’t necessary and I prefer the minimalist aesthetic.…

    Comment linking /news/2010/11/immediately-invoked-function-expression/

    on “Bootstrap's maintainer hates the semicolon”
  10. Submitted JavaScript's Chuck Norris as a story · 7 points

    HN discussion
  11. I believe you can use partial() from this post[1] to do something like this: var processT1 = (isOk, items) => items.filter(isOk).map(toOtherType).flatten(); var processT2 = partial(processT1, isOk); http://benalman.com/news/2012/09/partial-application-in-java...

    Comment linking /news/2012/09/partial-application-in-javascript/

    on “Trine – A utility library for functional programming in JavaScript”
  12. Submitted There's no such thing as a "JSON Object" as a story · 5 points

    HN discussion
  13. It's just a regular JS object. JSON !== JavaScript object notation. E.g. according to the JSON spec, you should always quote property names (`{"foo":123}`) but regular JS doesn't require this (`{foo:123}`). More: http://benalman.com/news/2010/03/theres-no-such-thing-as-a-j...

    Comment linking /news/2010/03/theres-no-such-thing-as-a-json/

    on “Adobe Launches "Adobe Edge" - HTML5 Animation Tool”
  14. Submitted A Bit of Advice for the JavaScript Semicolon Haters as a story · 3 points

    HN discussion
  15. Imo, the most important technique (besides standard ajax with js lib of choice) is making use of hashchange and organizing your behavior into 'routes' based on the hash. You'll notice that Gmail does this -- it has URIs ending with #inbox, #label/action, etc. Using hash routes allows you to keep track of state and decouple event handlers that set state from code that updates the page. Plus you get back button functi…

    Comment linking /projects/jquery-bbq-plugin/

    on “How can I write an interface like Gmail?”
  16. Submitted Ben Alman » Immediately-Invoked Function Expression (IIFE) as a story · 3 points

    HN discussion
  17. It does work in FF4, but it's not widely supported enough to rely on just yet, you're right. I also find the best thing to do is use a hybrid approach (pushState where available, hashbang as a fallback.) If anyone else is interested in implementing this, there are some good frameworks[1][2] to give functionality similar to pushState via the fragment identifier. Note that these constantly poll the hash in browsers th…

    Comment linking /projects/jquery-bbq-plugin/

    on “Its About The Hashbangs”
  18. Submitted Apparently, someone misses Makefiles as a story · 2 points

    HN discussion
  19. Instead of polling, you can define event handlers for <script>'s onload and onreadystatechange event to detect when jQuery gets loaded. See Ben Alman's jQuery bookmarklet generator for an example: http://benalman.com/code/test/jquery-run-code-bookmarklet/

    Comment linking /code/test/jquery-run-code-bookmarklet/

    on “Implementing bookmarklets in JavaScript”
  20. Submitted A Bit of Advice for the JavaScript Semicolon Haters as a story · 2 points

    HN discussion
  21. Let's see if HN allows this long link directly to the generated bookmarklet: http://benalman.com/code/test/jquery-run-code-bookmarklet/?n...

    Comment linking /code/test/jquery-run-code-bookmarklet/?name=Quora+Bookmarklet&

    on “Chrome extension lets you read Quora without logging in”
  22. Submitted Multiple var statements in JavaScript, not superfluous as a story · 2 points

    HN discussion
  23. I found this great little jQuery bookmarklet generator from Ben Alman: http://benalman.com/code/test/jquery-run-code-bookmarklet/ You can just paste this code in and generate yourself a bookmarklet to reveal the quora answers (should work on all browsers). $('.blurred_answer_wrapper').removeClass('blurred_answer_wrapper'); $('.with_signup').removeClass('with_signup'); $('.signup_cta_on_answer').remove();

    Comment linking /code/test/jquery-run-code-bookmarklet/

    on “Chrome extension lets you read Quora without logging in”
  24. Submitted Immediately-Invoked Function Expression (IIFE) as a story · 2 points

    HN discussion
  25. I use this JQuery Bookmarklet Creator all the time: http://benalman.com/code/test/jquery-run-code-bookmarklet/

    Comment linking /code/test/jquery-run-code-bookmarklet/

    on “Make Your Own Bookmarklets With jQuery”
  26. Submitted HN Bookmarklet to make all comments visible as a story · 2 points

    HN discussion
  27. I don't believe this is "the most practical explanation of closures out there" as the author claims, but it does present a use-case. The most important thing to grasp if you're fussed about naming concepts in JavaScript is the difference between a function, a scope [1], a closure [2], and an IIFE [3]. [1] https://developer.mozilla.org/en/docs/Web/JavaScript/Referen... [2] http://unscriptable.com/2011/10/02/closures-…

    Comment linking /news/2010/11/immediately-invoked-function-expression/

    on “Understand closures”
  28. Submitted There's no such thing as a “JSON Object” (2010) as a story · 1 points

    HN discussion
  29. I thought binding to window.scroll was considered bad practice without something like this http://benalman.com/projects/jquery-throttle-debounce-plugin...

    Comment linking /projects/jquery-throttle-debounce-plugin/

    on “StickyMojo: A contained sticky sidebar plugin for jQuery.”
  30. Submitted Multiple var statements in JavaScript, not superfluous (2012) as a story · 1 points

    HN discussion

Search all of HN for benalman.com

Linked by the same people?