Developer3 2013

Page 1

No 3/2013

The DEVELOPER JAVAZONE SPECIAL EDITION

FOR DEVELOPERS AND LEADERS

Java 8 to the rescue!? Fredrik Vraalsen Page 4

Configuring Laptops is

HARD

Tim Berglund Page 18

Pitfalls of grid computing Trond Arve Wasskog Page 14

a v Ja

ne o Z P

p

e ag

8

e

Se

SE 2 -1 1 1

1


The DEVELOPER

N 3 2013

A Human Activity

Contents

o

As you start out to become a programmer your focus is on the technical details. On getting your programs to do what you intend. In the beginning this is challenging, but the computer follows predictable rules, and with some effort you soon get the hang of it.

The classic image of the prototypical developer is an introvert thinker who enjoys spending hour after hour alone in front of his computer. But since 1971 - when the book Psychology of Computer Programming was first released (still a good read) - we have known that programming is first and foremost a human activity.

Java 8 to the rescue!? ............................................................................................. p. 4

Analytics, real-time, NoSQL, search

JavaZone 2013................................................................................................................... p. 8

NDC London

Get connected:

Programming with immutabiLity in Java

An introduction to the Neo4j Graph Database .......... p. 10

Akka - Distributed Concurrency in Java

Pitfalls of grid computing ........................................................................... p. 14

COURSES

Configuring Laptops is Hard .................................................................. p. 18

Course descriptions .............................................................................................. p. 49

A Maturity Model for Continuous Delivery Android and testing

........................................

p. 32

.....................................................................................................................

p. 34

..........................

p. 36

.............................

p. 44

..................

p. 24

Course overview Oslo ........................................................................................ p. 62

............................................................................................

p. 28

Course overview London .............................................................................. p. 64

As a developer I value working with people. Through communication we learn what problems need to be solved, and together we grow ideas of how to best do that. And as a team we have the dicipline needed to do it correctly. Inspiration to grow as a developer also comes from other people - through blogs, sosial networks, colleagues, user groups, conferences etc. When I go to a developer conference I get a unique opportunity to talk to a diverse set of people, which can all give me something valuable.

Editor: Kjersti Sandberg

If you don't take advantage of this opportunity you are missing out. Programming is a human activity - if most of your focus is on the machine you are probably doing it wrong!

Publisher: Norwegian Developers Conference AS By Programutvikling AS and DeveloperFocus Ltd Organisation no.: 996 162 060

Member of Den Norske Fagpresses Forening

Address: Martin Linges vei 17-25, 1367 Snarøya, Norway Phone: +47 67 10 65 65 E-mail: info@programutvikling.no

Uncredited photos are from Shutterstock, except portraits. Print run: 13,000 Print: Merkur Trykk AS

Password

HLR

Love SMS

Reminders

MMS

No 2/2013

N E W S A N D I N F O R M AT I O N F O R D E V E L O P E R S A N D L E A D E R S

ing

ation

Confirm

Voting

Posisjoner

Verifying

n

Donatio

The dEvELoPEr The deveLoPer Mobile ng marketi

Position

ing

s

Warning

d Passwor

Survey

Loyalty

Club

sCrolling both Ways

Voting

Merge SMS

ndC sPeCiaL edition

FOR DEVELOPERS AND LEADERS

Winrt for the ios developer

ng

Marketi

RD

IC ECOLAB

Pr

int in

g compa

ny

Advertise in The Developer

No 1/2013

SMS Billing

Publication schedule 2013: 15. November

EL

Torbjørn Marø Acting CTO of PSWinCom blog.kjempekjekt.com

Marketing Manager: Charlotte Lyng

24 1

And if you want to do a human activity well you have to interact with other humans, you can only go so far on your own. Understanding the human mind matter as much as technology when creating great software.

ElasticSearch:

67 2

And users are not so predictable. They don't seem to follow any sensible rules at all.

Similarly you can't possibly learn the craft well without being exposed to other programmers with different ideas, different approaches, and different skillsets. You need to listen, to get inspired. And most importantly: You need to get feedback on your own understanding, your thoughts and your ideas - even though this might be terribly frightening and sometimes painful for your self-esteem.

ARTICLES

NO

Then a much harder problem presents itself. Code is written to run on computers, but it always has to interact with humans in some way. In order to create usable software you have to understand the users - even when the only users are other developers (maybe just yourself).

JavaZone Edition

by iris Classon page 8

and meet your target group!

g Orderin

We love SMS! SMS - simply the world’s most effective communication method

Code for kids

15 years’ experience 13 APIs for easy integration

Page8

SMS wholesale worldwide

Business customers in more than 100 countries Direct third-line support to our developers

n

ing

Booking

d Passwor

Donatio

Verifying

Reminde

ord Rabekkgata 9, Moss - Norway Passw

Voting

ation

Confirm

sales@vianett.no l +47 69 20 69 20

Survey Payment

HLR

rs

Posisjoner

SMS Billing

MMS

ing Position

Single point of contact for worldwide SMS distribution

Loyalty

Voting

Merge SMS

CoffEEsCriPT

by Jøran lillesand and eirik lied page 4

TransiTioning suCCEssfuLLycontributors: from ThE iT sidE To BusinEss by howard podeswa John Zablocki page 20

NORWEGIAN DEVELOPERS CONFERENCE 2013

mark Seemann

torstein nicolaysen

vidar Kongsli

helge grenager Solheim

Jørgen vinne iversen

russ miles

Jon mccoy

alvaro videla

Jon Skeet

giovanni asproni

alan Smith

michael heydt

bryan hunter

Stuart lodge,

oslo Spektrum, oslo June12-14 Pre-workshops, 10-11 June

1

g

Orderin

Page 4

byalvaro videla Page 10

Club

ng

Marketi

For more information:

www.vianett.com

bjørn einar bjartnes

Power rabbit

Mobile ng marketi

For more information about advertisement, please contact Charlotte Lyng at +47 93 41 03 57 or charlotte@programutvikling.no

PLaying with drones and streams

Dispatch of about 700,000 SMS per day Online monitoring of all events worldwide 24/7

Developer_1_2013.indd 1

11.02.13 15:53

dominick baier

1 Developer_2_2013_10mai.indd 1

15.05.13 14:24

3


Š Shutterstock

Java 8 to the rescue!? By Fredrik Vraalsen

The last couple of years have seen a lot of exciting languages emerging in the Java ecosystem and vying for the JVM throne. Java the platform is arguably stronger than ever. Java the language however is starting to show it's age. The last major new language feature was generics in Java 5, almost 10 years ago.

4

This is about to change, big time. Java 8 is poised to bring the largest language changes Java has ever seen. Will we finally be delivered to the promised land of functional programming? Can we stop worrying about learning Scala or Clojure or the other new kids on the block? Let's take a brief look at what's coming. LAMBDAS, ANONYMOUS FUNCTIONS, SAMS, OH MY! The main new feature in Java 8 is Lambda expressions, also known as anonymous functions. Lambdas let you define stand-alone functions without having to wrap them in a class definition. An obligatory Hello World example: Runnable helloWorld

=

() -> System.out.println("Hello world");

5


Here we define an anonymous function, which consists of an (empty) parameter list, an arrow symbol, and finally the function body. We then assign the function to a variable of type Runnable. Nowhere in our code did we define a run() method, however we can still assign and call our anonymous function as if it was a normal Runnable instance: helloWorld.run(); // Prints out "Hello world" // to the console

How is that possible? Lambdas can be defined and used in place of functional interfaces. These are interfaces with just a single abstract method (SAM). Any lambda with the same signature (input and return types) as the SAM can "masquerade" as the implementation of that interface. In our example, the function has no input parameters and a return type of void, which is the same signature as the run() method of Runnable.

3. Perform a terminal operation, such as collecting the resulting elements into a new collection or computing the sum of a set of numbers. Since the Stream API abstracts away the actual control flow (loop implementation), we can substitute different implementations. For instance, to spread the computation across multiple threads, simply replace the call to stream() with parallelStream() like so: List<String> namesOfAdults = people.parallelStream()...

Parallelism for "free"! Of course, there is still no such thing as a free lunch. There are overhead costs involved, so use with care.

The good news is existing APIs which use single- method interfaces can utilize lambdas from day one. The implications are many. Imagine replacing pretty much every anonymous inner class you have ever implemented with lambdas? This simplifies writing listeners, callbacks, filters, and much more.

SCRATCHING THE SURFACE We've just barely scratched the surface of the changes in Java 8. In addition to lambdas we will get a host of other new features. Interfaces can have default methods with implementations in the interface itself. This allows for extending interfaces without breaking existing implementations. Method handles can be used instead of anonymous functions in a number of cases, making the code more concise. And of course there are many API changes that utilize the new functionality.

As we have seen, Lambdas can be assigned to variables. They can also be passed as parameters

THE COMPETITION So how does Java 8 fare against the competition?

to other methods or functions, and functions can create and return new functions as their results. This is the definition of higher-order functional programming.

Let's compare with Scala. Scala is a new-ish languages on the JVM (it's actually been around since 2004). It's a hybrid language, combining object-oriented and functional paradigms. Like Java it's also a statically typed compiled language.

STREAMS Higher-order functions enable us to abstract away control flow. Java 8 introduces the new Stream API to take advantage of this. Manually writing loops to iterate through a collection will be a thing of the past! Here's an example of filtering and transforming a list of Person-objects: List<Person> people = ... List<String> namesOfAdults = people.stream() .filter(p -> p.getAge() >= 18) .map(p -> p.getName()) .collect(Collectors.toList());

The arguments to the filter() and map() functions are anonymous functions which take individual Stream elements as input, in this case a Person object, and return a boolean and a String, respectively. Using the new Stream API involves the following steps: 1. Obtain a Stream from some source, such as a Collection or I/O.

6

2. Perform one or more intermediate operations on the elements in the stream (filter, map, etc).

Here's an implementation of the list transformation example above in Scala:

contain any built-in immutable collection implementations, and it's often impractical or burdensome to define immutable data models. Furthermore, Scala and Clojure provide very good support for higher level concurrency mechanisms, such as actors and software transactional memory (STM). CONCLUSION Many of the missing pieces will no doubt be supplied as people start tailoring libraries and frameworks to Java 8, such as better immutability support and more high-level concurrency mechanisms. Java 8 will also open the world of functional programming to a host of new developers, which is a good thing. However, Java 8 won't be released for months yet and it will likely be years before we can put it into production in enterprise systems. It seems natural to ask: Is it not time to switch to one of the other existing and proven languages on the Java platform, that already provide all these features and much more?

Fredrik is a developer and consultant, currently at Knowit but soon to be Iterate. The last couple of years he's become interested in functional programming and in particular how to apply what he learns to his daily job as a Java developer. He's held training courses in Scala and also dabbled in Clojure, and likes to speak at conferences.

One day workshop 10th September at IT Fornebu

GIT & GITHUB FOUNDATIONS with Tim Berglund & Matthew McCullough

www.programutvikling.no

Spring and Hibernate training with certified Spring trainer M책rten Haglind

val namesOfAdults = people filter(_.age >= 18) map(_.name)

That's quite a bit more concise than the Java code, while arguably improving readability by removing unnecessary cruft. This is partly achieved through a powerful collection API, and partly because of strong type inference, which let's you avoid repeating type information everywhere (the compiler can figure it out!). IMMUTABILITY Another strength of Scala and other languages such as Clojure are their support for working with immutable data structures. In this day and age of multi-core and distributed systems, shared mutable state is often referred to as the root of all evil. Functional programming promises to alleviate a lot of the pains related to concurrency and parallelism, but you need support both for functions and immutability. Java is missing the latter to a large degree; it does not

www.programutvikling.no

DEEP C

For C and C++ programmers with experience with Olve Maudal

www.programutvikling.no

7


w ys

John dee: The quintet While You Slept play atmospheric rock from their debut album Push/Pull. PhoTo: Vilde indrehuS

dJerv

John dee: djerv, with lead vocalist Agnete Kjølsrud, play a mix of aggressive rock and metal. PhoTo: Jørn Veberg

PrograM:

JavaZone 2013 brings you a zesty mix of music, food and enlightenment.

Feed your mind, body and soul by Inger renate Moldskred stIe

t

he conference gathers speakers from all over the world to give us new perspectives and ideas to bring back to our workplaces ans lives; and to our programming. This years conference will be a mix of parallel, enlightening sessions and culinary food. And as you gain access to the grand music happening, The AweZone Festival at Rockefeller, the experience is complete.

The Flying Culinary Circus

chefs Trond Svendgård (left to right), Tor Jørgen Kamprud Arnesen, hans Kristian larsen and Mathias Spieler bugge fly in to serve us culinary foods from the corners of the world.

FACSiMile: FCCirCuS.CoM

8

Food galore The travelling chefs in Flying Culinary Circus, land once again in Spektrum to serve us tasty food from all corners of the world; serving American, French, Italian and Japanese food. In addition there’ll be a salad bar, a dessert restaurant and a street food/street art-restaurant, whatever that is. Come and find out, and find your favourite. I know which ones I’ll favor. The restaurants, sponsored by Webstep, Accenture, Kantega, Steria, Miles, Computas and Kodemaker; together with javaBin, are all placed in the center of Oslo Spektrum in the Expo area and are open during the day. The Expo will be the place to be during

session breaks; the place to get fed and entertained, basically. And maybe you’ll find interesting new connections as well. aweZone FestIval Thursday night we’ll all gather and walk up to Rockefeller and John Dee for a grand sound experience; The AweZone Festival. Four bands and two partner bands will fire up your dancing feet with a variety of music. Bigbang enters the Rockefeller stage with music from their latest released album The Oslo Bowl, with inspiration from Los Angeles and Norwegian folk; an album made in a tribute to Oslo and it’s ability to inspire great art about anxiety and alienation. “To tribute a city’s problematic sides is something LA is good at, and it is time we start appreciate the deeper soulful qualities a city like Oslo has,” the rock band states. Also playing at the main stage is Lemâitre, a young Norwegian duo consisting of Ulrik Denizou, with background in rock/indie bands and Ketil Jansen, with background in electronic music; performing entertaining, visceral and thought provoking multimedia show in light, visuals and sound. In good tradition, we’ll be presented with music from partner bands on Oslos ultimate rock stage.

Rockefeller Main Stage Partner Bands Lemâitre Bigbang John Dee Live Club While You Slept Djerv

rockeFeller: øystein greni, nikolai hængsle eilertsen and olaf olsen in bigbang perform music from their new album The Oslo Bowl, a tribute to the capital. PhoTo: KnuT brY

bIgbang

Playing at John Dee are While You Slept, a quintet from Oslo playing atmospheric rock; music ranging from wonderful harmonies to pulsating guitar riffs, balancing the beautiful and the raw. In contrast, we’ll hear Djerv with their aggressive rock, borderline metal and with black metal references. Feed your mind and body at JavaZone, and remember to bring your friends and colleagues/partners to AweZone to soothe your souls. n

É

leMaItr

rockeFeller: Ketil Jansen and ulrik denizou, a young norwegian orwegian nSSon duo: lemâitre. PhoTo: FredriK A. hAnSSon

9


Neo4j is a JVM-based, open source graph database: a fully ACID, online (“real-time”) database management system with Create, Read, Update, and Delete (CRUD) methods that expose a graph data model. Graph databases like Neo4j excel at managing billions of densely connected, variably structured entities. Using a graph database, subject matter experts, developers and data architects can model, store and query complex data close to its native form. Given that many of the most important questions we want to ask of our data require us to understand the types, number, and qualities of the many different relationships that connect entities, this is a tremendously important capability in today's data technology landscape. Graph database applications cover a wide spectrum of business and technical use cases. Today, Neo4j is being used in business-critical applications in the domains of social networking, recommendations, datacenter management, logistics, entitlements and authorization, route finding, telecommunications network monitoring, fraud analysis, and many others. THE PROPERTY GRAPH DATA MODEL Figure 1 shows an example of the kind of graph data that can be stored in Neo4j.

GET CONNECTED: An Introduction to the Neo4j Graph Database

Join-intensive queries in a relational database are notoriously expensive, in large part because joins must be resolved at query time by way of an indirect index lookup. As an application’s dataset size grows, join pains begin to manifest themselves, and performance deteriorates. In Neo4j, in contrast, every relationship acts as a pre-computed join, and every node as an index of its associated nodes. As a result, Neo4j turns complex joins into fast graph traversals, which maintain millisecond performance irrespective of the overall size of the dataset. Neo4j's mainly schema-free data model provides tremendous flexibility when it comes to modeling the variably structured entities that make up a complex domain. No two nodes (or two relationships) need have exactly the same set of properties. More importantly, relationships (the graph database equivalent of joins) are defined with regard to specific node instances, rather than classes of nodes, meaning that no two nodes need have the same number or kind of connections. In the graph in Figure 1, for example, we see that a WORKS_FOR relationship exists between the node instances representing Sam and Acme, not Person and Company. Contrast this with relational schemas, where joins have to be planned up front, and uniformly applied to entire classes (tables) of entities. AN EXAMPLE: GRAPH SEARCH In the rest of this article I'll show how you can create a simple graph search application using Neo4j.

By Ian Robinson

