SlideShare a Scribd company logo
POLYGLOT
PROGRAMMING
IN THE JVM
       Or how I Learned to Stop Worrying and Love the JVM




Andres Almiray | Canoo Engineering AG
@aalmiray
ABOUT THE SPEAKER
Java developer since the beginning
True believer in open source
Groovy committer since 2007
Project lead of the Griffon framework
Currently working for
SOME FACTS ABOUT
JAVA
Previous name was Oak. Bonus points for knowing
its real name before that
Made its public appearance in 1995
C/C++ were king at the time
Networking, multithreading were baked right into
the language
Developers came for the applets and stayed for the
components (JEE and all that jazz)
HOWEVER...
It‘s already in its teens
It has not seen a groundbreaking feature upgrade
since JDK5 was released back in 2004 -> generics
(and we do know how that turned out to be, don’t
we?)
JDK7 was delayed again (late 2010, actual 2011).
Some features did not make the cut (lambdas)
JDK8, late 2013?
MORE SO...
It is rather verbose when compared to how other
languages do the same task
Its threading features are no longer enough.
Concurrent programs desperately cry for
immutability these days
TRUTH OR MYTH?
Is Java oftenly referred as overengineered?
Can you build a Java based web application (for
arguments sake a basic Twitter clone) in less than
a day‘s work WITHOUT an IDE?
Did James Gosling ever say he was threatened
with bodily harm should operator overloading find
its way into Java?
The JVM is a great
place to work however
Java makes it painful
sometimes...
What can we do about it?!
Polyglot Programming in the JVM - Øredev
Polyglot Programming in the JVM - Øredev
DISCLAIMER



(THIS IS NOT A BASH-THE-OTHER-
LANGUAGES TALK)
REDUCED VERBOSITY
STANDARD BEANS
public class Bean {
    private String name;


    public String getName() {
        return name;
    }


    public void setName(String name) {
        this.name = name;
    }
}
STANDARD BEANS
public class Bean {
    private String name;


    public String getName() {
        return name;
    }


    public void setName(String name) {
        this.name = name;
    }
}
STANDARD BEANS



class Bean {
    String name
}
STANDARD BEANS



class Bean(var name:String)



class Bean {
  @scala.reflect.BeanProperty
  var name: String
}
STANDARD BEANS



(defstruct Bean :name)
CLOSURES (OR FUNCTIONS)
public interfaceAdder {
    int add(int a, int b);
}


public class  MyAdder implements Adder {
    public int add(int a, int b) {
      return a + b;
    }
}
CLOSURES (OR FUNCTIONS)
// JDK7^H8 Closures proposal

(int a, int b)(a + b)


#(int a, int b) { return a + b; }

(int a, int b) -> a + b
CLOSURES (OR FUNCTIONS)



def adder = { a , b -> a + b }
CLOSURES (OR FUNCTIONS)




val adder = (a:Int, b:Int) => a + b
CLOSURES (OR FUNCTIONS)



(defn adder [a b] (+ a b))
ENHANCED SWITCH
char letterGrade(int grade) {
    if(grade >= 0 && grade <= 60) return ‘F‘;
    if(grade > 60 && grade <= 70) return ‘D‘;
    if(grade > 70 && grade <= 80) return ‘C‘;
    if(grade > 80 && grade <= 90) return ‘B‘;
    if(grade > 90 && grade <= 100) return ‘A‘;
  throw new IllegalArgumentException(“invalid
grade “+grade);
}
ENHANCED SWITCH
def letterGrade(grade) {
  switch(grade) {
     case 90..100: return ‘A‘
     case 80..<90: return ‘B‘
     case 70..<80: return ‘C‘
     case 60..<70: return ‘D‘
     case 0..<60: return ‘F‘
     case ~"[ABCDFabcdf]":
          return grade.toUpperCase()
  }
  throw new IllegalArgumentException(‘invalid
grade ‘+grade)
}
ENHANCED SWITCH


val VALID_GRADES = Set("A", "B", "C", "D", "F")
def letterGrade(value: Any):String = value match {
  case x:Int if (90 to 100).contains(x) => "A"
  case x:Int if (80 to 90).contains(x) => "B"
  case x:Int if (70 to 80).contains(x) => "C"
  case x:Int if (60 to 70).contains(x) => "D"
  case x:Int if (0 to 60).contains(x) => "F"
  case x:String if VALID_GRADES(x.toUpperCase) =>
x.toUpperCase()
}
ENHANCED SWITCH

