If you want to push your Java skills to the next level, this book provides expert advice from Java leaders and practitioners. You’ll be encouraged to look at problems in new ways, take broader responsibility for your work, stretch yourself by learning new techniques, and become as good at the entire craft of development as you possibly can.
Edited by Kevlin Henney and Trisha Gee, 97 Things Every Java Programmer Should Know reflects lifetimes of experience writing Java software and living with the process of software development. Great programmers share their collected wisdom to help you rethink Java practices, whether working with legacy code or incorporating changes since Java 8.
A few of the 97 things you should know:
"Behavior Is Easy, State Is Hard"—Edson Yanaga
“Learn Java Idioms and Cache in Your Brain”—Jeanne Boyarsky
“Java Programming from a JVM Performance Perspective”—Monica Beckwith
"Garbage Collection Is Your Friend"—Holly K Cummins
“Java's Unspeakable Types”—Ben Evans
"The Rebirth of Java"—Sander Mak
“Do You Know What Time It Is?”—Christin Gorman
Author(s): Trisha Gee, Kevlin Henney.
Edition: 1
Publisher: O'Reilly
Year: 2020
Language: English
Commentary: java
Pages: 350
Tags: java 14
Preface
Permissions
O’Reilly Online Learning
How to Contact Us
Acknowledgments
1. All You Need Is Java
Anders Norås
2. Approval Testing
Emily Bache
3. Augment Javadoc with AsciiDoc
James Elliott
4. Be Aware of Your Container Surroundings
David Delabassee
5. Behavior Is “Easy”; State Is Hard
Edson Yanaga
6. Benchmarking Is Hard—JMH Helps
Michael Hunger
7. The Benefits of Codifying and Asserting Architectural Quality
Daniel Bryant
8. Break Problems and Tasks into Small Chunks
Jeanne Boyarsky
9. Build Diverse Teams
Ixchel Ruiz
10. Builds Don’t Have To Be Slow and Unreliable
Jenn Strater
11. “But It Works on My Machine!”
Benjamin Muschko
12. The Case Against Fat JARs
Daniel Bryant
13. The Code Restorer
Abraham Marin-Perez
14. Concurrency on the JVM
Mario Fusco
15. CountDownLatch—Friend or Foe?
Alexey Soshin
16. Declarative Expression Is the Path to Parallelism
Russel Winder
17. Deliver Better Software, Faster
Burk Hufnagel
18. Do You Know What Time It Is?
Christin Gorman
19. Don’t hIDE Your Tools
Gail Ollis
20. Don’t Vary Your Variables
Steve Freeman
Assign Once
Localize Scope
21. Embrace SQL Thinking
Dean Wampler
22. Events Between Java Components
A.Mahdy AbdelAziz
23. Feedback Loops
Liz Keogh
24. Firing on All Engines
Michael Hunger
25. Follow the Boring Standards
Adam Bien
26. Frequent Releases Reduce Risk
Chris O’Dell
What Is Risk?
Large, Infrequent Releases Are Riskier
27. From Puzzles to Products
Jessica Kerr
28. “Full-Stack Developer” Is a Mindset
Maciej Walkowiak
29. Garbage Collection Is Your Friend
Holly Cummins
30. Get Better at Naming Things
Peter Hilton
31. Hey Fred, Can You Pass Me the HashMap?
Kirk Pepperdine
32. How to Avoid Null
Carlos Obregón
Avoid Initializing Variables to Null
Avoid Returning Null
Avoid Passing and Receiving Null Parameters
Acceptable Nulls
33. How to Crash Your JVM
Thomas Ronzon
34. Improving Repeatability and Auditability with Continuous Delivery
Billy Korando
Repeatable
Auditable
35. In the Language Wars, Java Holds Its Own
Jennifer Reif
My History with Java
Java’s Design and Background
Java’s Downsides
Why I Like Java
What Does It Mean for Developers?
36. Inline Thinking
Patricia Aas
37. Interop with Kotlin
Sebastiano Poggi
38. It’s Done, But…
Jeanne Boyarsky
1. Communication and Clarity
2. Perception
3. There’s No Partial Credit for Done
39. Java Certifications: Touchstone in Technology
Mala Gupta
40. Java Is a ’90s Kid
Ben Evans
41. Java Programming from a JVM Performance Perspective
Monica Beckwith
Tip #1: Don’t Obsess Over Garbage
Tip #2: Characterize and Validate Your Benchmarks
Tip #3: Allocation Size and Rate Still Matter
Tip #4: An Adaptive JVM Is Your Right and You Should Demand It
42. Java Should Feel Fun
Holly Cummins
43. Java’s Unspeakable Types
Ben Evans
44. The JVM Is a Multiparadigm Platform: Use This to Improve Your Programming
Russel Winder
45. Keep Your Finger on the Pulse
Trisha Gee
46. Kinds of Comments
Nicolai Parlog
Javadoc Comments for Contracts
Block Comments for Context
Line Comments for Weird Things
Last Words
47. Know Thy flatMap
Daniel Hinojosa
48. Know Your Collections
Nikhil Nanivadekar
49. Kotlin Is a Thing
Mike Dunn
50. Learn Java Idioms and Cache in Your Brain
Jeanne Boyarsky
51. Learn to Kata and Kata to Learn
Donald Raab
52. Learn to Love Your Legacy Code
Uberto Barbini
53. Learn to Use New Java Features
Gail C. Anderson
54. Learn Your IDE to Reduce Cognitive Load
Trisha Gee
55. Let’s Make a Contract: The Art of Designing a Java API
Mario Fusco
56. Make Code Simple and Readable
Emily Jiang
57. Make Your Java Groovier
Ken Kousen
58. Minimal Constructors
Steve Freeman
59. Name the Date
Kevlin Henney
60. The Necessity of Industrial-Strength Technologies
Paul W. Homer
61. Only Build the Parts That Change and Reuse the Rest
Jenn Strater
62. Open Source Projects Aren’t Magic
Jenn Strater
63. Optional Is a Lawbreaking Monad but a Good Type
Nicolai Parlog
Monad Definition
Monad Laws
So What?
64. Package-by-Feature with the Default Access Modifier
Marco Beelen
65. Production Is the Happiest Place on Earth
Josh Long
66. Program with GUTs
Kevlin Henney
67. Read OpenJDK Daily
Heinz M. Kabutz
68. Really Looking Under the Hood
Rafael Benevides
69. The Rebirth of Java
Sander Mak
70. Rediscover the JVM Through Clojure
James Elliott
71. Refactor Boolean Values to Enumerations
Peter Hilton
72. Refactoring Toward Speed-Reading
Benjamin Muskalla
73. Simple Value Objects
Steve Freeman
74. Take Care of Your Module Declarations
Nicolai Parlog
Keep Module Declarations Clean
Comment Module Declarations
Review Module Declarations
75. Take Good Care of Your Dependencies
Brian Vermeer
Vulnerable Dependencies
Updating Dependencies
A Strategy for Your Dependencies
76. Take “Separation of Concerns” Seriously
Dave Farley
77. Technical Interviewing Is a Skill Worth Developing
Trisha Gee
78. Test-Driven Development
Dave Farley
Red
Green
Refactor
79. There Are Great Tools in Your bin/ Directory
Rod Hilton
80. Think Outside the Java Sandbox
Ian F. Darwin
81. Thinking in Coroutines
Dawn Griffiths and David Griffiths
82. Threads Are Infrastructure; Treat Them as Such
Russel Winder
83. The Three Traits of Really, Really Good Developers
Jannah Patchay
84. Trade-Offs in a Microservices Architecture
Kenny Bastani
85. Uncheck Your Exceptions
Kevlin Henney
86. Unlocking the Hidden Potential of Integration Testing Using Containers
Kevin Wittek
87. The Unreasonable Effectiveness of Fuzz Testing
Nat Pryce
88. Use Coverage to Improve Your Unit Tests
Emily Bache
When You’re Writing New Code
When You Have to Change Code You Didn’t Write
When You’re Working in a Team
89. Use Custom Identity Annotations Liberally
Mark Richards
90. Use Testing to Develop Better Software Faster
Marit van Dijk
91. Using Object-Oriented Principles in Test Code
Angie Jones
Encapsulation
Inheritance
Polymorphism
Abstraction
92. Using the Power of Community to Enhance Your Career
Sam Hepburn
The Silver Lining
How Can Community Help?
Looking for Your Next Challenge?
93. What Is the JCP Program and How to Participate
Heather VanCura
94. Why I Don’t Hold Any Value in Certifications
Colin Vipurs
95. Write One-Sentence Documentation Comments
Peter Hilton
96. Write “Readable Code”
Dave Farley
97. The Young, the Old, and the Garbage
María Arias de Reyna
The Garbage Collector
GC Strategies
References
Contributors
Index