Programando una extensión de Google Chrome

Escribir una extensión para cualquier aplicación que lo soporte suele ser tan complicado como detallada sea la documentación que ofrece. En el caso que nos ocupa, Google Chrome, la documentación es bastante completa aunque haya que navegar por distintos negociados de la web de desarrolladores de Chrome para encontrar todas las piezas. Y una de las […]

Be careful what and how you “optimize”

Sometimes we tend to over-engineer our code. Just because we think it will look smarter, or run faster, or be more canon-compliant. Let’s take, for example, this function that gets a value from the server and translates it into a class name to apply to an element. angular.module('widgetTransactionsFilters', []) .filter('transactionType', function() { return function(input) { […]

On AngularJS considered as one big fat Trojan Horse

A couple of weeks ago I was thinking about the relationship between AngularJS and this company that buys or starts projects and later sink them just because. No, no that company, the other one: Google. While perusing thru job boards AngularJS was appearing as a MUST in the same way (and intent) as .net appears […]

The toString conundrum

Last week, in the course of a technical job interview I was asked this question: How to make console.log(test.plus(6).minus(4)) return 9. The first part, chaining functions, is trivial. As you (should) know, you just need to return the object in each chainable method. function Counter (numInitial) {       this.counter = numInitial;       […]

What’s in an SPA? Part II, the A in SPA

As you may remember from the first part of this thrilling SPA saga, the only object I’ve invoked right now is the Application. What is this Application that everyone in the ‘hood is talking about? For starters it should be your main dispatcher for all the objects in your application. Remember, we’re not doing a […]