Multi-clause Functions with Pattern Matching and Guards in Elixir

Last week we looked at pattern matching, how it differs from assignment, decomposing data structures, and matching against the return value of a function call. One of the most important uses of Pattern Matching in Elixir is matching the arguments of a function. By pattern matching the arguments of a function, Elixir allows us to […]

Continue reading...

Design Inspiration #242

Design Inspiration from Six, Prototype, Craft CMS, theory11, and Wonderland! Design Inspiration is a weekly post that showcases examples of some of the best new web design from around the internet. Six http://www.madebysix.com Prototypo https://www.prototypo.io Craft CMS https://craftcms.com theory11 https://www.theory11.com Wonderland https://www.wonderlandindustry.com

Continue reading...

What are Trailblazer Contracts?

In last week’s tutorial we looked at defining our first Operation for creating new users. A Trailblazer Operation encapsulates a given action of the application and takes responsibility for accepting data from the request, validating that data, and creating or updating the database. It’s often the case that the create and update actions of a […]

Continue reading...

Understanding Pattern Matching in Elixir

Pattern Matching was one of the characteristics of Elixir that really got me interested in learning the language. After mostly using PHP, Ruby, and Javascript, Pattern Matching was a totally new revelation to me. Pattern Matching creates a whole new way of writing code and dealing with common constructs such as if, while, and foreach. […]

Continue reading...

Design Inspiration #241

Design Inspiration from Bundy Bundy, Relay, Canyon, Coffee Supreme, and Studio Marani! Design Inspiration is a weekly post that showcases examples of some of the best new web design from around the internet. Bundy Bundy http://bundy.madebywild.com Relay http://relaymaps.com Canyon https://www.canyon.com Coffee Supreme http://www.coffeesupreme.com Studio Marani http://www.studiomarani.it

Continue reading...

Getting started with Operations in Trailblazer

A couple of weeks ago I gave my review of Trailblazer. Trailblazer is a “framework” for managing the inevitable abstraction you will need to introduce to your Ruby application once it reaches a certain level of complexity. One of the most important aspects of Trailblazer is that your Models and Controllers should be very thin. […]

Continue reading...

Functions as First-Class Citizens in Elixir

In Elixir, functions are first class citizens. This allows you to define a function and assign it to a variable, and then use that variable to invoke the function. You can also pass a function as the argument to another function. This is often referred to as anonymous functions or lambdas in other programming languages. […]

Continue reading...

Design Inspiration #240

Design Inspiration from Raden, The Square, Apollo, Beanstalk, and Superhuman! Design Inspiration is a weekly post that showcases examples of some of the best new web design from around the internet. Raden https://www.raden.com The Square http://www.thesquareapts.com Apollo http://www.apollostack.com Beanstalk http://beanstalkapp.com Superhuman https://superhuman.com

Continue reading...

Getting started with Trailblazer and Ruby on Rails

Last week I gave my review of Trailblazer, a book on the “high-level architecture” framework (Trailblazer) for Ruby web applications. I find it inevitable that you will need to introduce abstraction into a web application at a certain stage of the application’s life. This means you can either create your own abstractions, or stand on […]

Continue reading...

Understanding Function Arity in Elixir

A couple of weeks ago we looked at defining functions and modules in Elixir (Working with Functions and Modules in Elixir). An important concept that we didn’t look at in that tutorial was function arity. Unless you come from a Computer Science background, you have probably never come across the term “function arity”. It basically […]

Continue reading...