Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
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
    Cover of How JavaScript Works

    How JavaScript Works

    Douglas Crockford · 2018

    Web & Internet
    Open LibraryAmazon
    Stats for nerds
    2recommend
    5mentions
    4people
    2020–2024years
    40% recommend60% neutral

    Mentions per year

    20202021202220232024

    What Hacker News says

    1. amateurCoder5May 2023
      "JavaScript, The Good Parts" is not really relevant to modern JS. But Crockford's new book "How JavaScript Works" is basically the updated version. As an amateur coder I found it very useful, definitely worth reading.
      thread
    2. MathMonkeyManDec 2021
      Douglas Crockford has a sketch of a datetime library in his book, How JavaScript Works.

      I like it. Here's a summary.

      A datetime has three representations:

      - (real) number of milliseconds since the epoch,

      - string in some standard format (e.g. ISO 8601),

      - plain old object with the following properties: year, month (one-based), day, hour, minute, second (real), zone, week, weekday.

      Then there are four functions for generating datetimes and converting among the representations:

      - Date.now() -> Number

      - Date.object(Number | String, zone info? ...) -> Object

      - Date.string(Number | Object, format and/or zone info? ...) -> String

      - Date.number(Object | String, format and/or zone info? ...) -> Number

      You'd need the tz database under the hood and maybe exceptions for impossible or ambiguous datetimes.

      Aside from bundling the tz database, I don't see this library needing to be very large. And if it's small, it's not a big deal if it isn't standard.

      thread
    3. ZamicolDec 2024
      Hijacking for a random concern:

      I love JSON, but one of the technical problems we've ran into with JSON is that the spec forgot about all special characters.

      I actually noticed it when reading Douglas Crockford's 2018 book, "How JavaScript Works". The mistake is on page 22.9 where it states that there are 32 control characters. There are not 32 control characters. There are 33 7-bit ASCII control characters and 65 Unicode control characters. When thinking in terms of ASCII, everyone always remembers the first 32 and forgets the 33rd, `del`. I then went back and noticed that it was also wrong in the RFC and subsequent revisions. (JSON is defined to be UTF-8 and is thus Unicode.)

      Below is a RFC errata report just to point out the error for others.

      Errata ID: 7673 Date Reported: 2023-10-11

      Section 7 says:

      The representation of strings is similar to conventions used in the C family of programming languages. A string begins and ends with quotation marks. All Unicode characters may be placed within the quotation marks, except for the characters that MUST be escaped: quotation mark, reverse solidus, and the control characters (U+0000 through U+001F).

      It should say:

      The representation of strings is similar to conventions used in the C family of programming languages. A string begins and ends with quotation marks. All Unicode characters may be placed within the quotation marks, except for the characters that MUST be escaped: quotation mark, reverse solidus, and the control characters (U+0000 through U+001F, U+007F, and U+0080 through U+009F).

      Notes:

      There are 33 7-bit control characters, but the JSON RFC only listed 32 by omitting the inclusion of the last control character in the 7-bit ASCII range, 'del.' However, JSON is not limited to 7-bit ASCII; it is Unicode. Unicode encompasses 65 control characters from U+0080 to U+009F, totaling an additional 32 characters. The section that currently reads "U+0000 through U+001F" should include these additional control characters reading as "U+0000 through U+001F, U+007F, and U+0080 through U+009F"

      ---

      I've chosen `del` to be my favorite control character since so many engineers forget it. Someone needs to remember that poor little guy.

      thread
    4. MathMonkeyManMay 2024
      Crockford makes it work in his toy language in <https://www.amazon.com/How-JavaScript-Works-Douglas-Crockfor...>.
      thread
    5. gabrielsrokaJul 2020
      "How JavaScript Works" by Crockford was published in 2018.

      https://www.amazon.com/gp/aw/d/1949815005/ref=dbs_a_w_dp_194...

      https://youtu.be/8oGCyfautKo

      thread

    Related

    Cover of JavaScript
    2008–2026

    JavaScript

    Douglas Crockford
    72 recommend · 104
    Cover of Javascript Enlightenment
    2011–2017

    Javascript Enlightenment

    Cody Lindley
    7 recommend · 10
    Cover of Professional JavaScript for Web developers
    2008–2024

    Professional JavaScript for Web developers

    Nicholas C. Zakas
    19 recommend · 27
    Cover of JavaScript Patterns
    2010–2024

    JavaScript Patterns

    Stoyan Stefanov
    29 recommend · 35
    Cover of Eloquent Javascript
    2007–2026

    Eloquent Javascript

    Marijn Haverbeke
    226 recommend · 356
    Cover of Pro JavaScript Techniques
    2008–2022

    Pro JavaScript Techniques

    John Resig
    16 recommend · 27
    Cover of Javascript Web Applications
    2011–2013

    Javascript Web Applications

    Alex MacCaw
    8 recommend · 13
    Cover of You Don't Know JS
    2014–2025

    You Don't Know JS

    Kyle Simpson
    88 recommend · 123