Ben Evans

author
+ Follow
since Jan 17, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Ben Evans

Raul Rios wrote:I'm currently researching options for:

- Migrating a classic JAX-RS application made with Java 8 and Jersey to a microservices arquitecture based application
- Moving from a "manual way of deployment in the server" to a more DevOps pipeline, including Openshift Container Platform as the platform to deploy in containers

Does your book fit in any of these areas in any way? Would it be heplful for this migration project?



Thanks for the question! As Jason says, we talk about the fundamentals of Docker and related deployment technologies - not things like OpenShift.

Having said that - I work at Red Hat, so if you are having trouble finding what you need in terms of docs for your migration then feel free to drop me a Mastodon / Twitter or LinkedIn DM (I'm kittylyst pretty much everywhere) & I'll see if I can help.
2 years ago

Manuel Loayza wrote:I haven't read a book for a while since almost everything is in the Internet.



Well, be careful of that. For example, Stack Overflow contains a lot of information and answers that are now very outdated, but due to their high scores are still preferred by the SO algorithm.

For example, a surprising number of SO answers do not use try-with-resources. Why? Because they were written before Java 7 was released.


What is the differentiator of your book in compare with the tons of information in the Internet and other java books?



Becoming a better programmer is not about learning disconnected facts and snippets of knowledge. To level up, you need to understand the deeper connections between aspects of what you already know - and the things that move you beyond where you are now.

The book tries to do this - by building on foundations, to talk about deep topics that matter - concurrency and functional programming in particular. We also use non-Java languages - Kotlin and Clojure - to help you understand different viewpoints on these topics - which will make you a better programmer in any language that you choose to program in.
2 years ago

satya Priya Sundar wrote:Often time when we see a lot of enterprise projects that are still stuck with the Java8 version and developers working on it. Now we are talking about Java version 19
What are all the challenges one would face if tomorrow someone is pushed into 18 or 19 and expected to get up and running?
Any advice or roadmap you have on this topic in your book?



So in practice, the market does not really adopt anything other than the LTS releases (which are currently 11 & 17). This is because the other releases are only supported for 6 months - and then you have to upgrade or you won't get any security or other updates. Most development managers are not happy with a JDK upgrade every 6 months and so stick to LTS versions only.

The book covers Java 17, which is the highest version that most developers will be using. The updates from 8 to 11 to 17 are not so big - with Java modules (& the changes to access control) and the new Sealed Types and Records probably being the most important features.

We spend quite a lot of time in the book talking about the upgrade path to the new versions.
2 years ago

Gary W. Lucas wrote:
The Manning page cites concurrency as one of the topics you cover in your book.  I use multi-threading all the time, but I haven't really followed new developments since Java 1.5.  Is there any newer concurrency feature that you would recommend as especially interesting or useful?



The book covers both concurrency APIs that Java has - the low-level / "classic" / 1.0 API (Thread & the language-level primitives like synchronized) and the "new" java.util.concurrent API (since Java 5). We also cover newer innovations such as CompleteableFuture, which is similar to a Promise in other languages. Also the Fork/Join framework and some discussion of some different techniques used in the non-Java languages (e.g. Kotlin coroutines).

I hope you enjoy the material! We enjoyed writing it!
2 years ago

Mike Gosling wrote:
Would like to know your thoughts why do average Java developer would need to understand byte code manipulation? I have no idea what it is.. I will take a look later today.. I mean, majority of Java developers are using Spring (Boot) and how does knowledge from your book can be used within the context of Spring?



Well, a knowledge of bytecode helps to understand topics as diverse as why concurrent programming in Java is hard, and why Java has certain limitations to implementing functional programming.

Bytecode manipulation is a key technology that underlies many of the frameworks and tools that developers use every day.

Mike Gosling wrote:
Second thing, I see that Part 3, 4 and 5 are somewhat unrelated? Are they? Or in your book they should be read one after the other if they are related? If they are, can you explain how do you make connection between maven and functional programming?



Part 4 - Build & Deployment is reasonably standalone (although it does contain build / deployment content for the non-Java languages introduced in Part 2), but the other Parts do build upon each other - so the Advanced Concurrent Programming in Part 5 depends on the previous concurrency material.

Mike Gosling wrote:
Regarding concurrency, I myself haven't actually studied concurrent programming at school, I did however employ CompletableFutures at work for doing (commutative) operation upon some large dto (to examine different sections of it in parallel). What will be your advice to learn concurrency, for someone who doesn't have a lot of strong CS core background, didn't learn assembler for instance. Can your book help on learning concurrency by example?



Yes, there are 3 whole chapters about concurrent programming - and some additional material in some of the other chapters.
2 years ago
The performance chapter doesn't cover JMH.

There is some material about it in my book "Optimizing Java" (O'Reilly) - but I do advise caution.

In practice, very few Java developers really need to use JMH. It is *not* a general-purpose benchmarking tool but instead is useful in a couple of special cases.

When doing general application performance analysis, you need to start with a "top-down" approach, rather than a "bottom-up" one.
2 years ago
So this is the 2nd Edition of the book. The original title was suggested by the publisher, who was riffing on an existing book - "The Well-Grounded Rubyist".

The content is all about helping developers to move from the "middle tier" to the top level!

There's more detail in the Preface of the book.
2 years ago
So, "The Well-Grounded Java Developer" is really intended for intermediate developers that really want to take things to the next level.

It's possibly a bit advanced for straight after Head First, but please keep it in mind for after you've got a bit more experience under your belt.

And yeah - I think Effective Java and Cay's book are both excellent next choices!
2 years ago
Hi folks! Good to be back here and happy to answer any questions you might have!
2 years ago

Carl Byrd wrote:Does Java in a Nutshell include code examples readers can download to follow along while reading the book?



Hi Carl,

It does indeed - and you've just reminded me that I need to check with my editor and ensure that the GitHub project that contains them was published and made coderanch.

Thanks for that - I'll go and check and see if they're live yet!

Ben
6 years ago

meenakshi sundar wrote:I have been the regular reader of this tile ever since the version one came out. Why do you think as an author this title stood out the test of the time?



(Fixed a couple of typos for clarity).

Hi Meenakshi,

I think that a big part of Nutshell's long-livedness is the success of Java itself! After all, if no-one was still using Java, then there wouldn't need to be a "Java in a Nutshell".

When I was working on the 6th Edition (for Java 8) I spent a lot of time at the start of the project thinking about what Nutshell would look like to be useful for a modern developer.

After all, the world of the professional developer is very, very different to the world in which Nutshell 1st Ed came out - and the profession is a lot bigger and more complex than it was.

I tried to stick close to the principles of simplicity, and to not try to do every single aspect of Java in the book - to find the right balance between assuming the reader is new to Java, and not trying to take them too far along the journey - but instead to take them partway, and encourage them to carry on from there.

Ben
6 years ago

Vanessa Williamson wrote:Java in a Nutshell was one of the essential reading books whilst at university. In the first year, we were introduced to java with Blue J, then NetBeans in the second year. After a gap of around a year, I'm starting to delve back in it again self-teaching myself with IntelliJ. Am I on the right track and are their any suggestions on the best way to make the most of Java in a Nutshell?



Hi Vanessa,

IntelliJ is a fine IDE. Modern versions of Netbeans are also very good (and in my personal opinion, when I'm working on my private projects, I often use NB as I find it has a cleaner structure for projects than IntelliJ). My advice is to find some friends or online buddies to study with - and use whatever they use. Having someone to turn to for help is always really valuable in my experience, and would tend to outweigh any marginal benefit of one IDE over another.

As the author, I can comfortably say that Nutshell is not intended to be read in isolation - no book is an island! I would hope that it was very useful as part of a suite to help the learner, but I am sure that it greatly benefits from being part of a team. The other go-to books that I think complement Nutshell greatly are "Head First Java" and "Effective Java (3rd Ed.)".

Ben
6 years ago

Thomas Zink wrote: What advanced subject in the book should a programmer have mastered in Java in order to consider himself proficient in the language?



Hi Thomas,

That's a really tough question to answer. For one thing, the old phrase: "There's always another level" is as true here as it is elsewhere. As our journey with programming, and particular languages, continues, then what we consider "proficient" may well change along with us!

The second thing to think about is that Java is, by design, a fairly simple language. The real action is in the libraries and frameworks - and so this means that on any project, what we need to get up to speed up with is the unique architecture and stack and practices of the team.

The core of the language is, and should be, fairly simple. For example - did you know that Java 8 has only 53 keywords - an amazingly small number compared to the competitor languages? Or that in Java, the grammar is very regular and rigid - keywords cannot hide, and a user-defined construction (such as a library method) can never have as special a place in the language that a keyword does!

This means that it should be easier to grasp the core of the language. Of course, a programmer also needs to understand the idioms and the style of their chosen language as well. For this, I recommend "Effective Java" by Josh Bloch - the 3rd Ed has just come out and is by far the best for the modern Java programmer.

For me, as a personal answer, then I think that a programmer is truly proficient in a language when they sit down to code, having done the design, and the idioms and features of the language flow naturally down into the IDE from their fingers. Programming is simultaneously the creation of abstract structures and the rendering of them into an imperfect representation (as code written in a programming language). When we write code that is designed, almost instinctively, to take advantage of the good features of a language, then we are proficient in it. When we write code that instinctively evades the imperfections of our chosen language - even better!

Ben
6 years ago

Samuel El wrote:This might be just what I need. I am taking a Java class for school and it has been a year since I actually worked with Java. How do you guys feel about this book for a kind of school companion for a Java class?



Hi Samuel,

Java in a Nutshell was originally designed to be a companion guide for programmers who were new to Java. However, back in those days, most programmers were coming from either a C or C++ background - languages like Python, PHP and Ruby weren't all that popular - and Javascript didn't really exist except for tiny web gimmicks.

I've tried to conserve the feel of that in the new edition, and so I hope that it would be useful to someone in your situation. However, I would also recommend that you pick up a copy of "Effective Java (3rd Edition)" by Josh Bloch and maybe "Head First Java" as well. Nutshell *should* be a useful companion, but you might need more than one book to guide you.

If you like to watch videos, I have some Introduction to Java 8 videos (which you can also watch if you have a Safari subscription).

Hope that's useful - please feel free to ask any other specific questions as well!

Ben
6 years ago

R.J. Arzki wrote:It's good to see the book keeping up with the language changes.



Thanks.

There were some quite difficult decisions in terms of which language features to talk about, and which were too advanced - for example, Jeanne's point about the G1 collector - that was particularly tricky, as Nutshell is at least partially supposed to be a beginners or recent-newcomers book, so talking about the differences between G1 and Parallel may not be entirely suitable...

I hope we got it right - please let me know your comments on this thread.

Ben
6 years ago