By Ian Robinson

Figure 1: An example graph

© Shutterstock

The graph shown here is an example of a property graph. The property graph data model represents entities as nodes, and the connections between entities as named and directed relationships. Both nodes and relationships can have properties, consisting of name-value pairs, assigned to them. These properties can be used to represent things such as the attributes of an entity, or the strength or weight of a connection. In addition, labels can be attached to nodes in order to group them, add them to indexes, and apply schema constraints to them.

10

PERFORMANCE AND FLEXIBILITY Neo4j is intended to be a drop-in replacement for a relational database. It has all of the transactional and high availability characteristics of its relational brethren, but with the added benefits of orders of magnitude improvements in performance for join-intensive data queries, and increased flexibility when modeling and storing complex, variably structured data.

First, download the Community Edition of Neo4j suitable for your OS. The examples are based on a milestone preview of Neo4j 2.0, which you can download from http:// www.neo4j.org/download. (Remember to download a 2.0 version rather than 1.9: the milestone at the time of writing is 2.0.0-M03.) Extract the distribution and in your terminal navigate to its top-level directory. From here, start the Neo4j server: • On Linux/Mac issue bin/neo4j start from a terminal • On Windows issue bin\Neo4j.bat from the console

11


Once you've started the server, you can open the Neo4j Web UI, which is available at http://localhost:7474. Click on the Data Browser tab, and in the text box type: CREATE (acme:Company {name:'Acme, Inc'}), (sam:Person {name:'Sam'}), (lucy:Person {name:'Lucy'}), (bill:Person {name:'Bill'}), (java:Skill {name:'Java'}), (cSharp:Skill {name:'C#'}), (neo4j:Skill {name:'Neo4j'}), (ruby:Skill {name:'Ruby'}), (sam)-[:WORKS_FOR]->(acme), (lucy)-[:WORKS_FOR]->(acme), (bill)-[:WORKS_FOR]->(acme), (sam)-[:HAS_SKILL{level:'Expert'}]->(java), (sam)-[:HAS_SKILL{level:'Beginner'}]->(cSharp), (sam)-[:HAS_SKILL{level:'Intermediate'}]->(neo4j), (lucy)-[:HAS_SKILL{level:'Expert'}]->(java), (lucy)-[:HAS_SKILL{level:'Expert'}]->(neo4j), (bill)-[:HAS_SKILL{level:'Beginner'}]->(neo4j), (bill)-[:HAS_SKILL{level:'Intermediate'}]->(ruby) RETURN acme

Our CREATE statement creates eight nodes in total: one for the Acme company, three for its employees, and four to represent employee skills. Following the creation of these nodes, we then create some relationships. (sam)-[:WORKS_ FOR]->(acme) creates a relationship named WORKS_FOR that connects Sam to Acme. Cypher's syntax requires the relationship name to be placed between square brackets. We then use dashes and greater than (>) or less than (<) symbols to represent the relationship's direction. In this example, the WORKS_FOR relationship extends from Sam to Acme. Notice how we've used the identifiers sam and acme to reference nodes that were created earlier in the statement. To execute this statement click the Execute button, or type CTRL-ENTER.

MATCH (company)<-[:WORKS_FOR]-(sam:Person)-[:HAS_SKILL]->(skill), (company)<-[:WORKS_FOR]-(colleague:Person)-[:HAS_SKILL]->(skill) WHERE sam.name = 'Sam' RETURN colleague.name AS name, count(skill) AS score, collect(skill.name) AS skills ORDER BY score DESC