(defn letter-grade [grade]
  (cond
   (in grade 90 100) "A"
   (in grade 80 90) "B"
   (in grade 70 80) "C"
   (in grade 60 70) "D"
   (in grade 0 60) "F"
   (re-find #"[ABCDFabcdf]" grade) (.toUpperCase
grade)))
JAVA INTEROPERABILITY
ALL OF THESE ARE
TRUE
Java can call Groovy, Scala and Clojure classes as
if they were Java classes
Groovy, Scala and Clojure can call Java code
without breaking a sweat


In other words, interoperability with Java is a
given. No need for complicated bridges between
languages (i.e. JSR 223)
OK, SO...
WHAT ELSE CAN THESE
LANGUAGES DO?
ALL OF THEM
Native syntax for collection classes
Everything is an object
Closures!
Regular expressions as first class citizen
GROOVY
Metaprogramming (HOT!) both at buildtime and
runtime
Builders
Operator overloading
Healthy ecosystem: Grails, Griffon, Gant, Gradle,
Spock, Gaelyk, Gpars, CodeNarc, etc...

Not an exhaustive list of features!
SCALA
Richer type system
Functional meets Object Oriented
Type inference
Pattern matching (+ case classes)
Actor model
Create your own operator
Traits



Not an exhaustive list of features!
CLOJURE
Data as code and viceversa
Immutable structures
STM



Not an exhaustive list of features!
DEMO
Polyglot Programming in the JVM - Øredev
Polyglot Programming in the JVM - Øredev
OTHER PLACES WHERE
YOU‘LL FIND POLYGLOT
PROGRAMMING
WEB APP
DEVELOPMENT
XML
SQL
JavaScript
JSON
CSS
Flash/Flex/ActionScript
NEXT-GEN
DATASTORES (NOSQL)
FleetDB -> Clojure

FlockDB -> Scala

CouchDB, Riak -> Erlang



By the way, watch out for Polyglot Persistence ;-)
BUILD SYSTEMS
Gradle, Gant -> Groovy

Rake -> Ruby/JRuby

Maven3 -> XML, Groovy, Ruby

SBT -> Scala

Leiningen -> Clojure
PARTING THOUGHTS
Java (the language) may have reached its maturity
feature wise
Other JVM languages have evolved faster
Polyglot Programming is not a new concept
Download and play with each of the demoed
languages, maybe one of them strikes your fancy
RESOURCES
RESOURCES
RESOURCES
Q&A
THANK YOU!

More Related Content

What's hot (19)

PDF
Kotlin, smarter development for the jvm
Arnaud Giuliani
 
PDF
Develop your next app with kotlin @ AndroidMakersFr 2017
Arnaud Giuliani
 
PDF
Taking Kotlin to production, Seriously
Haim Yadid
 
ODP
Ast transformations
HamletDRC
 
ODP
AST Transformations
HamletDRC
 
PDF
Kotlin hands on - MorningTech ekito 2017
Arnaud Giuliani
 
PDF
Building microservices with Kotlin
Haim Yadid
 
PDF
Kotlin Developer Starter in Android projects
Bartosz Kosarzycki
 
PDF
Kotlin advanced - language reference for android developers
Bartosz Kosarzycki
 
PDF
Kotlin for Android - Vali Iorgu - mRready
MobileAcademy
 
PDF
JavaFX Your Way: Building JavaFX Applications with Alternative Languages
Stephen Chin
 
PDF
Swift and Kotlin Presentation
Andrzej Sitek
 
ODP
Groovy Ast Transformations (greach)
HamletDRC
 
PPTX
Introduction to kotlin + spring boot demo
Muhammad Abdullah
 
PDF
BangaloreJUG introduction to kotlin
Chandra Sekhar Nayak
 
PDF
Kotlin cheat sheet by ekito
Arnaud Giuliani
 
PDF
Ankara Jug - Practical Functional Programming with Scala
Ensar Basri Kahveci
 
PPTX
Kotlin
YeldosTanikin
 
ODP
AST Transformations at JFokus
HamletDRC
 
Kotlin, smarter development for the jvm
Arnaud Giuliani
 
Develop your next app with kotlin @ AndroidMakersFr 2017
Arnaud Giuliani
 
