Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    Reg Braithwaite

    raganwald.com · Personal blog · on HN since 2008

    Reg Braithwaite (raganwald) writes about JavaScript, functional programming, combinators, and programming theory with practical examples.

    Visit blogHN submissions
    ProgrammingLanguages & Compilers
    What HN says

    Commenters praise how it mixes theory with application, and one calls him the only writer covering idiomatic, dynamic JavaScript patterns.

    Stats for nerds
    94HN people shared it
    116linked in comments
    4.8Kstory points
    Sep 2024last shared
    2013people per year2024

    Top posts on HN

    1. 1
      How I Learned to Stop Worrying and Love the State Machine
      3 people · 700 points · first shared 2018 · 208 comments on HN
    2. 2
      Why recursive data structures?
      2 people · 404 points · first shared 2017 · 121 comments on HN
    3. 3
      Class Hierarchies? Don't Do That
      2 people · 333 points · first shared 2014 · 240 comments on HN
    4. 4
      Develop the three great virtues of a programmer: laziness, impatience, and hubris
      1 person · 319 points · first shared 2016 · 72 comments on HN
    5. 5
      A Brutal Look at Balanced Parentheses, Computing Machines, and Pushdown Automata
      2 people · 205 points · first shared 2019 · 77 comments on HN
    6. 6
      Why Y? Deriving the Y Combinator in JavaScript
      1 person · 200 points · first shared 2018 · 71 comments on HN
    7. 7
      Explicit vs. Clever
      2 people · 196 points · first shared 2013 · 97 comments on HN
    8. 8
      Trampolines in JavaScript
      7 people · 170 points · first shared 2013 · 72 comments on HN
    9. 9
      The Narcissism of Small Code Differences (2008)
      1 person · 170 points · first shared 2013 · 126 comments on HN
    10. 10
      Interviewing for a JavaScript Job
      1 person · 163 points · first shared 2015 · 113 comments on HN

    What HN people wrote when they linked it

    • michaelsbradleyNov 2013

      Jim Duey's blog post on the State Monad was helpful to me[1].

      I agree that one shouldn't reach for monads just because one finds them interesting or neat, or challenging for that matter.

      An analogy: consider that in many cases, `while` and `for` loops are great when looping is what's called for. But there are many times when recursion is more attractive still. But what to do if your language doesn't have TCO, and blowing the callstack is a real concern? Well, then you can use trampolines![2]

      Now, trampolines are great, but you don't need to always reach for them. An analysis should be done of the problem at hand, and "the right tool chosen for the task", which may be a simple `while` loop. The same goes for monads. Are there cases where the State Monad makes the most sense among other programming patterns? Yes, I think so. Particularly, when you are trying to model a multi-step and nested-steps computation where the steps are intertwined in such a way that one can easily identify "global state" at work. In that case, the State Monad is a tool that will let you thread the global state through the steps and levels of computation without having to twist yourself into knots doing it some other way AND without relying on unfettered mutability.

      [1] http://www.clojure.net/2012/02/10/State/

      [2] http://raganwald.com/2013/03/28/trampolines-in-javascript.html

      [&] http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/trampoline

    • a4ismsMar 2023

      Way back when Joel Spolsky was a high-profile blogger in the "starting your own software business" genre, I asked him for advice about my blogging, and he replied "Stop what you're doing and get your blog onto your own domain."

      I had procrastinated because other platforms made everything so damn easy, and hosting my own blog meant being a part-time web admin. But I took his advice, and set up http://raganwald.com.

      Some years after that, Posterous launched on HN, and I gave it a try. It was great, so very convenient! But I carefully kept copies of everything I posed there, and sure enough... One day it closed its doors, and I republished evrything on raganwald.com (some of my urls are raganwald.com/posterous/xxxxx.html, this is why).

      But what about all the links to the old posterous articles? All dead, so some threads right here on HN point to dead URLs. This is bad for me and for HN. For this reason, I personally reject the strategy of posting on my own domain and republishing it simultaneously on some other platform. Everything I write is on a domain I control, and if I get less traffic, so be it. Running my own blog on my own low-traffic domain is like running a store in a building I own. The mall is very attractive, but I'm done with landlords.

      p.s. There are hosted solutions that respect you your own domain. Some are free, like... Github Pages. And that's what I use. It is not essential that I own the server, just the…

    • bayindirhJun 2020

      > Programs are not designed to be readable, they are designed to solve a problem.

      No. Code should be readable. When a code is fresh only you and God knows what it does and how it does. 6 month later, only God knows how your code works. You need to re-read and understand it to grasp it again.

      Unless you marked all magic with big comments blocks or you wrote your code explicitly, it'll take some headache-inducing hours to re-understand it.

      > The first goal is to get the correct program, and only after, it is important to make the code readable. A readable code that doesn't work is not worth much.

      Again no. You can leave a non-working but readable code overnight and understand the problem tomorrow morning. You can't remember random noise after a good night's sleep (unrelated: This is why regex is hard for our brains).

      Related read: http://raganwald.com/2013/04/02/explicit-versus-clever.html

    • rstuart4133Jul 2024

      Why over complicate it? FRACTRAN is a Turning complete language based on only one operation: multiplication. It's Wikipedia entry gives a short FRACTRAN program that finds all primes. https://en.wikipedia.org/wiki/FRACTRAN

      In the words of it's inventor, John Conway:

      Makes workday really easy! FRACTRAN needs no complicate programming manual. It's entire syntax can be learned in 10 seconds, and programs for quite complex and interesting functions can be written almost at once. The entire configuration of a FRACTRAN computer at any instant is a single integer - no messy "tapes" or other foreign concepts to be understood by the fledging programmer. What's not to like? This is a good introduction for someone seriously considering doing their next project in FRACTRAN: https://raganwald.com/2020/05/03/fractran.html

    • kafkaesqFeb 2016

      Overly complex algorithm questions (that the interviewer expects an immediate, near-optimal solution to -- even though they were open in the literature for several years before these solutions were found); or reasonably enough questions that just aren't articulated properly (this happens amazingly often); gratuitous brain teasers, or "Carnac the Magnificent"[1] question so any sort; or just the sheer duration of some of these one-way, "prove to me you aren't a liar or an idiot, while I play with my cellphone" sessions (6-8 hours over multiple visits); and then, quite often, dealing with the candidate in a desultory fashion afterwards -- all qualify as borderline hazing, in my book.

      [1] https://raganwald.com/2015/05/08/carnac-the-magnificent.html

    • bootloadJan 2017

      "Does anybody know a widely used and open source project using literate programming? (Edit: please include only programs expressed "as a web of ideas" that Knuth mentions - apparently otherwise it's not literate programming, just loads of inline documentation?)"

      Funny you ask this, I ran across a @raganwald post mentioning a great example of ^literate programming^ (mixing code and documentation), "Literate CoffeeScript" [0]. You can read about how CoffeeScript does this at http://coffeescript.org

      [0] blog post: http://raganwald.com/2013/03/27/literate-coffeescript.coffee.html

      [1] raw text: https://raw.githubusercontent.com/raganwald/raganwald.github.com/master/_posts/2013-02-27-literate-coffeescript.litcoffee.md

    Related

    Reginald Braithwaitebraythwayt.com40 people

    JavaScript Allongé is free

    Reginald Braithwaite
    Personal · last shared 2024
    John Regehrblog.regehr.org401 people

    Teaching C

    John Regehr
    Personal · last shared 2026
    Raganwaldweblog.raganwald.com115 people

    My favourite interview question

    Raganwald
    Personal · last shared 2025
    Giles Bowkettgilesbowkett.blogspot.com138 people

    Went Off The Rails: Why I'm Rebuilding Archaeopteryx In CoffeeScript

    Giles Bowkett
    Personal · last shared 2018
    Jon Sterlingjozefg.bitbucket.org19 people

    Leaving Go

    Jon Sterling
    Personal · last shared 2016
    Jeremy Kunjeremykun.com194 people

    A Programmer's Introduction to Mathematics

    Jeremy Kun
    Personal · last shared 2026
    Coding Horrorblog.codinghorror.com2.1k people

    Farewell Stack Exchange

    Coding Horror
    Personal · last shared 2026
    Simon Marlowsimonmar.github.io30 people

    Haskell in the Datacentre

    Simon Marlow
    Personal · last shared 2026