This query finds all of the people who work for the same company as Sam (Sam's colleagues) and who have one or more skills in common with him. This is Cypher's equivalent of a SELECT statement. Cypher works by finding graph patterns in your graph data. Much as a regular expression finds character patterns in text, Cypher finds node and relationship patterns in a graph. In this particular example, the pattern we're trying to find looks like Figure 4.

The WHERE clause anchors the sam node in our pattern to the node in our graph with the label Person and a name property whose value is ‘Sam’. The RETURN clause then creates a projection of the matched data. The results include each matched colleague's name, the number of skills they have in common with Sam, and a comma-delimited list of those skills. Executing this query generates the results shown in Figure 5. As we can see, Lucy shares two skills with Sam—Java and Neo4j—while Bill has just one skill in common—Neo4j.

This CREATE statement is written using Neo4j's Cypher query language. Let's take a moment to understand it in a bit more detail. (acme:Company {name:'Acme, Inc'}) describes a node. The node has been given a label, Company, and a single property, name , with the value ‘Acme, Inc’. This newly created node is assigned to an identifier, acme, so that it can be referenced

elsewhere in the statement. This will prove useful when we come to creating the relationships that connect nodes.

Figure 2: Creating data in Neo4j Once the statement has executed, the display will show a single results row, representing the newly created acme node (see Figure 2). Click on this node (Node 8 in the screenshot) to display details of its properties (at present, it has only one property, name). From here, you can click on the Switch view mode button, which is at the top-right, below the Guide button, and which looks like a three-node graph. This brings up a graphical view of Acme and its three employees. By clicking around, you can expand the nodes and relationships, as shown in Figure 3.

Figure 5: Query results You can learn more about graph databases at the Neo4j website (http://www.neo4j.org), where there are a wealth of tutorials and use case examples. Or you can read my book, Graph Databases, published by O'Reilly. If you want to discuss graph databases in more detail, grab me during JavaZone—I'll have some copies of the book with me—or tweet me at @iansrobinson. Figure 4: A pattern for finding colleagues with shared skills The MATCH clause here specifies this pattern using Cypher's pattern matching syntax. The first part of the MATCH clause, (company)<-[:WORKS_FOR]-(sam:Person)-[:HAS_SKILL]>(skill), says that we're looking for a node with a Person label, which we'll call sam, with two outgoing relationships: a WORKS_FOR relationship, which connects sam to a node we'll call company, and a HAS_SKILL relationship, which connects sam to a node we'll call skill .

Neo4j

Figure 3: Visualising the graph Now that we've constructed a (simple) graph, we can start to query it. Switch view mode again (by clicking the list-like button beneath Guide), then type the following query into the text box, and click Execute:

12

The second part of the MATCH clause, (company)<-[:WORKS_ FOR]-(colleague:Person)-[:HAS_SKILL]->(skill) , says that we're looking for a second node with a Person label that is connected to the company and skill nodes identified in the first part of the clause. This second Person node we'll call colleague. Between them, these two parts of the MATCH clause specify the diamond-shaped graph pattern shown in Figure 4.

Ian Robinson works on research and development towards future versions of Neo4j. Formerly Neo Technology’s Director of Customer Success, he has worked extensively with clients to design and implement graph database solutions. He is a co-author of Graph Databases and REST in Practice (both from O'Reilly) and a contributor to REST: From Research to Practice (Springer) and Service Design Patterns (Addison-Wesley).

13


Š Shutterstock

Pitfalls of grid computing

By Trond Arve Wasskog

The sweet spot for grid computing is pure in-memory processing, sending business logic to distributed data instead of fetching the data for processing. Such applications can crunch several thousands entries per second and scale horizontally. Tax Norway (Skatteetaten) has been implementing grid based processing after a successful Proof-of-Concept in 2012. However, there are several pitfalls to avoid that may not be evident. In this article we take a look at two of them. 14

MOVING DATA IS EXPENSIVE Grid computing requires that data is present and partitioned in memory. We encountered several pitfalls while moving data to grid computing heaven. The picture on next page (Fig. 1) outlines a grid for batch-like processing of data:

1. Documents to be processed arrive as large files that are scooped into the grid 2. Data is replicated between two different data centers for resilience and high availability

4. Data in the grid is archived in a database 5. Results are transferred to adjacent applications such as the data warehouse

3. A job is executed to perform the required processing 15


Each grid node produce its own event feed, which is concatenated and published as an Atom feed for clients to consume. Obviously, we are moving large volumes of data around in order to do in-memory processing. This resulted in an overall throughput of 300 entries per second, one order of magnitude less than anticipated. Several changes are planned or already implemented to increase throughput: • Parallel loading and processing of independent incoming files • No grid redundancy; if data are lost we can reload from file Fig. 1 The first operation is to parse the incoming data and load it into the grid. Putting single entities is limited to tens per second; a 20M dataset would take 20 days. We need bulk inserts with thousands of entities per second; 5000/sec and the 20M dataset is done in a good hour. Grid APIs typically provide a putAll(…) method for this purpose. Parallel inserts are required to increase load performance further, but unfortunately loading data is not straightforward to scale horizontally. As entities arrive in the grid, they are replicated across the data centers for redundancy. To avoid these backups from detaining inserts, they need to have the same throughput as the inserts themselves. Synchronous backups guarantee that both the primary copy and backups are complete before returning control to the client. This will kill your insert performance. Asynchronous backups offer a best effort alternative, usually with no guarantees on consistency or timing. What we really need is for the grid platform to optimize the backups similar to bulk loading, or support changing from asynchronous backups while bulk loading to synchronous backups during normal operation. If you need to make sure all data is persisted to an RDBMS, this also has to be optimized. Grid platforms sup-

16

port transparent persistence via a pluggable MapStore API. Configured as write-through the entities are persisted as they arrive. No surprise, this will destroy performance for large volumes. The alternative, write-behind, is an asynchronous mechanism for regularly bulk storing all entities marked as dirty. Implemented with the JDBC batch API, a write-behind throughput of thousands per second is possible. Additionally, parallel execution is attainable as each grid node saves its own entities simultaneously. The downside of write-behind is reduced consistency control; no guarantees are given that all data is persisted. Finally, we need to get data out of the grid. Again, we need to use bulk transfer to exceed thousands of entities per second; fetching items one by one does not scale. Instead of pushing data to client endpoints, an Atom feed can be used to stream data to pull-clients. This approach improves robustness and reduces temporal coupling as well as providing high throughput.

• No database archival; both input and output data are available elsewhere In general grid computing is a good fit when data can be preloaded and/ or lives in memory for a longer period and is processed several times. Otherwise, take a look at stream processing platforms like Twitter Storm. REDUNDANCY GOTCHAS Grid platforms support data redundancy for high availability, horizontal scalability and fail-over capabilities. A primary node owns the entity, while it is copied to one (or more) secondary nodes using consistent hashing. When a node crashes, the secondary node promotes its copy and becomes the primary node for the entity. Additionally, re-balancing is initiated to recreate redundancy for the complete data set on the remaining nodes in the cluster. Adding a node to the cluster also results in re-balancing, assigning the new node ownership of its share of data. Fig. 2

One use case for this mechanism is to have redundancy between data centers localized on different geographical sites. If one data center fails – for example due to power failure, flood or earthquake – the other data center will continue as nothing happened and the application will experience no downtime. Dynamic scalability is another common use case, adding or removing nodes in the grid as demand rises and falls. Finally, rolling upgrades can be facilitated, updating application nodes one by one without interrupting normal operation.

a total of 40 GB. This was probably not the intention, but necessary to handle data center failure. A configuration option to disable redundancy when this happens would be useful. Of course, if the application does not depend on all data being available in memory, a sensible eviction policy could be used to avoid running out of memory.

SUMMARY Grid computing is a powerful platform for achieving extreme throughput and horizontal scalability. However, make sure that you get rid of the nasty habit of moving and storing data all over the place. Also make sure that redundancy is worth the cost; removing the need for redundancy will increase robustness and throughput significantly.

As mentioned in the previous section, redundancy comes at a cost. Inserting data into the grid is significantly hampered by backups while asynchronous backups may result in data inconsistency in case of failure. As an example, the chart below illustrates the insert throughput for a map with no backups, one synchronous backup and one asynchronous backup with Hazelcast 2.4. Fig. 4

Fig. 3 A possible unforeseen effect of redundancy is that memory requirements per node are quadrupled – not doubled – for a backup count of 1, compared to having no backups. In other words, a net data volume of 10 GB per node requires scaling each node for 40GB, not 20GB. Why? Consider a configuration of 4 nodes, each carrying 10 GB data. Redundancy requires that each node stores 10 GB backup data as well. In case of a data center failure, all data will be repartitioned on the remaining 2 nodes. Now, each node carries 20 GB of primary data and 20 GB of backup data,

Trond Arve Wasskog er utvikler, arkitekt og CTO i Bekk Consulting. Han har jobbet med utvikling på Java-plattformen i hele sin karrière, og satt sentralt både i PoC-en og i MAG-prosjektet.

17


Configuring Laptops is HARD If you ever doubted that you depend on your MacBook as if it were your very life, just wait to see what happens when it breaks. Two- or three-day turnaround at the Apple Store seems like months! You're stuck answering emails on a tablet and not writing a single line of code. It turns out your laptop is a tremendously valuable repository of programs, code, and configuration you've tuned over years to create a highly productive, sophisticated development tool. By Tim Berglund

How sophisticated is that tool? When it comes time to onboard a new developer, you get a sense of just how many individual utilities, applications, server components, and customized configuration files it takes to make your environment sing–because you have to do those things to a brand new machine. It can takes days to install and configure it all.

Š Shutterstock

Maybe you don't hire new developers every week, and maybe you've had good luck and haven't had your machine in the shop for years. Still, something is wrong with this picture. Like blacksmiths working for months on a single sword, we invest significant resources in the configuration of our development laptops. Unlike blacksmiths, we can come up with a powerful system for describing every step of our work and storing it in a Git repository.

19


Boxen is that system. In this article, I'll explain how Boxen is put together, how to use it to collaborate around system configuration, and what components you'll have to have in place to deploy it. I will assume you are basically familiar with two of Boxen's core components, Git and Puppet. If you aren't, don't worry–you'll still finish the article with a good understanding of what Boxen is and how it might be able to help you. BOXEN IS EASY Boxen [1] is a system for describing the configuration of development laptops using a declarative syntax and automatically applying that configuration using a single command line operation. It is based on Puppet [2], which emerged as a tool for configuring operational infrastructure like servers and networking equipment. This infrastructure was historically a large set of hand-crafted configuration spread throughout the data center in a form that was difficult to replicate, document, or test. Tools like Puppet emerged to turn that infrastructure into code, so it, too, could be versioned and collaborated-on in a Git repository. Boxen configuration files use the Puppet syntax, and Boxen ultimately uses Puppet itself turns those files into configu-

rated laptops. But Puppet was designed to configure servers, and the problems of developer laptop configuration are different from server configuration in subtle ways. Development machines are usually based on a set of organizational standards (i.e., everybody runs JDK 7, Ruby 1.9.3, and we use Homebrew for package management) with individual customization laid on top (i.e., I want the latest version of Gradle, I use ImageMagick, and I want the AsciiDoctor Ruby Gem installed globally, even if nobody else does). Boxen provides a central Git repository with a set of directory conventions used to express these laptop-specific configuration needs. It also defines extensions to the standard Puppet configuration syntax to make it easier to configure workstation settings. Boxen requires users to authenticate themselves before it does any work. Of course your company has its own authentication and authorization system for your own network and applications, and Boxen does not require that you integrate with that directory. Instead, it uses the GitHub API to authenticate your GitHub account credentials. Since the rest of your Boxen configuration is probably going to be stored on GitHub anyway, authenticating against GitHub simplifies Boxen deployment, rather than requiring painful,

one-off ID integration work for every new deployment. Boxen is an open-source project originally developed by GitHub for our own internal use. GitHub released Boxen under the MIT License [3]. REPOSITORY STRUCTURE Boxen stores all of its configuration information in Puppet files in a single Git repository. This repo becomes the focus for the entire organization's development workstation configuration effort, including everything from negotiating new standards to enforcing version upgrades to individual tweaks. Accordingly, the Boxen project provides a template repository on GitHub [4]. The boxen/our-boxen project is a minimum subset configuration repo, which you should copy and use for your own Boxen deployment. This saves you the trouble of creating the relatively complex template repo on your own. Precisely how to copy the repository is worth a bit of discussion. It's a Git repository with the full history of the development of the sample repo; however, the ongoing development of your Boxen deployment shouldn't maintain any connection with the template repo. You would never want to fork our-boxen or issue pull requests against it. The best thing to do is to clone it to your local development system and change the origin remote to point to the brand new GitHub repository that will hold your central Boxen repo. Usually this is a private repository that you would create under your company's organization account, or a repository in your internal GitHub instance if you use the behind-the-firewall GitHub Enterprise product. However you solve this problem, the you must end up with your own copy of the Boxen template repo, ready to accept commits and pull requests from the team. If this brief description is beyond your current Git skills, don't fear. There's a line-by-line listing of the commands to execute in the our-boxen README[5]. We will focus our attention on three key directories in the Boxen repository: config, manifests, and modules. THE CONFIG DIRECTORY The config directory contains two files: boxen.rb and basic. rb. You'll pretty much want to stay away from basic.rb, as it contains internal definitions only. boxen.rb, however, is where you go to set essential configuration parameters for your Boxen deployment. You'll choose the directory in which Boxen installs itself (and, by extension, under which it installs many other components you'll configure along the way), the name of the GitHub repository Boxen should look to for new configuration, and other key parameters. The configuration file [6] is fairly well-documented inline. THE MANIFESTS DIRECTORY The manifests directory contains the site.pp file, which is the primary Puppet source file executed when Boxen runs. You’ll have to have good Puppet skills to modify this file, but it’s where you’ll want to turn first for to set any global configuration that will apply to all machines configured by Boxen.

20

THE MODULES DIRECTORY The modules directory is where most of the action is. In the default template, it contains two subdirectories: people and projects. The people directory contains the personal manifests of all the people in the organization. The projects directory contains manifests specific to individual projects under development. In Boxen, a project is just a coding project in the way you would normally consider the term. A project has a name, a directory, a Git repo, and one or more other projects on which it depends. An example project manifest found in modules/projects/ manifests/reporting-dashboard.pp boxen::project { 'reporting-dashboard: dir => "${dev_src_dir}/reporting-dashboard", memcached => true, mysql => true, cassandra => true, redis => true, java => true, source => 'smartcorp/reporting-dashboard', }

When Boxen runs, it will clone https://github.com/smartcorp/reporting-dashboard to the directory specified in the dev_src_dir variable. This variable could be set in config/ boxen.rb, and can then be overridden in a personal manifest, which we'll take a look at in a moment. It will also find the projects called memcached, mysql, cassandra, and so forth, and ensure that they are installed as well. Each of those projects has a manifest of its own that defines its[-own-] dependencies, and potentially other custom configuration as well. It might be the case that all of your MySQL development instances should have InnoDB as the default storage engine. Well, the MySQL project manifest can ensure this either by dropping a customized /etc/my.cnf file on the developer's machine, or my executing MySQL command-line utilities after installing the database. Space does not permit us a detailed explanation of all possible project manifest options here, but you should know that the options are many.

NOTE: In its current version, Boxen only works on OSX-based laptops, but there is no reason in principle that future contributors couldn't add support for Linux and Windows. Historically, it was built for Mac users to scratch their own itch. We hope Windows and Linux users will catch the bug soon.

Project definitions are important, but they are no good if Boxen doesn't know which projects to install for which people. Moreover, centralized Boxen configuration might elect to install some standard packages and projects for the whole organization, but ultimately each developer must be in control of which projects (and which other elements of configuration) are deployed to his or her own machine. Boxen does this using the personal manifest. The personal manifest is a file located in modules/people/manifests , named after the individual's GitHub username. Read this example manifest carefully, including the inline comments.

21


An example personal manifest found in modules/people/ manifests/tlberglund.pp class people::tlberglund { # These are defined as applications under modules/projects/manifests include projects::training include projects::scriptdoctor # These are installed by a package manager (homebrew by default) package { 'lame': ; 'gradle': ; 'watch': ; 'imagemagick': ; 'groovy': ; 'emacs': ; 'GPGTools': provider => 'appdmg', source => 'https://github.com/downloads/GPG Tools/GPGTools/GPGTools-20120318.dmg' } # These are globally installed Ruby Gems ruby::gem { 'Asciidoctor': gem => asciidoctor, ruby => '1.9.3' } ruby::gem { 'watir-webdriver': gem => watir-webdriver, ruby => '1.9.3' } # Boxen has a syntax for setting OSX plists boxen::osx_defaults { 'Disable autocorrect': user => $::luser, domain => 'NSGlobalDomain', key => 'NSAutomaticSpellingCorrectionEnabled', value => false; 'Require fn for media keys': user => $::luser, domain => 'NSGlobalDomain', key => 'com.apple.keyboard.fnState', value => 1; } }

BOXEN WEB Boxen needs a place to go to authenticate the users running it. Anyone running Boxen must have a valid GitHub.com or GitHub Enterprise account, and that account must be a member of an organization configured to use Boxen. Rather than push this authentication configuration and logic to each installation of Boxen, it is centralized in a component called Boxen Web [7]. In addition to providing authentication, Boxen Web a single URL that displays a friendly page with easy bootstrap

22

instructions. Anyone championing Boxen inside their organization will have an easy time telling teammates, "Visit http://boxen.smartcorp.com and follow the instructions there"–particularly when those instructions amount to copying a single command-line command and running it in the terminal. Boxen Web gets this job done. SOCIAL IMPLICATIONS Boxen converts code into running infrastructure. When configuring servers with Puppet alone, infrastructure-as-code

is the only goal. That infrstructure is designed through a conventional engineering process, it is expressed through Puppet scripts, and Puppet turns it into running servers. Infrastructure is difficult to design, and the process presents all the normal social problems that attend collaborative engineering, but there is nothing uniquely social about the process in any sense that wouldn’t apply equally to infrastructure designed without Puppet. Configuration of development workstations is another matter entirely. Here, the tools must help arbitrate between the conflicting demands of the organization and the individual. The organization might want to standardize on Skitch for screen capture, whereas an individual developer might prefer Glui. The company might want to configure Git to use a the OSX Keychain credential helper, but a corporate trainer who often logs in to Git with nonstandard usernames might prefer the credential.helper configuration parameter to remain unset. There is a tension between the desire for uniform standards and the need for customization. Boxen stores all of these decisions in a single Git repository. This includes individual manifests and centralized company standards. Thus for anyone to be able to set individual preferences, he or she must also be able to modify files that affect corporate policy generally. This very coarse-grained permissions system might seem surprising in a typical enterprise environment, but it is quite intentional here. A finer-grained approach would put central policy manifests in one repository and personal manifests in another. Only a small group of administrators would have access to the central policy manifests, while everyone might be able to modify his or her own personal manifest. Boxen rejects this approach in order to make central policy decisions transparent to anyone who cares to inspect the repository. This puts pressure on central policy makers to reach decisions through an open process of negotiation–say, through a Pull Request discussion–rather than fiat decision. Running a tool that traverses a large set of configuration files and automatically makes changes to your computer requires that the user trust the tool. Any time the tool does something unexpected–like what would happen when policy changes unilaterally–that trust is damaged. Integrating all of the configuration in a single repo helps encourage a culture of consensus-building and careful balancing of the desires of the team with the desires of individuals within that team. Moreover, Boxen is not embarrassed to express opinions about how system configuration should be done. Having been developed by a Ruby shop, it speaks with a clear Ruby accent: it installs Ruby by default, and chooses the rbenv [8] tool to manage different versions of Ruby and their associated gem sets. It chooses Homebrew [9] for package management, and creates its own sandboxed install of Homebrew apart from any installation you might already have. It requires that you enable full-disk encryption (the so-called FileVault service) from your System Preferences. None of these opinions is utterly rigid, but they are all defaults you'll find out of the box.

Boxen’s first purpose is to turn your development laptop configuration into code and then turn that code into a running laptop, but it also has a social agenda. It wants you to collaborate openly around the standards and customizations you employ on the development workstations in your organization. CONCLUSION Boxen may not be the last word in workstation configuration-as-code, but it has the distinction of being the first. It is an open-source project in its early phases of adoption outside its sponsoring company, but it is already a complete and workable system based on the solid foundation of Puppet and easily extensible using Ruby and Bash. At present it supports only Mac OSX Moutain Lion or greater, but we are hopeful the community may extend it Linux and Windows in the future. If you’re a Mac shop looking to collaborate around the configuration of your development workstations and automate their creation, you have found the answer. REFERENCES [1] Boxen http://boxen.github.com/http://boxen.github.com/ [2] Puppet http://docs.puppetlabs.com/#puppetpuppet [3] MIT License http://opensource.org/licenses/MIT [4] template repository on GitHub https://github.com/boxen/our-boxen [5] our-boxen README https://github.com/boxen/our-boxen/blob/master/ README.md [6] configuration file http://boxen.smartcorp.com [7] Boxen Web https://github.com/boxen/boxen-web [8] rbenv https://github.com/sstephenson/rbenv [9] Homebrew http://brew.sh/

Tim is a trainer for [GitHub], a speaker internationally and on the [No Fluff Just Stuff] tour in the United States, and is president of the [Denver Open Source User Group]. He is one of the developers of the [Ratpack] web framework, is co-presenter of the [O'Reilly Git Master Class], co-author of [Building and Testing with Gradle] and author of [Gradle Beyond the Basics]. He blogs occasionally at [timberglund.com], and lives in Littleton, CO, USA with the wife of his youth and their three children.

23


A Maturity Model for Š Shutterstock

Continuous Delivery By Sveinung Dalatun and Stein Inge Morisbak

Continuous delivery has become increasingly popular over the last few years, but implementing it is often seen as difficult and daunting. Many seem to believe that to gain anything from continuous delivery you must implement it one hundred percent. We hold this to be false. The road to continuous delivery is paved with many smaller goals, each of which delivers value in themselves. HOW TO USE THE MODEL The first thing you need to establish is your current level of maturity within each category in the model. This will give you an idea of your strengths and weaknesses. Secondly, you need to prioritise. It is important to focus your efforts on the greatest bottleneck in your delivery process. To identify this bottleneck it can be helpful to visualise your value stream and focus your attention on the steps that are most error prone or slow. Prioritising which level to start enhancing will differ, and you will have to make your own assessment on which category will give the most value. You should try to keep the overall maturity level fairly even as most categories at the same level either depend on or complement each other. Furthermore you should not

24

skip levels or try to implement them all at once. As in any agile approach you should introduce changes in an incremental and iterative way. PROCESS & ORGANISATION Every organisation is different, and they all have a variety of processes. Yet there are some common categorisations that can be made. Silo organisations are typically a bad idea. People that depend on each others work are not co-located and don't work together. This causes ineffective handoffs, less insight in the whole, misunderstandings and a blame culture. No one can get their own work done before others have completed theirs. Since the silos "own" the stuff they are in charge of, they don't let others touch it. When developers don’t have access to production logs they are unable to see what goes on

PROCESS & ORGANISATION

ADVANCED

in production, and troubleshooting becomes almost impossible. When organisations begin to adopt Agile the communication with business improves and releases become more frequent. The boundaries between the fractions gets blurred and for the sake of sanity the developers get access to production logs. Gradually the teams become more efficient, and they measure and seek ways to reduce cycle times between deployments. By always having their code production ready they can release at any given moment. With freedom the teams usually self-organise, given that they are cross-functional. Everyone understands that everyone involved in creating the system must work together. Developers and Operations share common goals (DevOps) and everyone works on the system as a whole.

INTERMEDIATE

BASELINE

BIG CHALLENGES

TECHNOLOGY

QUALITY ASSURANCE

DEPLOYMENT ROUTINES

CONFIGURATION MANAGEMENT

BUILD & CI

Self organised and cross functional The team can solve any task. Releases continuously. DevOps!

Loosely coupled architecture It is easy to replace technology for the benefit of something better (Branch by abstraction).

All testing automated Almost all testing is automated, also for non-functional requirements. Testing of infrastructure code. Health monitoring for applications and environments and proactive handling of problems.

One-click deploy Everybody (including the customer) can deploy with one click. 0-downtime deploy. Feedback on database performance and deployment for each release.

Infrastructure as code Fully automated provisioning and validation of environments. Orchestration of environments.

Build/deploy pipeline Same binary is deployed to all environments. Continuous improvement and automation of repeating tasks. Optimised for rapid feedback and visualisation of integration problems.

Pull-based process Measurement and reduction of cycle time. Continuous focus on process improvement. Always production ready code.

Simple technology In depth knowledge about each technology; why it is used and how it works. All of the used technologies are easy to configure and script against. Technology that makes it simple to roll back and forth between database versions.

Automated functional tests Automated acceptance- and system tests. Tests are written as part of requirements specification. All stakeholders specify tests.

Automated deploy Same process for deploy to all environments. Feature toggling to switch on/off functionality in production. Release and rollback is tested. Database migration and rollback is automated and tested for each deploy. Database performance is monitored and optimised.

Application configuration control All application configuration in version control. The application is configured in one place.

Continuous integration Continuous integration of source code to mainline. All changes (code, configuration, environments, etc.) triggers the feedback mechanisms. Artifact repository. Reuse of scripts and tools. Generation of reports for the build. Builds that fail are fixed immidiately.

Agile 101 Improved communication with business. Releases after each iteration. Developers have access to production logs.

Best-of-breed Chooses technology stack based on what is best for each purpose. Chooses preferably Open Source. Avoids products that causes vendor lock-in.

Automated technical tests Automated unit- and integration tests.

Repeatable deploy Documented and partially automated deploy. Database changes are scripted and versioned.

Dependency control Dependencies and libraries are defined in version control.

CI-server Automation of builds/ tests on CI server. Can recreate builds from source code.

Silo organisation People who in some way depend on each others work are not sitting together. Infrequent releases. Developers do not have access to production logs.

"Enterprise" infrastructure Technology that can only be configured via a GUI. Large "enterprise" suites claiming they can solve all your problems.

Manual testing Test department. Testing towards the end, not continuously. Developers do not test.

Manual deploy Deployments require many manual steps. Manual and unversioned database migrations.

Manual configuration Manual configuration in each environment and on each server.

Manual routines Manual routines for builds. Lack of artifact repository. Lack of reports.

25


Photo: Shutterstock

© Shutterstock

TECHNOLOGY The transformation must also be supported by the best technology. "Enterprise" infrastructure that can only be configured via a GUI and which promises to solve all your problems just doesn't cut it. One must choose each technology carefully and put together a stack which best suits your specific needs. Open source technologies are easier to configure, script against, and they are a lot easier to understand (!). When your stack is put together in a "loose" fashion it is easy to replace one part with another when something better comes along. QUALITY ASSURANCE To be able to shorten delivery time you have to ensure that quality assurance is built into the process itself in an automated way. Handing your code over to a test department or spending two days of testing each time you release becomes impossible. This doesn't mean you should test less. The mantra of continuous delivery is to automate everything that can be automated, and all the different flavours of testing are obvious candidates for automation. DEPLOYMENT ROUTINES Speeding up the cycle time from idea to production is what continuous delivery is all about. Nothing has any value unless it’s in production. Deployment shouldn't be something you spend a lot of time focusing on. It should “just happen”, and it shouldn't involve any risk. Automate both deploy and rollback, have a feature toggle safety net, and pay special attention to your database. When releasing often you should be able to deploy without downtime.

26

CONFIGURATION MANAGEMENT Having configuration scattered all around makes it hard to understand how your application works and makes it difficult to pinpoint the cause when trouble arises. Keep it in source control and in one place. An application bug is not the only thing that can cause trouble in production, a badly configured infrastructure can do it just as easily. Therefore, you should treat your configuration as you would your code, put it in source control, and maybe use a provisioning framework. Make sure you test your infrastructure and use the same configuration in all environments (dev, test, qa and prod). BUILD & CI This category is closely related to the Quality Assurance, Deployment Routines and Configuration management categories. While the first provides the feedback, the second the deployment machinery, and the third the infrastructure, Build & CI puts it all together in a pipeline and provide feedback at every stage. The most basic mechanisms merely runs tests every time code is checked in. A more advanced setup will have the feedback mechanisms triggered by any change in any environment, be they code changes, deployments or configuration changes. SUMMARY Continuous delivery is all about reducing risk and making sure business gets their return on investment as soon as possible. It’s about removing focus from repetitive and risky tasks and devoting all you effort into delivering business value.

Hopefully you will find the maturity model valuable and useful in your own environment, and that it can help and inspire you to become better at obtaining your goals. Good luck! For an online version of the model, see: http://bekkopen.github.io/maturitymodel

Sveinung Dalatun works as a consultant at BEKK. Currently he focuses on continuous delivery and DevOps, mostly automating stuff to be able to focus on the more important things in life.

Training for developers and leaders in Oslo, London or wherever you like ProgramUtvikling offers the best courses and most flexible training to the developer community wherever you want us to. Our philosophy is to provide “practical, applicable knowledge” by providing the highest quality training with the best instructors.

Stein Inge Morisbak is Practice Lead for Continuous Delivery and Devops at BEKK. He is a true Agile evangelist with more than 10 years of experience in both contributing to, and helping others to become better at producing excellent software together with demanding customers. He is also an experienced speaker at conferences and the founder of DevOps Norway Meetup.

OSLO - www.programutvikling.no

In addition to our permanent staff we have a number of exciting and well-known instructors such as Herb Sutter, Craig Larman, Billy Hollis, Mike Cohn, Geoff Watts, Gill Cleeren, Sahil Malik and a great staff of excellent Scandinavian instructors.

LONDON - www.developerfocus.com

NDC has become one of the largest conferences dedicated to .NET and Agile development and is hosted by ProgramUtvikling AS. HTML5 • Javascript • Mobile • Agile • Scrum • Design .NET • Java • Architecture • TDD • SharePoint • C++


ANDROID and testing

By Christoffer Marcussen

So, what are our options for writing Android tests? And, is Android a viable candidate for Test-driven development (TDD)? I will in this article shed some light on four different frameworks and strategies, and their pros and cons. Finally, I will provide a suggestion of what a test setup could look like. Note that the described frameworks are my subjective choices, and others may be more suitable depending on the situation.

Writing tests for Android is a growing trend. The market for mobile applications has expanded, and we now develop large scale applications packed with functionality, in need for a robust test suite.

BACKGROUND Earlier, when people suggested testing Android code, the answer was a firm “no!”. Problems with testing Android dependencies were common, and a typical pitfall was to only write tests for the Java portion of the application at hand. Because a distinct separation between the Android dependencies and the Java code is hard to achieve, the end result was poor test coverage. Instrumentation tests are today the most common Android tests. These are Activity tests that hook into the application life cycle through an Instrumentation API. This means that the actual application is run in the Dalvik Virtual Machine (DVM) on either a device or in the emulator during testing. Of the four frameworks described in the next section, three are based on instrumentation, while the fourth targets another strategy, where tests are run in the Java Virtual Machine (JVM). FRAMEWORKS All examples shown will test the simple UI shown in figure 1. The goal is that a button click will trigger the addition of two numbers and output the result to a TextView:

28

THE ANDROID INSTRUMENTATION FRAMEWORK Google provides a large set of tools to test all application components, and the Android Instrumentation Framework is among these. Figure 2 shows the setup where the view elements defined in the layout file are assigned to variables.

© Shutterstock

The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

Figure 1

Figure 2

29


The Solo tool is used for interacting with the UI. Note that the underlying operations that had to be set explicitly in the Android Instrumentation Framework are hidden.

Figure 3

Figure 3 shows the test. @SmallTest means that this test does not interact with any file system or network. runOnUiThread is needed as UI commands cannot be run in any other thread. Pros One of this framework’s advantages is its maturity. It is maintained and updated by Google, and no third-party dependency is necessary. It is also very easy to get started with instrumentation testing in the Android Studio IDE. Cons It was mentioned earlier that instrumentation tests run the actual application. This means that an APK (Application Package File) must be built for each implementation change, which is a time consuming operation. Additional time use is also to be expected if the tests are run in the emulator. An emulator such as Genymotion will contribute to a smoother experience, but the bundling of resources and conversion of .class files to .dex files cannot be skipped.

Pros Robotium’s greatest advantage is that the syntax is readable and intuitive. The developer can focus on the task at hand, without having to know about necessary Android quirks before creating a test. Cons Because instrumentation is still used, Robotium is as time consuming as the Android Instrumentation Framework. It is also not possible to test multiple processes with Robotium, which the Android SDK has support for through UIAutomator.

Figure 4

Figure 5

30

Figure 8 shows the test setup, and figure 9 shows the test.

ROBOLECTRIC Robolectric is an innovative tool that removes the need for the Android SDK. This allows for tests to be run in the JVM instead of the DVM, and is achieved by replacing the native Android calls with proxies.

Test frameworks that use the emulator or a device do have their place in the world of Android testing. While the Android Instrumentation Framework, Robotium and Appium are not as suitable for TDD (which they were never meant for), they provide unique testing of actual activities and components. Google devotes a lot of resources to improve possibilities for testing mobile applications, which the annual Google Test Automation Conference is a good example of. There is really no reason why testing Android code should be avoided. Though the examples in this article are very basic, each framework is capable of testing complex Android functionality. Which ones to use depend on the situation, as none of the described frameworks excel in all aspects. The developers’ skill set may be a contributing factor in favor of tools such as Appium. In my experience, web developers may favor languages such as JavaScript or Ruby, which both can be used to write Appium tests.

Figure 6 shows the test setup and figure 7 shows the test.

An example test setup could be to use either Robotium or Appium on a CI-server such as Jenkins, where one is not dependent on a quick feedback cycle. Combined with Robolectric unit tests and maybe a stresstesting tool such as Monkey, the application at hand would have great test coverage.

Figure 8

Figure 6

Another disadvantage is that a basic understanding of Android is necessary to understand the syntax and how to write tests. It is not intuitive that one has to explicitly set the UI operations to run in the UI thread. ROBOTIUM Robotium can be seen as an extension to the instrumentation testing provided by the Android SDK, and focuses on black-box testing. While the Android Instrumentation Framework requires explicit test setup, such as to run in the UI thread, Robotium introduces an abstraction layer in order to simplify and increase readability. Figure 4 shows the Robotium test setup, and figure 5 shows the test.

APPIUM Appium is a framework for cross-platform automation testing. In fact, with some setup modifications, tests written for Android can actually be run against iOS applications as well. It uses the Selenium Web Driver API, which means that tests can be written in any supported language, for example: Java, JavaScript or Ruby. During a test run, Appium receives and translates Selenium commands into appropriate native calls, based on the target platform. These are then run using the Android UIAutomator framework.

Figure 9

Figure 7

All Android calls in figure 7 such as “setText” and “performClick” appear to be native, but are replaced with Robolectric’s proxy implementations. Pros It is blazingly fast, and the feedback cycle is faster than for any of the other frameworks. Another advantage is that it is combinable with Java testing tools, which are not available in the Android SDK. This could for example be a mocking tool such as Mockito, although Robolectric has built-in mocking functionality. Cons Because the JVM is used, the application is not run in the emulator or on a device. One could therefore argue that using proxies instead of the actual application components is a weakness compared to the instrumentation frameworks. The Robolectric API does not offer full Android SDK support, though it is continuously expanded. It is also not straightforward to use Robolectric in combination with frameworks such as RoboGuice, although it is supported.

Pros Cross-platform testing is an interesting idea, and so is the fact that developers can choose from a variety of programming languages. Appium also has the same advantage as Robotium, regarding abstractions of Android quirks. Cons Appium only supports SDK levels higher than 16 (4.1), where an additional framework has to be used for older versions. Developers familiar to Android have to adapt to the somewhat different Selenium syntax. An example is how to do simple tasks such as locating a text field, where the android:id tag cannot be used. One alternative is to find the element using the android:contentDescription tag. Appium also runs in the emulator or on a device, and the same disadvantage as with Robotium and the Android Instrumentation Framework applies regarding time use. CONCLUSION Christoffer Marcussen is a developer at Bekk. Besides Robolectric is by far the most TDD-suitable testing framehis dailyor work with web When using the Android Robot work among the mentioned. If TDD is a priority, Robolectric technologies, he enjoys should definitely be considered. Themodification feedback cycle any of isit, proper fiddling with native short, which is important if a technique such as pair-proAndroid attribution is required under theand iOS developgramming is to be used. For Java developers, an additional ment. Christoffer holds a ofas the Creative MSc in computer science advantage is that it is “business terms as usual”, they can use Commons from NTNU. Attribution license: familiar frameworks such as Hamcrest and Mockito.

The Android robot is reproduced or modified from work created and

31


ElasticSearch:

Analytics, real-time, NoSQL, search

ElasticSearch is a newcomer to the world of Java software. The unique feature-set ElasticSearch (ES) offers has made it a popular choice for solving a variety of data processing problems. Let's have a closer look at what ES is and how it can be applied.

By Kristoffer Dyrkorn

One important feature of ES is that it will store and index whatever you throw at it. It is schema-less and completely dynamic - it will create indices as needed and also let you store separate object types (entities) within an index as you go. At the same time, you can search within specific entities or indices in your system, or across all of them, and also use wildcards for more fine-grained targeting. All of this whilst keeping it very simple to scale your system - you can add new servers at runtime and ES will take care of the rest. The easiest way to communicate with ES is via its REST-based API. The data format for requests and responses is JSON and as usual, HTTP verbs must be used properly. So all you need to do to store data in ES is to send a JSON object using HTTP PUT. Each field will then be parsed and a data type will automatically

32

be inferred from the values. (Field types can also be specified manually.) The index data will then be split into a given number of shards and put on other nodes in the cluster. Also, each shard is replicated to the other cluster nodes. Replication happens automatically and allows for scalable searching and redundancy. In the event of server crashes your system will keep running as long as the shards on the running nodes form a complete index.

Getting documents is easy as well, but due to the wide range of features related to searching, real-time fetching, filtering and aggregation your search requests will normally be a bit complex - simply because you need to specify more parameters. The documentation will help you explore the various options, but there could have been more information about how to solve typical domain modeling problems. Here the Solr wiki can be very helpful, and experience with Solr or Lucene is nevertheless a huge plus. Since it is based on Lucene, it is natural to regard ElasticSearch as a document database. The fundamental

data structure is an inverted index, and this leads to a performance profile where inserts, lookups, aggregation, filtering and set operations run particularly fast. This makes ES an ideal solution for real-time analytics, where there is a need to quickly compute simple statistics on multidimensional, streaming data. The log analysis tool Logstash gives a good example of what ES can do. The power of ElasticSearch comes with a cost: Complexity. Although a small setup is easy to configure, highly distributed setups are inherently complex and you will need to consider a lot of options - and choose the right tradeoffs - all according to your needs. Some of the typical areas where you need to compromise are memory usage (heap size vs garbage collection pauses), cache sizes (memory usage vs response times), compression (storage requirements vs response times), replication (redundancy vs storage requirements), partitioning (local vs distributed processing) and how to handle splitbrain scenarios. Split-brain scenarios can be particularly challenging. In short, a splitbrain happens if a group of nodes disconnect from a cluster and form a new, separate cluster. This has to be avoided since there is no way to automatically merge the two clusters afterwards without risking data loss. ES has fail-safe mechanisms to avoid split-brain, e.g. you can provide a

cluster threshold. A simplified explanation of the threshold is that at least N nodes must be running in a group of servers before they are allowed to consider themselves a standalone cluster. However, this leads to new compromises and tradeoffs. In one project, I worked on an ES installation where a non-functional requirement said the system should be operational as long as one node in the cluster was operational. Meeting this requirement would mean that the complete index had to be stored on each node, leading to huge storage needs. Another consequence was that a single node, if cut off from the cluster, would regard itself as a separate cluster, leading to split-brain. Increasing the lower limit on when server nodes could form a cluster would not help since the requirement was for the system to be able to run on a single node. After considering various options, we reached the conclusion that the requirement could not be met. It might sound complicated working with ES, buy in my opinion, most of the complexity stems from the problem domain itself, and not so much from the software. Creating a scalable and performing system that supports storage, retrieval and analytics is a hard problem, but ES will give you a very powerful tool to use. My experience with the software has been great and I am looking forward to what the next releases will bring.

Kristoffer Dyrkorn is a Scientist i BEKK. He has been involved in architecture and delivery of various Javabased web applications the latest 12 years. Besides being a dedicated search engine nerd he specializes in systems architecture, integration and performance optimization.

Š Shutterstock

Shay Banon created ElasticSearch out of a need for a scalable search solution. In short, he extended the highly sophisticated searching and indexing library Lucene with advanced functionality for distribution and clustering. At the same time, he kept all functionality as dynamic and flexible as possible. This has paid off - ES is now a company with a growing community around it and the software is currently in use at companies like github, foursquare and StackOverflow (and also at several companies in Norway).

33


.NET Rocks! The ".NET Rocks! boys- Carl Franklin and Richard Cambell will be hitting the road in the UK and they want you to join in by being their audience.

This year marks the end of the long wait, as New Developers Conference will be continuing in London in December. This means that there are now two opportunities a year for developers to access the wisdom of some of the world's best speakers.

London

25 Sep

.NET ROCKS! UK TOUR: Hang out with Carl and Richard in Bristol on the 24th, London on the 25th and Manchester on the 26th of September whilst they record their show. At each destination the .NET Rocks! will meet and greet a speaker that will be attending NDC London. The venues are currently being booked, to get more information or sign up visit www.ndc-london.com/dnr

Join NDC London By Charlotte Lyng

Kjersti Sandberg, founder of NDC London, says: As NDC London will be the first time NDC goes outside Oslo we will hold nothing back as we aim to create the best developer conference that London has ever seen- boosting the industry like a 'Vitamin injection'. The conference will offer an arena for developers to share, gain and celebrate expert knowledge, and the perfect 'feel good' boost to the ever-evolving developer community�. To kick-start the developer festival, NDC London will be hosting a series of events prior to the conference, such as a quick dip in security with Jon McCoy and a UK road trip tour with the .NET Rocks! boys.

34

GET A FREE QUICK DIP INTO THE SECURITY WORLD FACED BY BUSINESSES TODAY Don't miss out on this free morning session with Jon McCoy in London on the 17th of October. Learn how to tackle security issues on the 39th floor of the Canada Square building in Canary Wharf- one of the world's most hi-tech business and finance districts. Sign up for this 3 hour free workshop at www.ndc-london.com/level39

DATE: 17th October TIME: 09.00-12.00 VENUE: Level39, situated in the 39th floor of the iconic One Canada Square building.

EARLY BIRD OFFER

Bristol

24 Sep

We hope you share our passion and excitement for NDC and will join us in making London's first 'Developer Festival' legendary. For more information or tickets purchase visit: www.ndc-london.com. Don't forget to get your ticket before the Early Bird offer expires 15th of October.

Jon McCoy

Manchester

26 Sep

Š Charlotte Lyng

The first NDC London will be on the 2-6 December and is expanding on the success of the Norwegian Developers Conference in Oslo. The venue is already booked and both pre-conference and conference will be at the ICC suites at the ExCel venue.

35


THE BENEFITS OF IMMUTABILITY Functional programming does to variables what structured programming did to goto. Much like how uncontrolled goto statements make programs hard to understand and maintain, uncontrolled mutability also has similar negative effects. By removing mutability we can remove quite a few concerns in code. It helps to minimize errors, it's easier to reason the code, and alleviates the pains of concurrency. Let's quickly discuss each of these points. MINIMIZE ERRORS As humans we're creative and can comprehend quite a bit of complexity. However, we're not good at remembering many low level details. Along the execution path of a method or a function if we modify the input parameters or alter state, we increase the chances for errors or bugs to creep in. After all we're not good at juggling multiple states in our minds, and what we call as bugs often are a result of our inability to deal with the increased accidental complexity we've introduced in solving problems (see off-byone error, for example, we discuss later in the article). EASY TO REASON A code that transforms a given input to a desired output is easier to comprehend, explain, and reason than the one that mutates variable. Let's consider an example, but before you read the code below, grab a stopwatch. As you read the code, measure the time it takes for you to figure out what the code below does. int total = 0; for(int i = 0; i < values.size(); i++) { if(values.get(i) > 3 && values.get(i) % 2 == 0) total += values.get(i) * 2; } Listing SUB-1: A sample imperative code that works with a list of numbers

By Venkat Subramaniam

How long did that take? Note down.

Assignment-less programming is one of the corner stones of functional programming. For those of us who have mainly programmed with imperative languages, it is hard to fathom creating programs without mutating variables. In this article we will briefly discuss the reasons to honor immutability and explore some ways to achieve that.

The constructs used in this Java example is quite familiar to most of us, the format is common in C-style languages which are mainstream today. The style here is imperative in nature. Imperative code have two traits, they often involve mutability and spell out not just what but how the code should work. There are two mutable variables in this example, the variable total and the loop index variable i. The code is short, but has many steps. It produces the total of double of select values that are even and greater than 3. Totaling values appears to be an operation that's innately mutable, however, we can perform this operation in a declarative/functional style with the help of some library functions as in the next Java 8 example. final int total = values.stream() .filter(value -> value > 3) .filter(value -> value % 2 == 0) .mapToInt(value -> value * 2) .sum();

PROGRAMMING WITH IMMUTABILITY IN JAVA 36

Š Shutterstock

from Challenges of Imperative Style to the Possibilities of Functional Style

Listing SUB-2: A declarative version of the previous example, written in Java 8

This version is also short, but is in declarative style. In this style, we tell what we want, but not how, we let the library functions figure that out. This may be unfamiliar to programmers who've only programmed in mainstream C-style languages, but each line in the code does one thing and builds on the previous step. The code reads much like the problem we're trying to solve, given the values, filter elements greater than 3, then filter even values, finally double the filtered values, and total. 37


The code takes the values through a series of transformations, but does not modify any values along the way. Once we get familiar with functions like filter and map, this version is easier to comprehend. Furthermore, this version is easier to make changes to as well, we can effortlessly inject a step or remove one as we desire. ALLEVIATE THE PAINS OF CONCURRENCY With multiple cores becoming a standard on the hardware side and with increased demand on responsiveness of applications, multithreading is not an esoteric feature we can ignore. Shared mutability makes programming concurrency incredibly difficult. In the seminal book "Java Concurrency in Practice" Brian Goetz covers the complexities of the Java memory model and the impact it has on getting concurrency right. "Programming Concurrency on the JVM" by Venkat Subramaniam discusses the prominent solutions that have evolved on the JVM to solve this tough problem. Uncontrolled shared mutability is the single most source of problems from the concurrency point of view. The first big step to programming concurrency is to minimize mutability. Take the example in Listing SUB-1, the imperative version to total the even values greater than 3. Suppose we have a fairly large collection of numbers and want to speed up the evaluation of the result. How can we make that code concurrent? The short answer, with a lot of effort and when we're done the concurrent version would look not much the same as the sequential version. Now take the example in Listing SUB-2, the functional style to total the even values greater than 3. In this version

we honored immutability, each of the little functions we performed along the way did its part but did not alter any state. This act of programming hygiene on our part has a huge payback, making this version concurrent is effortless in Java 8, as we see in Listing SUB-3. final int total = .filter(value -> .filter(value -> .mapToInt(value .sum();

values.parallelStream() value > 3) value % 2 == 0) -> value * 2)

Listing SUB-3: Concurrent version of code in Listing SUB-2

We simply changed the call to stream() to parallelStream(). In Java 8, Stream is an interface that abstracts a fancy iterator and provides several useful functions (like filter, map, etc.) (see "Functional Programming in Java: Harnessing the Power of Java 8 Lambda Expressions" by Venkat Subramaniam). A call to the stream() method returns an implementation of this interface that sequentially performs the requested operations. On the other hand, a call to parallelStream() returns an implementation of the interface that executes its operations concurrently. While there is quite a bit of complexity hidden under these implementations, a key step to reaping those benefits was in avoiding mutability in our code. Let's take a look at the performance gains for the sequential vs. concurrent versions in Listing SUB-4. Let's refactor the common code to make the measurement easy, and to make the timing for this small example significant, we'll add a small delay to the execution.

import java.util.*; import java.util.stream.*; public class Sample { public static void printTotal(Stream<Integer> values) { long start = System.nanoTime(); final int total = values .filter(value -> value > 3) .filter(value -> isEven(value)) .mapToInt(value -> value * 2) .sum();

}

long end = System.nanoTime(); System.out.printf("Total: %d Time: %.3f seconds\n", total, (end - start)/1.0e9);

public static boolean isEven(int number) { try { Thread.sleep(100); } catch(Exception ex) {} return number % 2 == 0; }

Listing SUB-4: Sequential and concurrent version to total select values 38

}

}

public static void main(String[ ] args) { List<Integer> values = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); printTotal(values.stream()); printTotal(values.parallelStream());

In the printTotal method we receive a Stream of values and total the double of even values greater than 3. In addition we measure the time the operation would take. In the main function we invoke the printTotal function with the sequential implementation of Stream first and then the concurrent implementation. The time taken by the two operations for a small list of ten values is shown next:

USE CONSTRUCTS THAT BIND VALUES RATHER THAN MUTATE VARIABLES The all too familiar traditional for loop has some serious drawbacks, it has too many moving parts in it. Consider the for statement:

Total: 56 Time: 0.756 seconds Total: 56 Time: 0.105 seconds

We first initialize the index variable i, but then have to decide, rather explicitly, the terminating value. Is that < or <=, should we use values.size() or values.size() -1? It's easy to get these wrong (as we often do) and end up with the fondly known bug called "off-by-one" error. The for loop, furthermore, requires us to decide on the iteration step, even though most often we step by one.

The results of the two execution are the same, a total of 56, however, the concurrent version, even for this little sample of data, was faster on my multicore processor. We discussed some main benefits of immutability. Next, let's take a look at how we an achieve that. HOW TO HONOR IMMUTABILITY If you're like me and have programmed for years in C-style languages like C++, Java, and C#, programming with immutability would at first seem like a strange idea. We're so used to creating variables and mutating them. Learning to program with immutability may appears to be rather a strange restriction and quite unnatural. However, a few techniques can make immutability more approachable. Let's discuss them next.

for(int i = 0; i < values.size(); i++)

More deeply, the variable i is mutated repeatedly as the loop iterates. On the other hand, the foreach loop in Java 5 does not have this problem and, in addition, has fewer moving parts. for(int element : values)

The variable element is not altered through the loop, but a new value named element is bound to a new values each time through the loop. This difference is subtle but quite significant. For example, if we try the following code in Java 8, we will get a compilation error.

List<Integer> values = Arrays.asList(1, 2, 3); for(int i = 0; i < values.size(); i++) { Runnable runnable = () -> System.out.println(values.get(i)); //ERROR }

The Java compiler will complain as shown next: error: local variables referenced from a lambda expression must be final or effectively final Runnable runnable = () -> System.out.println(values.get(i)); //ERROR ^ 1 error

The compiler is indicating that the variable i is being mutated and it's quite dangerous to access as such from within a lambda expression. On the other hand, the following code compiles without any error. for(int element : values) { Runnable runnable = () -> System.out.println(element); }

The value of element is effectively final here, it is not being mutated and a new variable/value is created each time through the loop, much like a new variable is created for the parameters of a method each time we call the method. Using these kinds of constructs that bind new values rather than repeatedly mutate a variable is better from the point of view of honoring immutability and reducing errors.

39


USE MORE EXPRESSIONS AND FEWER STATEMENTS We use expressions and statements as building blocks when writing code, however, there is a fundamental difference between the two. Statements perform actions but don't return anything. Expressions on the other hand return some result/value back in response to the call. By nature, statements lead to mutability while expressions can easily favor immutability. Statements are quite evil from the point of view of immutability. Statements perform actions, but they don't return anything. So the only way to get any results from them is to take a look at the aftermath of their side-effects. Expressions on the other hand, return result. They don't have to cause any side-effect (unless we force them to). We can easily learn about what they achieved by looking at the result they readily return. We can easily compose expressions to form a chain of operations, where the result of one expression flows into the next. Statements on the other hand do not compose well. We have to invoke them, fetch the result of their sideeffect, and then invoke the next statement or expression. When creating our own APIs, we can promote immutability by writing more expressions than statements. Where we have a choice, we should use more expressions than statements. For example, consider a rather simple case of a decision: String canIVote; if(age > 17) canIVote = "Yes, please vote"; else canIVote = "Not yet!"; System.out.println(canIVote);

Listing SUB-5: Using an if statement to make a decision forces mutability

We first created a mutable variable, canIVote, and within the branches of the if statement modified it. The if statement in Java does not return any results. This forces us down the path of mutability to get the result of its action. Let's rewrite this code using the ternary operator in Java. final String canIVote = age > 17 ? "Yes, please vote" : "Not yet!"; System.out.println(canIVote);

Listing SUB-6: Eliminating mutability using the ternary operator

The ternary operator is an expression and not a statement. It does its part and returns a result to the caller. We did not mutate any variables in this version. The main point here is not a blanket recommendation to use ternary operators instead of if statements, but a call to think about the nature of these constructs. For example, unlike Java, the if construct in languages like Scala, Groovy, and Ruby are not statements and can be used as expressions.

40

RELY ON LIBRARY FUNCTIONS THAT FACILITATE IMMUTABILITY One easy way to avoid mutability is to cover it under the rug, I mean encapsulate it. We could use library functions that can hide or eliminate mutability and at the same time make the code more declarative. For example, let's say we're given a list of names: List<String> names = Arrays.asList("Jake", "Raju", "Kim", "Kara", "Paul", "Brad", "Mike");

Here's imperative code to determine if the list of name contains Kim: boolean kimFound = false; for(String name : names) { if(name.equals("Kim")) { kimFound = true; break; } } System.out.println("Found kim?:" + kimFound);

This example is imperative in nature and at least one variable was tortured. Alternately we can go declarative and simply ask the collection to get this task done, as in: System.out.println("Found kim?:" + names.contains("Kim"));

That was simple, but what if we want to find if the list contains someone with a 3 letter name? We could do the following, with the full flare of mutability and imperative style: boolean a3LetterNameFound = false; for(String name : names) { if(name.length() == 3) { a3LetterNameFound = true; break; } } System.out.println("Found a 3 letter name?:" + a3LetterNameFound);

Or, we could do the following, using the JDK 8 library: System.out.println("Found a 3 letter name?:" + names.stream().anyMatch(name -> name.length() == 3));

The code is not only concise, it has fewer moving parts, at least in the code we have to view and maintain.

41


USE RECURSION There is at least one other way we can remove mutability, by using recursion. If we're not able to easily reach for a library function, then we could try to restructure the code to make use of recursion. Let's take an example to explore this approach further. Here's imperative code for a guessing game, it asks the user to guess a selected number, guides them along, and finally reports the win, announcing the number of tries. int target = (int) (Math.random() * 100); System.out.println("I've selected a number, can you guess?"); int attempts = 0; int guess = -1; while(guess != target) { attempts++; System.out.print("Enter your guess:"); guess = new Scanner(System.in).nextInt(); if(guess < target) System.out.println("Aim higher"); if(guess > target) System.out.println("Aim lower"); if(guess == target) { System.out.printf("You got it in %d attempts\n", attempts); } }

Recursions are quite an effective technique to remove mutability, however, we fear using them due to the possibility of stack overflow if the recursion becomes too deep. This can be eliminated using tail-call optimization, a technique using which the recursion can quietly be converted into a iteration under the hood. This technique is discussed in a classic book "Structure and Interpretation of Computer Programs" by Harold Abelson, Gerald Sussman, and Julie Sussman. Languages like Scala support tail-call optimization through compilation techniques and Groovy through library support. Java does not natively support tail-call optimization at this time, however, it can be done by applying lazy collections and lambda expressions. For details refer to the "Functional Programs in Java" book in the reference section. SUMMARY Minimizing mutability is a better way to program overall. It reduces errors in code, makes it easier to understand and maintain code. Code with fewer mutability is also easier to make concurrent and to refactor. As much as possible we should strive to minimize mutability in code, by using more expressions than statements. Further more, by using library functions and recursion, we can minimize mutability even further, even in languages like Java where mutability has unpleasantly become a common place.

REFERENCES Java Concurrency in Practice, Brian Goetz, Addison-Wesley, Reading, MA, 2006. Programming Concurrency on the JVM: Mastering Synchronization, STM, and Actors, Venkat Subramaniam, The Pragmatic Bookshelf, Raleigh, NC and Dallas, TX, 2011. Structure and Interpretation of Computer Programming by Harold Abelson, Gerald Sussman, and Julie Sussman, The MIT Press, Cambridge, MA, 2nd edition, 1996. Functional Programming in Java: Harnessing the Power of Java 8 Lambda Expressions, Venkat Subramaniam, The Pragmatic Bookshelf, Raleigh, NC and Dallas, TX, 2014 (available in Beta at http://pragprog.com/titles/vsjava8).

We have two mutable variables here, attempts and guess, and the code is the all too familiar imperative style. We can eliminate both the mutable variables by using recursion. Here's how: public class Guesser { final static int target = (int) (Math.random() * 100); public static void play(final int attempts) { System.out.print("Enter your guess:"); final int guess = new Scanner(System.in).nextInt(); if(guess < target) System.out.println("Aim higher"); if(guess > target) System.out.println("Aim lower");

}

}

if(guess == target) System.out.printf("You got it in %d attempts\n", attempts); else play(attempts + 1);

public static void main(String[] args) { System.out.println("I've selected a number, can you guess?"); play(1); }

In this version we moved the attempts variable as a final parameter to the play function and the guess variable as a final local variable. By using recursion we managed to remove the mutability from our code.

42

Dr. Venkat Subramaniam is an award-winning author, founder of Agile Developer, Inc., and Instructional Professor of Computer Science at the University of Houston. He has trained and mentored thousands of software developers in the US, Canada, Europe, and Asia, and is a regularly-invited speaker at several international conferences. Venkat helps his clients effectively apply and succeed with agile practices on their software projects. Venkat is a (co)author of multiple books, including the 2007 Jolt Productivity award winning book Practices of an Agile Developer. His latest book is Functional Programming in Java: Harnessing the Power of Java 8 Lambda Expressions. You can reach him by email at venkats@agiledeveloper.com or on twitter at @venkat_s

43


Akka is a JVM-toolkit and runtime for building concurrent and distributed applications. It is based on ideas from the Erlang programming language and written in Scala – and is part of the Typesafe Platform1. Akka is often mentioned as a framework used on projects written in Scala. However, it can also be used with Java code to greatly simplify concurrent tasks. This article explains how Akka works and shows one example of how it can be used to create a distributed master/worker system in a regular Java project.

AKKA

Distributed Concurrency in Java By Eivind Barstad Waaler

MESSAGES OVER METHOD CALLS Java-objects usually communicate by calling methods on each other. This happens synchronously on the same thread using the call-stack of the JVM. So objects are pushed to the stack while waiting for methods they have called to be executed on the same thread as themselves. Various mechanisms can be used to make this interaction asynchronous instead – for example using executors and making objects Callable. To avoid several threads from changing the same data you often need to add locks or other forms of synchronization complicating the code – as you never know how many threads might be calling the same method on the same object simultaneously.

by default and a dispatcher with an underlying thread-pool makes sure all messages are received and processed. Each Actor has a mailbox for receiving messages and is only allowed to process one message at a time. Therefore no locking or synchronization is needed, as there will only ever be one thread executing your Actor. A special ask-pattern can be used if you want to wait for a reply. Examples of sending messages in Akka:

Typical Java lock example:

44

Akka is the name of a mountain in Laponia, in the northern part of Sweden. © Shutterstock

Akka is based on the Actor model2 . Actors communicate by passing messages to each other. This is asynchronous

Akka supports remote messages and clustering without changing the syntax for sending and receiving messages. Akka has error handling based on supervision. If one Actor fails its supervisor can decide what action to take (retry, restart, stop, continue, etc.). This article does of course not have room to cover all aspects of Akka – I recommend reading the excellent documentation3 to get an overview.

45


EXAMPLE – DISTRIBUTED COMPETING WORKERS Let's dive straight into a more complex real life example of how Akka can be used. This example is a modified version of a concept described in the post “Balancing Workload Across Nodes with Akka 2” on the Akka team blog (http:// letitcrash.com)4. In the example we have a set of workers “competing” for work. We want the workers to pull work from some shared resource – database or similar. It is important to make sure that every piece of work is only handled once. We can have many workers within the same JVM, but also want the possibility to create new nodes/ JVMs with more workers to be able to scale up for more work.

Message handling for the worker:

This is implemented with a single master (cluster singleton pattern5) that is responsible for handing out work to workers who request it. The flow is given as follows: 1. Master checks if there is any new/available work (scheduled job or similar) and publishes a cluster-wide WORK_AVAILABLE message. 2. All workers that subscribe to the worker channel receive the message – but only the ones that are not currently working respond to the master with a GIVE_ME_WORK message. 3. The master will hand out work to the first workers that respond – thus implementing the competing consumers pattern6. It also places a watch on the worker to be noti fied of any failure to the worker. 4. One of the following will happen: a. When a worker is done it will send a WORK_DONE message back to the master who removes the watch from the worker. b. If an active worker fails (for example if the node it resides on dies) the master will receive a TERMINATED message so that it can clean up and hand the work over to a new worker. Message handling for the master:

46

In the example work is just randomly generated – and the workers only sleep for a while. But it has been tested with the master fetching work from a database and the workers actually performing it. The beauty of this is that the master does not need to have an overview of all workers – it just publishes a message to anyone who might be interested. At the same time we have multiple workers competing to perform the work – and we can just start more nodes if we need more work done. There is no need to synchronize database access as the master is a singleton processing only one message at a time. The work is performed in a future – making the worker responsive even when working (for example report status or progress to some admin page or similar).

There are many different tools and techniques available to create concurrent applications on the JVM. Akka might not be the best choice for every project, but it is worth considering in most cases where you need to create a scalable application of a certain size. Facing a future where more and more companies are looking for scalable ways to handle “big-data” and related buzzwords – I’ll be keeping Akka in my favorite toolbox. REFERENCES 1 http://typesafe.com/platform 2 http://en.wikipedia.org/wiki/Actor_model 3 http://doc.akka.io/docs/akka/snapshot/java.html 4 http://letitcrash.com/post/29044669086/balancingworkload-across-nodes-with-akka-2 5 http://doc.akka.io/docs/akka/snapshot/contrib/clustersingleton.html 6 http://www.enterpriseintegrationpatterns.com/ CompetingConsumers.html 7 https://github.com/eivindw/akka-cluster-example

Eivind Barstad Waaler is a consultant at Bekk Consulting in Oslo. He has 15 years of experience as a developer and architect in software projects and has a strong interest for programming languages and paradigms. The last couple of years Eivind has specialized in distributed systems and techniques for handling big data in a scalable way. He will be speaking about Akka at JavaZone 2013.

Java 8

A full runnable example with source code and instructions can be downloaded from GitHub7. AKKA IN YOUR TOOLBOX This article was just meant to briefly show some capabilities of Akka. Akka contains much more functionality than what has been shown here. With the non-blocking asynchronous defaults it can help you create highly concurrent JVM application that will be able to fully utilize modern multi-core processors, as well as more distributed high-level concurrency as shown in the example above. It has exceptionally strong error handling through its supervisor hierarchy that will help you build robust and fault-tolerant systems. Being a JVM toolkit it can easily be integrated with most databases, frameworks and others tools and languages.

Evolutionary Design and Architecture for Agile Development Both courses with Dr Venkat Subramaniam. For a complete course description, time and place, visit www.programutvikling.no

47


ADVERTISEMENT

COURSES for developers and leaders

Courses with

MIKE COHN CERTIFIED SCRUMMASTER - CSM – MIKE COHN This two day course—taught by author and popular Scrum and agile trainer Mike Cohn—not only provides the fundamental principles of Scrum, it also gives participants hands–on experience using Scrum, and closes with Certification as a recognized ScrumMaster. DESCRIPTION During the ScrumMaster class, attendees will learn why such a seemingly simple process as Scrum can have such profound effects on an organization. Participants gain practical experience working with Scrum tools and activities such as the product backlog, sprint backlog, daily Scrum meetings, sprint planning meeting, and burndown charts. Participants leave knowing how to apply Scrum to all sizes of projects,

from a single collocated team to a large, highly distributed team. YOU WILL LEARN Practical, project–proven practices The essentials of getting a project off on the right foot How to write user stories for the product backlog Why there is more to leading a self–organizing team than buying pizza and getting out of the way

How to help both new and experienced teams be more successful How to successfully scale Scrum to large, multi–continent projects with team sizes in the hundreds Tips and tricks from the instructors ten–plus years of using Scrum in a wide variety of environments COURSE DATE Oslo: 17 Sep, 9 Dec London: 24 Sep, 3 Dec

CERTIFIED SCRUM PRODUCT OWNER - CSPO – MIKE COHN Certified Scrum Product Owner Training teaches you, the product owner, how to use the product backlog as a tool for success. As you watch the product take shape, iteration after iteration, you can restructure the Product Backlog to incorporate your insights or respond to changes in business conditions. You can also identify and cancel unsuccessful projects early, often within the first several months. The Certified Scrum Product Owner; course equips you with what you need to achieve success with Scrum. Intuitive and lightweight, the Scrum process delivers completed increments of the product at rapid, regular intervals, usually from every two weeks to a month. Rather than the traditional system of turning a

OSLO - www.programutvikling.no

48

project over to a project manager while you then wait and hope for the best, Scrum offers an effective alternative, made even more attractive when considering the statistics of traditional product approaches in which over 50% of all projects fail and those that succeed deliver products in which 64% of the functionality is rarely or never used. Let us help you avoid becoming one of these statistics. YOU WILL LEARN Practical, project–proven practices How to write user stories for the product backlog

Proven techniques for prioritizing the product backlog How to predict the delivery date of a project (or the features that will be complete by a given date) using velocity Tips for managing the key variables influencing project success Tips and tricks from the instructors fifteen years of using Scrum in a wide variety of environments COURSE DATE Oslo: 19 Sep, 11 Dec

LONDON - www.developerfocus.com


AGILE - MANAGEMENT

EFFECTIVE CONCURRENCY

Herb Sutter

EFFECTIVE CONCURRENCY Author and instructor: Herb Sutter This course covers the fundamental tools that software developers need to write effective concurrent software for both single–core and multi–core⁄many–core machines. To use concurrency effectively, we must identify and solve four key challenges: 1. Leverage the ability to perform and manage work asynchronously. 2. Build applications that naturally run faster on new hardware having more and more cores. 3. Manage shared objects in memory effectively. 4. Engineer specifically for high performance

Craig Larman

AGILE AND ITERATIVE DEVELOPMENT - A MANAGERS GUIDE Author and instructor: Craig Larman This practical, information-packed seminar summarizes the key research, ideas, and practices of iterative development, aimed at executive and project leadership. This is a high-impact guide for managers and students to agile and iterative development methods: what they are, how they work, how to implement them – and why you should. Whether you’re an IT executive, project manager, student of software engineering, or developer, Craig Larman will help you understand the promise of agile/iterative development, sell it throughout your organization – and transform the promise into reality.

AGILE

Allan Kelly

APPLYING LEAN THINKING TO SOFTWARE DEVELOPMENT - INCLUDING AN INTRODUCTION TO THE KANBAN METHOD Author and instructor: Allan Kelly Demonstrate how Lean thinking can be applied to software development and equip students with practical tools for improving their development processes and environments. This workshop uses lecture material and exercises to teach Lean ideas and provide students with experience of applying Lean techniques. Those responsible for the development of software: Who should attend?: Project Managers, Team Leaders, Development Directors and Managers, Scrum Masters and Architects.

Jurgen Appelo

BDD - SPECIFICATION BY EXAMPLE Author and instructor: Gojko Adzic This three day workshop teaches you how to apply emerging practices for managing requirements, specifications and tests in agile and lean processes to bridge the communication gap between stakeholders and implementation teams, build quality into software from the start, design, develop and deliver systems fit for purpose.

Mike Cohn

AGILE MANAGEMENT Author and instructor: Jurgen Appelo Topics (Learning Objectives) This course is the first course day based on the book Management 3.0, which addresses the following three themes: You will learn about different agile methods, popular best practices, agile adoption strategies, and the role of the manager⁄team leader in agile organizations, second you will learn about creativity in the workplace, tips for intrinsic motivation, and how to form diverse and productive teams, and third you will learn when to manage and when to lead, and how to protect people and resources from any bad effects of self–organization.

AGILE ESTIMATING AND PLANNING Author and instructor: Mike Cohn Despite the many worthless plans that weve all seen—which may make us want to skip planning altogether— this Agile Estimating and Planning Training will demonstrate that its possible to create accurate project plans useful for programming testing—and projecting forward from 6–9 months. Our Agile Estimating and Planning Training will teach you how to create practical, useful and reliable plans for your software development projects.

Gojko Adzic

Dan North

In-house training anywhere in the world

AGILE FOUNDATIONS FOR BUSINESS ANALYSTS Author and instructor: Allan Kelly This course focuses on the role of requirements in driving generic Agile teams with reference to Scrum project management and XP technical practices. The Business Analyst’s role on an Agile team is described together with the additional tools, techniques and approaches available.

Our courses can be customized and tailored to meet your training needs and requirements. We think globally, and will deliver in-house training anywhere you want us to. In addition to our scheduled courses, we offer a number of courses on demand.

Allan Kelly

Please contact us for more information at info@programutvikling.no or info@developerfocus.com

© Shutterstock

Geoff Watts

50

ACCELERATED AGILE: FROM MONTHS TO MINUTES Author and instructor: Dan North During this course you will learn unusual and counter–intuitive techniques for software delivery and understand the principles behind them. Using a mixture of discussion, instruction and exploration you will start to think differently about agile development, automation and team dynamics. By exploring several architecture and development strategies you will learn how you and your teams can produce and deploy software faster than they thought possible. You’ll never look at TDD the same way again, not to mention copying–and–pasting code.

RETROSPECTIVE TECHNIQUES Author and instructor: Geoff Watts The 2–day Retrospective Techniques course will teach the 5 step structure for facilitating a retrospective as described by Esther Derby and Diana Larsen and will also cover a number of approaches to be used in each part of the process. As well as leaving with new techniques for their retrospective toolboxes, attendees will get the opportunity to practice putting together a retrospective agenda and running and⁄or experiencing many of the techniques they will learn about.

For a complete course overview visit www.programutvikling.no and www.developerfocus.com 51


SCRUM

TEST-DRIVEN DEVELOPMENT, TESTING AGILE DEVELOPMENT WITH SCRUM Author and instructor: Arne Laugstøl This course will give an introduction to development in Scrum and agile development. The Participants will learn how to practice Scrum by collaborating as part of a Scrum-team during the labs. The course is aimed at people that is either going to participate in Scrum-teams, or just wants to know more of the concepts of Scrum and agile-development. You don’t need to be a developer to gain a full benefit from the course.

Arne Laugstøl

Janet Gregory

CERTIFIED SCRUMMASTER CSM Author and instructor: Mike Cohn During the ScrumMaster class, attendees will learn why such a seemingly simple process as Scrum can have such profound effects on an organization. Participants gain practical experience working with Scrum tools and activities such as the product backlog, sprint backlog, daily Scrum meetings and sprint planning meeting. Participants leave knowing how to apply Scrum to all sizes of projects. The course gives you the title of Certified ScrumMaster.

BDD - SPECIFICATION BY EXAMPLE Author and instructor: Gojko Adzic This three day workshop teaches you how to apply emerging practices for managing requirements, specifications and tests in agile and lean processes to bridge the communication gap between stakeholders and implementation teams, build quality into software from the start, design, develop and deliver systems fit for purpose.

Mike Cohn

CERTIFIED SCRUMMASTER CSM Author and instructor: Geoff Watts Learn the Scrum framework for an agile project and the essentials of working as a ScrumMaster or Scrum team member. Through a fun mix of theoretical explanation, problem exploration and practical exercises, this 2–day course will equip attendees for their first Scrum project or enable them to reflect on their projects and become more agile.

Gojko Adzic

Geoff Watts

Mike Cohn

Geoff Watts

CERTIFIED SCRUM PRODUCT OWNER CSPO Author and instructor: Geoff Watts During this course you will understand the product owner role with its authority and responsibility, and its interaction with the other Scrum roles. You will be able to create a product vision, stock and groom the product backlog, prioritise the backlog, and systematically refine requirements. You will also be able to create a realistic release and track the project progress and understand how you can effectively collaborate with the ScrumMaster and team in the sprint meetings.

Mike Cohn

EFFECTIVE USER STORIES FOR AGILE REQUIREMENTS Author and instructor: Mike Cohn This course provides you with the knowledge and tools needed to identify and write effective and helpful user stories. Youll learn the six attributes all good stories must exhibit and thirteen guidelines for writing a better user story. The class explores how user role modeling can help when gathering a projects initial stories. During this hands–on course, all participants will have the opportunity to practice identifying user roles and writing stories on a case study

Lyssa Atkins

52

CERTIFIED SCRUM PRODUCT OWNER CSPO Author and instructor: Mike Cohn This course will teach you, the product owner, how to use the product backlog as a tool for success. As you watch the product take shape, iteration after iteration, you can restructure the Product Backlog to incorporate your insights or respond to changes in business conditions. You can also identify and cancel unsuccessful projects early, often within the first several months. The Certified Scrum Product Owner; course equips you with what you need to achieve success with Scrum.

COACHING AGILE TEAMS COURSE Author and instructor: Lyssa Atkins and Michael K. Spayd Coaching Agile Teams is a training experience that covers both the being and the doing of agile coaching. There’s a lot to learn, experience and practice! At the end of the course, you will be capable of applying many new tools and techniques, as well as your own mindset changes, to coach agile teams to high performance. As practical as it is provocative, the Coaching Agile Teams course challenges agile coaches to rise to the fullest expression of their role and offer simple, practical ways to get there.

THE WHOLE TEAM APPROACH TO AGILE TESTING Instructor: Janet Gregory This three day course explains how testers can become valued agile team members, how they contribute to delivering a continuous stream of business value, and ways to overcome common cultural and logistical obstacles in transitioning to an agile development process. It describes the values and principles that help testers adopt an agile testing mindset, and gives practical alternatives to traditional testing processes, such as defect tracking, metrics, audits, and conforming to quality models. Students will be shown how to complete testing activities in short iterations, and how testers contribute on a daily basis during each iteration and release cycle.

Venkat Subramaniam

TEST-DRIVEN DEVELOPMENT Author and instructor: Venkat Subramaniam The course has a good balance of interactive lectures and hands–on exercises. The attendees are expected to pair–up and work on the lab exercises. The instructor will assist the attendees as they work on the exercises. The objective of the course is for the attendees to gain an in depth practical knowledge of the concepts so they can put them to immediate use on real projects.

TEST-DRIVEN DEVELOPMENT & REFACTORING TECHNIQUES COURSE Author and instructor: Robert C. Martin This course teaches you how to use the principles and practices of TDD to specify requirements and designs using acceptance tests and unit tests. You will learn the intensely granular TDD approach to development using XUnit for unit testing and FitNesse for acceptance testing. You will experience the frequent and regular feedback and progress of letting tests drive the development and design. Robert C. Martin

Christian Johansen

TEST – DRIVEN JAVASCRIPT Author and instructor: Christian Johansen Even the most seasoned backend programmer is too often on thin ice once a web application’s frontend is in need of development and/or maintenance. Rid yourself of the insecurity by learning to understand and appreciate JavaScript for the highly productive and unusual language it is. The course will take you through JavaScript’s object model and functional elements, giving you a solid understanding of how JavaScript really works. A series of practical assignments puts this understanding to use by implementing reusable code using idiomatic JavaScript patterns. Unit testing and TDD will be demonstrated through-out the course.

Test yourself! Michael K. Spayd

Take your certification at Programutvikling AS. See programutvikling.no for more information, or call us at 67 10 65 65

53


DATABASE

JAVA

DATABASE DESIGN, -IMPLEMENTATION AND SQL-PROGRAMMING Author and instructor: Dag Hoftun Knutsen This course covers all phases of developing a database application: Analysis, design, implementation, SQL-programming and testing. Hands-on exercises will give you practical experience. There is particular focus on how physical database design is important from a performance perspective. Dag Hoftun Knutsen

CORE SPRING FRAMEWORK Author: Mårten Haglind Instructors: Mårten Haglind and Kaare Nilsen In this four–day bootcamp you learn how to use the Spring Framework to create well–designed, testable business applications in an agile manner. Students build a Spring–powered JEE application that demonstrates the Spring Framework and other Spring technologies in an intensely productive, hands–on setting. Kaare Nilsen

Mårten Haglind

ORACLE SQL- PROGRAMMING Author and instructor: Dag Hoftun Knutsen This course is a comprehensive introduction to SQL, including coverage of Oracle-specific features. The course includes all aspects of SQL: Data Definition, Data Control and Data Manipulation with particular focus on querying. It also covers principles of database design for performance. Hands-on exercises provide practical experience with SQL, and you will also learn about common errors and pitfalls and how to avoid these.

SPRING AND HIBERNATE DEVELOPMENT Author: Mårten Haglind Instructors: Mårten Haglind and Kaare Nilsen In this five–day course you will learn how to use the Spring Framework to create well–designed, testable business applications in an agile manner. In addition to that, you will learn how to use Hibernate, to effectively map Java domain model objects to a relation database.

Dag Hoftun Knutsen

Mårten Haglind

ORACLE PL/SQL- PROGRAMMING Author and instructor: Dag Hoftun Knutsen This course provides a comprehensive introduction to Oracle’s procedural language PL/SQL. The course describes the language’s general structure and syntax as well as various ways of applying the language in an application. Programming experience is gained through hands-on exercises. Dag Hoftun Knutsen

Peet Denny

MOBILE APPLICATIONS

Wei-Meng Le

Wei-Meng Le

Wei-Meng Le

NEW ANDROID DEVELOPER TRAINING Author and instructor: Wei-Meng Lee Android is Google’s operating system for mobile devices. Using the Android SDK, developers can develop applications on the Android platform using the Java Programming language. In this 5-day course, participants will learn the various techniques to program their Android devices. The first half of this feature-packed course will show you how to get started in Android development, right from the start till deployment. In the second-half of this course, you will explore Android beyond the basics. You will learn about the latest Android designed for tablet devices, and explore the new APIs that allow you to build both smartphone and tablet applications. In addition, you will also learn about networking technologies in Android – Bluetooth, Sockets, as well as push notifications using the Google Cloud Messaging (GCM) Framework.

FUNDAMENTALS OF IOS NEW Author and instructor: Wei-Meng Lee The workshop will begin with the basic concepts such as Views, View Controllers, Protocols and Delegates, as well as the tools that help you develop compelling iOS applications – Xcode and Interface Builder. Participants will then dive into the details of programming the iPhone, such as how to invoke the built–in applications and access the hardware of the iOS device. In the second half of this course particpants will learn the advanced techniques for writing iOS applications. You will learn about iPad–specific programming, Location–based Services and network programming.

MOB101 – 3-DAY WRITING CROSS PLATFORM IOS AND ANDROID APPS USING XAMARIN AND C# NEW Author and instructor: Wei-Meng Lee In this 3-day workshop, you will learn the fundamentals of building cross-platform mobile apps targeting iOS and Android devices using Xamarin and C#. Using the Xamarin Studio, you can now write iOS and Android apps using your familiar C# language. When you are ready to deploy your apps, the Xamarin compiler will compile your app into the native binary for each platform. The end result is you have a first class application that is optimized for the respective platform that it is compiled for.

Kaare Nilsen

PROGRAMMING JAVA STANDARD EDITION Authors and Instructors: Peet Denny This course is designed to give programmers a solid grounding in the Java Programming language. Starting with the core syntax and OO concepts, it then progresses to covering class design, arrays and collections, core libraries, exception handling, I⁄O and networking, JUnit testing an introduction to Swing as well as the new Java features (the course is always up to date with the latest versions of Java SE). After taking this course delegates should be comfortable with working from a design on real projects using core Java, will be able to attend more advanced Java courses such as JEE and have a firm grasp of the fundaments required for the SCJP exam. EFFECTIVE SCALA Author and instructor: Jon-Anders Teigen You will learn how to model rich object–oriented systems using Scala’s integration of concepts from object– oriented and functional programming. We will explore how these two paradigms complement each other to bring you the best of both worlds. During these three days you will go from learning how to explore APIs using Scala’s interpreter to building full blown applications using the Lift web framework.

Jon-Anders Teigen

EFFECTIVE JPA Authors and instructors: Mårten Haglind The course gives the attendees a comprehensive kickstart into applying JPA and Hibernate for effective Java persistence. Insights will be provided into O⁄R–Mapping techniques and semantics as well as the programming model and paradigm to enable enterprise developers to instantly and productively apply the technologies involved in a real world setting. Common pitfalls as well as best practices, designs and idioms are discussed. Mårten Haglind

XML EXCHANGING AND MANAGING DATA USING XML AND XSLT Author and instructor: Espen Evje This course gives a broad overview of XML, in particular of the structure and the syntax of XML documents, and of how to use XML documents in your solutions. You will learn about XML Schemas and about XPATH, and you will get an insight on how to use XML with relational databases. Espen Evje

For a complete course overview visit www.programutvikling.no and www.developerfocus.com

54

55


DESIGN - ANALYSIS- ARCHITECTURES

Craig Larman

AGILE DESIGN AND MODELING FOR ADVANCED OBJECT DESIGN WITH PATTERNS Author and instructor: Craig Larman During this popular, high–impact, and hands–on course you will learn to design with patterns, apply visual modelling in an agile modelling approach, and a suite of related advanced design topics, including the design of packages. This course is based on acclaimed industry leader Craig Larman’s extensive experience coaching and applying OOD since the mid 1980s.

ANALYSIS AND DESIGN WITH SCRUM Author and instructor: Eivind Nordby The course targets developers who need to catch the users’ needs and transform them into distinct development tasks and into a solution capable of adapting to continuous requirements changes. The workflow is Scrum based, and UML is used for analysis and design ahead of programming in each sprint. Bundled with object-orientation, this gives a powerful, practical, developer oriented approach to problem solving.

DESIGN - ANALYSIS- ARCHITECTURES continued

CLEAN CODE: AGILE SOFTWARE CRAFTSMANSHIP Author and instructor: Robert C. Martin This is a two–day hands–on course in which students learn the principles and practices of Clean Code as described in Robert C. Martin’s book: Clean Code: A Handbook of Agile Software Craftsmanship. This course alternates between lecture and exercise so that students can experience, first–hand, the practices and disciplines of these fundamental topics. Robert C. Martin

OBJECT-ORIENTED DEVELOPMENT Author and instructor: Eivind Nordby This is a course for experienced developers who are new to, or wish to strengthen their object-oriented thinking. More than the programming itself, the difficulty in passing to object-orientation is mental. That is why this course focuses on basic object-oriented thinking and basic design principles. Of course, there are plenty of practical exercises. Eivind Nordby

Eivind Nordby

ARCHITECTURE SKILLS Author and instructor: Kevlin Henney The Architecture Skills course introduces a broad curriculum for software architects. The course introduces development process models, architectural styles, requirements techniques, sufficient modelling techniques, design patterns and testing practices. This course includes a number of practical exercises so that attendees can see how the different activities fit together. There is also plenty of opportunity for discussion.

HTML5 – JAVASCRIPT JAVASCRIPT FOR PROGRAMMERS Author and instructor: Christian Johansen This three day workshop will introduce you to HTML5 with a brief backstory, before diving into the APIs one by one. As well as going through code and showing practical demonstrations, where possible, we’ll also talk about the alternatives and polyfills for old browsers that dont support ”awesome” out of the box.

Kevlin Henney Christian Johansen

Robert C. Martin

Juval Lowy

AGILE ARCHITECTURE AND DESIGN Author and instructor: Robert C. Martin This course is a deep dive into the well–known SOLID principles of Agile and Object Oriented Design. Students will learn the characteristics of sound Object–Oriented designs and architecture, and patterns and practices that create them. Principles include: The Single Responsibility Principle, The Open Closed Principle, The Liskov Substitution Principle, The Interface Segregation Principle, The Dependency Inversion Principle, and many others. Special attention is paid to Component oriented design, and the principles and patterns of large–scale component architecture.

Christian Johansen

THE ARCHITECT’S MASTER CLASS Author and instructor: Juval Lowy The class agenda reflects these three elements: development process and project leadership skills, technology, and finally analysis and design. Students will see how to approach rarely discussed topics such as allocation of services to assemblies, allocation of services to processes, transaction boundaries, identity management, authorization and authentication boundaries and more.

TEST – DRIVEN JAVASCRIPT Author and instructor: Christian Johansen Even the most seasoned backend programmer is too often on thin ice once a web application’s frontend is in need of development and/or maintenance. Rid yourself of the insecurity by learning to understand and appreciate JavaScript for the highly productive and unusual language it is. The course will take you through JavaScript’s object model and functional elements, giving you a solid understanding of how JavaScript really works. A series of practical assignments puts this understanding to use by implementing reusable code using idiomatic JavaScript patterns. Unit testing and TDD will be demonstrated through-out the course. WRITING AMBITIOUS WEBAPPS WITH EMBER.JS Author and instructor: Joachim Haagen Skeie This course is well suited for programmers that have felt the pain of either messy client–side code, or the pains that come with the server–side MVC model. You want to learn how to build scalable, testable and clean web applications that you can come back to and understand in 6 months, and you are willing to accept and overcome the learning curve to get there!

J. Haagen Skeie

Kristian Nordal

DOMAIN-DRIVEN DESIGN (DDD) HANDS-ON IMMERSION Author: Eric Evans Instructor: Kristian Nordal This course is written by Eric Evans and conducted by Kristian Nordal from Arktekk, which is certified by Eric Evans. The course will be held in norwegian. This intensive course will aid participants in striking a healthy balance between digging into their subject matter and addressing technological issues, which, while unavoidable, cannot be allowed to dominate the development process for commercially viable systems. We weave together lecture, discussion and classroom exercises, including hands–on coding projects. In discussions, attendees have the oportunity to discuss their own experiences and relate their own work to the principles and techniques presented in the class. EVOLUTIONARY DESIGN AND ARCHITECTURE FOR AGILE DEVELOPMENT Author and instructor: Dr. Venkat Subramaniam The course has a good balance of interactive lectures and hands-on exercises. The attendees are expected to pair-up and work on the lab exercises. The instructor will assist the attendees as they work on the exercises. The objective of the course is for the attendees to gain an in depth practical knowledge of the concepts so they can put them to immediate use on real projects.

V. Subramaniam

56

Tim Berglund

GIT & GITHUB FOUNDATIONS Authors and instructors: Tim Berglund & Matthew McCullough Our Foundations class helps you, as a newcomer to Git and GitHub, fully grasp the concepts and application of distributed version control so that you can effectively begin using this productivityenhancing suite of tools. During this live training course, we’ll explore the foundations of Git and GitHub through practical every-day commands and processes. We’ll conclude with workflow ideas and practical tips that will get you on the road to mastery of this revolutionary version control system.

M. McCullough

JAVASCRIPT AND HTML5 FOR DEVELOPERS Author and instructor: Christian Wenz JavaScript has shown an impressive comeback over the past few years. The static, non-functional websites of the past have been replaced by smart web browsers which offer a runtime environment for actual applications. This course intends to bring you up to speed with today’s efficient and effective JavaScript. Christian Wenz

57


SHAREPOINT

C++

SHAREPOINT 2010 AND OFFICE 365: END TO END FOR DEVELOPERS AND DESIGNERS Author and instructor: Sahil Malik This 5 day course is packed with information that will load you with enough skills to work productively on any SharePoint project. It covers development aspects or UI design concepts in depth. This course is designed for technical audience or the architect who needs to learn all aspects of the product, for the developer, designer, and the administrator. Sahil Malik

Mike Tarlton

Sahil Malik

SHAREPOINT 2013 AND OFFICE 365: END TO END FOR TECHNICAL AUDIENCE Author and instructor: Sahil Malik This 5 day course is packed with information that will load you with enough skills to work productively on any SharePoint project. It covers development aspects or UI design concepts in depth. This course is designed for technical audience or the architect who needs to learn all aspects of the product, for the developer, designer, and the administrator. The course has been written, and is delivered by Sahil Malik. You can expect plenty of real world insight that you don’t get in “canned courses”.

Sahil Malik

SHAREPOINT 2013 AND OFFICE 365: ONLY THE NEW STUFF Author and instructor: Sahil Malik This 3 day course is packed with targeted information that will bring your skills up to date on SharePoint 2013. Thiscourse is designed for technical audience or the architect who is already familiar with SharePoint 2010 and isinterested in getting targeted information, or the delta between SharePoint 2013 and SharePoint 2010. The coursehas been written, and is delivered by Sahil Malik. You can expect plenty of real world insight that you don’t get in“canned courses”.

ADVANCED C++ PROGRAMMING Author and instructor: Hubert Matthews This course is designed to introduce delegates to more advanced use of C++. It will cover techniques and idioms that allow for more efficient and safer use of the language as well as the concepts that make C++ different from other languages. Modern C++ techniques and facilities such as the STL are used throughout to introduce developers to the full power of the C++ language. Hubert Matthews

C++11 PROGRAMMING Author and instructor: Hubert Matthews This course is designed to upgrade delegates to C++11, the new C++ standard. C++11 is designed to make programming in C++ easier and more efficient for both the developer and the machine. It will cover all of the major features along with idioms for using them effectively, giving you access to the full power of the new language and libraries. Hubert Matthews

C

Olve Maudal

DEEP C: A COURSE FOR EXPERIENCED C AND C++ DEVELOPERS Author and instructor: Olve Maudal Programming is hard. Programming correct C is particularly hard. Indeed, even in serious industrial applications it is uncommon to see only correct, well defined and conforming code. Why do professional programmers write code like this? Because they lack a deep understanding, they don’t know the history and spirit of this wonderful programming language. C is not really a high level language, it is more like a portable assembler where you always need to consider the underlying hardware.

Scott Meyers

EFFECTIVE C++11 PROGRAMMING Author and instructor:: Scott Meyers Software developers familiar with the fundamentals of C++11 are ready to advance from knowing what's in C++11 to understanding how to apply it effectively. This seminar, based on information in Scott Meyers' forthcoming Effective C++11, highlights the insights and best practices of the most accomplished C++11 programmers: the things they almost always do (or almost always avoid doing) to produce clear, correct, efficient code.

MICROSOFT

PROGRAMMING INTRODUCTION TO PYTHON PROGRAMMING Authors and instructors: Peet Denny This Python course is an intensive introduction to Python Programming. The objective is to enable students to understand how Python can be used to solve real-world problems through realistic and useful course exercises.

C++ FOR EMBEDDED DEVELOPERS Author and instructor: Mike Tarlton This course introduces the C++ language for general use. The course is suitable for programmers who do not need to have in–depth knowledge of embedded programming concepts or concurrency issues. The course is also useful for Hardware Engineers needing to learn C++, for example to move onto using SystemC. It is assumed delegates have a working knowledge of the C programming language.

ZERO TO MICROSOFT BUSINESS INTELLIGENCE Author and instructor: Peter Myers This five day intensive instructor–led training course has been designed to enable students to commence developing and maintaining state–of–the–art integrated Business Intelligence (BI) solutions developed by using Microsoft products. The course consists of numerous hands–on labs that will provide students with the opportunity to produce an end–to–end BI solution. Peter Myers

Peet Denny

For a complete course overview, price update, time and place, visit www.programutvikling.no and www.developerfocus.com

DEVELOPING WINDOWS AZURE AND WEB SERVICES NEW Author and instructor: Magnus Mårtensson About this CourseIn this course, students will learn how to design and develop services that access local and remote data from various data sources. Students will also learn how to develop and deploy services to hybrid environments, including on-premises servers and Windows Azure. This course helps people prepare for exam 70-487 M. Mårtensson

Registration Oslo: Tel 67 10 65 65 • kurs@programutvikling.no • www.programutvikling.no Registration London: Tel +44 0843 523 5765 • sales@developerfocus.com • wwww.developerfocus.com

58

59


MICROSOFT continued

Arne Laugstøl

Billy Hollis

Dominick Baier

Scott Allan

C#.NET: UTVIKLING AV APPLIKASJONER I .NET MED C# Author and instructor: Arne Laugstøl. Instructor: Arjan Einbu In this 5-day course you will learn how to develop applications in the .Net environment. The course will teach you the C# language and how to use the platform to make applications that will run on the desktop with WPF(Window Presentation Foundation) or in the browser with ASP.Net. How to communicate with WCF(Windows Communication Foundation), and accessing data with Linq or Entity Framework is part of the course.

MICROSOFT continued

Arjan Einbu

DESIGNING USER EXPERIENCES: PRINCIPLES AND TECHNIQUES FOR DEVELOPERS, MANAGERS AND ANALYSTS Author and instructor: Billy Hollis This class is aimed at developers, but it includes design, architecture, and development topics. Technical topics are mostly covered earlier in the class, with design and architectural topics coming later. However, because the class stresses effective design and architecture, design and architecture topics are listed first. This course will also discuss changes to WPF and related technologies in future Microsoft products, as presented at the BUILD Windows conference that takes place before the class. CLAIMS-BASED IDENTITY & ACCESS CONTROL FOR .NET 4.5 APPLICATIONS Author and instructor: Dominick Baier This course introduces to the fundamental concepts of identity & access control in .NET 4.5 and covers the integration of these new technologies into the main application frameworks like ASP.NET, ASP.NET Web API and WCF. You will learn about patterns like single sign–on, federation, home realm discovery and identity delegation and how to implement them with .NET. You will learn how to implement authentication and authorization in web applications, SOAP services and HTTP⁄REST based services. You will learn about the SAML and JWT token types and the WS–Federation, WS–Trust and OAuth2 protocols. MS 70-516 - REAL WORLD LINQ - DATA ACCESS, ENTITY FRAMEWORK AND BEYOND Author and instructor: Scott Allan LINQ not only changes how we build data access components with .NET, but also introduces new flexibility and expressiveness into the C# language. In this course we’ll see how LINQ works at a language level, and also how to use LINQ with XML and the Entity Framework. We’ll look at the tradeoffs to evaluate when building a data access layer with LINQ, talk about LINQ in the context of specific design patterns, and use LINQ features in a domain to implement better business logic. This course is a combination of lectures and hands–on labs.

70-513 - WCF 4.5 WITH VISUAL STUDIO 2012 Instructor: Sahil Malik This course is aimed at .NET developers interested in developing deep architectural and developer level expertise in WCF 4. In addition, this course will teach you about Windows Server AppFabric and Windows Azure AppFabric. This course also explains good archtecture practises and enables you to take Exam 70–513.

Arjan Einbu

WEB DEVELOPMENT IN .NET - ASP.NET MVC , HTML5, CSS3, JAVASCRIPT Author and instructor: Scott Allen/Arjan Einbu This course covers everything you need to know to start building applications with the latest Microsoft web development stack. We will use ASP.NET MVC on the server and see how to work with models, views, and controllers. On the client we’ll take advantage of HTML 5, CSS 3, and the best JavaScript frameworks, including jQuery, Modernizr, and more. During the course we’ll also see how to apply test driven development techniques, cover best practices for security, scalability, and maintainability, and see various tips and tricks for building a compelling user experience. Over 150 pages of hands–on lab material included. 70-511 WINDOWS PRESENTATION FOUNDATION - WPF/XAML Author and instructor: Arne Laugstøl Windows Presentation Foundation (WPF) is a .NET technology that makes it possible to create compelling applications with modern user experience. The course covers both the basic things and the advanced stuff you need to know, to be able to give the user a “wow” effect. This course will make you able to take the Exam in 70-511 Windows Application Development with Microsoft .NET Framework 4.

Arne Laugstøl

70-583 - MICROSOFT AZURE Author and instructor: Sahil Malik This course is aimed towards the .NET developer who wishes to further their knowledge about Microsoft’s cloud offering – Azure. There are many parts to Azure, Windows Azure (Compute, Storage, Virtual Machine), SQL Azure, AppFabric and DataMarket. This course methodically looks at each piece and shows you practical usage of what you can use today. Sahil Malik

Gill Cleeren

CREATING WINDOWS 8 METRO APPS USING C# AND XAML Author and instructor: Gill Cleeren In this 3 day training course, attendees will learn how to build Windows 8 Metro style applications that offer a great user experience and interact with Windows. Developers will learn how to use the power of the XAML language to build their application all the way from the very first idea of the application to the deployment in the Windows Store. Throughout the course, attendees will see the relation between Windows 8 and other XAML–based technologies such as Silverlight or WPF.

Shy Cohen

ARCHITECTURE CLINIC Author and instructor: Shy Cohen It is a 5 day highly interactive event where you will learn, improve, and exercise software architecture skills, all based on the IDesign Method – a breakthrough, battle–proven approach to software architecture that has shown up to 80% reduction in the effort and time required for architecting, designing, and implementing software solutions. Through its application, it produces an easy–to–follow blueprint for the construction of a software system, while covering all the important aspects involved.

Sahil Malik

Daniel Marbach

Shy Cohen

60

ENTERPRISE DEVELOPMENT WITH NSERVICEBUS Author and instructor: Daniel Marbach The course teaches you all the ins–and–outs of NServiceBus – the most popular, open–source service bus for .NET – now updated for NServiceBus 3.0. Used in production since 2006, NServiceBus is now used in hundreds of companies in finance, healthcare, retail, SaaS, web 2.0, and more. From basic one–way messaging, through publish⁄subscribe; providing solutions from transactions to cross–machine scale out; this hands–on course will show you how simple distributed systems development can be.

THE CLOUD ARCHITECT MASTER CLASS Author and instructor: Shy Cohen The cloud provides many great benefits, but how should one leverage all this goodness? What are the options, benefits, and caveats for using the different services in the cloud? How should teams organize to better develop software for the cloud? How does one architect cloud–scalable systems? This class answers these questions and more, as it goes through the architecture, design, and implementation of cloud components and solutions. In the class you will learn about the different elements of the cloud, cloud architecture and design patterns, how to create robust, scalable, and secure cloud solutions, possible changes to your business model, how to migrate to the cloud, the skills you need to succeed and the supporting processes, and even cost analysis.

Miguel Castro

Christian Wenz

WINDOWS COMMUNICATION FOUNDATION (WCF) MASTER CLASS Author and instructor: Miguel Castro The training starts by explaining the motivation for WCF, and then continues to discuss in depth how to develop service–oriented applications using WCF. You will see how to take advantage of built–in features such as service hosting, instance management, asynchronous calls, synchronization, reliability, transaction management, disconnected queued calls, security as well as emerging technologies like cloud computing and the Windows Azure AppFabric service bus.

NEW ASP.NET WEB API & SIGNALR: LIGHTWEIGHT WEB-BASED ARCHITECTURES FOR YOU! Author and instructor: Christian Weier Let's face it! The current trends and developments especially in the area of mobile platforms & devices and cloud computing will cause a re-thinking in architectural aspects for many software projects and products. If you ignore this today you may be in big trouble tomorrow. How can I reach a plethora of users and client devices? How can I integrate my systems and application parts in a lightweight and interoperable manner? How am I able to push data in near-real-time fashion from my services to my clients? This course tries to answer these and more questions. Christian Weyer will show you in a pragmatic way how to face the new challenges. See all of this coming to life by using technologies and frameworks like ASP.NET Web API, SignalR, .NET- and HTML5/JavaScript-based clients - mobile or not.

61


COURSE OVERVIEW OSLO

www.programutvikling.no

SHAREPOINT

COURSETITLE AGILE Accelerated Agile: From months to minnutes

2

Evolutionary Design and Architecture for Agile Development - Dr. Venkat Subramaniam

4

Architecture Skills - Kevlin Henney

3

Effective User Stories for Agile Requirements - Mike Cohn

1

SCRUM

03

02

Certified Scrum Product Owner - CSPO - Mike Cohn

2

Certified ScrumMaster - CSM - Geoff Watts

2

Certified ScrumMaster - CSM - Mike Cohn

2

17

Smidig utvikling med Scrum - Arne Laugstøl

1

09

3

Test-Driven Development - Venkat Subramaniam

5

Test-Driven JavaScript - Christian Johansen

3

DESIGN - ANALYSIS - ARCHITECTURES Evolutionary Design and Architecture for Agile Development - Dr. Venkat Subramaniam Evolutionary Design and Architecture for Agile Development - Dr. Venkat Subramaniam

14 18

20 04

London

18900

Core Spring - Mårten Haglind

4

London

7500

Effective JPA - Industrial strength Java Persistence with JPA 2.0 and Hibernate

2

IT Fornebu

14900

Price

Effective Scala - Jon-Anders Teigen

3

IT Fornebu

18900

IT Fornebu

24900

IT Fornebu

24900

IT Fornebu

14900

Felix, Oslo

14900

IT Fornebu

14900

Felix, Oslo

14900

IT Fornebu

6500 18900

IT Fornebu

24900

IT Fornebu

18900

5

Kongsberg 09 27

5

MOB101 - 3-Day Writing Cross Platform iOS and Android Apps using Xamarin and C# - Wei-Meng Lee

3

30

3

18900 Price 21900 21900 21900

London

18900

London

24900 Price

09

IT Fornebu

24900

04

IT Fornebu

18900

IT Fornebu

18900

07

Days Sep Oct Nov Dec Location 5

Price

IT Fornebu

Days Sep Oct Nov Dec Location

Android Developmer Training - Wei-Meng Lee

Price

IT Fornebu

IT Fornebu

28

02

5

JAVA

IT Fornebu

4

The Architect`s Master Class - Juval Lowy

#

09

4

3

70-513 - WCF 4.5 with Visual Studio 2012 - Sahil Malik

09

SharePoint 2013 and Office 365: End to End for Developers - Sahil Malik

Price

IT Fornebu

24900

IT Fornebu

24900

Programming Java Standard Edition - Peet Denny

5 5

HTML5 - JavaScript - CSS3

3

JavaScript for programmers - Christian Johansen

3

Practical CSS3 - Chris Mills

2

Test-Driven JavaScript with Christian Johansen

3

Writing Ambitious Webapps with Ember.js - Joachim Haagen Skeie

3 4

C++ for Embedded Developers - Mike Tarlton

5

C++11 programming - Hubert Matthews - IT-Fornebu

3

C++11 programming - Hubert Matthews - Kongsberg

3

Programming in C++ with Mike Tarlton Deep C: Et kurs for erfarne C og C++ programmerere - Olve Maudal XML Exchanging and Managing Data using XML and XSLT - Espen Evje DATABASE Databasedesign, -implementering og SQL-programmering - Dag Hoftun Knutsen PROGRAMMING Objektorientert utvikling - Eivind Nordby EFFECTIVE CONCURRENCY Effective Concurrency - Herb Sutter (26th-28th March 2014) DEVOPS DevOps - Alex Papadimoulis

5

07

ASP.NET Web API & SignalR: Lightweight Web-Based Architectures for you!

2

30

IT Fornebu

14900

Claims-based Identity & Access Control for .NET 4.5 Applications - Dominick Baier

2

14

IT Fornebu

14900

Web Development in .NET - ASP.NET MVC, HTML5, WebAPI, and Single Page Applications - Scott Allen

5

IT Fornebu

24900

ProgramUtvikling

Creating Windows 8 Apps using C# and XAML - Gill Cleeren

3

IT Fornebu

18900

Creating Windows 8 Apps using HTML5 and JavaScript - Christian Wenz

3

IT Fornebu

18900

Enterprise Development with NServiceBus - Daniel Marbach

4

29

IT Fornebu

21900

The office and course rooms are located in the IT-Fornebu technology park approximately 10 minutes away from central Oslo. Address: Martin Lingesvei 17-25, 1367 Snarøya.

Web Development in .NET - ASP.NET MVC , HTML5, CSS3, JavaScript - Scott Allen/Arjan Einbu

5

14

IT Fornebu

24900

Tel.: +47 67 10 65 65 - Fax: +47 67 82 72 31

WPF/XAML - 70-511 / 10262A Windows Presentation Foundation/XAML - Arne Laugstøl

3

IT Fornebu

21900

www.programutvikling.no - info@programutvikling.no

Developing Windows Azure and Web Services - Magnus Mortenson

5

Zero to Microsoft Business Intelligence - Peter Myers

5

09 08

03

16 19 11

IT Fornebu

24900

IT Fornebu

24900

IT Fornebu

23

11

IT Fornebu

21 23

11

04 16 18

11 20

25 30 25 02

02 06

4

25 04

18900

IT Fornebu

14900

IT Fornebu

18900

IT Fornebu

18900 21900

Ålesund

24900

IT Fornebu

18900

Kongsberg

18900

Ålesund

21900

IT Fornebu

Days Sep Oct Nov Dec Location 4

22

IT Fornebu

Days Sep Oct Nov Dec Location 4

03

03

Days Sep Oct Nov Dec 3 Days Sep Oct Nov Dec 3

Price

Kongsberg

Trondheim

09

Price

IT Fornebu

Days Sep Oct Nov Dec Location 3

Price 21900

18900

Days Sep Oct Nov Dec Location 2

24900

IT Fornebu

Days Sep Oct Nov Dec Location

Advanced C++ programming - Hubert Matthews

C

25

Days Sep Oct Nov Dec Location

JavaScript and HTML5 for Developers - Christian Wenz

C++

09

Days Sep Oct Nov Dec Location

Spring and Hibernate Development - Mårten Haglind

C .NET: Utvikling av applikasjoner i .NET med C# - Arjan Einbu

09

24900

21900

Days Sep Oct Nov Dec Location

Architecture Skills - Kevlin Henney

MICROSOFT

14

3

4

Fundamentals of iOS Programming - Wei-Meng Lee

11

5

Price

IT Fornebu

Days Sep Oct Nov Dec Location

Agile Desgin and Modeling for Advanced Object Design With Patterns - Dr. Venkat Subramaniam

MOBILE APPLICATIONS

19

Days Sep Oct Nov Dec Location

SharePoint 2010 and Office 365: End to End for Developers and Designers - Sahil Malik

8900

Days Sep Oct Nov Dec Location

Test-Driven Development & Refactoring Techniques - Robert C. Martin

Whole Team Approach to Agile Testing - Janet Gregory

17

Price

IT Fornebu

Days Sep Oct Nov Dec Location 2

TESTING

09 27

Certified Scrum Product Owner - CSPO - Geoff Watts

TEST-DRIVEN DEVELOPMENT

62

Days Sep Oct Nov Dec Location

IT Fornebu Location London Location IT Fornebu

Price 14900 Price 18900 Price 21900 Price 21900 Price 17900 Price 17900

63


COURSE OVERVIEW LONDON

DeveloperFocus LTD, London by ProgramUtvikling AS www.developerfocus.com

JAVA

COURSETITLE AGILE & SCRUM

Location

Advanced Scrum Master Course - Geoff Watts & Paul Goddard

2

Holborn Bars

Agile Foundations for Business Analysts with Allan Kelly

2

Farringdon

Acceptance Test-Driven Development with David Evans

2

Agile Estimating and Planning Training - Mike Cohn

1

Architecture with Agility - Kevlin Henney

Price

Days Sep Oct Nov Dec

£700

£1195

Java Virtual Machine (JVM) with Ben Evans

1

£700

£1195

Understanding Advanced Java & The Java Virtual Machine (JVM) with Ben Evans

3

£1495

£1195

Object-Oriented Programming in Java - John Denny

5

£1995

Introduction to Python Programming with John Denny

3

3

Holborn Bars

£1195

Certified Scrum Master - CSM - Geoff Watts

2

Holborn Bars

£1195

USER EXPERIENCE & DESIGN

Certified Scrum Master - CSM - Mike Cohn

2

Holborn Bars

£1400

Designing User Experiences: Principles and Techniques for Developers, Managers, and Analysts - Billy Hollis

Certified Scrum Product Owner - CSPO - Geoff Watts

2

Holborn Bars

£1195

Certified Scrum Product Owner - CSPO - Mike Cohn

2

Holborn Bars

£1400

Effective User Stories for Agile Requirements Training - Mike Cohn

1

Canary Wharf

£700

Succeeding with Agile - Mike Cohn

2

Holborn Bars

£1400

Working on a Scrum Team with Kenny Rubin

3

Holborn Bars

£1400

Writing Effective User Stories Training with Kenny Rubin

2

Holborn Bars

£1195

04 26

Days Sep Oct Nov Dec

Location

Price

Holborn Bars

£1495

Holborn Bars

£2500

3

Architecture Clinic with Michael ‘Monty’ Montgomery

5

The Architect`s Master Class with Juval Lowy

5

Holborn Bars

£2500

Project Design Master Class with Juval Löwy

5

Holborn Bars

£2500

The Cloud Architect Master Class with Shy Cohen

5

Holborn Bars

£2500

Windows Communication Foundation (WCF) Master Class with Miguel Castro (Bør byttes til annet kurs,SignalR)

5

Holborn Bars

£2500

C++ Advanced C++ Programming - Hubert Matthews MICROSOFT .NET

Days Sep Oct Nov Dec

Holborn Bars

4 Days Sep Oct Nov Dec

C #.NET: Developing applications in .NET with C# - Gill Cleeren

5

Creating Windows 8 Metro Apps using C# and XAML - Gill Cleeren

3

Location

Location

25 15

Price £1795 Price £1995

10

Holborn Bars

£1495

Design Concepts, Architecture, and Advanced Capabilities for WPF - Billy Hollis

4

£1795

WCF - Windows Communication Foundation (WCF) 4 with Sahil Malik

5

£1995

ASP.NET Web API & SignalR - Lightweight web-based architectures for you! with Christian Weyer

2

MOBILE APPLICATIONS

13

Days Sep Oct Nov Dec

Holborn Bars Location

SharePoint 2013 and Office 365: End to End for Technical Audience - Sahil Malik

EFFECTIVE CONCURRENCY

£1195 Price

Fundamentals of Android Programming with Wei-Meng Lee

5

Farringdon

£1995

Fundamentals of iOSProgramming with Wei-Meng Lee

5

Farringdon

£1995

DeveloperFocus

5

25

Days Sep Oct Nov Dec 3 Days Sep Oct Nov Dec

Effective Concurrency - Herb Sutter (26th-28th March 2014)

Advanced Windows Security Masterclass with Paula Januszkiewicz

07

Days Sep Oct Nov Dec

3

Location Holborn Bars

Price £1995

Location

Price

Holborn Bars

£1495

Location

Price

Holborn Bars

£1995

COURSE LOCATION, LONDON

De Vere’s Holborn Bars is one of the UK’s leading conference centres in London. Step through the imposing doors of Holborn Bars and sense you’re entering somewhere rather special – an inspirational place to hold conferences, meetings, training and assessment centres. Set in its bustling backdrop located near London, makes a lasting impression on guests and delegates while providing a comfortable and inspiring surrounding. You will be provided with cool water & mints in all rooms, freshly brewed tea & coffee with pastries & biscuits during your breaks and delicious lunches with a different menu prepared every day. In the lobby area there are PCs to catch up on some emails during breaks and free internet access is also available. Arriving by Train and Tube The property is located on the north side of Holborn, close to its junction with Gray’s Inn Road. It benefits from excellent public

© Mark S/ Wikipedia

02

SHAREPOINT

© Nigel Cox/ Wikipedia

08

Price

1

£700

05

Location

Advanced Java Programming with Martijn Verburg

Canary Wharf

ARCHITECTURE - DESIGN - SECURITY - MASTERCLASSES

64

Days Sep Oct Nov Dec

Lucky Byatt, CEO, DeveloperFocus, London

transport links with Chancery Lane underground station, Farringdon station and City Thameslink station all in close proximity. Bus You can get to Holborn Bars by bus from London Bridge mainline station. The 521 Bus route stops opposite just outside the Sainsbury’s headquarters and Holborn Bars is a little further ahead on the other side of the road. ADDRESS Holborn Bars. 138–142 Holborn, London EC1N 2NQ

ENROLMENT OPTIONS www.developerfocus.com - info@developerfocus.com Tel.: 0843 523 5765

65


A unique course provider! Within the space of just a few years, we have established ourselves as Norway’s leading provider of courses for IT developers and project managers. We are purely an independent course provider and we do not sell other products or services. Our ambition is to ensure that participants get the maximum out of their course, so they can make substantial practical use of the training in their daily work. VISION To provide the world’s best courses for developers and managers.

alone. We do not attempt to sell products or consultancy services alongside.

BUSINESS CONCEPT To offer developer courses in the field of IT that provide practical and useful expertise.

COURSES OFFERED We hold advanced courses in, for example, C#, .NET, SQL, UML, XML, Java, Maven, TDD and Spring. In project management, we offer the most popular methodologies within agile development, including Scrum and Lean. Our unique combination of custom courses developed in-house

CLEAR STRATEGY We have a transparent strategy that aims to provide courses for developers and project managers - and that

and standard courses means that we can help reduce the number of course days and costs for our customers.

JOBB I BEKK ? Vi tror at interesser og lidenskap er viktig – både på og utenfor jobb. Nysgjerrige mennesker oppnår rett og slett mer. I BEKK får du mulighet til å utvikle deg videre, både som menneske og fagperson.

Our vision is to provide the world’s best courses for developers and managers

HOW TO FIND US PROGRAMUTVIKLING MAIN OFFICE, OSLO Parking Entrance

ProgramUtvikling AS is located in the IT-Fornebu technology park at Snarøya. ADDRESS Martin Lingesvei 17-25, 1367 Snarøya. Our offices and course rooms are situated in the terminal building of the former Oslo airport. The photo shows the car park, bus stop and course rooms. For details of bus times, go to trafikanten.no

ENROLMENT OPTIONS www.programutvikling.no - info@programutvikling.no

Bus stop

Tel.: +47 67 10 65 65 - Fax: +47 67 82 72 31

FOLLOW US ON twitter.com/progutvikling

66

Sjekk ut ulike jobbmuligheter og hele vår faglige bredde på våre nettsider. www.programutvikling.no/feed/news.aspx

nyheter@programutvikling.no

facebook.com/programutvikling

www.bekk.no

67


gs Warnin

rd

tion onfirma

C

Voting

d Passwor

Passwo

g Verifyin

Survey

SMS Billing

ing

Market

ers

Remind

Loyalty

Club

Voting

Contact LOVE update SMS

HLR

SMS API

ing

n

Donatio

Position

Mobile ng marketi Returadresse: ProgramUtvikling AS. Postboks 1, 1330 Fornebu Merge SMS

g

Orderin

The fast way to integrate

SMS into your software

C# Java HTTP ASP COM SMPP MSSQL YAP SMTP FTP Web Services

n Donatio

HLR

sales@vianett.no l

Voting

onfi

SMS Billing

g Verifyin

Rabekkgata 9, Moss - Norway

rmation

ww.vi

unt: w per acco

develo

rs

m20inde +47 69 R 20e 69

rd Passwo

For more information:

www.vianett.com arketing

M

eloper

m/dev anett.co

Survey

ing

Booking

ord

free

Oslo Spektrum 11-12 Sept.

Position

Sign

for a up now

Meet us at:

t

Paymen

MMS

ired Get insp

Voting

Order Ask

Merge SMS

We love SMS!


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.