Taking Kotlin to production, Seriously
Haim Yadid
 
Ast transformations
HamletDRC
 
AST Transformations
HamletDRC
 
Kotlin hands on - MorningTech ekito 2017
Arnaud Giuliani
 
Building microservices with Kotlin
Haim Yadid
 
Kotlin Developer Starter in Android projects
Bartosz Kosarzycki
 
Kotlin advanced - language reference for android developers
Bartosz Kosarzycki
 
Kotlin for Android - Vali Iorgu - mRready
MobileAcademy
 
JavaFX Your Way: Building JavaFX Applications with Alternative Languages
Stephen Chin
 
Swift and Kotlin Presentation
Andrzej Sitek
 
Groovy Ast Transformations (greach)
HamletDRC
 
Introduction to kotlin + spring boot demo
Muhammad Abdullah
 
BangaloreJUG introduction to kotlin
Chandra Sekhar Nayak
 
Kotlin cheat sheet by ekito
Arnaud Giuliani
 
Ankara Jug - Practical Functional Programming with Scala
Ensar Basri Kahveci
 
AST Transformations at JFokus
HamletDRC
 

Similar to Polyglot Programming in the JVM - Øredev (20)

PDF
Polyglot Programming @ Jax.de 2010
Andres Almiray
 
PDF
Scala @ TechMeetup Edinburgh
Stuart Roebuck
 
PDF
Polyglot Programming @ CONFESS
Andres Almiray
 
PPTX
Intro to scala
Joe Zulli
 
PDF
Programming in scala - 1
Mukesh Kumar
 
PDF
A Sceptical Guide to Functional Programming
Garth Gilmour
 
PDF
Getting Started With Scala
Meetu Maltiar
 
PDF
Getting Started With Scala
Xebia IT Architects
 
PDF
BCS SPA 2010 - An Introduction to Scala for Java Developers
Miles Sabin
 
PDF
An Introduction to Scala for Java Developers
Miles Sabin
 
PDF
The Future of JVM Languages
VictorSzoltysek
 
PPT
Scala Talk at FOSDEM 2009
Martin Odersky
 
PDF
Atlassian Groovy Plugins
Paul King
 
PPT
Scala uma poderosa linguagem para a jvm
Isaias Barroso
 
PDF
Introduction To Scala
Peter Maas
 
PDF
Workshop Scala
Bert Van Vreckem
 
PDF
Groovy On Trading Desk (2010)
Jonathan Felch
 
PDF
Scala Sjug 09
Michael Neale
 
PPTX
Scala, Play 2.0 & Cloud Foundry
Pray Desai
 
Polyglot Programming @ Jax.de 2010
Andres Almiray
 
Scala @ TechMeetup Edinburgh
Stuart Roebuck
 
Polyglot Programming @ CONFESS
Andres Almiray
 
Intro to scala
Joe Zulli
 
Programming in scala - 1
Mukesh Kumar
 
A Sceptical Guide to Functional Programming
Garth Gilmour
 
Getting Started With Scala
Meetu Maltiar
 
Getting Started With Scala
Xebia IT Architects
 
BCS SPA 2010 - An Introduction to Scala for Java Developers
Miles Sabin
 
An Introduction to Scala for Java Developers
Miles Sabin
 
The Future of JVM Languages
VictorSzoltysek
 
Scala Talk at FOSDEM 2009
Martin Odersky
 
Atlassian Groovy Plugins
Paul King
 
Scala uma poderosa linguagem para a jvm
Isaias Barroso
 
Introduction To Scala
Peter Maas
 
Workshop Scala
Bert Van Vreckem
 
Groovy On Trading Desk (2010)
Jonathan Felch
 
Scala Sjug 09
Michael Neale
 
Scala, Play 2.0 & Cloud Foundry
Pray Desai
 
Ad

More from Andres Almiray (20)

PDF
Dealing with JSON in the relational world
Andres Almiray
 
PDF
Deploying to production with confidence 🚀
Andres Almiray
 
PDF
Going beyond ORMs with JSON Relational Duality Views
Andres Almiray
 
PDF
Setting up data driven tests with Java tools
Andres Almiray
 
PDF
Creando, creciendo, y manteniendo una comunidad de codigo abierto
Andres Almiray
 
PDF
Liberando a produccion con confianza
Andres Almiray
 
