JDK developer, OpenJDK reviewer, CSR group lead, sometimes JCP spec lead, Java Floating-Point Czar (emeritus).
Joe's Rule of Renaming If you think renaming something is the solution, make sure you're solving the right problem.
Given limited resources, optimizing quality doesn't just involve minimizing the number of errors; it also involves balancing different kinds of errors. There are two basic types of errors one can make: Doing things you should not do. Not doing things you should do. For the theologically inclined these would be sins of commission and sins of omission, respectively. Much of statistics deals with bounding the probability of making errors in judgments. From statistics, except in...
Given limited resources, optimizing quality doesn't just involve minimizing the number of errors; it also involves balancing different kinds of errors. There are two basic types of errors one can...
Recently, Alex Miller has made the incendiary suggestion that C++ be renamed Java--. Years ago, Bill Joy's initial reaction to C++ was that he instead wanted "C++++-=, a little bit more but a whole lot less." Java came about a few years later. I'm sure others have noted the Oak seedling on the cover of Stroustrup'sThe Design and Evolution of C++ along with the following quote on page 207: Within C++, there is a much smaller and cleaner language struggling to get out. However, Str...
Recently, Alex Miller has made the incendiary suggestion that C++ be renamed Java--. Years ago, Bill Joy's initial reaction to C++ was that he instead wanted "C++++-=, a little bit more but a whole...
One way declared types in Java differ from one another is whether the type is a class (which includes enums) or an interface (which includes annotation types). An independent property of a type is its relation to the surrounding lexical context. A top level class does not appear inside another class or interface. If a type is not top level it is nested. However, there are a number of distinct ways a type can be nested. First, a type can be a member of another type; a member...
One way declared types in Java differ from one another is whether the type is a class (which includes enums) or an interface (which includes annotation types). An independent property of a type is its...
With the talk of closures,modules,more annotations,and other language features in the air for JDK 7, what are all the tasks that might need to happen to fully add a language feature to the platform? Besides the general advice of being open about the project's status and soliciting feedback, there are specific technical considerations for language changes. Designing language features generates a lot of interest so providing a design rationale and FAQ is especially important....
With the talk of closures,modules,more annotations,and other language features in the air for JDK 7, what are all the tasks that might need to happen to fully add a language feature to the platform?...
Effective Java discusses two variants of the type-safe enum pattern, one that allows subclassing and one that does not. The enum language construct added in JDK 5 only provides the non-subclassing variant (because supporting subclassing would have confusing interactions with switch statements and other enum features). However, having the enum class implement a mixin interface can restore some of the third-party extensibility of the subclassing variant. (In Java, a mixin...
Effective Java discusses two variants of the type-safe enum pattern, one that allows subclassing and one that does not. The enum language construct added in JDK 5 only provides the non-subclassing...
It has been said that there are foxes and there are hedgehogs and "the fox knows many tricks, but the hedgehog knows one great trick." The one great trick of computer science is adding a level of indirection in the right place. There is an interesting similarity between the level of indirection added by the visitor pattern and by closures. The title="Wikipedia on the visitor pattern">visitor pattern when used on a type hierarchy allows arbitrary operations to be addedindepende...
It has been said that there are foxes and there are hedgehogs and "the fox knows many tricks, but the hedgehog knows one great trick." The one great trick of computer science is adding a level ofindir...
Hubbert's theory on peak oil (and other geological resources) states that the maximum rate of production of the resource occurs when half of the reserve has been extracted. Initially, there is near exponential growth in the rate of extraction as lots of "easy oil" is found and pumped, but after the peak the rate of extraction decreases. The marginal cost of extraction goes up as less desirable source of oil are put into production; this cost should provide economicincentives...
Hubbert's theory on peak oil (and other geological resources) states that the maximum rate of production of the resource occurs when half of the reserve has been extracted. Initially, there is nearexp...
At times it is useful to summarize a set of values, say a vector of real numbers, as a single number representing the set's size. For example, distilling benchmark subcomponent scores into an overall score. One way to do this is to use a norm. Mathematically, a norm maps from a vector V of a given number of elements to a real number length such that the following properties hold: norm(V) ≥ 0 for all V and norm(V) = 0 if and only if V = 0 (positive definiteness) norm(c · V) =...
At times it is useful to summarize a set of values, say a vector of real numbers, as a single number representing the set's size.For example, distilling benchmark subcomponent scores into an overall...