Profile cover photo
Profile photo
Ian Bicking
9,290 followers
9,290 followers
About
Posts

Post has attachment
I'm moving my posting over to Facebook instead of Google+ (still blogging too, but Facebook for smaller things).
Add a comment...

Post has attachment

Post has attachment

Post has attachment
Add a comment...

I realized why promise.then(success, fail) is so bad/hard-to-use.  This code:

  doSomething().then((result) => {
    useResult(result);
  }, (error) => {
    handleError(error);
  });

Is equivalent to the sync (fixed):

  success = false;
  try {
    result = doSomething();
    success = true;
  } catch (error) {
    handleError(error);
  }
  if (success) {
    useResult(result);
  }

But that almost never makes sense; instead you should do:

  doSomething().then((result) => {
    useResult(result);
  }).catch((error) => {
    handleError(error);
  });

Which is equivalent to:

  try {
    result = doSomething();
    useResult(result);
  } catch (error) {
    handleError(error);
  }

See?  Obvious!  Like democracy, promises are the worst form of async, except for all the others.
Add a comment...

Post has attachment
Some interesting thoughts in a review: http://www.nytimes.com/2015/09/04/opinion/david-brooks-the-new-romantics-in-the-computer-age.html?smid=tw-share

"... we have been living through an unromantic period and there’s bound to be a correction. People eventually want their souls stirred, especially if the stuff regarded as soft and squishy turns out in a relational economy to be hard and practical."

Thinking of this, I am not so much reminded of a world driven by sentimentalism as ideology.  As much as we talk about it, I personally think ideology is on the decline.  We've learned how to talk about ideology with so much vigor, but I don't think it defines many individual's lives in the same way (reactively or proactively – that is, ideology isn't done to people as often either).  Instead so many of us are enthusiastic spectators of ideology.  The magnifying glass we hold to ideology makes it seem much larger in this world.

And maybe this is just David Brooks – really it probably is – but I am then struck by how economic and reductionist all these observations are:

"You should instead ask, What are the activities that we humans, driven by our deepest nature or by the realities of daily life, will simply insist be performed by other humans?"

Which is a statement to return agency to the economy over aesthetics.  We shall be aesthetic because it is demanded of us.

"He observes that 'culture in the West has become progressively more practical, materially oriented, and skeptical.' "

And here... I don't know.  Will we really change course?  I am, as predicted, skeptical.

Still, what if in all this there is something to be re-revealed in us?  To truly find this, a new romanticism, I think we'll have to turn aside from these economics.  Or else... to create ever better simulacrums of authenticity, always hustling to sell the next priceless thing.
Add a comment...

Post has attachment
Add a comment...

I wasn't very happy with grunt, so I switched to gulp. I'm not really any happier with gulp. Webpack? Something about fool me once...

I still really like shell scripts. Through all this they've only grown on me. I'm not quite sure what to do with that.  (I came upon this, but it seems rather obscure: http://steved-imaginaryreal.blogspot.com/2015/05/shmake-shell-based-build-tool.html)
Add a comment...

Once it became clear that the web was the future, did the web get taken over by those it supplanted? We tried to clean up and replace the apps with the web, and lost our way... now the web begs to be an app platform and chases someone else's dream, and has lost track of the "web".
Add a comment...

A thought on how to add a REPL to an app or service:

Your REPL starts by creating a persistent connection to the app or service.  Could be as simple as a login and a cookie jar, or could be a socket open to the app.  Then the REPL starts a bash subshell.  In that process there are new commands for all the different things the application supports.  You get a full language and a sort of scriptability, but you don't have to implement anything beyond exposing commands.

I realize in some sense the subshell is just a way-too-fancy context manager or try/finally for bash.  But the idea of starting a shell session seems vague in bash.  And it's the session that makes the script hang together as a command language.
Add a comment...
Wait while more posts are being loaded