SlideShare a Scribd company logo
Breaking The Monotony

      @sai_venkat &
      @harikrishnan83
Or
Theme



The Agility we seek is from the code we write
and systems we build and not just from
processes and practices we follow.
Breaking The Monotony
Why this talk?
 ●   As Craftsmen we are on look out for right
     tool for the job and sharing our
     experiences with you.
 ●   This talk is based on the experiences we
     have on our day to day projects – The
     choice we make when we build the
     application can bring us agility.
 ●   We have chosen to concentrate on these
     areas because in any decent sized
     (Enterprise :P) project these problems are
     common.
Introspection
Modeling time
●   Aim – To build the world's largest resume builder.
●   We choose you as the architect (or funky name – Master
    Craftsman) to create a model of a profile builder.
●   Tell us what you need (tools, frameworks) and your model.
●   Catch – We don't want to restrict the resumes coming in
    from public in any way. We want the users to give as much
    information about them as possible
Person_PK LastName                                       Resume Person Title                         Summary
                                                           _PK    _FK
  1                        clouseau
                                                           2                  1              Inspector Developer with
                                                                                             turned    instincts of an
                                                                                             Developer inspector
Resume_FK                  Skill_FK
2                          1                                          Skill_PK               Name       Description
2                          2                                          1                      Java       Statically
2                          3                                                                            typed
                                                                                                        language
                                                                      2                      Clojure    Lisp like
                                                                                                        language
                                                                      3
S E L E C T * F R O M P e r s o n p , R e s u m e r, S k ill s , R e s u m e _ S k ill r s
                                                                                             Haskel     Functional
W HERE                                                                                                  language
       p .P e r s o n _ P K = r.P e r s o n _ F K A N D
       r.R e s u m e _ P K = r s . R e s u m e _ F K A N D
       s . S k ill_ P K = r s . S k ill_ F K A N D
       s .N a m e in ( “ J a v a ” , “ C lo j u r e ” )
Same Data Modeled as Documents
 {                                                   {
     Name: “Closseau”,                                   Name: “Mr Magoo”,
     title: “Inspector turned developer”,                title: “Funny developer”,
     Skills: [“Ruby”, “Haskell”, “C#”],                  Skills: [“Ruby”, “Self”, “Clojure”],
     Telephone_Numbers: [9611805466],                    Email-id: “magoo@looneytoons.com”,
     Experience: 5                                       Experience: 4
 }                                                   }


Querying the Data:

Map function:

function(doc) {
  if (contains(doc.skills, [“java”, “clojure”])) {
    emit(null, doc);
  }
}
A Case for Non Relational
                Databases
●   Schema less Data helps us to evolve the model over the
    course of application development and maintenance (Ex.
    FriendFeed, github, Sourceforge)
●   Scaling out is easy in nosql databases. Throw in more
    commodity machine.
●   You may not always need atomic consistency (Dirty interface
    of mnesia)
●   Most nosql Databases are simpler than conventional
    RDBMS, hence more robust and lightweight
●   SQL Engines are only a convenience If they are not helping
    don't have to use them (Waffle on Mysql Datastore)
Polyglot & PolyParadigm
                Programming
●   Today's Applications Need to
    ●   Must scale
    ●   Must be resilient and secure
    ●   Must evolve for future
    ●   Work with large volumes of data and users.
Hope you don't have someone like this
in your team -

I work only with Java.....
Polyglot & PolyParadigm
                  Programming
●   Are there any advantages to writing an entire application in one
    language or one stack (Microsoft shop or Java shop anyone)?
●   Is one language best for all domains?
●   Are we harnessing the power we have in our hardware?
●   Languages have their boundaries – Imperative vs Functional, Static vs
    Dynamic, Procedural vs Object Oriented
●   Advantages are mostly relative and context sensitive.
●   Examples:
    Flightcaster, Facebook Chat, github - BERT, Runa – Swarmiji, Twitter
●   No Language Wars please :)
In Erlang
                                    In Java
-module (fact).
-export ([fact/1]).                 public int fact(int value)
                                     {
fact(0) -> 1;                          if (value == 0)
fact(N) -> N * fact(N -1).             {
                                         return 0;
                                       }
                                       else
 Tail Recursion Optimized              {
                                         return value * fact(value - 1);
 -module (fact).                       }
 -export ([fact/1]).                 }

 fact(N) -> fact(N, 1).

 fact(0, A) -> A;
 fact(N, A) -> fact(N -1, N * A).
