80 Days: tech

All about my experience as a developer.

Sep 10, 2018

Let Postgres generate thouse updated_at timestamps for you

Various ORMs (like Rails’ ActiveRecord, Sequelize, etc) offer you the option of adding timestamps for the moment a record is created and updated. The created stamp is easy to do by simply giving it a default value of NOW(), but an updated_at stamp needs to change every time the row does.

Sep 10, 2018

3 tips on building a modern embedded widget

Working for one client, I had to write a widget that would JustWork™ in clients’ websites, adapting to their colour schemes and not interfering in their own scripts. It’s actually not that hard when you identify the requirements of what you’re doing! I thought I’d share my learnings with the community.

Sep 10, 2018

How to use events for DOM complete

These days in the age of <script> tags getting the async and defer attributes, you might want to include a .js file on your site, and then use its methods inline or in another script file.