HomeBlogDigestBooksProjectsArchiveAboutlogo

A Curious Animal

Born to be curious, born to be animal!

How to update a column's type (in PostgreSQL)

04 January, 2020
- 2 min read

So, you have a table and you need to modify a column's type. The problem arise when the column is filled and the type change is incompatible, for example, from string to integer, so **how we can update the type and recompute the filled values to the new type?** Don't worry, SQL is powerful enough to let you make the change in one sentence with `ALTER TABLE`.

Working with query params in JavaScript

09 November, 2019
- 2 min read

No matter if you work with JavaScript at client or server side, at some point you'll need to work with urls and its query params. As example, I'm currently using [react-router](https://reacttraining.com/react-router/web) in my project, which is an great tool. I can define dynamic routes with path params and easily react-router returns me these params within the `match` variable and the rest of url information in the `location` variable, but how can I easily access to query params? There are great libraries for this purpose -like [query-string](https://www.npmjs.com/package/query-string) or [qs](https://www.npmjs.com/package/qs)- but the question is: **why increase in some more bytes the size of your package when there is a native solution?** 😄 The `URLSearchParams`.

How I migrated my site from Jekyll to Gatsby

03 October, 2019
- 9 min read

I think it was a matter of time to make this change. [Jekyll](https://jekyllrb.com/) was one of the first static site generates and it's awesome but for me, as a JavaScript developer that know little about ruby language, has more sense to stay close JS world. I heard about [Gatsby](https://www.gatsbyjs.org/) some time ago but never spent enough time to get a good ideas about its philosophy and capabilities. Finally this weekend I decided to make the change. What I found is while Jekyll is extremely good doing one thing --mainly focused on blogs--, Gatsby is a more general solution that can be good for many other things and not only a blog. This post is about my experience in the migration process and how I implemented some features.

Express API with autogenerated OpenAPI doc through Swagger

20 October, 2018
- 3 min read

In past years [OpenAPI](https://www.openapis.org) has arise as the preferred way to document APIs. In this article we will see how easy is document an API created with NodeJS and Express through the [Swagger](https://swagger.io/) tools. If you are working in an REST API you more probably will desire to have some API doc where your users could find what are the endpoints of your API, what they do, which parameters they accept and which output they generate. <iframe width="560" height="315" src="https://www.youtube.com/embed/CE01dwNEkEU" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

Joppy, the Tinder for tech recruitment

28 June, 2018
- 6 min read

> TLTR: This post is about [Joppy](https://www.joppy.me), a new service I'm working on that tries to eliminate the pain currently exists in the communication among recruiters and tech professionals. Let me describe you the current scenario in the recruitment world and, please, any feedback will be welcome. > **Tech professionals**: Wherever I wrote *tech professionals* I mean any kind of role related with tech companies: software engineers, developers or programmers, manager, product owners, QA, designers, ... <img alt="Joppy" src="./images/joppy-slogan.png"> ## It all starts... ...taken a beer and asking your friends: *How many connection requests do you receive per week from LinkedIn?* All three (two developers and a UI/UX designer) answer the same *enough to be annoying*. Every tech professional want to have his/her CV updated in LinkedIn, it is a great service, but no one agrees with the myriad of emails asking for connections from recruiters that has awesome job offers from awesome companies. Do you think the job of a recruiter is easy? Well, let me say you are completely wrong. It is not an easy job and often ungrateful. If you think in a more or less important city with many tech companies you can image the competition existing among companies to get tech professional. Currently there are two main things recruiters can do to arrive to candidates: 1. Publish offers in some kind of board and wait candidates applies (we all have in mind web sites that crawls and shows tons of job offers) 1. Make an **active search** of potential candidates. Recruiters need to use services like LinkedIn, where they can search techies in a given geographical area, that know about X, Y, Z skills and many other options. Once filtered they need to contact each of them where, probably, most of them are not interested in a change or in the position the recruiter is offering.

Using async/await in ExpressJS middlewares

15 February, 2018
- 5 min read

If you are not living in a cave for the past year you'll probably know the `async/await` keywords are one of the most interesting additions on ES7. It merges the benefits of a sequential syntax with the power of asynchronous programming. In this post we will cover how we must use correctly async functions as express middleware.