E is for excellent: Appendix E
Alain O'Dea
18 posts
|
Don’t forget to read Appendix E. It explains many of the tools that come with Erlang like Code Coverage, Profiler, and Cross-reference analyzers. It also gives a quick overview of the Debugger and debugging technique, provides some explanation of the errors the Compiler generates, and explains how to use the Tracing tool. Seriously, read Appendix E. It takes Erlang programming from a design exercise to a seriously pragmatic and productive endeavor. I went from running mind-experiments of my code to doing unit testing with coverage analysis within an hour of skimming over Appendix E. These tools are all invoked using Erlang code. This makes automating workflows that use them surprisingly easy and convenient. A module called project which I created to handle builds and coverage for a game server I am writing: -module(project).
-author('alain.odea').
-license('http://opensource.org/licenses/afl-3.0.php').
-export([make/0, cover/0]).
each(Fun) ->
lists:map(Fun, [actor, escrow, game, hex, inner_perimeter,
intersection, outer_perimeter, path, player,
server, status, stockpile, test_game]).
make() ->
each(fun(Mod) -> shell_default:c(Mod, [debug_info]) end).
cover() ->
cover:start(),
each(fun cover:compile/1),
test_game:run(),
each(fun cover:analyse_to_file/1).
|
1 post, 1 voice
