Skip to content

Rocket Seat - Ignite - Elixir - Challenge 3 - A simple Elixir program that generates an employee productivity report from raw CSV data.

Notifications You must be signed in to change notification settings

librity/ignite_productivity_report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProductivityReport

A simple Elixir program that generates an employee productivity report from raw CSV data.

CSV colums are parsed as name, hours worked, day, month and year.

Commands

$ mix deps.get
$ mix credo gen.config
$ mix credo
$ mix credo --strict
$ mix test

Generate reports:

> ProductivityReport.build("test_report")
> ProductivityReport.build("gen_report")

Measuring execution time in microseconds:

> :timer.tc(fn -> ProductivityReport.build("test_report") end)
> :timer.tc(fn -> ProductivityReport.build("gen_report") end)

Exploring Elixir's syntax:

> %{a: 1, 2016: 4}
** (SyntaxError) iex:1:13: unexpected token: ":" (column 13, code point U+003A)
> %{a: 1, "2016": 4}
%{"2016": 4, a: 1}
> map = %{:a => 1, 2016 => 4}
%{2016 => 4, :a => 1}
> Map.get(map, 2016, :default)
4
> Map.get(map, 2017, :default)
:default

Resources

About

Rocket Seat - Ignite - Elixir - Challenge 3 - A simple Elixir program that generates an employee productivity report from raw CSV data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages