Skip to content

Instantly share code, notes, and snippets.

@zacid
zacid / exercise.md
Last active February 27, 2022 09:56
Software Engineering Exercise

Software Engineering Exercise

Please make use of a random public API of your choice to demonstrate your ability to:

  • Fetch data from 3rd party source
  • Persist the data
  • Transform the data by doing something interesting with the data
  • Deliver value from the responses

Outcome:

@zacid
zacid / tasks.exs
Created February 25, 2017 12:47
Comparison between parallel map in Elixir and map
# p_map is a parallel map which runs each and every process concurrently
> p_map = fn -> 1..5 |> Enum.map(fn(i) -> Task.async(fn -> :timer.sleep(200); i + 1 end) end) |> Enum.map(fn(tsk) -> Task.await(tsk) end) end
# slow_map runs each and every iteration one after the other
> slow_map = fn -> 1..5 |> Enum.map(fn(i) -> :timer.sleep(200); i + 1 end) end
> :timer.tc(fn -> p_map.() end, [])
{200830, [2, 3, 4, 5, 6]}
> :timer.tc(fn -> slow_map.() end, [])
Verifying that "zacman.id" is my Blockstack ID. https://onename.com/zacman

Keybase proof

I hereby claim:

  • I am zac156 on github.
  • I am zacman (https://keybase.io/zacman) on keybase.
  • I have a public key whose fingerprint is 4B5C A1D0 1AC5 FA56 39F9 17DF 1DC4 557B 2485 6574

To claim this, I am signing this object:

/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp();
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different