PDF
Liberando a produccion con confidencia
Andres Almiray
 
PDF
OracleDB Ecosystem for Java Developers
Andres Almiray
 
PDF
Softcon.ph - Maven Puzzlers
Andres Almiray
 
PDF
Maven Puzzlers
Andres Almiray
 
PDF
Oracle Database Ecosystem for Java Developers
Andres Almiray
 
PDF
JReleaser - Releasing at the speed of light
Andres Almiray
 
PDF
Building modular applications with the Java Platform Module System and Layrry
Andres Almiray
 
PDF
Going Reactive with g rpc
Andres Almiray
 
PDF
Building modular applications with JPMS and Layrry
Andres Almiray
 
PDF
Taking Micronaut out for a spin
Andres Almiray
 
PDF
Apache Groovy's Metaprogramming Options and You
Andres Almiray
 
PDF
What I wish I knew about Maven years ago
Andres Almiray
 
PDF
What I wish I knew about maven years ago
Andres Almiray
 
PDF
The impact of sci fi in tech
Andres Almiray
 
Dealing with JSON in the relational world
Andres Almiray
 
Deploying to production with confidence 🚀
Andres Almiray
 
Going beyond ORMs with JSON Relational Duality Views
Andres Almiray
 
Setting up data driven tests with Java tools
Andres Almiray
 
Creando, creciendo, y manteniendo una comunidad de codigo abierto
Andres Almiray
 
Liberando a produccion con confianza
Andres Almiray
 
Liberando a produccion con confidencia
Andres Almiray
 
OracleDB Ecosystem for Java Developers
Andres Almiray
 
Softcon.ph - Maven Puzzlers
Andres Almiray
 
Maven Puzzlers
Andres Almiray
 
Oracle Database Ecosystem for Java Developers
Andres Almiray
 
JReleaser - Releasing at the speed of light
Andres Almiray
 
Building modular applications with the Java Platform Module System and Layrry
Andres Almiray
 
Going Reactive with g rpc
Andres Almiray
 
Building modular applications with JPMS and Layrry
Andres Almiray
 
Taking Micronaut out for a spin
Andres Almiray
 
Apache Groovy's Metaprogramming Options and You
Andres Almiray
 
What I wish I knew about Maven years ago
Andres Almiray
 
What I wish I knew about maven years ago
Andres Almiray
 
The impact of sci fi in tech
Andres Almiray
 
Ad

Recently uploaded (20)

PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
Digital Circuits, important subject in CS
contactparinay1
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 

