The Best Library I Ever Designed

The Best Library I Ever Designed

Faafc04d9e69b73b9f49995fd4c94d4d?s=128

Andrea Leopardi

May 04, 2017
Tweet

Transcript

  1. LIbRarY DEsiGnED tHe bESt I evER

  2. WhAT HOw

  3. @wHatYOuhIDe

  4. FORZA FOOTBALL

  5. None
  6. WhAT HOw

  7. WhAT

  8. abStRacT

  9. abStRacT COmPleX cODe

  10. abStRacT PAtTerNs/IDeAs

  11. TwO TyPEs OF liBrARiEs

  12. "leT mE HanDlE ThiS fOR yoU"

  13. {:ok, conn} = Redix.start_link() Redix.command(conn, ["GET", "my_key"]) #=> {:ok, "my_value"}

  14. "HEre'S hOW yoU HanDlE ThiS"

  15. Saul.validate( some_data, one_of([&is_ref/1, &is_pid/1]) )

  16. leT mE HanDlE ThiS fOR yoU heRE's How YOu hANdLe

    tHIs
  17. HOw

  18. EXteNsIBle

  19. buILt-iN 80 exTEnSibLE 20

  20. Mix.Shell Mix.Shell.IO Mix.Shell.Process Mix.Shell.Quiet

  21. geT Out OF poINtS

  22. LAw oF ABsTrACtiONs LEakY

  23. fragment( "lower(?)", post.title )

  24. COmPosABle

  25. LAnGuAge FEatURes USe

  26. sTreAMs

  27. Xandra.stream_pages!(query) |> Task.async_stream(mapper) |> Enum.reduce(acc, fun)

  28. EXisTInG cONveNtIoNs KnOW

  29. {:ok, term} {:error, term}

  30. FOcuSEd coMpOSabLE <3

  31. EaSy USe TO

  32. coNsISteNt pRinCIpLe Of LeAsT asTOniShMEnT

  33. TrANsParENt ThIN enOuGh ThAT yoU Can SEe ThROugH

  34. {:ok, socket} = :gen_tcp.connect GrEaT ErRorS

  35. DOcuME nTatIoN

  36. WrITe dOCs FOr YoUr FutURe sELf

  37. WhAT HOw

  38. @wHatYOuhIDe