At Wooga, John-Paul had the chance to rewrite an old PHP game server to Erlang with very little experience. Now the project is finished and we learned a lot about Erlang which he'd like to talk about. The common beginner mistakes, oddities and other slow downs and how to avoid them.
Talk objectives:
The goal is to show beginners how fast they can get started with Erlang projects if they avoid some of the common beginner mistakes and slow downs. On the other side I hope I can stir up some discussions about Erlang itself and making it a little bit more approachable.
Target audience:
Beginners and experienced Erlang developers, interested in improving the Erlang world itself.
11. OTP RELEASES
‣ Skip if you own / operate the
infrastructure where the app is running
‣ Skip if you deploy frequently
‣ Use if your customer owns / operates
the infrastructure
‣ Use if you ship the app to the customer
and updates are rare and huge
12. TESTS
‣ eunit
‣ common test
‣ etest
etest_http
17. STRINGS & TIME
‣ Text Manipulation: Do it somewhere else
‣ Time Operations: Gregorian / Half-Baked
18. STRINGS & TIME
(Time.now - 3600).sunday?
=> true
> 3.months.ago.end_of_week.midnight
=> Sun, 18 Nov 2012 00:00:00 CET +01:00
"Hello World is overrated".gsub(/o/) do |match|
match += "ooo"
end
=> "Helloooo Woooorld is ooooverrated"
20. SYNTAX …
‣ Not as bad as you initially think
‣ Do not blindly follow emacs mode
dogma
‣ Do not hide more than necessary
‣ Try to structure your code in the most
readable way