Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Question for Josh Bloch: Your inspirations

Saloon Keeper
Posts: 14102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Josh!

I've read your Effective Java and Puzzlers books with great interest and entertainment. The former especially has shaped the way I program a great deal, not just in Java, but other programming languages as well.

I am wondering how you came up with these best practices yourself. Do you have your own favorite reference works or authors/mentors? Is it a product of many painful encounters with spaghetti code? Why did you decide to write about these best practices in the first place?


Author and "Sun God"
Posts: 185
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Stephan. The material in effective Java summarizes things that I've learned in my career, working in Java and, as you suspected, in other languages as well. Many best practices transcend individual programming languages, and I  merely described these as they applied to Java. And yes, many of the lessons are the result of scars from code that did not adhere to best practices.

I have many favorite programming books. An old one that's long out of print, but surprisingly still relevant is The Elements of Programming Style by Kernighan and Plauger, written in 1974. Another old one that influenced me deeply is The Mythical Man Month, written by Frederick P. Brooks in 1975. That one is still in print, and you should read it if you haven't yet. A third book that had a great influence on me is Jon Bentley's Programming Pearls. This book and its sequel are fun and enlightening. I had the privilege of learning about algorithms from Jon at CMU, and later, of working with him and Vladimir Yaroslavskiy on the Dual Pivot Quicksort algorithm (which we designed for Java 7). Another book I love, though it's in some sense the polar opposite of my book, is Henry Warren's Hacker's Delight, which is all about bit-twiddling.
    Bookmark Topic Watch Topic
  • New Topic