Polyglotism in Testing

We would use Java or C# to write functional tests as our application code is in that language

                                                         require “watir”
 package org.openqa.selenium.example;
                                                         browser = Watir::Browser.new(:firefox)
 import   org.openqa.selenium.By;
                                                         browser.goto “http://www.google.com”
 import   org.openqa.selenium.WebDriver;
                                                         browser.text_field(:name, “q”).set “Cheese”
 import   org.openqa.selenium.WebElement;
                                                         browser.button(:name, “btnG”).click
 import   org.openqa.selenium.htmlunit.HtmlUnitDriver;
                                                         puts “Page title is #{browser.title}”
 public class Example  {
     public static void main(String[] args) {
         WebDriver driver = new HtmlUnitDriver();
         driver.get("http://www.google.com");
         WebElement element =
 driver.findElement(By.name("q"));
         element.sendKeys("Cheese!");
         element.submit();
         System.out.println("Page title is: " +
 driver.getTitle());
     }
 }
Polyglotism in Testing
Using Cucumber + Jruby or Groovy for acceptance testing of services and API
interfaces in Java.


             Feature: Proposal notification
              In order to reduce time spent on emailing
              Administrators should be able to mail
              all proposals owners depending on status
              Scenario: Email accepted proposal
                Given hari@gmail.com proposed 'Breaking the Monotony'
                And the 'Breaking the Monotony' proposal is approved
                When I send mass proposal email
                Then hari@gmail.com should get email
                 """
                 Hi hari@gmail.com
                 Congratulations, 'Breaking the Monotony' was accepted.
                 See you at 'Agile India 2010'!
                 """
Polyglotism in Testing
Using Cucumber + Jruby or Groovy for acceptance testing of services and API
interfaces in Java.


             Feature: Proposal notification
              In order to reduce time spent on emailing
              Administrators should be able to mail
              all proposals owners depending on status
              Scenario: Email accepted proposal
                Given hari@gmail.com proposed 'Breaking the Monotony'
                And the 'Breaking the Monotony' proposal is approved
                When I send mass proposal email
                Then hari@gmail.com should get email
                 """
                 Hi hari@gmail.com
                 Congratulations, 'Breaking the Monotony' was accepted.
                 See you at 'Agile India 2010'!
                 """
Build and Deployment
●   Build script or Build code?
●   9000 lines of XML Code and still no test?
●   We really need a first class language for flexibility
    ●   Programming in XML doesn't make sense
    ●   Pure declarative model solves some problems but reduces
        flexibility
    ●   Testing is much simpler with a real language
●   Use Ruby or Groovy for build (Example: FubuMVC in Rake)
    and Capistrano for deployment.
●   Continuous Deployment.
●   Cloud for deployment.
The path less traveled
Thank you for listening to us.

                Sai Venkatakrishnan

                Twitter - http://twitter.com/sai_venkat
                Github - http://github.com/saivenkat
                Blog - http://developer-in-test.blogspot.com

                Harikrishnan

                Twitter - http://twitter.com/harikrishnan83
                Github - http://github.com/harikrishnan83
                Blog - http://harikrishnan83.wordpress.com

More Related Content

PDF
DEBUGGING FUZZY XPATH QUERIES
PDF
Groovy Domain Specific Languages - SpringOne2GX 2012
PPTX
Domain-Specific Languages
KEY
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
PDF
BangaloreJUG introduction to kotlin
PDF
Practical Groovy DSL
PDF
Nltk:a tool for_nlp - py_con-dhaka-2014
PDF
DSL's with Groovy
DEBUGGING FUZZY XPATH QUERIES
Groovy Domain Specific Languages - SpringOne2GX 2012
Domain-Specific Languages
Groovy DSLs, from Beginner to Expert - Guillaume Laforge and Paul King - Spri...
BangaloreJUG introduction to kotlin
Practical Groovy DSL
Nltk:a tool for_nlp - py_con-dhaka-2014
DSL's with Groovy

What's hot (20)

PDF
Natural Language Toolkit (NLTK), Basics
KEY
NLTK in 20 minutes
PDF
Polyglot JVM
KEY
Have Your Cake and Eat It Too: Meta-Programming Techniques for Java
PDF
Little Helpers for Android Development with Kotlin
PDF
Kotlin for Android Developers - 1
PPT
Simple Design
PDF
Text analysis using python
PPTX
Natural Language Processing and Python
PPT
Polyglot Programming in the JVM
PDF
Agile 2012 Simple Design Applied
PDF
Os Borger
PPT
JEST: REST on OpenJPA
PDF
Java Full Throttle
PPTX
PDF
JavaScript Parser Infrastructure for Code Quality Analysis
PDF
Python and Zope: An introduction (May 2004)
PDF
Kotlin for Android Developers - 3
PDF
Puppet DSL gotchas, and understandiing Roles & Profiles pattern
PDF
Building DSLs with Xtext - Eclipse Modeling Day 2009
Natural Language Toolkit (NLTK), Basics
NLTK in 20 minutes
Polyglot JVM
Have Your Cake and Eat It Too: Meta-Programming Techniques for Java
Little Helpers for Android Development with Kotlin
Kotlin for Android Developers - 1
Simple Design
Text analysis using python
Natural Language Processing and Python
Polyglot Programming in the JVM
Agile 2012 Simple Design Applied
Os Borger
JEST: REST on OpenJPA
Java Full Throttle
JavaScript Parser Infrastructure for Code Quality Analysis
Python and Zope: An introduction (May 2004)
Kotlin for Android Developers - 3
Puppet DSL gotchas, and understandiing Roles & Profiles pattern
Building DSLs with Xtext - Eclipse Modeling Day 2009
Ad

Similar to Breaking The Monotony (20)

PDF
Building Atlassian Plugins with Groovy - Atlassian Summit 2010 - Lightning Talks
PDF
A Sceptical Guide to Functional Programming
ODP
Groovy intro for OUDL
PDF
Atlassian Groovy Plugins
PPTX
Why learn new programming languages
KEY
Polyglot and functional (Devoxx Nov/2011)
PDF
Scala, Akka, and Play: An Introduction on Heroku
PDF
Clean code
PPTX
Intro to scala
PDF
Scala @ TechMeetup Edinburgh
PPTX
All about scala
PDF
A Tour Through the Groovy Ecosystem
PDF
Scala for Java Programmers
PDF
Scala at GenevaJUG by Iulian Dragos
KEY
Polyglot and Functional Programming (OSCON 2012)
PPTX
Use of Apache Commons and Utilities
PDF
Workshop Scala
PDF
Testing outside of the Ruby World
KEY
groovy & grails - lecture 2
PDF
OpenLogic
Building Atlassian Plugins with Groovy - Atlassian Summit 2010 - Lightning Talks
A Sceptical Guide to Functional Programming
Groovy intro for OUDL
Atlassian Groovy Plugins
Why learn new programming languages
Polyglot and functional (Devoxx Nov/2011)
Scala, Akka, and Play: An Introduction on Heroku
Clean code
Intro to scala
Scala @ TechMeetup Edinburgh
All about scala
A Tour Through the Groovy Ecosystem
Scala for Java Programmers
Scala at GenevaJUG by Iulian Dragos
Polyglot and Functional Programming (OSCON 2012)
Use of Apache Commons and Utilities
Workshop Scala
Testing outside of the Ruby World
groovy & grails - lecture 2
OpenLogic
Ad

More from Naresh Jain (20)