Polyglot Programming in the JVM - Øredev

  • 1. POLYGLOT PROGRAMMING IN THE JVM Or how I Learned to Stop Worrying and Love the JVM Andres Almiray | Canoo Engineering AG @aalmiray
  • 2. ABOUT THE SPEAKER Java developer since the beginning True believer in open source Groovy committer since 2007 Project lead of the Griffon framework Currently working for
  • 3. SOME FACTS ABOUT JAVA Previous name was Oak. Bonus points for knowing its real name before that Made its public appearance in 1995 C/C++ were king at the time Networking, multithreading were baked right into the language Developers came for the applets and stayed for the components (JEE and all that jazz)
  • 4. HOWEVER... It‘s already in its teens It has not seen a groundbreaking feature upgrade since JDK5 was released back in 2004 -> generics (and we do know how that turned out to be, don’t we?) JDK7 was delayed again (late 2010, actual 2011). Some features did not make the cut (lambdas) JDK8, late 2013?
  • 5. MORE SO... It is rather verbose when compared to how other languages do the same task Its threading features are no longer enough. Concurrent programs desperately cry for immutability these days
  • 6. TRUTH OR MYTH? Is Java oftenly referred as overengineered? Can you build a Java based web application (for arguments sake a basic Twitter clone) in less than a day‘s work WITHOUT an IDE? Did James Gosling ever say he was threatened with bodily harm should operator overloading find its way into Java?
  • 7. The JVM is a great place to work however Java makes it painful sometimes...
  • 8. What can we do about it?!
  • 11. DISCLAIMER (THIS IS NOT A BASH-THE-OTHER- LANGUAGES TALK)
  • 13. STANDARD BEANS public class Bean { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } }
  • 14. STANDARD BEANS public class Bean { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } }
  • 15. STANDARD BEANS class Bean { String name }
  • 16. STANDARD BEANS class Bean(var name:String) class Bean { @scala.reflect.BeanProperty var name: String }
  • 18. CLOSURES (OR FUNCTIONS) public interfaceAdder { int add(int a, int b); } public class MyAdder implements Adder { public int add(int a, int b) { return a + b; } }
  • 19. CLOSURES (OR FUNCTIONS) // JDK7^H8 Closures proposal (int a, int b)(a + b) #(int a, int b) { return a + b; } (int a, int b) -> a + b
  • 20. CLOSURES (OR FUNCTIONS) def adder = { a , b -> a + b }
  • 21. CLOSURES (OR FUNCTIONS) val adder = (a:Int, b:Int) => a + b
  • 22. CLOSURES (OR FUNCTIONS) (defn adder [a b] (+ a b))
  • 23. ENHANCED SWITCH char letterGrade(int grade) { if(grade >= 0 && grade <= 60) return ‘F‘; if(grade > 60 && grade <= 70) return ‘D‘; if(grade > 70 && grade <= 80) return ‘C‘; if(grade > 80 && grade <= 90) return ‘B‘; if(grade > 90 && grade <= 100) return ‘A‘; throw new IllegalArgumentException(“invalid grade “+grade); }
  • 24. ENHANCED SWITCH def letterGrade(grade) { switch(grade) { case 90..100: return ‘A‘ case 80..<90: return ‘B‘ case 70..<80: return ‘C‘ case 60..<70: return ‘D‘ case 0..<60: return ‘F‘ case ~"[ABCDFabcdf]": return grade.toUpperCase() } throw new IllegalArgumentException(‘invalid grade ‘+grade) }
  • 25. ENHANCED SWITCH val VALID_GRADES = Set("A", "B", "C", "D", "F") def letterGrade(value: Any):String = value match { case x:Int if (90 to 100).contains(x) => "A" case x:Int if (80 to 90).contains(x) => "B" case x:Int if (70 to 80).contains(x) => "C" case x:Int if (60 to 70).contains(x) => "D" case x:Int if (0 to 60).contains(x) => "F" case x:String if VALID_GRADES(x.toUpperCase) => x.toUpperCase() }
  • 26. ENHANCED SWITCH (defn letter-grade [grade] (cond (in grade 90 100) "A" (in grade 80 90) "B" (in grade 70 80) "C" (in grade 60 70) "D" (in grade 0 60) "F" (re-find #"[ABCDFabcdf]" grade) (.toUpperCase grade)))
  • 28. ALL OF THESE ARE TRUE Java can call Groovy, Scala and Clojure classes as if they were Java classes Groovy, Scala and Clojure can call Java code without breaking a sweat In other words, interoperability with Java is a given. No need for complicated bridges between languages (i.e. JSR 223)
  • 29. OK, SO... WHAT ELSE CAN THESE LANGUAGES DO?
  • 30. ALL OF THEM Native syntax for collection classes Everything is an object Closures! Regular expressions as first class citizen
  • 31. GROOVY Metaprogramming (HOT!) both at buildtime and runtime Builders Operator overloading Healthy ecosystem: Grails, Griffon, Gant, Gradle, Spock, Gaelyk, Gpars, CodeNarc, etc... Not an exhaustive list of features!
  • 32. SCALA Richer type system Functional meets Object Oriented Type inference Pattern matching (+ case classes) Actor model Create your own operator Traits Not an exhaustive list of features!
  • 33. CLOJURE Data as code and viceversa Immutable structures STM Not an exhaustive list of features!
  • 34. DEMO
  • 37. OTHER PLACES WHERE YOU‘LL FIND POLYGLOT PROGRAMMING
  • 39. NEXT-GEN DATASTORES (NOSQL) FleetDB -> Clojure FlockDB -> Scala CouchDB, Riak -> Erlang By the way, watch out for Polyglot Persistence ;-)
  • 40. BUILD SYSTEMS Gradle, Gant -> Groovy Rake -> Ruby/JRuby Maven3 -> XML, Groovy, Ruby SBT -> Scala Leiningen -> Clojure
  • 41. PARTING THOUGHTS Java (the language) may have reached its maturity feature wise Other JVM languages have evolved faster Polyglot Programming is not a new concept Download and play with each of the demoed languages, maybe one of them strikes your fancy
  • 45. Q&A