Understanding Recursion and Tail Call Optimisation in Elixir

Last week we looked at branching and conditionals logic and how we can rewrite these constructs as multi-clause functions to make our code more declarative and easier to understand and read. If you are coming to Elixir from another programming language you are probably very accustomed to using loops to iterate through a list of […]

Continue reading...

Design Inspiration #244

Design Inspiration from Summer Fridays, L’Estrange London, Made of Sundays, Ebullition, and Spendesk! Design Inspiration is a weekly post that showcases examples of some of the best new web design from around the internet. Summer Fridays http://summer-fridays.com L’Estrange London https://lestrangelondon.com Made of Sundays https://www.madeofsundays.com Ebullition http://www.agence-ebullition.com Spendesk https://www.spendesk.com

Continue reading...

Using Inheritance for Trailblazer Operations

Over the last couple of week’s we’ve been looking at some of the basic concepts that go into building a Ruby application using Trailblazer. A technique that is promoted heavily in the Trailblazer book is inheritance. Inheritance is of course one of the basic building blocks of Ruby (Understanding Inheritance in Ruby), and so you […]

Continue reading...

Branching and Conditionals in Elixir

One of the very first things you typically learn when getting started with programming is branching and conditional logic. This usually involves using if and else, case statements, and while loops. These early steps of the curriculum are usually very useful for languages such as Ruby, Python, PHP, and Javascript, but in Elixir, there is […]

Continue reading...

Design Inspiration #243

Design Inspiration from Ravelin, Cushion, Greenhouse, OTHR, and Lattice! Design Inspiration is a weekly post that showcases examples of some of the best new web design from around the internet. Ravelin https://www.ravelin.com Cushion http://cushionapp.com Greenhouse https://www.greenhouse.io OTHR https://www.othr.com Lattice http://latticehq.com

Continue reading...

Using Trailblazer Operations in Controllers and Views

Over the last couple of weeks we’ve looked at getting started with Trailblazer and Ruby on Rails, and Operations and Contracts. A Trailblazer Operation encapsulates the given action of your application. So far in this little exploration of Trailblazer we’ve created an Operation for creating new Users. Encapsulating an action in an Operation class is […]

Continue reading...

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...