Open in app

Sign In

Write

Sign In

Arturo Martínez
Arturo Martínez

46 Followers

Home

About

Published in IceMobile

·Pinned

Why I choose to be a Node.js carpenter

In the early nineties I used to fall asleep to the fuzzy glow of the monochrome amber monitor of our tired 80286 and the murmur of its busy hard disk, compiling and linking my dad’s code written with Borland C. Some nights they would be accompanied by the comforting clacks…

Programming

4 min read

Why I choose to be a Node.js carpenter
Why I choose to be a Node.js carpenter
Programming

4 min read


Published in JavaScript in Plain English

·Jan 11, 2021

When Should You Use sinon’s Restore and Reset Functions?

In this article we analyze differences of the restore, reset, resetHistory and resetBehaviour functions in sinon, and how they behave depending on whether our sinon fakes are anonymous or they wrap existing properties. — A very common approach while working with sinon, as shown in their own documentation, is to call the function restore as part of Mocha’s afterEach hook. afterEach(function () { // completely restore all fakes created through the sandbox sandbox.restore(); });

Programming

3 min read

When should you use sinon’s restore and reset functions?
When should you use sinon’s restore and reset functions?
Programming

3 min read


Published in The Startup

·Nov 21, 2020

How to Make Keycloak Start Up Faster When There Are a Lot of Offline Sessions

If you have offline sessions enabled in Keycloak and there are lots of them stored in the database (e.g. more than 300k) you will notice that the time it takes to start up can be up to more than 20 minutes. In this article I will share some tips we…

Software Engineering

3 min read

How to Make Keycloak Start Up Faster When There Are a Lot of Offline Sessions
How to Make Keycloak Start Up Faster When There Are a Lot of Offline Sessions
Software Engineering

3 min read


Published in JavaScript in Plain English

·Oct 29, 2020

The dangers of deep equal assertions in Chai.js

Deep equal assertions are faster to implement but usually come with a dangerous lack of attention — Has anyone in your team ever said something like this? “It was covered by unit tests, but we were comparing it against the wrong value!” Most of the times I’ve heard that, there was a deep equal assertion involved. Deep equal assertions in Chai.js are extremely simple and fast to…

Java Script

2 min read

The dangers of deep equal assertions in Chai.js
The dangers of deep equal assertions in Chai.js
Java Script

2 min read


Published in JavaScript in Plain English

·Oct 26, 2020

When is it okay to Unit Test private variables and functions in JavaScript?

Asking this question might be a sign of underlying design flaws. And the first step to fix them. — Why you usually shouldn’t test them In her book Practical Object Oriented Design in Ruby, Sandi Metz enumerates the following reasons not to include private methods in unit tests: Redundancy: private methods are hidden inside public components that already have tests; a failure in them will always be exposed by an existing test.

Java Script

4 min read

When is it okay to Unit Test private variables and functions in JavaScript?
When is it okay to Unit Test private variables and functions in JavaScript?
Java Script

4 min read


Published in JavaScript in Plain English

·Oct 21, 2020

Increasing promise performance with pending-promise-recycler

The fastest promise in JavaScript is the one that has already been resolved! — The npm package pending-promise-recycler keeps track of promises in a pending state; that means ongoing promises that have not been resolved yet. If someone would try to create a new instance of one of those pending promises, pending-promise-recycler will reuse the one that is currently pending instead of unnecessarily creating…

Java Script

2 min read

Increasing promise performance with pending-promise-recycler
Increasing promise performance with pending-promise-recycler
Java Script

2 min read


Published in The Startup

·Oct 18, 2020

Why Would You Use POST Instead of GET for a Read Operation?

Exploring scenarios in which we might want to deviate from the standard. — Normally, I’d say “no, you don’t”; because GET is for read operations and POST is meant for write (e.g. create) operations. But today I was reading the draft of some OpenAPI specifications, in which one of our REST API consumers suggested having a new endpoint to look up users by…

Programming

2 min read

Why Would You Use POST Instead of GET for a Read Operation?
Why Would You Use POST Instead of GET for a Read Operation?
Programming

2 min read


Published in The Startup

·Oct 17, 2020

Recycling Pending Promises in Node.js

With the package “pending-promise-recycler”, we can save precious resources and avoid performing the same operation again and again by recycling pending promises. — Imagine the following scenario. We have an API that sometimes makes calls to a 3rd party service; for example, to retrieve a list of stores. Let’s assume that retrieving this list of stores is a very expensive and slow operation, averaging a response time of about 12 seconds.

Programming

3 min read

Recycling Pending Promises in Node.js
Recycling Pending Promises in Node.js
Programming

3 min read


Published in IceMobile

·Sep 4, 2020

Continuous Documentation for Forgetful Programmers

And non-programmers too! — I’ve always considered my work-related memory to be subpar. I would often be asked whether I remember how we implemented X or why we chose option Y; and even though we did implement X and chose option Y three or four times, the answer would forever remain hiding on the…

Productivity

5 min read

Continuous Documentation for Forgetful Programmers
Continuous Documentation for Forgetful Programmers
Productivity

5 min read


Published in The Startup

·Aug 20, 2020

Destructured Function Parameters and Code Maintainability

Code keeps changing, there’s no doubt about that. We always do our best to set some rock solid code foundations when a new project starts, we even have one or two favorite functions that become the cornerstone of our beautiful program. “This function will be my rod when I walk…

Java Script

5 min read

Destructured Function Parameters and Code Maintainability
Destructured Function Parameters and Code Maintainability
Java Script

5 min read

Arturo Martínez

Arturo Martínez

46 Followers

Node.js Carpenter @ Founda Health

Following
  • Maximiliano Contieri

    Maximiliano Contieri

  • John Gruber

    John Gruber

  • Pablo Rodríguez-Sánchez

    Pablo Rodríguez-Sánchez

  • Kirshi Yin

    Kirshi Yin

  • Dmitry Kostyuk

    Dmitry Kostyuk

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech