97 Things Every Java Programmer Should Know

Book Description

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

Publisher Resources

View/Submit Errata

Table of Contents

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

Product Information

  • Title: 97 Things Every Java Programmer Should Know
  • Author(s): Kevlin Henney, Trisha Gee
  • Release date: May 2020
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781491952696