polyglot programming and agile development

58
Polyglot Programming and Agile Development Shashank Teotia Pramod Sadalage ThoughtWorks

Upload: shashank-teotia

Post on 19-Jul-2015

48 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Polyglot programming and agile development

Polyglot Programming and

Agile Development

Shashank Teotia Pramod Sadalage ThoughtWorks

Page 2: Polyglot programming and agile development

Problem Statement

Page 3: Polyglot programming and agile development

“To create multi-platform gaming hardware configuration software with crowd sourcing and backup abilities with an awesome GUI which looks the same on all supported platforms.”

- Client

Page 4: Polyglot programming and agile development

“Adding a new platform / device should be trivial.”

Page 5: Polyglot programming and agile development

“Of course, don’t forget that the software should have minimal CPU & memory footprint. !

Gamers hate bloatware!”

Page 6: Polyglot programming and agile development

“And yes, I have a small team, distributed across 3 continents. They should be busy delivering features, not get caught up in the operational challenges.”

Page 7: Polyglot programming and agile development

:)

Page 8: Polyglot programming and agile development

OK, this is not a special situation!

Page 9: Polyglot programming and agile development

How do you architect?

Page 10: Polyglot programming and agile development

Lets look at the world for inspiration

Page 11: Polyglot programming and agile development

Does the carpenter use just one tool?

credit: homespothq.com

Page 12: Polyglot programming and agile development

Carpenter uses many tools to

get the job done

credit: homespothq.com

Page 13: Polyglot programming and agile development

Some time back we could write a

system with COBOL

Page 14: Polyglot programming and agile development

The world by nature is polyglot

Page 15: Polyglot programming and agile development

Have done it earlier Bash/Shell

AWK Perl SED etc…

Page 16: Polyglot programming and agile development

Neal Ford coined the term in 2006

bit.do/neal4d

Page 17: Polyglot programming and agile development

Many new languages on the JVM started

the trend

Page 18: Polyglot programming and agile development

Java, Jruby, Jython, Clojure, Scala, Groovy,

Rhino

Page 19: Polyglot programming and agile development

Lets talk of our experience

Page 20: Polyglot programming and agile development

Observation & Awareness

Page 21: Polyglot programming and agile development

“Lets break down the domain!” - Biz people

Page 22: Polyglot programming and agile development

“Divide & Integrate!” - informally dressed devs

Page 23: Polyglot programming and agile development

Observation

Page 24: Polyglot programming and agile development

Think Bounded Context - Eric Evans in Domain Driven Design

Page 25: Polyglot programming and agile development

“To create multi-platform gaming hardware configuration software with crowd sourcing and backup abilities with an awesome GUI which looks the same on all supported platforms. And yes, adding a new platform or device should be trivial. Of course, don’t forget that the software should have minimal CPU and memory footprint.” !“And yes, I have a small team, distributed across 3 continents. They should be busy delivering features, not get caught up in the operational challenges.”

Page 26: Polyglot programming and agile development

GUI

Core

Device Library

Cloudcrowd sourcing

backup

distributed

operational challenges.small team available

multi-region

PaaSreplication

Device Driver

cross-platform

multi-platform

hardware configuration

looks the sameawesomelightweight

trivial to add a new platform

lightweight

gaming

multi-threadedbuild easy

C interface

trivial to add a new device

generic HID USB interface

long running

short-lived

device communication

Page 27: Polyglot programming and agile development

Awareness

Page 28: Polyglot programming and agile development

In your search for the right language, you should underrate your current skills.

Repeat it.

Page 29: Polyglot programming and agile development

Choosing the right language is a competitive edge!

Page 30: Polyglot programming and agile development

Case Study

Page 31: Polyglot programming and agile development

Cloudcrowd sourcing

backup

distributed

operational challenges.small team available

multi-region

PaaSreplication

GUIcross-platform

looks the sameawesomelightweight

gaming

short-lived

Coremulti-platform

hardware configurationtrivial to add a new platform

lightweightmulti-threaded

build easyC interface

long running

Device Librarytrivial to add a new device

generic HID USB interface Device Driverdevice communication

Page 32: Polyglot programming and agile development

GUIcross-platform

looks the sameawesomelightweight

gaming

short-lived

Coremulti-platform

hardware configurationtrivial to add a new platform

lightweightmulti-threaded

build easyC interface

long running

Device Librarytrivial to add a new device

generic HID USB interface Device Driverdevice communication

Chef Infrastructure as a Service

(scaling is easy)

Sinatra modular RACK app

(API dev is blazing fast)

RIAK distributed, CAP tunable DB

(backups never fail)Cloud

Page 33: Polyglot programming and agile development

