Hot.orelse(not)
-
Upload
nick-vanderhoven -
Category
Software
-
view
496 -
download
0
Transcript of Hot.orelse(not)
@hypernation @nickvdh#Devoxx #hotornot
Hot.orElse(not)Nick Vanderhoven
Jeroen Horemans
`
@hypernation @nickvdh#Devoxx #hotornot
String concatenation
• Compiler optimization with
StringBuilder
• “ To increase the performance
of repeated string
concatenation, a Java compiler
_may_ use the StringBuffer
class or a similar technique to
reduce the number of
intermediate String objects that
are created by evaluation of an
expression. ” - JLS
30 % 70 %
HOT NOT
@hypernation @nickvdh#Devoxx #hotornot
milli micro nano pico
• nanoTime()
= precision timer
• currentTimeMillis()
= wall clock
• jmh35 % 65 %
HOT NOT
@hypernation @nickvdh#Devoxx #hotornot
Streams and state
• never modify the same
list an iterator/stream
• sorted() = “stateful
intermediate
operation”
• breaks with parallel()
• mutable shared
variable
59 % 41 %
HOT NOT
@hypernation @nickvdh#Devoxx #hotornot
Primitive constructors
• @Deprecated(since="9
")
public Integer(int value)
• 5 boolean states
• Boolean.TRUE
• Boolean.FALSE
• new Boolean(true)
• new Boolean(false)
• null
32 % 68 %
HOT NOT
@hypernation @nickvdh#Devoxx #hotornot
JEP 286: Local-Variable Type Inference
• JEP 286
Feature Candidate
• Author
Brian Goetz
• Reviewed by
Alex Buckley, Mark
Reinhold
72 % 28 %
HOT NOT
@hypernation @nickvdh#Devoxx #hotornot
Optional.get()
• “I think calling this
method ‘get()’ was our
biggest API mistake in
Java 8.”
- Brian Goetz
• Optional.getWhenPresent()
?33 % 67 %
HOT NOT
@hypernation @nickvdh#Devoxx #hotornot
Lombok
• Developers are lazy,
but don’t trust anything
they don’t understand
• Beyond JSR 269
(annotation
processors)59 % 41 %
HOT NOT
@hypernation @nickvdh#Devoxx #hotornot
Exceptions
//no comment
68 % 32 %
HOT NOT
@hypernation @nickvdh#Devoxx #hotornot
MATCH
1 award-winning author, founder of Agile Developer, Inc., and an instructional
professor at the University of Houston.
Venkat Subramaniam
76 %
95 %
65 %
FRAMEWORKS
FUNCTIONAL
JAVA
@hypernation @nickvdh#Devoxx #hotornot
Thank you for voting
Nick Vanderhoven
Jeroen Horemans
`
@hypernation @nickvdh#Devoxx #hotornot