“Collection-Last Auto-Curried Functions”

You want your data last, and you want your functions “partially applied.” Here’s why.

June 24, 2017Filed under Tech#functional programming#javascriptMarkdown source

Why Elm Instead of TypeScript?

Or, yet another long comment in Slack turned into a blog post.

April 23, 2017Filed under tech#elm#functional programming#javascript#programming languages#typescriptMarkdown source

Functions, Objects, and Destructuring in JavaScript

On functions in JS and some fun bits in ES2015 in particular

March 27, 2017Filed under tech#javascriptMarkdown source
February 15, 2017Filed under micro#elm#fsharp#functional programming#javascript#programming languages#rustMarkdown source

One of the biggest changes in my JavaScript from learning Rust/Elm/F♯/etc. is that I now think constantly about what can fail.

TypeScript keyof Follow-Up

Autocomplete all the things in all the ways!

January 03, 2017 (updated January 08, 2017)Filed under Tech#javascript#programming languages#software development#typescriptMarkdown source

The Itch

How typed functional programming is what I was looking for all along.

December 19, 2016Filed under tech#functional programming#javascript#rust#software developmentMarkdown source

keyof and Mapped Types In TypeScript 2.1

Making JavaScript dance to an ML-ic tune.

December 17, 2016 (updated December 18, 2016)Filed under tech#javascript#programming languages#software development#typescriptMarkdown source
December 16, 2016Filed under micro#javascript#software development#tweetstormMarkdown source

I originally posted this as a tweetstorm, but I’m treating this as the canonical and adding a tweet to the end of that “topic” linking back here. Indie web forever.


  • JavaScript experiences which induce profound frustration in me:

  • I had gotten in an insane state where things just stopped working that had previously been working as I updated to Ember CLI 2.6.

  • After much tearing of hair, I started over from scratch and repeated the upgrade process.

    Everything works now.

    ¯\_(ツ)_/¯

  • Then: rm -rf node_modules bower_components and test again.

    Nothing works now.

    ¯\_(ツ)_/¯

  • Consistently, it works fine after the upgrade and ember init finishes. Then, if I do a clean install of the dependencies, it fails.

  • And it fails in the same ways. So ultimately I’ll be chasing those, because we’re not going to get stuck here.

  • But this is an infuriating experience. If you’ve ever believed npm’s claim that non-deterministic installs aren’t a problem… consider this a data point in the opposite direction.

    ┻━┻ ︵╰(°□°)╯︵ ┻━┻

What is Functional Programming?

(And why should we care about it?)

November 11, 2016 (updated November 14, 2016)Filed under tech#functional programming#javascript#software developmentMarkdown source
November 05, 2016Filed under micro#javascript#software developmentMarkdown source

Pro tip: use Map and not Object for dictionaries/hash-tables in JavaScript. Performance difference is A LOT. (I haven’t measured, but for a simple example I was playing with (~12k items) it was at least a couple orders of magnitude.)

Edit: Belay that: the problem was an allocation-speed issue: I wasn’t reallocating a Map. Updating in-place is much more comparable.

October 08, 2016Filed under micro#javascript#reactjs#software developmentMarkdown source

People, React is great—truly! But the fact that you only learned about the ideas it uses from React doesn’t make React itself the paradigm.

October 08, 2016Filed under micro#javascript#reactjs#software developmentMarkdown source

People, React is great—truly! But the fact that you only learned about the ideas it uses from React doesn’t make React itself the paradigm.

Rust vs. React Native—What?

Tradeoffs, or: Speed and stability are for everyone

October 07, 2016Filed under Tech#f sharp#javascript#rust#software development#swiftMarkdown source
August 17, 2016Filed under micro#emberjs#javascript#software development#testingMarkdown source

I’m writing a talk on test-driven development with Ember.js for Olo’s in-house tech talks. How? By building a real feature and capturing the process!

August 15, 2016Filed under micro#c#cplusplus#fortran#java#javascript#php#programming languages#python#visual basicMarkdown source

My #firstsevenlanguages—looking strictly at what I’d used at all; ignoring HTML and CSS):

  1. Visual Basic
  2. C++
  3. Fortran
  4. Java
  5. C
  6. PHP
  7. JavaScript

