Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Adding to this, the primitives erlang, and descendants, give you are very easy to work with, and therefore very easy to test.

Take GenServer. The workhorse of most BEAM systems. Everything it does it basically just calling various functions with simple parameters. So you can test it just by call l calling those functions and manually passing parameters to it, and asserting on its output. No need to set up complex testing systems that are capable of dealing with asynchronous code, no need to handle pauses and wait for coffee to finish running in your tests. It's something a lot of juniors tend to miss, but it's liberating when figured out



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: