TLDR: BruceEckel.substack.com
I’ve noticed that I haven’t been writing here that much lately, and I began to suspect it is because of the necessary ceremony of creating a blog post. Which, really, isn’t that much but I’ve started to see that even the smallest amount can be an impediment.
When I began trying to paint, I discovered these impediments, and they’re different for each person. In my case, the stretched canvas was “too important” and I resisted putting paint on it (both parents grew up in the depression, so I am overly careful about wasting things, which makes experimentation hard).
Returning from giving my Polymorphism Unbound presentation at StrangeLoop (not yet available on YouTube, but all the examples and presentation slides are on Github), I found myself dissatisfied. Part of this was certainly my failure to cram a 2-hour presentation into 40 minutes (after cutting it down from a day-long, workshop-length size). The bigger issue was my inability to answer the essential question at the end of the presentation: why are we writing polymorphic functions?
I was attempting to assist on an open-source project when I was stopped short by this (names have been changed):
class DataPoint: measurement1 = None measurement2 = None measurement3 = None DataPoint was later used like this:
d = DataPoint() d.measurement1 = 100 d.measurement2 = 200 d.measurement3 = 300 Why give names and initialization values to class attributes, then when you make an object, immediately create and initialize instance variables with the same names as the class attributes?
This is an update to the subsection “Testing Object Equivalence” in the “Operators” chapter of On Java 8. This will appear in the book in its next update.
The relational operators == and != work with all objects, but their results can be confusing:
// operators/Equivalence.java public class Equivalence { static void show(String desc, Integer n1, Integer n2) { System.out.println(desc + ":"); System.out.printf( "%d==%d %b %b%n", n1, n2, n1 == n2, n1.
Or: How to Remain Sane when Approaching Gradle (with apologies to Hans Dockter).
(James Ward and I go into more detail about this article in the Happy Path Programming Podcast).
I started using make in the 80’s. When I wrote Thinking in C++, I created a tool I called makebuilder which analyzed the examples extracted from the book and generated an appropriate makefile. make is a dedicated tool that only cares about dependencies and actions, so it is reasonably approachable.
The goal of a developer retreat is to stop what you are doing for awhile and explore something new. This usually requires a shift in mindset, and the biggest shift is to suspend the focus around productivity and urgency. It’s important to give up the idea that “we must accomplish something in an amount of time.” Only with the sigh of relief that comes from liberating yourself from goals is your brain allowed to float to the most interesting places.