Java sutra
Click here to load reader
-
Upload
nick-vanderhoven -
Category
Software
-
view
52 -
download
0
Transcript of Java sutra
@nickvdh @Hypernation#Devoxx #junior2professional
Java SutraThe audience questions
Nick VanderhovenJeroen Horemans
@nickvdh @Hypernation#Devoxx #junior2professional
Introduction
Nick : Badass architect eliteJeroen : Intergalactic senior supreme
@nickvdh @Hypernation#Devoxx #junior2professional
Question 1
“ Since methods in Java are now first class citizens,is it okay to write them with a first capital letter? “
@nickvdh @Hypernation#Devoxx #junior2professional
Methods are first class citizen
● Bytecode library to give them a firstname and lastname
● Methods from foreign library to avoid illegal access exception
@nickvdh @Hypernation#Devoxx #junior2professional
Question 2
“You said you support test driven development, but not in all cases...
… when is testing not appropriate?”
@nickvdh @Hypernation#Devoxx #junior2professional
Inappropriate testing
● Testing on animal should never be allowed
● Java threats everything as an object with a number
○ Filed a JSR to introduce an extra root class: Animal
@nickvdh @Hypernation#Devoxx #junior2professional
Question 3
“Sometimes I believe the compiler ignores all my comments”
@nickvdh @Hypernation#Devoxx #junior2professional
Comments
In order to make people read your comments
● Give them nonsense names, like a(), execute() or doSomething()● Use a lot of html and images in them● Use self invented javadoc annotations like @Pre en @Post
The pattern is called comments by obfuscation
@nickvdh @Hypernation#Devoxx #junior2professional
Question 4
How to keep your velocity stable
@nickvdh @Hypernation#Devoxx #junior2professional
Agile velocity
Do the estimations after the story is developed
● That way you are always sure the velocity is maintained
If the velocity is 2 mandays / storypoint
● If you are ready after 1 day● You have a day left to drink coffee
@nickvdh @Hypernation#Devoxx #junior2professional
Question 5
“How did you fix your 4 hour build time?”
@nickvdh @Hypernation#Devoxx #junior2professional
The long build
Kick 50% of your integration/gui tests
● even/odd approach● If its old its stable approach
Let someone else do it
@nickvdh @Hypernation#Devoxx #junior2professional
Question 6
“How come your build never fails”
@nickvdh @Hypernation#Devoxx #junior2professional
The stablest build
● Push max twice per sprint● Push when no other devs are around● If it fails fix it fast and remove the failed jenkins build
○ Are you sure you want to delete this permanently >> YES
@nickvdh @Hypernation#Devoxx #junior2professional
Question 7
You like to work with a lot of juniors, how do you keep them all busy
@nickvdh @Hypernation#Devoxx #junior2professional
Newbies FTW
You had one job● 1 junior for merging branches● 1 junior for writing javadoc● 1 junior for writing tests for my code● 1 junior for fixing bugs
They can choose a new role every sprint
@nickvdh @Hypernation#Devoxx #junior2professional
Question 9
How do I stop morons changing my code
@nickvdh @Hypernation#Devoxx #junior2professional
My Code is not for sharing
Obfuscation is again your friend
● Self invented patterns● Extreme use of lambdas, optional and self invented function interfaces
● Functions returning ○ functions returning
■ streams of functions ● of optionals
○ of streams ■ of functions
@nickvdh @Hypernation#Devoxx #junior2professional
My Code is not for sharing
// Autogenerated, do not edit. All changes will be undone.
@nickvdh @Hypernation#Devoxx #junior2professional
Any questions left?Thank you!
Nick VanderhovenJeroen Horemans