Richard Reese

+ Follow
since Jul 13, 2011
Richard likes ...
Eclipse IDE Firefox Browser Java
Merit badge: grant badges
Richard M. Reese is an associate professor teaching Computer Science at Tarleton State University in Stephenville, Texas. Previously, he has worked in industry for over 16 years in the aerospace and telephony industries. He earned his Ph.D. in Computer Science from Texas A&M University and served 4 years in the Air Force primarily in the field of communication intelligence.
Outside of the classroom, he enjoys tending his vegetable garden, maintaining his aquariums, and running with his dog, Zoey. He also enjoys relaxing with an episode of Firefly and is ever hopeful for the return of the series.
He has written numerous publications including the EJB 3.1 Cookbook and more recently he has co-authored the Java 7 New Features Cookbook.
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Richard Reese

From a historical programming perspective, I remember the concepts being introduced in the following order:

Functional, Structured, OOP, AOP

Functional programming has been around since at least Lisp (1957) with structured programming coming into existence in the 1960s. OOP, as a term, started with Smalltalk in the 1970's though the concept existed in different forms well before then. AOP appear rather recently. These approaches are based on concepts that predate them making it hard to provide a definitive order.
8 years ago

There is nothing explicit in java 8 that I am aware of that simplifies swing or web application development. JavaFX 8 has been released and it is able to take advantage of Java 8 features.

8 years ago

The addition of new features to Java 8 does not encourage using non-OO techniques. For example, lambda expressions complement OO programming. They are based on anonymous inner classes.

Most of the new Java 8 features are tied to lambda expressions one way or another. Pai’s recommendation is a good one since the Date API is not as dependent on lambda expressions.

With regards to Java enhancements since Java 1.5, I don’t believe they are adding features just to add features. They are driven by Java community recommendations and other language developments. Of course developments like LINQ impact Java’s direction.

8 years ago

The addition of default methods is a controversial one for many. Time will tell, however, I feel they are a good addition. I don’t have much insight into the developer’s rationale. Maurice Naftalin’s comments are a good starting point for further information about this topic:

8 years ago

There are new flags added for Metaspace in JDK 8. Check out the following article for more details on how to manage this space: There still may be some problems with native memory, but there are options to handle it.

8 years ago

I think Java is definitely changing but it’s like most languages in that it doesn’t necessarily force you to use specific techniques. For example, you can write a non-object oriented program in C++ and still call it C++. The new Java provides you with more options to solve problems. Whether you use them is another story.

I think the answer to your question is that it all depends on who uses it and their ability and motivation for using new features. The new version of Java simply gives you many more new options than it had before.
8 years ago

I wouldn’t expect existing libraries to be rewritten using the Optional class. It can be used to create better libraries in the future. One of the nice things about using the Optional class is that it will force you to deal with null values. You will have to actively consider the possibility that a null result may be encounter. This will make your code more stable. Of course this comes with a cost: more time spent developing your code. The payback is arguably better code.

8 years ago

You are correct. It should be getYear() and not getDayOfYear(). This will be added to the book’s errata.

For better or worse I used a more verbose approach to calculate the current date to illustrate the methods available. is shorter and can be used. Knowing about these methods allows you to easily calculate a future date where one of the “of” methods parameter is modified. Similar results can be obtained using a “plus” method.

The new data and time API provides a lot of flexibility in how temporal values can be created. At the same time, this flexibility can be confusing as to which method is best.
8 years ago
Lambdas are quite flexible. They can be passed multiple parameters and return values. Arguments types can be implied in many situations and lambda bodies can be multiple lines. Your concern about “how c gets fed” is a good one. This is one of those neat things that the compiler does for you. It is able to infer the data type and then “get” the values based on the lambda expressions’ context. Lambda expressions do not contain information about which functional interface it is implementing. It all depends on the context in which it is being used.

8 years ago

In addition to Campbell’s response, there have been a number of enhancements to the VM that makes for a better VM including removal of three infrequently used garbage collection routines and permanent generation. Many of these improvements are not normally of interest to many programmers. Another interesting addition is the introduction of compact profiles which can help reduce the size of your application.

8 years ago

The book is not aimed at beginner Java programmers. There are other books out there better suited for that. Once he has mastered the basic concepts of Java, then this book will help him get up to speed on Java 8.

8 years ago

There can be but you need to be careful. Streams can be processed either sequentially or concurrently. On small streams, processing them concurrently may take more time than doing them sequentially. You also want to make sure that a stream processed concurrently does not introduce errors. This can occur when there are “sequential” dependencies that can affect the results.

With that said, streams can result in better performance. Better yet, they are easier to build and understand than using more traditional manual multiple threading approaches.
8 years ago

Yes. The book assumes that you understand the basics of Java which it sounds like you have. It will provide you with a good overview of what is available in Java 8. One thing that I do different from other Java 8 books is that I spend more time with default methods and functional interfaces. Most of everything else flows from these features. Once you have mastered them, then the other concepts fall into place more easily.

8 years ago