ErlIDE: Erlang and Eclipse, hands-on
| ErlIDE is an open-source plug-in for the Eclipse development environment. It enables Erlang developers to use Eclipse for Erlang developing and debugging, and features full support for editing, navigation, testing, running and debugging erlang code. It also supports refactoring through Wrangler. In my tutorial I will show how to install Eclipse and ErlIDE. We will use ErlIDE hands-on to develop a small Erlang application and run unit tests. I will also show how to use ErlIDE with a larger application, making use of the navigation, tracing and debugging features. |
Hands-on DBG and TTB introduction
| The Erlang tracing capability enables the developer to look inside any part of the system in an easy and efficient way. The Erlang dbg application facilitates this capability and is an extremely powerful tool which can be used when inspecting, tracing and debugging Erlang systems in real time and this tutorial will go through the basic to intermediate levels. We will go through how to enable tracing and how to interpret the results. We will then look at how to build basic debugging/tracing capabilities in distributed systems using the Trace Tool Builder (ttb) as a platform. We will be looking at some hands-on demos where we will try the ideas and concepts and make you confident enough to delve deeper into the documentation to explore the more advanced features. |
McErlang: a model checker for Erlang
| McErlang is a tool which helps finding bugs and understanding them. In
this hands-on tutorial we will illustrate the use of McErlang through
examples, including the latest improvements implemented in the tool. |
| The Nitrogen Web Framework allows Erlang developers to build interactive web applications in full-stack Erlang. This tutorial teaches beginners how to build web applications with Nitrogen. Participants will learn how to download and install Nitrogen, generate a new web project, create pages, manipulate page elements using Ajax and Comet, and create a custom elements and actions. The class will culminate with participants creating a simple Nitrogen-based application. |
| QuickCheck support property based development. Instead of writing test cases for your applications, you write a one-pager with a QuickCheck property from which hundreds of test cases are generated automatically. QuickCheck simplifies failing cases to a minimal example on a test failure (so that fault diagnosis is quick and easy). QuickCheck enables developers to dramatically improve test coverage, and find obscure errors at an earlier stage, lowering costs and improving quality as a result. In this tutorial we will look at QuickCheck Mini, the free version of the QuickCheck library, and use examples to show how developers write QuickCheck specifications—which are actually Erlang programs using the QuickCheck API—and use them to test code written in Erlang or other programming languages. We will show how QuickCheck’s shrinking finds tiny examples that provoke errors, making the step from observing a bug to diagnosing it very short indeed, and we will show how property driven development can produce code that is solid from the word go. |
| RefactorErl is a source code analyzer and transformer tool aimed at refactoring Erlang software. The tool itself is written in Erlang with a unique approach: semantic analysis results are stored in a Mnesia database to avoid repeated analysis of the same source code, and simple, syntax-based manipulations are available that hide the details of handling separators, comments, and code layout. Beside the 24 implemented refactoring transformations the tool has a complex analyzer framework. For example, it provides data flow analysis, dynamic function call detection, side-effect analysis, etc and a user level query language to query semantic information or structural complexity metrics about Erlang programs. This 90 minute tutorial introduces the main features of RefactorErl: how you can use it simply as a refactoring tool, and how analysis results can help you during software development and maintenance. The main part of the talk focuses on the usage of semantic queries to support code comprehension and how can you use it from the different user interfaces. |
Testing Database Applications with QuickCheck
| In this tutorial we concentrate on Erlang applications that use a database in the bottom. The database can be Mnesia, mySQL or any other. When testing such database application on needs to test the business logic. The business logic can be seen as rules that should hold for the data in the database, but these rules cannot easily be guaranteed by the database itself. For example, it is hard in Mnesia to guarantee relations between data and it is hard in mySQL to guarantee on the database level that only specific customers can order more than 10 products. These business logic rules are normally implemented in Erlang on top of the database. In order to verify that the business logic is not violated by the application one would like to test all possible scenario's of users storing and retrieving data from the database. Such random behaviour is easily modeled in QuickCheck and in this tutorial we show how one does so. By means of a small web-shop example we show how complex scenario's are automatically testsed when the model is constructed. |
Testing Erlang multi-core applications with PULSE
| PULSE is an addition to QuickCheck that enables you to find concurrency
errors like race conditions and deadlocks in Erlang programs. Even if
those errors may not show on a single processor system, they may be
sitting there waiting to be revealed when you switch to multi-core. With
PULSE you explore random schedulings that are possible on a multi-core
but not on a single core, therewith increasing the possibility to reveal
weird errors. Of course, the test case is minimized when finding a
concurrency error, which results in a repeatable test case that helps to
analyze the cause of the error quickly. In this tutorial little knowledge of QuickCheck is required; it suffices if you participated in a QuickCheck talk or tutorial before. We will look at a few examples in which QuickCheck and PULSE are used to find concurrency errors. |
Testing OTP libraries with QuickCheck Mini
| QuickCheck Mini, the free version of Quviq QuickCheck, is ideal for testing data structure implementations. The desired behaviour is specified via a simple model, and then actual results are compared against the model, yielding minimal failing test cases when the implementation breaks. Key techniques are: * generating //symbolic// test cases, for readable test failures * dealing with partial operations * controlling the distribution of test data * specifying shrinking * expressing correctness wrt the model Participants will learn all of these techniques, and apply them to standard OTP libraries such as lists, sets, and queue. Afterwards, participants will be well prepared to perform similar testing of their own libraries. |
| UBF is the "Universal Binary Format", originally designed and implemented by Joe Armstrong. See http://www.sics.se/~joe/ubf.html for full details. My company has added a large number of enhancements and improvements to the original UBF framework. This work is slowly making its way into the wider world, using an MIT license and distributed via GitHub (http://github.com/norton/ubf/tree/master). During the tutorial's first half, we would like to present about the basics of UBF - UBF(a), UBF(b), and UBF(c), the supported network wire formats (UBF, EBF, JSF and JSON-RPC, and most recently TBF), and the various existing client implementations (erlang, python, java, ..). During the tutorial's second half, we like to provide an opportunity for some hands-on experience to download, to build, to develop, and to test a real UBF contract, real UBF client, and real UBF server. The goal of the exercise is to implement your own Bert-RPC (http://github.com/norton/ubf-bertrpc) server using UBF. |
Wrangler as a part of the software development process
| Wrangler is a refactoring tool which supports interactive refactoring for Erlang programs. It is integrated with both Emacs and Eclipse. Wrangler supports a variety of structural, macro and process refactorings, as well as functionalities for code inspection, such as semantics-aware expression/variable search, duplicated code detection, improper module dependency detection, etc. In this tutorial, we'll show you how to use Wrangler as a part of the software development process. Apart from the basic usage of Wrangler, we will also demonstrate how to use Wrangler to eliminate duplicated code, and to improve the module structure of Erlang programs. |