Showing posts with label Devoxx. Show all posts
Showing posts with label Devoxx. Show all posts

2016/11/11

Devoxx 2016 - day 5: notes (2016/11/11)

Java Language and Platform Futures: A Sneak Peek

Brian Goetz

possible improvements
  • type inference for local variables
  • taming boilerplate
    • equals, hashCode toString...
    • IDE help for writing but not reading
    • e.g. data classes class Point(int x, int y){ } (but complex issues to solve)
  • improved switch: eg pattern matching
  • project valhalla: value types / better Data layout (complex)
  • specialized generics
  • project panama: efficient native code (better JNI)
others:

Flying services with the drone

Krzysztof Kudrynski, Blazej Kubiak


Building Chat Bots - The Next Gen UI

James Ward

  • chat channels: slack, facebook messenger
  • natural language / interactive
  • protocols: no standards
  • demo

2016/11/10

Devoxx 2016 - day 4: notes (2016/11/10)

Programming your body with chip implants

Pär Sikö

chip: 12mm / 2mm -- same as for pets
  • rfid: entrance system
  • nfc: smartcards: 1kb
issues
  • battery -- energy harvesting
  • communication technology
    • active

Optional - The Mother of All Bikesheds

Stuart Marks

Optional
  • java 8 (java.util)
  • non-null ref (present) or empty (absent)
  • primitives: OptionalInt, Long etc
  • never use "null" as ref in Optional
  • "limited mech for returntypes where null will very likely return errors" e.g. streams api: Optional prevents NPE's in chained calls
  • issue NoSuchElementException
usage of Optional
  • never call "Optional.get()" when you can prove that the Optional is present
  • prefer alternatives to Optional.isPresent() / .get()
    • use: orElse() / orElseGet() / orElseThrow()
  • Optional.filter() predicate
  • Optional.ifPresent(): (<> isPresent) executes lambda if present
  • other methods
    • empty()
    • of()
    • flatMap()
    • ...
  • stream of Optional: .filter(Optional::isPresent).map(Optional::get).collect() -- filters present Optionals & extract values
misuses:
  • simple nullchecks - avoid Optional.isNullable. chainsgh
  • too complex constucts: Optional chains should be avoided
  • Optional.get() "attractive nuisance" -- will be deprecated
  • do not use Optional for
    • fields
    • method parameters
    • collections
    • replacing every null
  • Optional adds extra objects -- check performance issues
  • no identity-sensitive operations (e.g. serialization)

A Crash Course in Modern Hardware

Cliff Click

  • classic Von Neumann Architecture
  • throughput / core +10% / year (single-threaded)
  • CISC: easier to program, but harder to optimize (pagefaults)
  • RISC: simpler, but faster execution
  • walls:
    • power wall
    • ILP wall (branch prediction, speculative execution)
      • pipelining
        • better throughput, but latency remains
      • cache misses: stall -- performance = cache misses
      • branch predictions: 95% success
      • Itanium: static ILP: not much gain for huge effort
      • x86: limited by cache misses / branch mispredicts
      • locality is critical
    • memory wall
      • memory is larger, but latency is still high (DRAM)
      • SRAM for caches
        • requires data locality
        • cache layers
      • "memory is the new disk"
      • faster memory
        • relax coherency constraints
        • better throughput
    • speed of light
  • flat clock rates (15y)
    • hyper-threading: same limits (cache misses)
    • more cores
      • challenges:
        • chips reorder
        • concurrency is hard
        • immutable data
        • missing toolsets

The ISS position in real time on my mobile in less than 15mn ? Yes, we can.

Audrey Neveu

  • api.open-notify.org
  • ionic + cordova
  • server-sent events: push technology: text-only
    • streamdata.io for streaming the server-sent-events
    • JSON-patch RFC-6902 for changes demo
  • ionic start iss.io maps (=template)
  • ionic serve --lab
  • bower.json --> bower install

graph databases and the "panama papers"

Stefan Armbruster