PDF
Problem Solving Techniques For Evolutionary Design
PDF
Agile India 2019 Conference Welcome Note
PDF
Organizational Resilience
PDF
Improving the Quality of Incoming Code
PDF
Agile India 2018 Conference Summary
PDF
Agile India 2018 Conference
PDF
Agile India 2018 Conference
PDF
Agile India 2018 Conference
PDF
Pilgrim's Progress to the Promised Land by Robert Virding
PDF
Concurrent languages are Functional by Francesco Cesarini
PDF
Erlang from behing the trenches by Francesco Cesarini
PDF
Anatomy of an eCommerce Search Engine by Mayur Datar
PDF
Setting up Continuous Delivery Culture for a Large Scale Mobile App
PDF
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
PDF
Value Driven Development by Dave Thomas
PDF
No Silver Bullets in Functional Programming by Brian McKenna
PDF
Functional Programming Conference 2016
PDF
Agile India 2017 Conference
PDF
The Eclipse Way
PDF
Unleashing the Power of Automated Refactoring with JDT
Problem Solving Techniques For Evolutionary Design
Agile India 2019 Conference Welcome Note
Organizational Resilience
Improving the Quality of Incoming Code
Agile India 2018 Conference Summary
Agile India 2018 Conference
Agile India 2018 Conference
Agile India 2018 Conference
Pilgrim's Progress to the Promised Land by Robert Virding
Concurrent languages are Functional by Francesco Cesarini
Erlang from behing the trenches by Francesco Cesarini
Anatomy of an eCommerce Search Engine by Mayur Datar
Setting up Continuous Delivery Culture for a Large Scale Mobile App
Towards FutureOps: Stable, Repeatable environments from Dev to Prod
Value Driven Development by Dave Thomas
No Silver Bullets in Functional Programming by Brian McKenna
Functional Programming Conference 2016
Agile India 2017 Conference
The Eclipse Way
Unleashing the Power of Automated Refactoring with JDT

Recently uploaded (20)

PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation theory and applications.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Getting Started with Data Integration: FME Form 101
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Empathic Computing: Creating Shared Understanding
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
OMC Textile Division Presentation 2021.pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation theory and applications.pdf
A comparative analysis of optical character recognition models for extracting...
MIND Revenue Release Quarter 2 2025 Press Release
Advanced methodologies resolving dimensionality complications for autism neur...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Network Security Unit 5.pdf for BCA BBA.
cloud_computing_Infrastucture_as_cloud_p
Getting Started with Data Integration: FME Form 101
Spectroscopy.pptx food analysis technology
Group 1 Presentation -Planning and Decision Making .pptx
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Empathic Computing: Creating Shared Understanding
NewMind AI Weekly Chronicles - August'25-Week II
Encapsulation_ Review paper, used for researhc scholars
Agricultural_Statistics_at_a_Glance_2022_0.pdf
OMC Textile Division Presentation 2021.pptx

