SlideShare a Scribd company logo
QUESTIONING 
THE STATUS 
QUO 
(THROUGH THE LOOKING GLASS) OF 
JAVA, OOP AND BEYOND
WHO AM I? 
A software developer just like you 
... probably less smart than you, actually 
By the way let's see who we are
WHAT WILL YOU GET OUT 
OF THIS TALK?
What will you get out of this talk? 
image © collien 
SOME FOOD FOR THOUGHT AND BRAIN 
TEASING
What will you get out of this talk? 
A PRETTY COOL LIST OF FUTURE 
READINGS & VIDEOS
What will you get out of this talk? 
THINGS YOU DIDN'T KNOW 
THINGS YOU ALREADY KNEW 
THINGS YOU DIDN'T CARE TO KNOW
What will you get out of this talk? 
EXTRA UNSOLICITED SCALA AND FP 
PROMOTION!
LET'S START OUR JOURNEY 
FROM THE BEGINNING 
image © Justin Overell
Think about your first steps in programming...
You probably felt excited, curious and every bit of script that 
worked was so satisfying!
Even if you've been forced to learn programming as 
schoolwork, you probably got addicted to it sooner or later 
...otherwise you wouldn't be here today, listening to this talk
It can happen though, that such passion fades in the 
background, trampled by daily chores
We should strive to try and keep caring for what we do, and 
keep alive that initial spark of passion for this activity
“AS DEVELOPERS, AS AN 
INDUSTRY, WE HAVE THE 
POTENTIAL TO CREATE A 
BETTER SOCIETY” 
Hadi Hariri from jetbrains - Codemotion Rome 2014 
slides available here www.slideshare.net/Codemotion/developing-in-a-decade 
Do you still care?
WHERE DID I GET LOST?
A DAILY ROUTINE 
MESSY ENTERPRISEY CODE 
BUGS, CODE SMELLS, OVER-COMPLEXITY, 
IMPERFECTIONS 
SOPHISTICATED SOLUTIONS TO 
PROBLEMS... 
... NEEDED TO SOLVE THE INDUSTRY 
NEEDS 
LIKE FASTER TIME TO MARKET AND 
TIGHT DELIVERY SCHEDULES
THE ENTIRE AGILE MOVEMENT WAS 
BORN TO ADAPT TO AND HANDLE THIS 
KIND OF ISSUES 
As a personal note, I recommend to take a look at the idea underlying agile, forgetting about costly 
certifications and easy promises
Let's take a look at some code
code 
@Controller 
@RequestMapping("/orders/{id}") 
@ExposesResourceFor(Payment.class) 
@RequiredArgsConstructor(onConstructor = @__(@Autowired)) 
public class PaymentController { 
private final @NonNull PaymentService paymentService; 
private final @NonNull EntityLinks entityLinks; 
/** 
* Accepts a payment for an {@link Order} 
*/ 
@RequestMapping(value = PaymentLinks.PAYMENT, method = PUT) 
ResponseEntity<PaymentResource> submitPayment( 
@PathVariable("id") Order order, 
@RequestBody CreditCardNumber number) { 
if (order == null || order.isPaid()) { 
return new ResponseEntity<PaymentResource>(HttpStatus.NOT_FOUND); 
} 
source from https://github.com/olivergierke/spring-restbucks 
CreditCardPayment payment = paymentService.pay(order, number); 
PaymentResource resource = new PaymentResource(order.getPrice(), payment.getCreditCard()); 
resource.add(entityLinks.linkToSingleResource(order)); 
return new ResponseEntity<PaymentResource>(resource, HttpStatus.CREATED); 
}
code 
/** 
* Base class for entity implementations. Uses a {@link Long} id. 
*/ 
@MappedSuperclass 
@Getter 
@ToString 
@EqualsAndHashCode 
public class AbstractEntity implements Identifiable<Long> { 
@Id 
@GeneratedValue(strategy = GenerationType.AUTO) 
@JsonIgnore 
private final Long id; 
protected AbstractEntity() { 
this.id = null; 
} 
} 
source from https://github.com/olivergierke/spring-restbucks 
pretty terse... uh?
Annotatiomania 
@Entity 
@Table(name = "Person", catalog = "TestDB", schema = "dbo") 
@XmlRootElement 
@NamedQueries({ 
@NamedQuery( 
name = "Person.findAll", 
query = "SELECT p FROM Person p"), 
@NamedQuery( 
name = "Person.findByPersonId", 
query = "SELECT p FROM Person p WHERE p.personId = :pId"), 
@NamedQuery( 
name = "Person.findByPersonName", 
query = "SELECT p FROM Person p WHERE p.personName = :pName"), 
@NamedQuery( 
name = "Person.findByPersonFamily", 
query = "SELECT p FROM Person p WHERE p.personFamily = :pFamily"), 
@NamedQuery( 
name = "Person.findByPersonReference", 
query = "SELECT p FROM Person p WHERE p.personReference = :pRef")}) 
source from https://groups.google.com/forum/#!topic/querydsl/4lgLx3QQqBA 
public class Person implements Serializable { 
private static final long serialVersionUID = 1L; 
@Id 
@Basic(optional = false) 
@NotNull 
@Column(name = "person_id", nullable = false) 
private Integer personId; 
@Size(max = 50) 
@Column(name = "person_name", length = 50)
root-context.xml 
<?xml version="1.0" encoding="UTF-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:mvc="http://www.springframework.org/schema/mvc" 
xmlns:context="http://www.springframework.org/schema/context" 
xsi:schemaLocation=" 
http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context-3.0.xsd 
http://www.springframework.org/schema/mvc 
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"> 
<import resource="db-context.xml"/> 
<!-- Detects annotations like @Component, @Service, @Controller, @Repository, @Configuration --> 
<context:component-scan base-package="xpadro.spring.web,controller,xpadro.spring.web.service"/> 
<!-- Detects MVC annotations like @RequestMapping --> 
<mvc:annotation-driven/> 
</beans> 
source from https://github.com/xpadro/spring-rest
pom.xml 
<?xml version="1.0" encoding="UTF-8"?> 
<?xml version="1.0" encoding="UTF-8" standalone="no"?> 
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 
<modelVersion>4.0.0</modelVersion> 
<groupId>org.springsource.restbucks</groupId> 
<artifactId>restbucks</artifactId> 
<packaging>war</packaging> 
<version>1.0.0.BUILD-SNAPSHOT</version> 
<name>Spring RESTBucks</name> 
<parent> 
<groupId>org.springframework.boot</groupId> 
<artifactId>spring-boot-starter-parent</artifactId> 
<version>1.1.4.RELEASE</version> 
</parent> 
<properties> 
<spring-data-releasetrain.version>Evans-BUILD-SNAPSHOT</spring-data-releasetrain.version> 
<spring-hateoas.version>0.15.0.RELEASE</spring-hateoas.version> 
<tomcat.version>8.0.9</tomcat.version> 
</properties> 
<dependencies> 
source from https://github.com/olivergierke/spring-restbucks 
well, this can get pretty verbose 
<!-- Spring Data REST --> 
still there? 
<dependency> 
<groupId>org.springframework.boot</groupId> 
<artifactId>spring-boot-starter-data-rest</artifactId> 
</dependency>
can get hard to decode 
.486P 
CR0_CD equ 040000000h ; Cache Disable bit of CR0 
CR0_NW equ 020000000h ; Not Write-through bit of CR0 
DisableCache proc 
pushf ; save the flags 
push eax ; save eax 
cli ; disable interrupts while we do this 
mov eax,cr0 ; read CR0 
or eax,CR0_CD ; set CD but not NW bit of CR0 
mov cr0,eax ; cache is now disabled 
wbinvd ; flush and invalidate cache 
; the cache is effectively disabled at this point, but memory 
; consistency will be maintained. To completely disable cache, 
; the following two lines may used as well: 
or eax,CR0_NW ; now set the NW bit 
mov cr0,eax ; turn off the cache entirely 
pop eax ; restore eax 
popf ; restore the flags 
ret ; return to caller 
DisableCache endp 
code ends 
end
Questioning the status quo
"Traditional" enterprise code today looks just like that
DO WE DARE AND TRY 
SOMETHING DIFFERENT? 
image © Elena Kalis
code 
public class Application extends Controller { 
/** Display the login page or dashboard if connected */ 
public static Result index() { 
String email = ctx().session().get("email"); 
if (email != null) { 
User user = User.findByEmail(email); 
if (user != null && user.validated) { 
return GO_DASHBOARD; 
} else { 
Logger.debug("Clearing invalid session credentials"); 
session().clear(); 
} 
} 
return ok(index.render(form(Register.class), form(Login.class))); 
} 
source from https://github.com/yesnault/PlayStartApp
code 
public String validate() { 
User user = null; 
try { 
user = User.authenticate(email, password); 
} catch (AppException e) { 
return Messages.get("error.technical"); 
} 
if (user == null) { 
return Messages.get("invalid.user.or.password"); 
} else if (!user.validated) { 
return Messages.get("account.not.validated.check.mail"); 
} 
return null; 
} 
source from https://github.com/yesnault/PlayStartApp
application.conf 
# This is the main configuration file for the application. 
# ~~~~~ 
# Secret key 
# ~~~~~ 
# The secret key is used to secure cryptographics functions. 
# If you deploy your application to several instances be sure to use the same key! 
application.secret="..." 
# Global object 
# ~~~~~ 
# Define the Global object type for this application. 
# Default to Global in the root package. 
# global=Global 
# Database configuration 
# ~~~~~ 
# You can declare as many datasources as you want. 
# By convention, the default datasource is named `default` 
# 
db.default.driver=org.h2.Driver 
db.default.url="jdbc:h2:mem:play" 
source from https://github.com/yesnault/PlayStartApp 
# 
# You can expose this datasource via JNDI if needed (Useful for JPA) 
# db.default.jndiName=DefaultDS 
# Evolutions 
# ~~~~~ 
# You can disable evolutions if needed 
# evolutions=disabled
routes.conf 
# Home page 
GET / controllers.Application.index() 
GET /dashboard controllers.Dashboard.index() 
POST /login controllers.Application.authenticate() 
GET /logout controllers.Application.logout() 
GET /settings controllers.account.settings.Index.index() 
GET /settings/password controllers.account.settings.Password.index() 
POST /settings/password controllers.account.settings.Password.runPassword() 
GET /settings/email controllers.account.settings.Email.index() 
POST /settings/email controllers.account.settings.Email.runEmail() 
... 
source from https://github.com/yesnault/PlayStartApp
build.sbt 
import sbt.Keys._ 
name := "PlayStartApp" 
version := "1.0-SNAPSHOT" 
scalaVersion := "2.10.4" 
libraryDependencies ++= Seq( 
jdbc, 
javaEbean, 
cache, 
"org.mindrot" % "jbcrypt" % "0.3m", 
"com.typesafe" %% "play-plugins-mailer" % "2.2.0", 
filters 
) 
resolvers ++= Seq( 
"Apache" at "http://repo1.maven.org/maven2/", 
"jBCrypt Repository" at "http://repo1.maven.org/maven2/org/", 
"Sonatype OSS Snasphots" at "http://oss.sonatype.org/content/repositories/snapshots" 
) 
source from https://github.com/yesnault/PlayStartApp 
It's all here folks 
lazy val root = (project in file(".")).enablePlugins(play.PlayJava)
WHAT AM I TRYING TO SAY? 
It's too easy to get lost in cluttered technicalities 
Complex environments can blur the overall picture 
Every so often it's good to critically examine the tools we use 
Moreso if they result from some predetermined policy 
Find some time to explore new opportunities, they don't 
always pay back, but sometimes they do 
Don't be scared by the learning curve, you've been there 
already!
ABOUT THE "LEARNING CURVE" 
Rich Hickey (clojure, datomic) made interesting remarks 
about the different meaning of 
simple and easy 
presentation available here www.infoq.com/presentations/Simple-Made-Easy-QCon-London-2012
HAMMOCK DRIVEN DEVELOPMENT 
Hickey also discussed about the creative process and 
problem solving
HAMMOCK DRIVEN DEVELOPMENT 
About how solutions from related or unrelated fields can 
inspire new perspectives
HAMMOCK DRIVEN DEVELOPMENT 
About the need to focus
HAMMOCK DRIVEN DEVELOPMENT 
presentation available here https://www.youtube.com/watch?v=f84n5oFoZBc
QUIZ TIME
In “The Art of Agile Development” the author explores the 
concept that source code is actually the real software design 
He supports the concept with an example showing how 
modern structured programming conveys the program flow 
much better than Assembly code 
1000 NS% = (80 - LEN(T$)) / 2 
1010 S$ 0= "" 
1020 IF NS$ = 0 GOTO 1060 
1030 S$ = S$ + " " 
1040 NS% = NS$ - 1 
1050 GOTO 1020 
1060 PRINT S$ + T$ 
1070 RETURN 
So much that we seldom need flow diagrams anymore
Can you make out what both of these functions do? 
def version1(text: String) { 
val center = (LENGTH - text.size) / 2 
var space = "" 
for (i <- 0 until center) { 
space += " " 
} 
println(space + text + space) 
} 
def version2(text: String) = { 
def recurse(space: String): String = 
if ((space*2 + text).size == LENGTH) space + text + space 
else recurse(space + " ") 
println(recurse("")) 
} 
Which version was easier to grok?
Before the second test we need some preparation 
//A class with some simple-to-understand attributes 
class Person(val name: String, val age: Int, val gender: String) 
//An appendable "array-like" class 
class ArrayBuffer 
ready?
So let's rock it! 
def version1(queued: Iterable[Person]): Iterable[Person] = { 
val (boyz, girlz) = queued.filter(_.age > 18) 
.partition(_.gender == "male") 
val boyzIn = boyz take (girlz.size / 2) 
val in = (boyzIn ++ girlz).to[Set] 
for (boy <- boyz if !in(boy)) 
println(s"Go home, ${boy.name}. Better luck tommorrow, kiddo!") 
in 
} 
def version2(queued: Iterable[Person]): Iterable[Person] = { 
val girlz = ArrayBuffer[Person]() 
val boyz = ArrayBuffer[Person]() 
for (person <- queued) { 
if (person.age > 18) { 
if (person.gender == "male") boyz.append(person) 
else girlz.append(person) 
} 
} 
val in = ArrayBuffer[Person]() 
in.appendAll(girlz) 
for (i <- 0 until boyz.size) { 
if (i < girlz.size / 2) in.append(boyz(i)) 
else println(s"Go home, ${boyz(i).name}. Better luck tommorrow, kiddo!") 
} 
return in 
}
SAME RESULTS?
MAYBE WE LEARNED SOMETHING 
“It is not only the violin that shapes the 
violinist, we are all shaped by the tools we 
train ourselves to use, and in this respect 
programming languages have a devious 
influence: they shape our thinking habits.” 
Edsger W. Dijkstra - Letter to the budget council of The 
University of Texas at Austin 
the whole letter is here 
www.cs.utexas.edu/users/EWD/OtherDocs/To%20the%20Budget%20Council%20concerning%20Haskell.pdf
WATCH OUT FOR THE 
"HAMMER SYNDROME" 
Try to get a deeper understanding of the tools at your 
disposal 
So you can take informed decisions about the best solution 
to the problem at hand 
"Conventional" solutions are stable but sometimes best 
tailored to yesterday's problems 
Look for opportunities to explore new ideas
A SHORT AND APPROXIMATE 
PARADE OF EXPLORATION 
OPPORTUNITIES FOR THE 
MODERN JAVA DEVELOPER
AT THE DESIGN LEVEL 
Conventional Unusual 
CRUD Domain Driven Design 
ORM Event Sourcing 
MVC CQRS
AT THE FRAMEWORK STACK LEVEL 
Conventional Unusual 
Servlet Play! 
JSP Vert.x 
JSF Typesafe Config 
Spring JOOQ 
Java-EE Gradle 
Maven sbt
AT THE LANGUAGE LEVEL 
Conventional Unusual 
java groovy 
javascript kotlin 
sql ceylon 
scala 
clojure 
haskell!
Have a look at 
MATT RAIBLE 
'S 
DEVOXX '13 PRESENTATION 
to get some inspiration regarding modern web 
development technologies 
here is the video 
www.parleys.com/play/5298cbe3e4b039ad2298c9db/ 
and here the slides 
static.raibledesigns.com/repository/presentations/The_Modern_Java_Web_Developer_Bootcamp_Devoxx2013.pdf 
[beware! heavy pdf]
TIME TO TAKE OFF AND FLY A LITTLE 
HIGHER
THE OBJECT-ORIENTED VS. 
FUNCTIONAL DEBATE 
Even though it's hard to define both, we can try to identify 
some core features of each 
OOP FP 
Modularity/Scoping Composability 
Encapsulation (reduce 
dependencies) 
Abstraction 
Mathematical Reasoning 
(pureness & immutability) 
both approaches have reusability and simplicity as goals
SUGGESTED READINGS ON THE 
SUBJECT 
D.L. Parnas - On the Criteria To Be Used in Decomposing 
Systems into Modules 
www.cs.umd.edu/class/spring2003/cmsc838p/Design/criteria.pdf 
M.Odersky; M.Zenger - Scalable Component Abstractions 
lampwww.epfl.ch/~odersky/papers/ScalableComponent.pdf 
J.Hughes - Why Functional Programming Matters 
www.cse.chalmers.se/~rjmh/Papers/whyfp.html 
H.Abelson; G.J.Sussman - Structure and Interpretation of 
Computer Programs 
mitpress.mit.edu/sicp/
IMPEDANCE MISMATCH 
OOP attaches behaviour to data 
FP separates functions from data 
Interestingly, the FP approach to data is considered an 
anti-pattern in OOP
IMPEDANCE MISMATCH (DETOUR) 
Object Relational Mapping has been called 
“The Vietnam of Computer Science” 
Ted Neward cited in 
blog.codinghorror.com/object-relational-mapping-is-the-vietnam-of-computer-science/
IS RELATIONAL DATABASE ALWAYS THE 
BEST CHOICE? 
“Database Driven Development” anyone? 
Once again, keep watch for opportunities! 
NoSql NoDB!
STILL MORE HIGH LEVEL 
and a little out-of-the-box
WHERE'S INNOVATION IN 
THE PROGRAMMING 
WORLD? 
Internet of Things? 
Raspberry Pi? 
Arduino? 
Smart Glasses? 
...?
WHO'S INNOVATING? 
Bill Gates? 
Steve Jobs? 
Mark Zuckerberg? 
...?
What I'm looking after is tools that could change 
THE WAY WE THINK ABOUT 
PROGRAMMING 
in out daily work 
often with tech available even as we speak
TOOLS FROM THE NEAR FUTURE? 
REPL 
Scala Worksheet 
Chris Granger's 
Light Table 
Elm debugger 
Swift Playground 
Microsoft is also researching in the area of 
Live UI 
Programming TouchDevelop 
with along the same lines
As Light Table came out, Granger made some research 
to figure out “what's wrong in programming”, and what kind 
of solutions he could come up with 
His reasoning is better explained on his blog 
www.chris-granger.com/2014/03/27/toward-a-better-programming/ 
where he shows the progress of a new project called Aurora 
Similar ideas can be found on this blog entry about 
Legible Mathematics 
glench.com/LegibleMathematics/
WOLFRAM LANGUAGE 
knowledge based and cloud deployed 
math functions and algorithms 
data visualization 
nlp 
data and visualisation from many world-wide domains 
everything based on symbolic functions manipulation 
(includes symbols, images, docs, graphs...) 
Wolfram Data Framework ontology
THE PEOPLE WHO IMAGINED SUCH 
TOOLS 
stopped thinking about what we already know about 
software development 
and asked what we can actually do with the technology at 
our disposal 
can we stop taking for granted the way we develop and 
focus on how we would like to develop?
Most of the ideas we just saw were inspired by the creativity 
of this young talented guy 
BRET VICTOR 
His area of interest is the future of computing, education, 
data visualization and manipulation 
SUGGESTED MATERIAL INCLUDES 
The future of programming: 
worrydream.com/#!/TheFutureOfProgramming 
Inventing on principle: 
worrydream.com/#!/InventingOnPrinciple 
Magic Ink: 
worrydream.com/#!/MagicInk
INFLUENCES 
It strikes me how often Victor cites works and "explorers" 
from the historical or contemporary computer science 
research and other fields 
NAMES SUCH AS 
Alan Kay 
Douglas Engelbart 
Tony Hoare 
Edsger Dijkstra 
Alan Cooper 
Edward Tufte 
Don Norman 
Jeff Raskin 
David Hestenes
Many of these influencial people's stunning innovations, 
date back to the early days of the computer age 
THE POINT HERE IS 
HOW MUCH CAN WE LEARN 
FROM THE PAST?
“I have this strong feeling that the more I 
look into the latest approaches or hard 
problems in today's software, the more I find 
myself looking back” 
JUST ME
Whenever we discover new cool approaches and ideas 
about computer science, they're probably inspired by past 
research, tackling the same old fundamental issues 
DESIGN PATTERNS 
λ-CALCULUS 
TYPE SYSTEMS 
DATA REPRESENTATION 
BIG DATA 
DISTRIBUTED SYSTEMS 
ACTORS 
REACTIVE PROGRAMMING
QUOTING SOME HASKELL 
EVANGELIST? 
“One inconvenient thing about a purely imperative language is that you have 
to specify far too much sequencing. For example, if you wish to do a matrix 
multiplication, you have to do n³ multiplications. If you write an ordinary 
program to do this, you have to specify the exact sequence which they are all 
to be done. Actually, it doesn't matter in what order you do the 
multiplications so long as you add them together in the right groups. Thus 
the ordinary sort of imperative language imposes much too much 
sequencing, which makes it very difficult to rearrange if you want to make 
things more efficient.” 
P.J. Landin - The Next 700 Programming Languages, 1966 
www.cs.cmu.edu/~crary/819-f09/Landin66.pdf
THOUGH THE INFORMATION AGE IS ALL 
AROUND US NOW, THE HISTORY OF 
SOFTWARE AND COMPUTERS IS STILL 
VERY YOUNG 
TO LOOK FORWARD WE 
ALSO NEED TO LOOK BACK
BACK FROM 
THE FUTURE
FUTURE OF: APPLICATIONS 
Sep 2013 
the reactive manifesto - 
www.reactivemanifesto.org 
Feb 2009 (first public commit) 
support by the akka framework - 
www.akka.io 
1990 (first presentation) 
inspired by erlang language - 
www.erlang.org 
1973 
based on the actor model from Carl Hewitt - Hewitt; Bishop; 
Steiger; “A Universal Modular Actor Formalism for Artificial 
Intelligence. IJCAI”
FUTURE OF: SOFTWARE DESIGN 
2012 
Uncle Bob Martin quotes an article about software design 
from Jack W. Reeves in his book on “Agile Software 
Development, principles, patterns and practices” 
1985 
the author published a reply to said article, after 13 years of 
reviews and comments - “What is software design: 13 years 
later” 
1972 
the original article - “What is software design?” 
1962 
the idea supported in the article, that “the code, as written by 
the developer, is the actual application design”, had been 
already clear to Reeves for 10 years 
www.developerdotstar.com/mag/articles/reeves_design_main.html
FUTURE OF: DATA MODELING 
THE LATE WILLIAM KENT'S BOOK “DATA & REALITY” 
2012 (3rd ed.) 
updated and commented by Steve Hobermann 
2000 (2nd ed.) 
reprinted practically unchanged from the original edition 
1978 (1st ed.) 
1967 - a sentence, quoted in the book preface 
“We do not, it seems, have a very clear and commonly agreed 
upon set of notions about data - either what they are, how they 
should be fed and cared for, or their relation to the design of 
programming languages and operating systems” [G.H.Mealy] 
Both Kent, in the first edition, and Hobermann, in the most 
recent, confirm the validity of this sentence from 1967 at the 
time of writing!
I think that innovation comes from the same open-minded 
approach of those past years, when the future of computing 
was still largely unwritten 
LEAVING BACK SOME UNNEEDED 
BAGGAGE COULD MAKE CREATIVITY 
SPROUT
POSSIBLE VISIONS OF SOFTWARE'S 
FUTURE 
Paul Chiusano - The future of software, the end of apps, 
and why UX designers should care about type theory 
pchiusano.github.io/2013-05-22/future-of-software.html 
Jamie Brandon - Imperative thinking and the making of 
sandwiches 
http://www.lighttable.com/2014/07/18/imperative-thinking/
CONCLUSIONS 
The interesting problems of computer science don't seem to 
have changed much over the last 50 years or so 
code reasoning/ease of use 
program correctness 
memory allocation/GC 
concurrency/parallelism 
distributed computing 
artificial intelligence/data mining 
... 
We can get a lot of inspiration from field pioneers and 
research material 
NEVER STOP LEARNING
FREEDOM 
Being free is not about doing whatever we please, but about 
not being constrained by our limited knowledge
CONTACTS 
 plus.google.com/u/0/+IvanoPagano/ 
 twitter.com/pagoda_5b 
 github.com/ivanopagano 
 stackoverflow.com/users/1237450/pagoda-5b 
 www.linkedin.com/in/ivanopagano
FURTHER DISCUSSION 
The problems of the past are not solved... 
Why? What can we do about it? 
WHAT IS YOUR POINT OF VIEW?
COPYRIGHTS NOTICE 
Lilo & Stitch copyrights belong to Walt Disney Pictures 
The Wolfram Language logo copyrights belong to Wolfram Research Inc. 
Back to the future copyrights belong to Universal Studios 
The Matrix copyrights belong to Warner Bros. Entertainment Inc. 
Questioning The Status Quo by Ivano Pagano is licensed under a 
Creative Commons Attribution- 
. 
NonCommercial-ShareAlike 4.0 International License 
Based on a work at . 
http://github.com/ivanopagano/questioning-status-quo

More Related Content

PDF
[PL] Jak nie zostać "programistą" PHP?
PPT
PDF
PHP Secure Programming
PDF
Code obfuscation, php shells & more
PDF
QA for PHP projects
PDF
Php web backdoor obfuscation
KEY
PHP security audits
PDF
파이썬 플라스크로 배우는 웹프로그래밍 #4 (ABCD)
[PL] Jak nie zostać "programistą" PHP?
PHP Secure Programming
Code obfuscation, php shells & more
QA for PHP projects
Php web backdoor obfuscation
PHP security audits
파이썬 플라스크로 배우는 웹프로그래밍 #4 (ABCD)

What's hot (20)

PPS
Php security3895
PPS
PHP Security
PDF
Php tips-and-tricks4128
ODP
Concern of Web Application Security
PDF
SOLID code in practice - creating good object oriented PHP application @ WDI...
PDF
Code with style
PDF
Php Security
PDF
PhpBB meets Symfony2
ODP
Web Security
PPT
PHP Security
KEY
Geek Moot '09 -- Smarty 101
PDF
Dip Your Toes in the Sea of Security (CoderCruise 2017)
PDF
PHP Backdoor: The rise of the vuln
PDF
Deadly Code! (seriously) Blocking &amp; Hyper Context Switching Pattern
PDF
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
PDF
Symfony2 - OSIDays 2010
PDF
Get Started with RabbitMQ (CoderCruise 2017)
PDF
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
PPTX
New in php 7
Php security3895
PHP Security
Php tips-and-tricks4128
Concern of Web Application Security
SOLID code in practice - creating good object oriented PHP application @ WDI...
Code with style
Php Security
PhpBB meets Symfony2
Web Security
PHP Security
Geek Moot '09 -- Smarty 101
Dip Your Toes in the Sea of Security (CoderCruise 2017)
PHP Backdoor: The rise of the vuln
Deadly Code! (seriously) Blocking &amp; Hyper Context Switching Pattern
Full-Text Search Explained - Philipp Krenn - Codemotion Rome 2017
Symfony2 - OSIDays 2010
Get Started with RabbitMQ (CoderCruise 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
New in php 7
Ad

Viewers also liked (12)

PDF
Pownce Lessons Learned
PDF
Feeding the sharks
PDF
Why and How to Optimize Your Data Architecture for an Integrated Future
PDF
Audio and Podcasting in the US
PPTX
10 of the Biggest Stories in Technology
PDF
Facilitating Complexity: A Pervert's Guide to Exploration
PDF
Trespassing The Forgotten and Abandoned: Ethics in Software Development
PDF
TDD - Inevitable Challenge for Software Developers (phpkonf15 keynote)
PDF
The Future of Music: What Every Business Can Learn From The State of The Musi...
PDF
The Future Of Work & The Work Of The Future
PDF
Prototyping is an attitude
PDF
How to Use Social Media to Influence the World
Pownce Lessons Learned
Feeding the sharks
Why and How to Optimize Your Data Architecture for an Integrated Future
Audio and Podcasting in the US
10 of the Biggest Stories in Technology
Facilitating Complexity: A Pervert's Guide to Exploration
Trespassing The Forgotten and Abandoned: Ethics in Software Development
TDD - Inevitable Challenge for Software Developers (phpkonf15 keynote)
The Future of Music: What Every Business Can Learn From The State of The Musi...
The Future Of Work & The Work Of The Future
Prototyping is an attitude
How to Use Social Media to Influence the World
Ad

Similar to Questioning the status quo (20)

ODP
New Ideas for Old Code - Greach
PDF
PPTX
Good practices for PrestaShop code security and optimization
PDF
Having Fun with Play
PPT
You shouldneverdo
KEY
[Coscup 2012] JavascriptMVC
PPTX
REST with Eve and Python
PPTX
Mood analyzer-ng poland
PDF
Living With Legacy Code
KEY
PDF
Spring boot introduction
PDF
Charla EHU Noviembre 2014 - Desarrollo Web
PDF
Vagrant for real
PDF
Slides
 
KEY
PPT
Security.ppt
PPT
12-security.ppt - PHP and Arabic Language - Index
PPTX
SADI in Perl - Protege Plugin Tutorial (fixed Aug 24, 2011)
PDF
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
ODP
Bring the fun back to java
New Ideas for Old Code - Greach
Good practices for PrestaShop code security and optimization
Having Fun with Play
You shouldneverdo
[Coscup 2012] JavascriptMVC
REST with Eve and Python
Mood analyzer-ng poland
Living With Legacy Code
Spring boot introduction
Charla EHU Noviembre 2014 - Desarrollo Web
Vagrant for real
Slides
 
Security.ppt
12-security.ppt - PHP and Arabic Language - Index
SADI in Perl - Protege Plugin Tutorial (fixed Aug 24, 2011)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Bring the fun back to java

Recently uploaded (20)

PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
UNIT 4 Total Quality Management .pptx
PDF
Digital Logic Computer Design lecture notes
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
composite construction of structures.pdf
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
Geodesy 1.pptx...............................................
Embodied AI: Ushering in the Next Era of Intelligent Systems
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
UNIT 4 Total Quality Management .pptx
Digital Logic Computer Design lecture notes
Strings in CPP - Strings in C++ are sequences of characters used to store and...
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
composite construction of structures.pdf
bas. eng. economics group 4 presentation 1.pptx
CH1 Production IntroductoryConcepts.pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Internet of Things (IOT) - A guide to understanding
Operating System & Kernel Study Guide-1 - converted.pdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
OOP with Java - Java Introduction (Basics)
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Lesson 3_Tessellation.pptx finite Mathematics
Geodesy 1.pptx...............................................

Questioning the status quo

  • 1. QUESTIONING THE STATUS QUO (THROUGH THE LOOKING GLASS) OF JAVA, OOP AND BEYOND
  • 2. WHO AM I? A software developer just like you ... probably less smart than you, actually By the way let's see who we are
  • 3. WHAT WILL YOU GET OUT OF THIS TALK?
  • 4. What will you get out of this talk? image © collien SOME FOOD FOR THOUGHT AND BRAIN TEASING
  • 5. What will you get out of this talk? A PRETTY COOL LIST OF FUTURE READINGS & VIDEOS
  • 6. What will you get out of this talk? THINGS YOU DIDN'T KNOW THINGS YOU ALREADY KNEW THINGS YOU DIDN'T CARE TO KNOW
  • 7. What will you get out of this talk? EXTRA UNSOLICITED SCALA AND FP PROMOTION!
  • 8. LET'S START OUR JOURNEY FROM THE BEGINNING image © Justin Overell
  • 9. Think about your first steps in programming...
  • 10. You probably felt excited, curious and every bit of script that worked was so satisfying!
  • 11. Even if you've been forced to learn programming as schoolwork, you probably got addicted to it sooner or later ...otherwise you wouldn't be here today, listening to this talk
  • 12. It can happen though, that such passion fades in the background, trampled by daily chores
  • 13. We should strive to try and keep caring for what we do, and keep alive that initial spark of passion for this activity
  • 14. “AS DEVELOPERS, AS AN INDUSTRY, WE HAVE THE POTENTIAL TO CREATE A BETTER SOCIETY” Hadi Hariri from jetbrains - Codemotion Rome 2014 slides available here www.slideshare.net/Codemotion/developing-in-a-decade Do you still care?
  • 15. WHERE DID I GET LOST?
  • 16. A DAILY ROUTINE MESSY ENTERPRISEY CODE BUGS, CODE SMELLS, OVER-COMPLEXITY, IMPERFECTIONS SOPHISTICATED SOLUTIONS TO PROBLEMS... ... NEEDED TO SOLVE THE INDUSTRY NEEDS LIKE FASTER TIME TO MARKET AND TIGHT DELIVERY SCHEDULES
  • 17. THE ENTIRE AGILE MOVEMENT WAS BORN TO ADAPT TO AND HANDLE THIS KIND OF ISSUES As a personal note, I recommend to take a look at the idea underlying agile, forgetting about costly certifications and easy promises
  • 18. Let's take a look at some code
  • 19. code @Controller @RequestMapping("/orders/{id}") @ExposesResourceFor(Payment.class) @RequiredArgsConstructor(onConstructor = @__(@Autowired)) public class PaymentController { private final @NonNull PaymentService paymentService; private final @NonNull EntityLinks entityLinks; /** * Accepts a payment for an {@link Order} */ @RequestMapping(value = PaymentLinks.PAYMENT, method = PUT) ResponseEntity<PaymentResource> submitPayment( @PathVariable("id") Order order, @RequestBody CreditCardNumber number) { if (order == null || order.isPaid()) { return new ResponseEntity<PaymentResource>(HttpStatus.NOT_FOUND); } source from https://github.com/olivergierke/spring-restbucks CreditCardPayment payment = paymentService.pay(order, number); PaymentResource resource = new PaymentResource(order.getPrice(), payment.getCreditCard()); resource.add(entityLinks.linkToSingleResource(order)); return new ResponseEntity<PaymentResource>(resource, HttpStatus.CREATED); }
  • 20. code /** * Base class for entity implementations. Uses a {@link Long} id. */ @MappedSuperclass @Getter @ToString @EqualsAndHashCode public class AbstractEntity implements Identifiable<Long> { @Id @GeneratedValue(strategy = GenerationType.AUTO) @JsonIgnore private final Long id; protected AbstractEntity() { this.id = null; } } source from https://github.com/olivergierke/spring-restbucks pretty terse... uh?
  • 21. Annotatiomania @Entity @Table(name = "Person", catalog = "TestDB", schema = "dbo") @XmlRootElement @NamedQueries({ @NamedQuery( name = "Person.findAll", query = "SELECT p FROM Person p"), @NamedQuery( name = "Person.findByPersonId", query = "SELECT p FROM Person p WHERE p.personId = :pId"), @NamedQuery( name = "Person.findByPersonName", query = "SELECT p FROM Person p WHERE p.personName = :pName"), @NamedQuery( name = "Person.findByPersonFamily", query = "SELECT p FROM Person p WHERE p.personFamily = :pFamily"), @NamedQuery( name = "Person.findByPersonReference", query = "SELECT p FROM Person p WHERE p.personReference = :pRef")}) source from https://groups.google.com/forum/#!topic/querydsl/4lgLx3QQqBA public class Person implements Serializable { private static final long serialVersionUID = 1L; @Id @Basic(optional = false) @NotNull @Column(name = "person_id", nullable = false) private Integer personId; @Size(max = 50) @Column(name = "person_name", length = 50)
  • 22. root-context.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"> <import resource="db-context.xml"/> <!-- Detects annotations like @Component, @Service, @Controller, @Repository, @Configuration --> <context:component-scan base-package="xpadro.spring.web,controller,xpadro.spring.web.service"/> <!-- Detects MVC annotations like @RequestMapping --> <mvc:annotation-driven/> </beans> source from https://github.com/xpadro/spring-rest
  • 23. pom.xml <?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.springsource.restbucks</groupId> <artifactId>restbucks</artifactId> <packaging>war</packaging> <version>1.0.0.BUILD-SNAPSHOT</version> <name>Spring RESTBucks</name> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.1.4.RELEASE</version> </parent> <properties> <spring-data-releasetrain.version>Evans-BUILD-SNAPSHOT</spring-data-releasetrain.version> <spring-hateoas.version>0.15.0.RELEASE</spring-hateoas.version> <tomcat.version>8.0.9</tomcat.version> </properties> <dependencies> source from https://github.com/olivergierke/spring-restbucks well, this can get pretty verbose <!-- Spring Data REST --> still there? <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-rest</artifactId> </dependency>
  • 24. can get hard to decode .486P CR0_CD equ 040000000h ; Cache Disable bit of CR0 CR0_NW equ 020000000h ; Not Write-through bit of CR0 DisableCache proc pushf ; save the flags push eax ; save eax cli ; disable interrupts while we do this mov eax,cr0 ; read CR0 or eax,CR0_CD ; set CD but not NW bit of CR0 mov cr0,eax ; cache is now disabled wbinvd ; flush and invalidate cache ; the cache is effectively disabled at this point, but memory ; consistency will be maintained. To completely disable cache, ; the following two lines may used as well: or eax,CR0_NW ; now set the NW bit mov cr0,eax ; turn off the cache entirely pop eax ; restore eax popf ; restore the flags ret ; return to caller DisableCache endp code ends end
  • 26. "Traditional" enterprise code today looks just like that
  • 27. DO WE DARE AND TRY SOMETHING DIFFERENT? image © Elena Kalis
  • 28. code public class Application extends Controller { /** Display the login page or dashboard if connected */ public static Result index() { String email = ctx().session().get("email"); if (email != null) { User user = User.findByEmail(email); if (user != null && user.validated) { return GO_DASHBOARD; } else { Logger.debug("Clearing invalid session credentials"); session().clear(); } } return ok(index.render(form(Register.class), form(Login.class))); } source from https://github.com/yesnault/PlayStartApp
  • 29. code public String validate() { User user = null; try { user = User.authenticate(email, password); } catch (AppException e) { return Messages.get("error.technical"); } if (user == null) { return Messages.get("invalid.user.or.password"); } else if (!user.validated) { return Messages.get("account.not.validated.check.mail"); } return null; } source from https://github.com/yesnault/PlayStartApp
  • 30. application.conf # This is the main configuration file for the application. # ~~~~~ # Secret key # ~~~~~ # The secret key is used to secure cryptographics functions. # If you deploy your application to several instances be sure to use the same key! application.secret="..." # Global object # ~~~~~ # Define the Global object type for this application. # Default to Global in the root package. # global=Global # Database configuration # ~~~~~ # You can declare as many datasources as you want. # By convention, the default datasource is named `default` # db.default.driver=org.h2.Driver db.default.url="jdbc:h2:mem:play" source from https://github.com/yesnault/PlayStartApp # # You can expose this datasource via JNDI if needed (Useful for JPA) # db.default.jndiName=DefaultDS # Evolutions # ~~~~~ # You can disable evolutions if needed # evolutions=disabled
  • 31. routes.conf # Home page GET / controllers.Application.index() GET /dashboard controllers.Dashboard.index() POST /login controllers.Application.authenticate() GET /logout controllers.Application.logout() GET /settings controllers.account.settings.Index.index() GET /settings/password controllers.account.settings.Password.index() POST /settings/password controllers.account.settings.Password.runPassword() GET /settings/email controllers.account.settings.Email.index() POST /settings/email controllers.account.settings.Email.runEmail() ... source from https://github.com/yesnault/PlayStartApp
  • 32. build.sbt import sbt.Keys._ name := "PlayStartApp" version := "1.0-SNAPSHOT" scalaVersion := "2.10.4" libraryDependencies ++= Seq( jdbc, javaEbean, cache, "org.mindrot" % "jbcrypt" % "0.3m", "com.typesafe" %% "play-plugins-mailer" % "2.2.0", filters ) resolvers ++= Seq( "Apache" at "http://repo1.maven.org/maven2/", "jBCrypt Repository" at "http://repo1.maven.org/maven2/org/", "Sonatype OSS Snasphots" at "http://oss.sonatype.org/content/repositories/snapshots" ) source from https://github.com/yesnault/PlayStartApp It's all here folks lazy val root = (project in file(".")).enablePlugins(play.PlayJava)
  • 33. WHAT AM I TRYING TO SAY? It's too easy to get lost in cluttered technicalities Complex environments can blur the overall picture Every so often it's good to critically examine the tools we use Moreso if they result from some predetermined policy Find some time to explore new opportunities, they don't always pay back, but sometimes they do Don't be scared by the learning curve, you've been there already!
  • 34. ABOUT THE "LEARNING CURVE" Rich Hickey (clojure, datomic) made interesting remarks about the different meaning of simple and easy presentation available here www.infoq.com/presentations/Simple-Made-Easy-QCon-London-2012
  • 35. HAMMOCK DRIVEN DEVELOPMENT Hickey also discussed about the creative process and problem solving
  • 36. HAMMOCK DRIVEN DEVELOPMENT About how solutions from related or unrelated fields can inspire new perspectives
  • 37. HAMMOCK DRIVEN DEVELOPMENT About the need to focus
  • 38. HAMMOCK DRIVEN DEVELOPMENT presentation available here https://www.youtube.com/watch?v=f84n5oFoZBc
  • 40. In “The Art of Agile Development” the author explores the concept that source code is actually the real software design He supports the concept with an example showing how modern structured programming conveys the program flow much better than Assembly code 1000 NS% = (80 - LEN(T$)) / 2 1010 S$ 0= "" 1020 IF NS$ = 0 GOTO 1060 1030 S$ = S$ + " " 1040 NS% = NS$ - 1 1050 GOTO 1020 1060 PRINT S$ + T$ 1070 RETURN So much that we seldom need flow diagrams anymore
  • 41. Can you make out what both of these functions do? def version1(text: String) { val center = (LENGTH - text.size) / 2 var space = "" for (i <- 0 until center) { space += " " } println(space + text + space) } def version2(text: String) = { def recurse(space: String): String = if ((space*2 + text).size == LENGTH) space + text + space else recurse(space + " ") println(recurse("")) } Which version was easier to grok?
  • 42. Before the second test we need some preparation //A class with some simple-to-understand attributes class Person(val name: String, val age: Int, val gender: String) //An appendable "array-like" class class ArrayBuffer ready?
  • 43. So let's rock it! def version1(queued: Iterable[Person]): Iterable[Person] = { val (boyz, girlz) = queued.filter(_.age > 18) .partition(_.gender == "male") val boyzIn = boyz take (girlz.size / 2) val in = (boyzIn ++ girlz).to[Set] for (boy <- boyz if !in(boy)) println(s"Go home, ${boy.name}. Better luck tommorrow, kiddo!") in } def version2(queued: Iterable[Person]): Iterable[Person] = { val girlz = ArrayBuffer[Person]() val boyz = ArrayBuffer[Person]() for (person <- queued) { if (person.age > 18) { if (person.gender == "male") boyz.append(person) else girlz.append(person) } } val in = ArrayBuffer[Person]() in.appendAll(girlz) for (i <- 0 until boyz.size) { if (i < girlz.size / 2) in.append(boyz(i)) else println(s"Go home, ${boyz(i).name}. Better luck tommorrow, kiddo!") } return in }
  • 45. MAYBE WE LEARNED SOMETHING “It is not only the violin that shapes the violinist, we are all shaped by the tools we train ourselves to use, and in this respect programming languages have a devious influence: they shape our thinking habits.” Edsger W. Dijkstra - Letter to the budget council of The University of Texas at Austin the whole letter is here www.cs.utexas.edu/users/EWD/OtherDocs/To%20the%20Budget%20Council%20concerning%20Haskell.pdf
  • 46. WATCH OUT FOR THE "HAMMER SYNDROME" Try to get a deeper understanding of the tools at your disposal So you can take informed decisions about the best solution to the problem at hand "Conventional" solutions are stable but sometimes best tailored to yesterday's problems Look for opportunities to explore new ideas
  • 47. A SHORT AND APPROXIMATE PARADE OF EXPLORATION OPPORTUNITIES FOR THE MODERN JAVA DEVELOPER
  • 48. AT THE DESIGN LEVEL Conventional Unusual CRUD Domain Driven Design ORM Event Sourcing MVC CQRS
  • 49. AT THE FRAMEWORK STACK LEVEL Conventional Unusual Servlet Play! JSP Vert.x JSF Typesafe Config Spring JOOQ Java-EE Gradle Maven sbt
  • 50. AT THE LANGUAGE LEVEL Conventional Unusual java groovy javascript kotlin sql ceylon scala clojure haskell!
  • 51. Have a look at MATT RAIBLE 'S DEVOXX '13 PRESENTATION to get some inspiration regarding modern web development technologies here is the video www.parleys.com/play/5298cbe3e4b039ad2298c9db/ and here the slides static.raibledesigns.com/repository/presentations/The_Modern_Java_Web_Developer_Bootcamp_Devoxx2013.pdf [beware! heavy pdf]
  • 52. TIME TO TAKE OFF AND FLY A LITTLE HIGHER
  • 53. THE OBJECT-ORIENTED VS. FUNCTIONAL DEBATE Even though it's hard to define both, we can try to identify some core features of each OOP FP Modularity/Scoping Composability Encapsulation (reduce dependencies) Abstraction Mathematical Reasoning (pureness & immutability) both approaches have reusability and simplicity as goals
  • 54. SUGGESTED READINGS ON THE SUBJECT D.L. Parnas - On the Criteria To Be Used in Decomposing Systems into Modules www.cs.umd.edu/class/spring2003/cmsc838p/Design/criteria.pdf M.Odersky; M.Zenger - Scalable Component Abstractions lampwww.epfl.ch/~odersky/papers/ScalableComponent.pdf J.Hughes - Why Functional Programming Matters www.cse.chalmers.se/~rjmh/Papers/whyfp.html H.Abelson; G.J.Sussman - Structure and Interpretation of Computer Programs mitpress.mit.edu/sicp/
  • 55. IMPEDANCE MISMATCH OOP attaches behaviour to data FP separates functions from data Interestingly, the FP approach to data is considered an anti-pattern in OOP
  • 56. IMPEDANCE MISMATCH (DETOUR) Object Relational Mapping has been called “The Vietnam of Computer Science” Ted Neward cited in blog.codinghorror.com/object-relational-mapping-is-the-vietnam-of-computer-science/
  • 57. IS RELATIONAL DATABASE ALWAYS THE BEST CHOICE? “Database Driven Development” anyone? Once again, keep watch for opportunities! NoSql NoDB!
  • 58. STILL MORE HIGH LEVEL and a little out-of-the-box
  • 59. WHERE'S INNOVATION IN THE PROGRAMMING WORLD? Internet of Things? Raspberry Pi? Arduino? Smart Glasses? ...?
  • 60. WHO'S INNOVATING? Bill Gates? Steve Jobs? Mark Zuckerberg? ...?
  • 61. What I'm looking after is tools that could change THE WAY WE THINK ABOUT PROGRAMMING in out daily work often with tech available even as we speak
  • 62. TOOLS FROM THE NEAR FUTURE? REPL Scala Worksheet Chris Granger's Light Table Elm debugger Swift Playground Microsoft is also researching in the area of Live UI Programming TouchDevelop with along the same lines
  • 63. As Light Table came out, Granger made some research to figure out “what's wrong in programming”, and what kind of solutions he could come up with His reasoning is better explained on his blog www.chris-granger.com/2014/03/27/toward-a-better-programming/ where he shows the progress of a new project called Aurora Similar ideas can be found on this blog entry about Legible Mathematics glench.com/LegibleMathematics/
  • 64. WOLFRAM LANGUAGE knowledge based and cloud deployed math functions and algorithms data visualization nlp data and visualisation from many world-wide domains everything based on symbolic functions manipulation (includes symbols, images, docs, graphs...) Wolfram Data Framework ontology
  • 65. THE PEOPLE WHO IMAGINED SUCH TOOLS stopped thinking about what we already know about software development and asked what we can actually do with the technology at our disposal can we stop taking for granted the way we develop and focus on how we would like to develop?
  • 66. Most of the ideas we just saw were inspired by the creativity of this young talented guy BRET VICTOR His area of interest is the future of computing, education, data visualization and manipulation SUGGESTED MATERIAL INCLUDES The future of programming: worrydream.com/#!/TheFutureOfProgramming Inventing on principle: worrydream.com/#!/InventingOnPrinciple Magic Ink: worrydream.com/#!/MagicInk
  • 67. INFLUENCES It strikes me how often Victor cites works and "explorers" from the historical or contemporary computer science research and other fields NAMES SUCH AS Alan Kay Douglas Engelbart Tony Hoare Edsger Dijkstra Alan Cooper Edward Tufte Don Norman Jeff Raskin David Hestenes
  • 68. Many of these influencial people's stunning innovations, date back to the early days of the computer age THE POINT HERE IS HOW MUCH CAN WE LEARN FROM THE PAST?
  • 69. “I have this strong feeling that the more I look into the latest approaches or hard problems in today's software, the more I find myself looking back” JUST ME
  • 70. Whenever we discover new cool approaches and ideas about computer science, they're probably inspired by past research, tackling the same old fundamental issues DESIGN PATTERNS λ-CALCULUS TYPE SYSTEMS DATA REPRESENTATION BIG DATA DISTRIBUTED SYSTEMS ACTORS REACTIVE PROGRAMMING
  • 71. QUOTING SOME HASKELL EVANGELIST? “One inconvenient thing about a purely imperative language is that you have to specify far too much sequencing. For example, if you wish to do a matrix multiplication, you have to do n³ multiplications. If you write an ordinary program to do this, you have to specify the exact sequence which they are all to be done. Actually, it doesn't matter in what order you do the multiplications so long as you add them together in the right groups. Thus the ordinary sort of imperative language imposes much too much sequencing, which makes it very difficult to rearrange if you want to make things more efficient.” P.J. Landin - The Next 700 Programming Languages, 1966 www.cs.cmu.edu/~crary/819-f09/Landin66.pdf
  • 72. THOUGH THE INFORMATION AGE IS ALL AROUND US NOW, THE HISTORY OF SOFTWARE AND COMPUTERS IS STILL VERY YOUNG TO LOOK FORWARD WE ALSO NEED TO LOOK BACK
  • 73. BACK FROM THE FUTURE
  • 74. FUTURE OF: APPLICATIONS Sep 2013 the reactive manifesto - www.reactivemanifesto.org Feb 2009 (first public commit) support by the akka framework - www.akka.io 1990 (first presentation) inspired by erlang language - www.erlang.org 1973 based on the actor model from Carl Hewitt - Hewitt; Bishop; Steiger; “A Universal Modular Actor Formalism for Artificial Intelligence. IJCAI”
  • 75. FUTURE OF: SOFTWARE DESIGN 2012 Uncle Bob Martin quotes an article about software design from Jack W. Reeves in his book on “Agile Software Development, principles, patterns and practices” 1985 the author published a reply to said article, after 13 years of reviews and comments - “What is software design: 13 years later” 1972 the original article - “What is software design?” 1962 the idea supported in the article, that “the code, as written by the developer, is the actual application design”, had been already clear to Reeves for 10 years www.developerdotstar.com/mag/articles/reeves_design_main.html
  • 76. FUTURE OF: DATA MODELING THE LATE WILLIAM KENT'S BOOK “DATA & REALITY” 2012 (3rd ed.) updated and commented by Steve Hobermann 2000 (2nd ed.) reprinted practically unchanged from the original edition 1978 (1st ed.) 1967 - a sentence, quoted in the book preface “We do not, it seems, have a very clear and commonly agreed upon set of notions about data - either what they are, how they should be fed and cared for, or their relation to the design of programming languages and operating systems” [G.H.Mealy] Both Kent, in the first edition, and Hobermann, in the most recent, confirm the validity of this sentence from 1967 at the time of writing!
  • 77. I think that innovation comes from the same open-minded approach of those past years, when the future of computing was still largely unwritten LEAVING BACK SOME UNNEEDED BAGGAGE COULD MAKE CREATIVITY SPROUT
  • 78. POSSIBLE VISIONS OF SOFTWARE'S FUTURE Paul Chiusano - The future of software, the end of apps, and why UX designers should care about type theory pchiusano.github.io/2013-05-22/future-of-software.html Jamie Brandon - Imperative thinking and the making of sandwiches http://www.lighttable.com/2014/07/18/imperative-thinking/
  • 79. CONCLUSIONS The interesting problems of computer science don't seem to have changed much over the last 50 years or so code reasoning/ease of use program correctness memory allocation/GC concurrency/parallelism distributed computing artificial intelligence/data mining ... We can get a lot of inspiration from field pioneers and research material NEVER STOP LEARNING
  • 80. FREEDOM Being free is not about doing whatever we please, but about not being constrained by our limited knowledge
  • 81. CONTACTS  plus.google.com/u/0/+IvanoPagano/  twitter.com/pagoda_5b  github.com/ivanopagano  stackoverflow.com/users/1237450/pagoda-5b  www.linkedin.com/in/ivanopagano
  • 82. FURTHER DISCUSSION The problems of the past are not solved... Why? What can we do about it? WHAT IS YOUR POINT OF VIEW?
  • 83. COPYRIGHTS NOTICE Lilo & Stitch copyrights belong to Walt Disney Pictures The Wolfram Language logo copyrights belong to Wolfram Research Inc. Back to the future copyrights belong to Universal Studios The Matrix copyrights belong to Warner Bros. Entertainment Inc. Questioning The Status Quo by Ivano Pagano is licensed under a Creative Commons Attribution- . NonCommercial-ShareAlike 4.0 International License Based on a work at . http://github.com/ivanopagano/questioning-status-quo