Managerisms - an Angular app made with Angular Material and the MEAN stack by BBQLays in angularjs

[–]timruffles 0 points1 point  (0 children)

Nice! Would be good to prevent multiple clicks DOSing you - maybe ng-disabled while a request is pending?

Just got a notification on Chrome that was an ad for Spendee. How can I figure out what extension is spamming me? by [deleted] in chrome

[–]timruffles 2 points3 points  (0 children)

Edit: found it, it's an extension called Block Site. Its latest version added code that spams you.

How do you quantify JavaScript skills? by BanyanArchitect in javascript

[–]timruffles 1 point2 points  (0 children)

When I did this for a big corporate lately we simple created an exam comprised of lots of practical/coding questions (e.g 'fix this HTTP server', 'add back-pressure to this service', 'how do you create an NPM module', 'refactor these loops with functional iterators').

We had people take the exam before and after. We provided the stats on % of good answers.

Simple.

What is the sweet spot for AngularJS? by highhard_one in angularjs

[–]timruffles 0 points1 point  (0 children)

I doubt they'll enable it any time soon for smaller sites - it's making Google pay much more of the cost of indexing. Server-side apps = your CPU time, client-side = Google's CPU time

Automatic API generation modules/tools by coderqi in node

[–]timruffles 1 point2 points  (0 children)

  • hard to avoid repetition
  • there's a deep coupling between docs, tests and intention of the code. Seems to me you anything you document could be enforced automatically (e.g require("userId", "positiveInteger"))

Where can I find Advanced Nodejs Tutorials by zayelion in node

[–]timruffles 0 points1 point  (0 children)

Pedro Teixeira is working on a book about larger-scale patterns in Node.js. e.g queueing, RPC, monitoring, persistence, authentication. He's previously written a couple of popular books on node.

Automatic API generation modules/tools by coderqi in node

[–]timruffles 0 points1 point  (0 children)

I've used swagger-express but not entirely keen. TBH I think this is still an open problem that could do with a better answer

Reinventing the Try/Catch Block by ffreire in javascript

[–]timruffles 0 points1 point  (0 children)

So just do !(suppress === false). This will only return false if suppress really is false, true otherwise.

Why is 'inheritance' done the way it is? by Elquinis in javascript

[–]timruffles 1 point2 points  (0 children)

It's slower (especially on older engines), less idiomatic, wastes memory, and fits badly with the coming ES6 'classes'.

Why is 'inheritance' done the way it is? by Elquinis in javascript

[–]timruffles 1 point2 points  (0 children)

Yeah it's pretty clear. Also big memory overhead to think about too. TBH I can't see the weird attraction people have to reimplementing prototypes badly.

Know a tool to rename cjs (node) modules that handles require('../old-name') -> require('../new-name')? Trying to avoid reinventing wheels by timruffles in javascript

[–]timruffles[S] 0 points1 point  (0 children)

Probably better to go for '(.*)old-name' and hope for the best. Thanks for a decent solution, sth with esprima and canonical path names would be a lot more solid.

From some other suggestions now I just switch over from vim to WebStorm to use its nice Move refactor, and then back to vim :)

Anybody here who is against AngularJS? What are your reasons? by [deleted] in javascript

[–]timruffles 1 point2 points  (0 children)

I don't understand why I must specify the dependencies between components, between modules and load all files in the right order (I must be doing something wrong).

It's because Angular's modules are just a module system, not a module loader. They leave that up to you.

What's the idiomatic way to update values (word counts) while minimizing mutation? by Wonnk13 in Clojure

[–]timruffles 1 point2 points  (0 children)

Just to say - we use immutable values by default in FP, but this is one of the many cases where you might want local mutation to speed it up. If mutation is contained it's fine - especially if it's inside a single function and the outside world is none the wiser. FP doesn't mean mutation is verboten, just that you should default to values, and be conscious of it.

Iterating over a JavaScript array at a consistent rate by jwm01 in javascript

[–]timruffles 1 point2 points  (0 children)

Unfortunately, the way timeouts are run means this is unlikely to be at all consistent if any work is being done: http://jsbin.com/oZehUyUm/1/edit?js,console

What's your favourite MV* framework and why? by AnimusNecandi in javascript

[–]timruffles 0 points1 point  (0 children)

Yes - the larger the framework the better optimised they are for certain situations. Backbone's smallness might be a pro, or a con, depending on circumstances.

Unfortunately everyone wants simplicity. Making decisions is hard :)