Breaking The Monotony

  • 1. Breaking The Monotony @sai_venkat & @harikrishnan83
  • 2. Or
  • 3. Theme The Agility we seek is from the code we write and systems we build and not just from processes and practices we follow.
  • 5. Why this talk? ● As Craftsmen we are on look out for right tool for the job and sharing our experiences with you. ● This talk is based on the experiences we have on our day to day projects – The choice we make when we build the application can bring us agility. ● We have chosen to concentrate on these areas because in any decent sized (Enterprise :P) project these problems are common.
  • 7. Modeling time ● Aim – To build the world's largest resume builder. ● We choose you as the architect (or funky name – Master Craftsman) to create a model of a profile builder. ● Tell us what you need (tools, frameworks) and your model. ● Catch – We don't want to restrict the resumes coming in from public in any way. We want the users to give as much information about them as possible
  • 8. Person_PK LastName Resume Person Title Summary _PK _FK 1 clouseau 2 1 Inspector Developer with turned instincts of an Developer inspector Resume_FK Skill_FK 2 1 Skill_PK Name Description 2 2 1 Java Statically 2 3 typed language 2 Clojure Lisp like language 3 S E L E C T * F R O M P e r s o n p , R e s u m e r, S k ill s , R e s u m e _ S k ill r s Haskel Functional W HERE language p .P e r s o n _ P K = r.P e r s o n _ F K A N D r.R e s u m e _ P K = r s . R e s u m e _ F K A N D s . S k ill_ P K = r s . S k ill_ F K A N D s .N a m e in ( “ J a v a ” , “ C lo j u r e ” )
  • 9. Same Data Modeled as Documents { { Name: “Closseau”, Name: “Mr Magoo”, title: “Inspector turned developer”, title: “Funny developer”, Skills: [“Ruby”, “Haskell”, “C#”], Skills: [“Ruby”, “Self”, “Clojure”], Telephone_Numbers: [9611805466], Email-id: “[email protected]”, Experience: 5 Experience: 4 } } Querying the Data: Map function: function(doc) { if (contains(doc.skills, [“java”, “clojure”])) { emit(null, doc); } }
  • 10. A Case for Non Relational Databases ● Schema less Data helps us to evolve the model over the course of application development and maintenance (Ex. FriendFeed, github, Sourceforge) ● Scaling out is easy in nosql databases. Throw in more commodity machine. ● You may not always need atomic consistency (Dirty interface of mnesia) ● Most nosql Databases are simpler than conventional RDBMS, hence more robust and lightweight ● SQL Engines are only a convenience If they are not helping don't have to use them (Waffle on Mysql Datastore)
  • 11. Polyglot & PolyParadigm Programming ● Today's Applications Need to ● Must scale ● Must be resilient and secure ● Must evolve for future ● Work with large volumes of data and users.
  • 12. Hope you don't have someone like this in your team - I work only with Java.....
  • 13. Polyglot & PolyParadigm Programming ● Are there any advantages to writing an entire application in one language or one stack (Microsoft shop or Java shop anyone)? ● Is one language best for all domains? ● Are we harnessing the power we have in our hardware? ● Languages have their boundaries – Imperative vs Functional, Static vs Dynamic, Procedural vs Object Oriented ● Advantages are mostly relative and context sensitive. ● Examples: Flightcaster, Facebook Chat, github - BERT, Runa – Swarmiji, Twitter ● No Language Wars please :)
  • 14. In Erlang In Java -module (fact). -export ([fact/1]). public int fact(int value) { fact(0) -> 1; if (value == 0) fact(N) -> N * fact(N -1). { return 0; } else Tail Recursion Optimized { return value * fact(value - 1); -module (fact). } -export ([fact/1]). } fact(N) -> fact(N, 1). fact(0, A) -> A; fact(N, A) -> fact(N -1, N * A).
  • 15. Polyglotism in Testing We would use Java or C# to write functional tests as our application code is in that language require “watir” package org.openqa.selenium.example; browser = Watir::Browser.new(:firefox) import org.openqa.selenium.By; browser.goto “http://www.google.com” import org.openqa.selenium.WebDriver; browser.text_field(:name, “q”).set “Cheese” import org.openqa.selenium.WebElement; browser.button(:name, “btnG”).click import org.openqa.selenium.htmlunit.HtmlUnitDriver; puts “Page title is #{browser.title}” public class Example  {     public static void main(String[] args) {         WebDriver driver = new HtmlUnitDriver();         driver.get("http://www.google.com");         WebElement element = driver.findElement(By.name("q"));         element.sendKeys("Cheese!");         element.submit();         System.out.println("Page title is: " + driver.getTitle());     } }
  • 16. Polyglotism in Testing Using Cucumber + Jruby or Groovy for acceptance testing of services and API interfaces in Java. Feature: Proposal notification In order to reduce time spent on emailing Administrators should be able to mail all proposals owners depending on status Scenario: Email accepted proposal Given [email protected] proposed 'Breaking the Monotony' And the 'Breaking the Monotony' proposal is approved When I send mass proposal email Then [email protected] should get email """ Hi [email protected] Congratulations, 'Breaking the Monotony' was accepted. See you at 'Agile India 2010'! """
  • 17. Polyglotism in Testing Using Cucumber + Jruby or Groovy for acceptance testing of services and API interfaces in Java. Feature: Proposal notification In order to reduce time spent on emailing Administrators should be able to mail all proposals owners depending on status Scenario: Email accepted proposal Given [email protected] proposed 'Breaking the Monotony' And the 'Breaking the Monotony' proposal is approved When I send mass proposal email Then [email protected] should get email """ Hi [email protected] Congratulations, 'Breaking the Monotony' was accepted. See you at 'Agile India 2010'! """
  • 18. Build and Deployment ● Build script or Build code? ● 9000 lines of XML Code and still no test? ● We really need a first class language for flexibility ● Programming in XML doesn't make sense ● Pure declarative model solves some problems but reduces flexibility ● Testing is much simpler with a real language ● Use Ruby or Groovy for build (Example: FubuMVC in Rake) and Capistrano for deployment. ● Continuous Deployment. ● Cloud for deployment.
  • 19. The path less traveled
  • 20. Thank you for listening to us. Sai Venkatakrishnan Twitter - http://twitter.com/sai_venkat Github - http://github.com/saivenkat Blog - http://developer-in-test.blogspot.com Harikrishnan Twitter - http://twitter.com/harikrishnan83 Github - http://github.com/harikrishnan83 Blog - http://harikrishnan83.wordpress.com