Interesting feature of Elixir: Documentation as Tests

One of the coolest feature I came across in Elixir - our code documentation becomes our unit tests. I was amazed by its simplicity when I saw it in action in sample app I was writing. I feel this is one of the most incredibly and helpful feature I saw in any modern programming language in recent times. (Python has similar functionality using Python’s doctest.) Let me explain this by giving a quick demo using few simple examples: Math functions sum and multiply. Lets say this is our Maths module defmodule Maths do def sum(num1, num2) do num1

Draw architectural design of the project using "railroady" gem

As a developer no one likes to write a complete documentation for a project. Butsometime we have to give some document which explain at least our architectural design of project. If in future anyone else work on same project then he can easily understand the overview and business logic before look into the code.We should draw a simple architectural design of our project models, controller and their relationship. There is a gem which provides all necessary diagrams - add it into development group. gem 'railroady' System Requirements $ sudo apt-get install graphviz run $ rake diagram:all It generates all diagrams