Blog

Eloquent Javascript

A free, up to date, possibly good book on JS programming? Flipping thru, a few things pop out at me.

This is a petty pet peeve, but I greatly dislike that he writes arrow functions without parens:

n => { return n * n; } instead of (n)=>{ return n * n; }

When they are required for multiple arguments: (x, y)=>{ return x * y; }

On first appearance, he dismisses arrow functions as just being shorter than function expressions, which is incorrect (arrows fix the 'this' reference which is never correct in function expressions). But then he consistently uses arrow functions (in his ugly parens-elided style), so crisis averted?

"Every now and then, usually between eight and ten in the evening, Jacques finds himself transforming into a small furry rodent with a bushy tail."

Which example then leads into a statistical analysis story, and the kind of data hackery that JS (and Python) are very good for.

The robot delivery example is another fairly detailed story with pathfinding, tho his algorithm is defective (it fails and/or consumes all memory forever on more complex graphs than the very simple one given).

I'll have a look at the rest of the book later.

None of the examples thus far actually build and run in a web page, or any sort of UI, except in the online document. You can copy-paste these examples into Safari's console and run them. I really don't think it's useful to learn a language outside the context of a running environment, so next post I'll give you one.

Coffee ☕️

Good morning, it is time for:

  • Coffee
  • Coffee Ipsum
    "Mazagran rich mazagran aged dripper, coffee variety at aged extraction a roast. Ut single shot espresso, coffee blue mountain organic crema shop. Macchiato, arabica americano turkish aftertaste single shot dripper. Frappuccino, white macchiato single origin carajillo, filter turkish cultivar et sugar. Single shot, that blue mountain ristretto at, wings viennese trifecta strong instant roast."
  • Black Blood of the Earth: I should try this. Or I should definitely NOT. I should try this.
  • 100 Cups of Coffee

I'm awake, and super bored, but let's not go thru my thousands of open tabs or bookmarks for things to read. That's too much effort.

I just looked for the fps/ping meter in the bottom-left of my screen. Not in ESO, not on my desktop, but in the corner of my eyes.

This is such a terrible game.

Important sanity-preserving note: "Don't read the comments" especially applies to Haxxor Nooz, Readdat, and Stuck Underflown (anti-SEO naming). Where's the "block" button on these sites, other than just blocking the whole site? And everyone I want to block has a "score" over 10K.

Medium (neither rare nor well-done) is the poster child for why you should own your own blog-posting. They shut down custom domains so you had to use their brand. Now they've shut down any monetization except "claps" giving a few pennies from a Medium membership which nobody buys.

Trust no-one with your content!