In terms of what I learned well enough to use, though:

  1. Fortran
  2. Java
  3. C
  4. PHP
  5. JavaScript
  6. Python
  7. C++
July 30, 2016Filed under micro#javascript#programming languages#software developmentMarkdown source

I’m quickly discovering a desire for actual, enforceable types as I’m trying to compose a series of functions. It’s hard without them.

July 28, 2016Filed under micro#css#html#javascript#software development#swiftMarkdown source

I’m so used to dealing with layout distinctly from behavior with the HTML/CSS/JS separation that learning how to lay things out in macOS apps feels weird.

July 16, 2016Filed under micro#javascript#rust#software developmentMarkdown source

I am trying to fix a bug in a Node.js back end I wrote 18 months ago. And I have never been so tempted in my life to rip out the entire Node back end and replace it with one written in Rust.

July 08, 2016Filed under micro#javascript#software developmentMarkdown source

I haven’t gotten almost anything done today. I think I’m calling today my day off for this week and I’ll hammer at productive things later.

July 06, 2016Filed under micro#javascript#software developmentMarkdown source

Wow: a minimal (but extremely useful) lodash install is only 4kb minified and gzipped. I… need to have this available to use everywhere now, please.

June 30, 2016Filed under micro#javascript#software developmentMarkdown source

I’d love—love—to see an open standard for embedding browser engines (a la Chromium/Electron) emerge, so you can embed whichever you like.

June 22, 2016Filed under micro#javascript#software developmentMarkdown source

The build worked on develop last night. We have made no commits. Now it fails.

Current best guess: transitive dependencies. Thanks, npm.

Y Combinators, how do they even work?

A commentary on a blog post by Matt Might, or: learning out loud.

June 19, 2016Filed under tech#javascript#programming languages#software developmentMarkdown source
June 11, 2016Filed under micro#javascript#nodejs#software developmentMarkdown source

I spent the afternoon modernizing a large chunk of Node.js code in preparation for fixing a bug—and I’ve caught multiple other bugs along the way. (Also, my comfort level with JavaScript and functional programming has taken a massive leap since I originally wrote this!)

Testing Ember.js Mixins (and Helpers) With a Container

Fixing "Attempting to lookup an injected property on an object without a container" errors in mixin and helper tests.

June 09, 2016 (updated April 20, 2017)Filed under tech#emberjs#javascript#software developmentMarkdown source
June 09, 2016Filed under micro#javascript#programming languagesMarkdown source

JavaScript with semicolons written by hand is such a sad language. Almost every line, it’s crying:

);
May 19, 2016Filed under micro#javascript#programming languages#python#software developmentMarkdown source

I needed to write a tiny server to test out some quirky single-page app stuff I’m doing for Olo right now. So I did it with Python and Flask.

And you know what? Python is still—and forever, I suspect—so much better than JavaScript.

May 16, 2016Filed under micro#javascript#programming languages#software developmentMarkdown source

Just bumped into another person who (quite reasonably) didn’t know that ES6 classes are just syntactic sugar for prototypes. I like classes… but they’re more confusing than not, I think.

April 25, 2016Filed under micro#javascript#software developmentMarkdown source

I hate npm’s non-deterministic installs. Reproducible builds are essential, not optional.

April 23, 2016Filed under micro#javascript#software developmentMarkdown source

I’ve been working for a few weeks now on what has ended up being a much larger feature than I expected. CLOC tells me it’s a +1,320-lines-of-code change. But of those, 951 are tests. As it should be when writing JavaScript.

April 21, 2016Filed under micro#angularjs#javascript#software developmentMarkdown source

Just finished a massive cleanup of about 4000 lines of an AngularJS codebase. It’s not amazing, but it’s a heck of a lot easier to deal with now.

April 19, 2016Filed under micro#emberjs#javascript#software developmentMarkdown source

I still love EmberJS—but if I have one complaint, it’s that it’s slightly too heavy on convention-based magic. I want it to be a little more explicit, so that I can have a little more insight into what it’s going. Yes, even if that means a little more boilerplate. Explicit is better than implicit.