Coremulti-platform

hardware configurationtrivial to add a new platform

lightweightmulti-threaded

build easyC interface

long running

Device Librarytrivial to add a new device

generic HID USB interface Device Driverdevice communication

Chef Infrastructure as a Service

(scaling is easy)

Sinatra modular RACK app

(API dev is blazing fast)

RIAK distributed, CAP tunable DB

(backups never fail)Cloud

node-webkit Native Apps in HTML5

(write once, run anywhere)Knockout

lightweight JS MVVM (complex UI modeling made easy)

GUI

Cocoa Mac UI Controls

Page 34: Polyglot programming and agile development

Device Librarytrivial to add a new device

generic HID USB interface Device Driverdevice communication

Chef Infrastructure as a Service

(scaling is easy)

Sinatra modular RACK app

(API dev is blazing fast)

RIAK distributed, CAP tunable DB

(backups never fail)Cloud

node-webkit Native Apps in HTML5

(write once, run anywhere)Knockout

lightweight JS MVVM (complex UI modeling made easy)

GUI

Cocoa Mac UI Controls

Google GoCore

Interfaces & Build constraints (easy multi platform dev)

Simple and unambiguous (focus on the domain)

CGO (call C code)

built-in concurrency primitives (no multi-threading hell)

cross platform libraries (just specify the build env)

Page 35: Polyglot programming and agile development

Device Driverdevice communication

Chef Infrastructure as a Service

(scaling is easy)

Sinatra modular RACK app

(API dev is blazing fast)

RIAK distributed, CAP tunable DB

(backups never fail)Cloud

node-webkit Native Apps in HTML5

(write once, run anywhere)Knockout

lightweight JS MVVM (complex UI modeling made easy)

GUI

Cocoa Mac UI Controls

Device LibraryLisp

data is code (add new device)

good old C

Google GoCore

Interfaces & Build constraints (easy multi platform dev)

Simple and unambiguous (focus on the domain)

CGO (call C code)

built-in concurrency primitives (no multi-threading hell)

cross platform libraries (just specify the build env)

Page 36: Polyglot programming and agile development

Chef Infrastructure as a Service

(scaling is easy)

Sinatra modular RACK app

(API dev is blazing fast)

RIAK distributed, CAP tunable DB

(backups never fail)Cloud

node-webkit Native Apps in HTML5

(write once, run anywhere)Knockout

lightweight JS MVVM (complex UI modeling made easy)

GUI

Cocoa Mac UI Controls

Device LibraryLisp

data is code (add new device)

good old C Device Drivergood old C

Google GoCore

Interfaces & Build constraints (easy multi platform dev)

Simple and unambiguous (focus on the domain)

CGO (call C code)

built-in concurrency primitives (no multi-threading hell)

cross platform libraries (just specify the build env)

Page 37: Polyglot programming and agile development

A 10 member team manages it all

Page 38: Polyglot programming and agile development

The Secret Sauce

Page 39: Polyglot programming and agile development

Feed the Build Pipeline

Page 40: Polyglot programming and agile development

Build Pipeline

Page 41: Polyglot programming and agile development

Core

Func Tests

tarball

report

FrontEndpackage.nwgit

git

git

Promote Build

DeviceLib Driverslib

Page 42: Polyglot programming and agile development

Promoted Build artifacts

Installerpkg

Go exe tarball package.nwlib

Deploy package artifact

Page 43: Polyglot programming and agile development

A good choice!

Page 44: Polyglot programming and agile development

Working with an embedded Chromium browser helped!

Page 45: Polyglot programming and agile development

A simple RESTful SOA

tested using Cukes!

Page 46: Polyglot programming and agile development

Keeping a tight control

over test code quality helped!

#failfast

Page 47: Polyglot programming and agile development

Speed & simplicity of building Go meant a tighter turn around!

Page 48: Polyglot programming and agile development

Skype channel for communication

Page 49: Polyglot programming and agile development

Challenges!

Page 50: Polyglot programming and agile development

Paradigms are hard to master

Page 51: Polyglot programming and agile development

Debugging can be tricky

Page 52: Polyglot programming and agile development

Don’t succumb to the Highlander

Fallacybit.do/highlander_fallacy

Page 53: Polyglot programming and agile development

"Always code as if the g u y w h o e n d s u p maintaining your code w i l l b e a v i o l e n t psychopath who knows where you live."

Page 54: Polyglot programming and agile development

Ultimately what matters...

Page 55: Polyglot programming and agile development

... is a happy Client

Page 56: Polyglot programming and agile development

And remember superheroes!

Page 57: Polyglot programming and agile development

bit.do/superpowers

Page 58: Polyglot programming and agile development

Thank you!