panama papers: 2,6 TB data
property graph model
  • nodes: entities (can have name/value properties
  • relationships: type + direction (=semantic)
neo4j usecases
  • internal
    • network / it operations
    • data management
  • customer facing
    • real-time recommendations
    • graph based search
    • identity/access management
neo4j:
  • graph database -- easy to draw structure
  • solves relational pains (logical vs table model)
  • open source
  • easy to use
  • ACID
  • scalable (3.1)
  • syntax
    • patterns: (:Person{name:"Dan"})-:KNOWS>(:Person{name:"an"})
    • clauses CREATE / MERGE / SET/DELETE..
    • MATCH > WHERE <>
      • ORDER BY <>
      • paginationSKIP / LIMIT
    • LOAD CSV
  • demo

A JVM does That?

Cliff Click

 services -- "Virtual"
  • high quality GC
  • high quality machine code gen
  • uniform threading / memory model
  • type safety
  • ...
Illusion:
  • infinite mem -- gc pauses
    • jvm optimizes
  • byte code is fast:
    • JIT brings back expected cost model (gcc -O2 level)
    • JIT requires profiling
  • virtual calls are slow: java makes them fast
    • inline caches
  • partial programs are fast: requires deoptimization, reprofile, reJIT
  • consisten memory model: every machine has different memory models -- JVM handles this
  • consistent thread model: JVM imporves locking etc
  • Locks are fast
  • quick time access: difficult on hardware / multiple threads *
    • gettimeofday in java
wishes for the future:
  • tail calls
  • Integer as cheap as int
  • BigInteger as cheap as int
  • atomic multi-address update (software transactional memory)
  • thread priorities: on linux -- only as root
  • finalizers: "eventually" runs -- might be never (no timeliness guarantees)
  • soft/phantom refs: difficult to maintain in GC 

2016/11/09

Devoxx 2016 - day 3: notes (2016/11/09)

Keynote

  • AI / machine learning
    • lots af labeled datasets
    • products
      • tensorflow
  • java 9:
    • modules
      • jlink
    • jshell (REPL interface)
  • java future
    • small improvements: property-classes
    • Panama: improve JNI
      • demo: opencv (detect image contents)
      • cleaner interaction with native code

Security and Microservices

Sam Newman

intro
transport security
  • threatmodel
  • https everywhere:
    • server guarantee / tampering prevention
    • letsencrypt.org
  • client side certs: difficult -- Lemur
  • auth
    • oauth
    • form auth
    • "confused deputy problem": multiple access paths complicate security
      • saml assertions: complex
      • oauth token validated in services
data at rest
  • encrypted datastore
  • vault for password storage
docker issue
  • scans
  • build them yourself
code
logs
  • centralize in ELK

The road to Node Package Manager Hell

Paul Watson

dependency checker:
  • owasp dependency checker
  • commercial: snyk.io / nodesecurity.io
yarn
  • alternative npm client
  • fast
  • autolock dependencies
  • deterministic installs
  • offline installs
others:
  • Nexus / Arifactory
  • gradle gulp / node plugin

Modern web development using Aurelia

Harro Lissenberg

aurelia http://aurelia.io/
  • javascript framework
  • clean & non-obstrusive
  • no dependencies -- uses its own polyfills
  • MIT license
demo
  • cli for project setup
  • yarn install
  • require.js
  • recent ecmascript --> export class {}, constructor etc.
  • au run -watch for testing
  • repeate.for attribute with list of elements

Containers, VMs, Processes… How all of these technologies work ? Deep dive and learn about your OS

Quentin ADAM

process isolation
  • chroot
    • security risks (root, escape, ...)
  • jail / containers
    • linux cgroups: (docker)
      • some security risks
      • filedescriptors shared fS or full OS
  • vm (e.g. qemu)
    • simulate cpu
    • VT-X instruction-set
    • performance?
      • cpu / memory- bound? usually not an issue
      • I/O system
        • storage
        • network
others:

100% Stateless with JWT (JSON Web Token)

Hubert Sablonnière

intro:
  • cookies
  • sessionid
    • shared / distributed cache (memcached etc)
    • or sticky session
jwt
  • comparable to sessionids
  • types
    • by reference
      • bankcard ref needed
    • by value
      • realmoney --> no extra data needed
  • initial
    • wiret +sign
    • set JWT as cookie
  • after
    • verify each request
  • parts:
    • payload: claims + extra data
      • iss issuer
      • sub subject emaetc
      • times exp / nbf /iat
      • jti id
      • claims
    • signature
      • symetric e.g. hmac256
      • asymetric signature
  • oauth2 / openid connect
    • based on jwt
  • benefits
    • no loadbalancing:
      • shared secret on all servershtt
      • or public key on all servers en secret only on logon-service
    • multilanguage
  • drawbacks
    • revocation
      • blacklist or whitelist?
    • single page applications // security?
      • xss with data in local storage
        • 3rd party scripting
        • solution: HTTPonly cookies
    • mobile apps
      • Authorization: Bearer header instead of cookie
    • csrf:
      • use local storage + add csrf token in payload
      • interceptor to send csrf token on each ajax request
  • others
    • multipart forms
    • emails: jwt for reset email
    • api gateway with sessionid, but use internally JWT: api gateway does the transformation

Testing Legacy Code

Elliotte Rusty Harold

http://www.cafeaulait.org/slides/sdbestpractices2006/legacy/
  • create broader tests first
  • prefer unit test over integration test
  • concentrate on changes
  • junit, testng etc
  • create initial setup (before / after) and add easy tests
  • trial & error to tweak a new test
  • also test obvious cases
  • remove dead code
  • code coverage: focus on missed elements:
    • Emma, Cobertura.
    • covered != tested...
  • autogenerate tests? avoids boilerplate
  • static analysis: Findbugs, PMD,...
  • refactoring: watch out for reflective access (hibernate, etc)

Wait, what!? Our microservices have actual human users?

Stefan Tilkov

  • single frontend that connects to multiple services?
  • orchestration: complex
  • functional services
    • services with DB-access -- JDBC in disguise -- too low level
    • reuse is sideeffect
  • UIs matter most (not the services)
    • can become a big monolith
    • failure in the long run
  • "virtical responsibility": http://scs-architecture.org/
    • single team responsible for full slice
    • modularize frontend
  • frontend tech is not an implementation detail!
    • impacts architecture
    • decision to be made upfront
  • frontend
    • web: server vs client rendering
      • simple links (=resources)
      • redirection
      • transclusion: embedding other apps with javascript -- Web Components?
      • argument to avoid native
    • hybrid: try to use webbased
    • native: platform specifics
      • single monolith "by definition"
      • only internal modularization
  • solution frontend
  • summary
    • UIs matter
    • use the correct architectural style
    • frontend monoliths: as good /bad as backend monoliths

2016/11/08

Devoxx 2016 - day 2: notes (2016/11/08)

Array Linked to a List, the full story!

José Paumard


https://stuartmarks.wordpress.com/2015/12/18/some-java-list-benchmarks/
basic operations
  • list.sort
  • list.removeIf()
  • forEach
  • stream()
  • ... random:
  • arraylist
    • will never shrink
    • arraycopy operations
  • http://www.hackersdelight.org/
  • linkedlist:
    • som costly operations
benchmarks: JMH
cpu architecture
Java 9
  • List.of()
  • Set.of()
demo

Exploring Java 9

Venkat Subramaniam

Modularity
  • big rt.jar split in modules ("jmods" subdir)
  • java.base: default dependencies
  • other code also in modules
  • rule: no cycles (cyclic dependencies)
module
  • collection of packages / data
  • name
  • "requires"
  • "exports": only exported stuff can be used
  • convention: put module in dedicated dir
  • module-info.java in a top-level directory
    • module { export ; }
    • "requires java.base;" automatically added
  • public is not "public" anymore -- module-bound
  • examine dependencies
    • jdeps -s (exists since java 8)
    • -Xdiag:resolver
    • java -listmods -- JRE dependencies
  • implied readability: support transitive dependencies
    • "requires public"
  • transition to java 9:
    • jdeps -genmoduleinfo outputdir *.jar
    • put old jars in module path (-mp option)
    • "automatic modules"
    • uses name of jar instead of name of module"
    • classpath: "unnamed module" -- 'quarantined' module (exports all)
  • versions: still ongoing
others
  • jlink: create platformspecific binary executable -- "java"
  • REPL "read evaluate print loop" -- jShell: snippets

The end of polling : why and how to transform a REST API into a Data Streaming API?

Audrey Neveu

"realtime user experience"
  • no refresh buttons
  • solutions
    • polling -- chatty protocol / inefficient
    • alternative
demo with http://streamdata.io and a drone

Open Sesame! Conversations With My Front Door

Maurice Naftalin

raspberry pi for controlling dooropener
  • python
  • asterisk: voip solution
    • complex setup / config
    • freepbx (commercial modules)
    • Asterisk-Java: support Fast AGI -- server on 45373
    • dialplay: voice recognition -- IBM Watson speech recognition service for converting the codes
    • DTMF is more reliable for entering a code future:
    • Natural Language Processing

Notes on Type Theory for absolute beginners

Hanneli Tavante

intro to Type theory
steps:
  • collect all keywords / analyse gramar
  • replace with mathemetics
  • remove duplicates
  • symbolic logic
  • environment (set of classes / variables)
  • predicate logic to analyse your system
  • lambda calculus
  • ...

2016/11/07

Devoxx 2016 - day 1: notes (2016/11/07)

Deep Learning: An Introduction

Breandan Considine


examples
reasons
  • big data
  • hardware (nvidia cuda)
  • algorithms
machine learning fundamentals
  • tensors: n-dimensional array
  • learning types:
    • supervised
    • unsupervised
    • reinforced
tensorflow examples
  • linear regression: single line in data
  • classification
    • "perceptron"
    • layers + weighs "gradient descent"
unsupervised learning
  • clustering, separation, association
  • clustering: random points, euclidean distance
data preprocessing
  • feature scalin,g normalization
  • decomposition & aggregation
  • dimensionality reduction
  • --> training set, validate & select best modelf
DeepLearning4J
  • builder pattern
  • components:
    • nd4j -- n-dimensional arrays reinforcement learning
  • agent has context + choices
  • rewards
  • goal: maximize cumulative reward
refs:

Make CSS Fun Again with Flexbox!

Hubert Sablonnière


refs:
flex:
  • float styles are only for text flow
  • display: flex: // flex: 1 ( for 1 row)
    • parent / flexcontainer
    • children: elements
  • flex-grow: weight
  • flex-shrink: minimum
  • flex-basis: default
others
  • justify-content: center / flex-end
  • align-items: center

Easily secure your Front and back applications with KeyCloak

Sébastien Blanc


http://www.keycloak.org/
Open Source Identity and Access Management
  • jwt (rfc 7519)
  • openid, kerberos etc
  • adapters (wildfly, spring boot, node.js ...)
  • native clients
  • login brokers
  • otp
demo
  • web.xml: roles/ security config
  • keycloak.json config
  • atom editor https://atom.io/
  • node.js: add keycloak.protect()

Sentiment analysis of social media posts using Apache Spark

Niels Dommerholt


http://spark.apache.org/ dataprocessing engine

sentiment analysis
  • positive / negative
  • java 8 / streams api
  • coursera
demo
  • JavaSparkContext: config

Apache Spark? If only it worked

Marcin Szymaniuk


origin: http://blog.explainmydata.com/2014/05/spark-should-be-better-than-mapreduce.html*

details

  • RDD: Resilient Distributed Dataset :
    • cache
    • no priority
  • sizing executors: configure memory (should autobalance in recent versions)
  • known pitfalse: 2g block limit, gc's -- check level of parallelism (groupByKey, repartition)
  • check locality: NODE_LOCAL -- increase exectors if needed
  • broadcast variable
  • avoid groupbykey -- use reducebykey
  • debugging:
    • log aggregation
    • hdfs monitoring logging
    • gclogs  

Devoxx 2016: Be Productive with JHipster (2016-11-07)

Julien Dubois & Deepu K Sasidharan

https://jhipster.github.io/
demo generated stuff:
  • database: liquibase
  • Dockerfile -- docker-compose -f src/main/docker/mysql.yml up -d
  • swagger documentation
  • mvn clean test (maven / gradle wrappers)
other options
I18n:
  • Angular Translate in client
  • java internationalization on server
Websockets
  • Spring Websockets
  • sample screen generated (track users)
demo:
integration tests
production
JDL Jhipster Domain Language
Modules
Microservices
JHipster Console
  • Monitoring app built with ELK
  • Dcoker Compose sub-generator
future:
  • yarn upgrade https://yarnpkg.com/
  • bower will be removed in jhipster 4
  • Angular JS2: 90% done
  • JHipster IDE Plugin for eclipse: design entities

2014/11/14

Devoxx 2014: Conference day 3 Notes (14/11/2014)


50 new things we can do with Java 8

José Paumard
Date
  • Instant.now()
    • Duration.between(start, end).toMillis()
  • LocalDate.now() — .of() —
    • Period: time between 2 dates
    • now.with(TemporalAdjuster.next(DayOfWeek.SUNDAY));
  • LocalTime.now() — of(10,20) //10:20
  • ZoneTime / ZoneId.of(“Europe/London”)
    • ZonedDateTime — Period
  • Formatter (DateTimeFormatter.ISO_DATE_TIME etc.)
  • Bridge with java.util.Date:
    • Date.from(instant)
    • TimeStamp.from(instant)
    • Date.from / toLocalDate()
Stream
  • IntStream
  • Patter.compile(…).splitAsStream(txt)
String concat
  • compiler does stringbuilder conversion
  • StringJoiner: concat with delimeters + pre-/postfix
    • String.join(…)
Numbers
  • Long.max(), Long.sum()
  • lambda: .reduce(…,Long::max)
  • static Long.hashCode(l)
I/O reading text files
  • Files.lines(Path)
    • path=Paths.get(…);
    • autoclosable with try(resource){} pattern
  • Files.list(path)
  • Files.walk(path): recursive find
Iterable
  • forEach consumes (e.g; strings.forEacht(System.out::println))
  • boolean b = list.removeIf(s-> s.length() > 4)
  • list.replaceAll(String::toUpperCase)
  • list.sort(Comparator.naturalOrder())
Comparator
  • Comparator.naturalOrder()
  • Comparator.comparingBy(Person::getLastName) .thenComparing(Person::getFirstName).thenComparing(..)
  • comparator.reversedOrder() / comp.reversed()
  • Comparator.nullsFirst() /nullsLast()
Optional
  • Optional.empty();
  • Optional.of(“one”)
  • opt.isPresent() /.get() / .orElse(“”) / .orElseThrow()
  • Stream integration ifPresent / filter / map / flatMap
    • flatMap().collect(…)
Map
  • map.forEach( (key, value) -> …)
  • better Compare-And-Swap functions for concurrency:
    • map.get(key) -> map.getOrDefault(key, default)
    • map.putIfAbsent(key, object)
    • map.replace(key, old, new) -> extra test on old value
    • map.remove(key, old) - extra test on old value
    • map.compute() / computeIfAbsent() / computeIfPresent()
Type Annotations
  • @NonNull
Parallel Arrays
  • Arrays.parallelPrefix
  • parallelSort
Completable Future -> graphs of tasks (“reactive programming”)
  • CompletableFuture.supplyAsync()
  • thenApply() thenAccept()
  • thenCompose()
  • allof(): combine multiple futures -> join()
  • thenCombine() / applyToEither: get the first result
Atomic Variables
  • AtomicLong -> updateAndGet(lambda) / accumulateAndGet(lambda)
  • multithreaded ;increment() / .sum() computes final result
StampedLock
  • s.writeLock() s.readLock()
  • tryOptimisticRead()
ConcurrentHashMap
  • completely replaced, no locking
  • size(): do not use! -> map.mappingCount()
  • search(threshold, lambda) : threshold before going parallel
  • reduce() / reduceKey() / reduceEntries()
  • ConcurrentHashMap.newKeySet() // values are Boolean.TRUE
Books
  • Java SE8 for the Really Impatient - Cay Horstman

Introduction to Android Wear - A Glimpse Into the Future

Cyril Mottier
principles:
  • contextual
  • glanceable
  • low interaction

In Full Flow: Java 8 Lambdas in the Stream

Paul Sandoz
Stream Basics
  • Stream:
    • abstract view over data
    • aggregate ops
  • not RxJava, not CompletableFuture, not Distributed Stream
  • e.g.;
    • list.stream().filter(s -> s.length() > 0).count()
    • mapToLong(e -> 1L)
    • reduce(0, Long::sum);
    • reduce(“”, (a, b) -> a + “ “ + b)
    • Optional
  • performance:
    • parallel can go slower for small datasets (due to overhead)
    • reduce can generate a lot of extra classes -> .collect()
Parallel Game
  • a stream is sequential by default
  • can be made parallel()
  • Greedy -> takes more work -> multicore
  • implementation under the hood:
    • forkjoinpool -> split problem in parts
  • when to use?
The future
  • near term:
    • better parallel resource control
    • improved splitting implementations
      • Files.lines()
      • unordered input to limit()
    • more operations:
      • takeWhile()
      • skipWhile()
      • Matcher.stream()
    • helper methods
      • Optional.stream()
      • Stream.ofNullable(T t)
    • longer term:
    • Value types
    • extending generics over values
    • IntStream extends Stream
    • Tuples

2014/11/13

Devoxx 2014: Conference day 2 Notes (13/11/2014)


keynote: Android Material Design

Chet Haase & Nick Butcher
visual design talk :-/

Modern Enterprise Java Architectures with Spring 4.1

Juergen Hoeller
Spring Framework 4.1
  • embedded webserver
  • websocket-style lightweight messaging
  • baseline:
    • min.: java 6, servlet 2.5, JPA 2.0
    • Java 8 support,
  • support:
    • servlet 3.0 oriented
    • compatible with Websphere7 (JPA feature pack)
    • Google App Engine
    • EE7 level:
      • servlet 3.1, Websockets
      • JRSR-236 Managed concurrency
      • JPA2.1, Bean validattion
      • JTA 1.2, JMS 2.0
      • JCache 1.0
    • dedicated support for latest servers
      • Tomcat 8.0, Jetty 9.2
      • GlassFish 4.2, WebLogic 12.1.3
      • Websphere Liberty Profile, WildFly
Spring 4.1 features
  • Component Classes: example meta-data (annotations) (not new)
    • @Service, @Lazy
    • @Autowired
    • @Transactional
  • Configuration classes
    • @Configuration
    • @Profile
  • Composable annotations
    • combine annotations to a “@interface” that groups multiple default annotations
    • overridable annotations: e.g. custom scopes, require specific attributes
  • Generic-based Injection Matching: look for the most specific @Bean match with @Autowired, without qualifiers;
  • ordered collection injection:
    • @Bean @Order(1)
    • @Autowired …List<> is filled with correct beans, using the @Order
  • Lazy Injection Points
  • support for standard annotations: @ManagedBean, @Inject, @PreDestroy -> no need to have spring dependencies
  • java.util.Optional (java 8)
  • Declarative formatting with Java 8 data-time:
    • base: LocalDate, LocalDateTime (java.time.*)
    • @DateTimeFormat(pattern=”M/d/yy h:mm”) (org.springframework.annotations)
    • @Past (javax.validation.constraints.*)
  • Declarative Scheduling
    • @Async
    • @Scheduled (can repeated on a single method)
  • java 8 Lambdas
    • JdbcTemplate, JmsTemplate etc.
  • Annotated MVC Controllers
    • @PathVariable from @RequestMapping(value=”/path/{id}”)
    • @Valid -> bean validation
  • STOMP on WebSocket: @SubscribeMapping
  • Annotated JMS Endpoints:
    • @JmsListener
    • Messaging abstraction: org.springframework.messaging.Message
  • Declarative Caching:
    • use spring’s annotation (not in JEE yet)
      • @CacheConfig
      • @Cacheable
      • @CachePut
      • @CacheEvict
    • or JCache JSR-107 javax.cache.annotations.
      • @CacheDefaults
      • @CacheResult
      • @CachePut
      • @CacheRemove
Demo: start.spring.io

API Design With Java 8 Lambda and Streams

Stuart Marks / Brian Goetz
API: “interface between software pieces” client / library
history:
  • java 5:
    • generics (parameterized types)
    • annotations
  • java 8
    • lambda
    • default methods
    • streams
lambda:
  • pass behavior
    • “functions as data”
    • replaces anon. inner classes
  • subclassing vs functions-as-data
    • “behavioral” patterns: Command, Iterator, Observer/Listener …
    • eg:
      • Collection -> Array -> Streams.toArray(lambda)
      • Iterator -> forEach() (state on stack, one method call)
      • conditional execution (e.g. null elements) -> iilter()
Function composition and High order functions
  • Collections.sort(List, Comparator) -> custom order with Comparator
    • Collectins.sortByType() -> too many specialized methods -> method variation is not the correct solution
    • -> revisit Comparator:
      • higher-order functions to make composing easy
      • Comparator.comparing(keyFunc)
      • Comparator.comparingInt
      • Comparator.thenComparing(): chain comparing
  • Composition / High-order functions are extremely powerful techniques!
    • Java 8 + Lambda’s
    • Strategy / Command patterns
Default Methods
  • interface evolution
  • java 8:
    • enable streams on collections
    • e.g; default remove() implementation on interface
  • reduces pressure to get interface right from the beginning
  • don’t replace abstract classes
    • no private/protected
    • no state
    • client vs subclasser interface distinction is difficult
Static methods on interfaces
  • less need for utility classes (e.g. Collections)
  • static factory methods: Comparator.comparing()
Streams in APIs
  • aggregations of other things:
    • historically: Collection
      • defensive copy
      • performance issues
    • java8: Stream
      • lazy by default
      • avoid making defensive copies
      • no need for conversion
      • can be infinite
      • (use Collection is repeatable read is required)
      • client can filter(), collect(), findFirst() on Stream
Optional
  • wrapperclass: value is present or empty
  • consider when a method can return null
  • reducess NullPointerExceptions
  • usages: min/max on empty input; find/search
  • orElse(), orElseThrow()
Generics
  • type inference relies on generics
  • raw types give issues
  • use wildcards :-/
others:
  • deprecate/remove old stuff? “removing has almost only drawbacks”

Don’t be naked in front of JavaScript: 15 essential tools explained in 15 minutes

Romain Linsolas
  • books:
    • Javascript the good parts
    • Javascript definitive guide
  • NodeJS:
    • serverside; npm
    • Express: REST
  • Yoeman: scafold project
    • yo angular
  • Bower: dependency mgmt
  • Grunt: task runner
    • config over code
    • ant for javascript
  • Gulp: Stream-besed build system
    • code over config
  • IntelliJ/ WebStorm
  • Jasmine: unit tests and functional tests
  • CasperJS: integration testing
  • Google Closure Compiler
  • SonarQube:
    • coding rules
    • test coverage
  • Batarang: Chrome extension
    • Angular debugging / profiling
    • inspect scopes
    • watch perf.

Java 8, 9 and beyond - Ask the Experts

Brian Goetz / Paul Sandoz / Stuart Marks
  • reified generics instead of erased genics: dificult with wildcards / complex within compiler -> address painpoints
    • better type literals
    • arrays: immutable
    • arraylist of int
  • jdk 9
  • parallelstreams by default -> start sequential, measure
  • backwards compatibility: burden? -> “constraint”
  • checked exceptions: failed? part of the platform.
    • difficult with generics

3D Printing, Teaching Java & Visual Programming

Michael Hoffer
3D Printing: plastic: layers of material ‘additive’ -prototyping (industry: remove layers)
How to create 3D geometries?
  • professional CAD
  • Blender (free) -> design
  • OpenSCAD
  • JCSG / JFXScad (Java libraries)
    • Union, Diff, Intersection or Hull
VRL-Studio
  • General purpose visual programming language
  • Automatic GUI gen
  • jar-file
  • JCSG Plugin -> 3d drawing
    • save as STL file -> to printing software

Pragmatic Functional Refactoring with Java 8

Raoul-Gabriel Urma / Richard Warburton
First-class Functions
  • classic: interface Predicate / implemented
  • java 8:
    • method refs: this::myMethod()
    • lambdas
  • composing functions
    • java.util.function.Predicate -> test()
      • has default methods e.g; or(), and() etc.
    • function pipelines: java.util.function.Function
      • andThen() chaining
Currying
  • DoubleUnaryOperator class
  • partial application: using some arguments and returning a new function
Immutability
  • withXxxxx() methods instead of setters that copy the object and return the modified version
  • copy objects to prevent racecondition issues with internal state
  • related
    • domain driven design: immutable value types
    • tools:
      • JSR-308: annotations
      • Mutability Detector
      • FindBugs @Immutable test
Optional Data Types
  • NullPointerException protection
  • java.util.Optional
    • single value container
    • excplicit modelling
    • must be actively unwrapped
    • construct: Optional.ofNullable(person);
    • Optional.flatMap(Person::getCar — can be chained -> return Optional value
Books:
  • Java 8 in Action
  • Java 8 Lambdas

Evening Keynote: Infinite Possibilities

Denise Jacobs
  • creativity
  • fixed (perfectionism) or growth mindset?
  • ‘release tirany of the expert’
  • adopt a beginner’s mind
  • “flow”
  • make bug lists
  • choose bigger/creative problems to solve
  • ‘culture of creativity’