Java sutra

20

Click here to load reader

Transcript of Java sutra

Page 1: Java sutra

@nickvdh @Hypernation#Devoxx #junior2professional

Java SutraThe audience questions

Nick VanderhovenJeroen Horemans

Page 2: Java sutra

@nickvdh @Hypernation#Devoxx #junior2professional

Introduction

Nick : Badass architect eliteJeroen : Intergalactic senior supreme

Page 3: Java sutra

@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? “

Page 4: Java sutra

@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

Page 5: Java sutra

@nickvdh @Hypernation#Devoxx #junior2professional

Question 2

“You said you support test driven development, but not in all cases...

… when is testing not appropriate?”

Page 6: Java sutra

@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

Page 7: Java sutra

@nickvdh @Hypernation#Devoxx #junior2professional

Question 3

“Sometimes I believe the compiler ignores all my comments”

Page 8: Java sutra

@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

Page 9: Java sutra

@nickvdh @Hypernation#Devoxx #junior2professional

Question 4

How to keep your velocity stable

Page 10: Java sutra

@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

Page 11: Java sutra

@nickvdh @Hypernation#Devoxx #junior2professional

Question 5

“How did you fix your 4 hour build time?”

Page 12: Java sutra

@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

Page 13: Java sutra

@nickvdh @Hypernation#Devoxx #junior2professional

Question 6

“How come your build never fails”

Page 14: Java sutra

@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

Page 15: Java sutra

@nickvdh @Hypernation#Devoxx #junior2professional

Question 7

You like to work with a lot of juniors, how do you keep them all busy

Page 16: Java sutra

@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

Page 17: Java sutra

@nickvdh @Hypernation#Devoxx #junior2professional

Question 9

How do I stop morons changing my code

Page 18: Java sutra

@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

Page 19: Java sutra

@nickvdh @Hypernation#Devoxx #junior2professional

My Code is not for sharing

// Autogenerated, do not edit. All changes will be undone.

Page 20: Java sutra

@nickvdh @Hypernation#Devoxx #junior2professional

Any questions left?Thank you!

Nick VanderhovenJeroen Horemans