Abstract: Bugs are a daily stress in our work as Java developers. Those pesky bugs hide behind important Java concepts; there is no way out of this.
But can we have fun hunting them?
How about solving a series of Java puzzles and challenges as a way to learn concepts and save a lot of time finding those tricky bugs?
In this session, attendees solve fun Java challenges and gain a clear understanding of what causes the most stressful Java bugs—and have fun eliminating them from your projects.
Speaker:
Rafael Chinelato Del Nero, Systems Analyst, NoBugsProject (Oracle Certified)
Rafael Del Nero, the creator of NoBugsProject, is the author of "No Bugs, No Stress - Create a Life-Changing Software Without Destroying Your Life." Rafael believes there are many techniques involved in creating high-quality software that developers are often unaware of. His life's purpose is to help Java developers use best programming practices to code quality software for stress-free projects with fewer bugs.
Barry Evans, Senior Applications Consultant, Dublin JUG / Version 1 (Oracle Certified)
Barry is a seasoned web application engineer with over 10 years experience developing enterprise applications predominantly in the financial sector.
He has been using Java SE, Spring, and ORM to build middleware for RIA apps written in Adobe Flex & AS3, Angular JS, and HTML 5.
Recently OCP Java SE 8 certified, he is keen to increase his knowledge of Java EE and is working towards the OCMJEA certification.
Barry is also interested in meeting other JUG leaders, finding out what brings Java developers together, and he wants to help the Dublin JUG in Ireland grow by getting involved with the global Java community.
Learn the Concepts Behind Those 10 Java Challenges and Eliminate Stressful Bugs
1. Learn the concepts behind 10 Java Challenges
and Eliminate Stressful Bugs!
2. Who we are...
Rafael Del Nero
- Made in Brazil
- Creator of nobugsproject.com
- #JavaChallenges
- Author of "No Bugs, No Stress -
Create a Life Changing Software
Without Destroying Your Life” book
- He helps Java developers use best
programming practices to code
quality software for stress-free
projects with fewer bugs.
- Shares Barry’s daughters birthday
(19/09)
Barry Evans
- Made in (N) Ireland
- Java == since 2007
- 💚s Clean Code & TDD
- 💔s Bugs & Untested Code
- Java 8 SE OCP Certified
- 2nd JavaOne
- version1.com
- DubJUG.org
6. A) It won’t compile
at line 12, 17 and
19
B) It won’t compile
at line 11, 27 and
30
C) It won’t compile at
line 5, 24 and 30
D) It will compile
Crazy Syntax #3
10. A) It won’t compile
at line 9.
B) It won’t compile at
line 24.
C) BAMM!!POHHHH!!!
D) It won’t compile at
line 20
𝝺 -> Lambdas #7
11. A) befe
B) bfce
C) efce
D) aecf
1 - Widening
2 - Boxing
3 - Boxing+varargs
Method Overloading #8
12. A) 31
B) Prints to ∞...
C) Prints nothing
D) java.util.NoSuchElementException
Streams #9
13. A) Spider Pig!
Eat my shorts!
I love Sax!
B) Spider Pig!
Simpson!
I love Sax!
C) Spider Pig!
Eat my shorts!
Simpson!
D) Simpson!
Simpson!
Simpson!
Polymorphism #10
Generic Type Parameter
Generic Type parameter scope Class/Method
Explain the generic type in the class
Explain the generic type in the method
String pool
Immutable String
== != equals
TODO
Align all ternary returns – e.g. ? “3” : “4”
For structure
Variable names
Generic types declarations
Thread execution order is indeterminate
Thread priority is only a preference
Daemon threads will not keep the jvm alive
No output is possible
System.exit(0) | Runtime.exit(0) or All threads that are not daemon threads have died
HashMap uses hashcode, then equals to find unique entries
Hashcode will be used 1st time, then equals
LinkedHashMap will guarantee the iteration order
cheaper than TreeMap
Map.forEach uses BiConsumer (accept)
java 8 feature
TreeSet requires Comparable<?> interface
compareTo provides reverse alpha order
Equals never used with TreeSet
ArrayList.forEach uses Consumer (accept)
java 8 feature
Or method reference
8 calls
Homer,Homer
Homer,Marge
Homer,Lisa
Marge,Lisa
Lisa,Bart
Homer,Bart
Lisa,Maggie
Marge,Maggie