April 14, 2016Filed under micro#javascript#programming languages#software developmentMarkdown source

Things I want basically all the time when writing JavaScript:

  • strong types
  • enums with values (tagged unions)
  • pattern-matching
  • immutability (more easily than with Object.freeze)
  • actual constants (not just fixed bindings like const)

Basically: an ML, I guess.

April 14, 2016Filed under micro#elm#javascript#programming languages#purescriptMarkdown source

After looking at Elm a little, and discovering it doesn’t have Haskell-style typeclasses (a la Rust’s traits), I was a bit disappointed. Then I discovered PureScript, which does. Intrigued all over again.

April 11, 2016Filed under micro#javascript#software developmentMarkdown source

Betting I’m not the only one who thinks it a little weird that the Event.target in the DOM APIs is the source of the event.

April 09, 2016Filed under micro#javascript#software developmentMarkdown source

It is utterly infuriating how many parts of the DOM API are “array-like” but don’t have the basic Array API actually attached. Want to iterate over a HTMLCollection? You get to use a for loop with an index! Lucky you! 😐

April 07, 2016Filed under micro#javascript#programming languages#software developmentMarkdown source

The more time I spend with languages with pattern matching and expressive type systems, the more I feel frustrated by things I just can’t express in JavaScript. If I could write Ember in something Elm… I think I’d be giddy.

April 06, 2016Filed under micro#javascript#software developmentMarkdown source

Why isn’t this updating? :looks around for five minutes: Oh. It’s because I’m just serving an old version, and don’t have it rebuilding as I make changes.

Yeah…

March 14, 2016Filed under micro#javascript#software developmentMarkdown source

Apparently, debugger; is a thing. My life would have been so much easier if I had known about this sooner than ten minutes ago.

March 09, 2016Filed under micro#emberjs#javascript#software developmentMarkdown source

Pro tip for tracking down oddities with Ember.js during testing: ember test --serve --filter '<some pattern>' is great. E.g. ember t -s --filter 'Unit' for just unit tests.

March 06, 2016Filed under micro#javascript#software developmentMarkdown source

Seriously. All I want to do is transpile ES6 to ES5 and make it runnable in browser. And I need Browserify or Webpack for this? sigh

March 06, 2016Filed under micro#javascript#software developmentMarkdown source

Trying to do a little tweaking with the lightweight scripts I use on this site. Trying to automate things with Babel, browser imports, etc.

This is still far, far worse than it should be in 2016. Here’s hoping it’s (substantially!) better a year from now."

March 04, 2016Filed under micro#javascript#software developmentMarkdown source

I ran into a Medium post arguing against ES6’s class implementation, and got linked to this argument against super(). Strongly concur.

Inheritance is fragile. Useful when appropriate, but fragile. Prefer composition.

The Future of JavaScript

ES2015, ES2016, and Hopes for ES2017 and Later

March 02, 2016Filed under Tech#javascript#programming languages#software development#talksMarkdown source
February 25, 2016Filed under micro#javascript#programming languages#rust#software developmentMarkdown source

I have an irrational-but-ridiculously-strong desire to build an Atom package that is a tiny JavaScript wrapper around a Rust implementation. Just because.

February 20, 2016Filed under micro#javascript#software developmentMarkdown source

Of course, there’s another challenge with picking back up: I’ve gotten spoiled by having ES2015 available and want to add it to this Angular project.

HTML5 Location, <base>, and SVG

Making Angular and SVG xlink:href work correctly in Firefox.

June 20, 2015 (updated July 02, 2015)Filed under tech#angularjs#javascript#software developmentMarkdown source

How to Build a Single-Page App API Right

Or: How to get performance, progressive enhancement, and SEO in your Ember/Angular/Backbone/etc. app for free!

June 09, 2015Filed under tech#javascript#software developmentMarkdown source

Lessons Learned

9 Months With HolyBible.com

April 12, 2015Filed under tech#angularjs#javascript#software developmentMarkdown source

Unsurprisingly, In Flux

A Quick Look at the State of JS Frameworks in Early 2015

April 08, 2015 (updated August 28, 2015)Filed under tech#angularjs#emberjs#javascript#react#software developmentMarkdown source