Echo JS 0.11.0

<~>

tracker1 comments

tracker1 3478 days ago. link 3 points
I don't think some of the analogies hold...  Why wood framed houses are better than sticks and mud, might be a better comparison... or Concrete is better than Mud,  Or if you're only building a doghouse, you don't need concrete and steel.

While software development is not an engineering discipline in practice a lot of the time, it is more apt to compare to construction/building in general.

A lot of the reason for the polarization is that when you are working on a project for a company, you absolutely will favor one over another, and need to be able to defend and back up your decisions to the PHB types.  It is as much political as it is technical in a lot of cases.  IMHO, angular isn't as predictable or straight forward as you might think... There are a lot of times when I'm a user of an application (grubhub comes to mind) and state behaves very weirdly... more often than not, when I'm using apps with weird state issues, it's an angular app.

That's not to say you can't work around those kinds of issues, but it's working around the core of angular.  $scope.$apply(Async) is a huge code smell.  ng2 is better, but still has a lot of similar quirkiness.  Likewise I'm a proponent of React, though I feel too many people reach for either in cases where server rendering + enhancements would be better all around.  More over, I'd rather developers discover and start using sessionStorage/localStorage already to overcome a lot of the weird behaviors.
tracker1 3482 days ago. link 1 point
One other tip would be to use tag deployments to npm via travis-ci for your public modules.
tracker1 3482 days ago. link 1 point
It's best to think of web workers as something at the other end of a message queue, such as via an MQ server... it's faster and on the local machine, but still entirely separate wrt to the work being done.
tracker1 3482 days ago. link 2 points
I'm pretty sure my car does have over 291 parts... Not all of them moving parts, or directly related to the drivetrain.. but if you include the components for computer control, fuel injection, systems monitoring, breaking, stearing, etc, I'd be surprised if there weren't more than 291 parts there alone.

I understand the concern... also of concern is when you see multiple versions of lodash, underscore and ramda (I know the last one is different, but similar usage).  It's as bad as a few years ago, you open up the home page for the companies website and discover 3+ versions of jQuery being loaded.

Of course, beyond all of that, I'd rather have hundreds of small modules doing one thing well and easily replaced than any given monolith.
tracker1 3490 days ago. link 3 points
WTF!?!?  Article submission, to summary page on medium that links to the article...

That said, this is part of what I don't like wrt angularisms..

    expiry: ['', [Validators.required, Validators.pattern(expiryRegex)]]

Why does it even need nested arrays, the first item is the current value, just have the rest be validation..  Or better uet, have it be an object, that you pass an array of validators to.

    expiry: validatedValue({
      value: '',
      validation: [
        Validators.required, 
        Validators.pattern(expiryRegex)
      ]
    })

I know I could make that function... I just mean that ng2 chose TypeScript so that they could have enforced structure and types, then they use this weird array structured dsl in places.
tracker1 3490 days ago. link 3 points
Really wish it didn't cost karma to vote down... it's hard to earn it on this site.
tracker1 3490 days ago. link 1 point
flatmap is just map + reduce

    invoices
      .map(inv => inv.positions)
      .reduce((a, p) => a.concat(p || []), []);

ex:

    function flatmap(object, mapper) {
      return object.map(mapper)
        .reduce((agg, ary) => agg.concat(ary || []), [])
    }
[more]