trenpixster's thoughts on software development
  • Home
  • Contact

tips

A collection of 5 posts

til

TIL Handlebars.js each has an else

Today I learned that Handlebars.js has an {{else}} instruction when you're iterating over a collection with {{each}}. This allows you to make a contextualized check if the collection is empty.

  • Nizar Venturini
    Nizar Venturini
1 min read
elixir

TIL :calendar rocks

Today I learned that Erlang's native calendar module has a super useful function: last_day_of_the_month/2! This saved me a ton of work. Here's how you could use it in

  • Nizar Venturini
    Nizar Venturini
1 min read
elixir

TIL about Ecto schema @derive

TL;DR; You can use @derive to choose what attributes from your model you want to serialize via Poison.encode instead of adding custom code to clean your models: Not TL;DR; version

  • Nizar Venturini
    Nizar Venturini
2 min read
elixir

A saner way to deal with complex flows

Yes, finally! We now have in Elixir the with keyword! (See what I did there with the post title?) In a gist, with allows you to sequence function calls and return a certain

  • Nizar Venturini
    Nizar Venturini
1 min read
programming

The wonders of .bind()

Here’s a quick cool tip to improve code smoothness. How many times have you var self = this; or var _this = this; and all these variants? I always hated typing this - pun

  • Nizar Venturini
    Nizar Venturini
1 min read
trenpixster's thoughts on software development © 2025
Latest Posts Twitter Ghost