Computing Thoughts

Bruce Eckel's Programming Blog

Feb 4, 2021 - 6 minute read

Java Object Equivalence

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/ 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.

Jan 2, 2021 - 16 minute read

The Problem with Gradle

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.

Nov 22, 2020 - 7 minute read

Python Extensions with Rust and Go

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.

Jul 30, 2020 - 4 minute read

We Haven't Invented Zero Yet

I am the author, with Svetlana Isakova, of Atomic Kotlin. I suspect most people currently alive were introduced to the concept of zero quite early in their development—early enough that they internalized it as a foundational principle and don’t ask questions about it. In addition, many people probably know that zero was invented after the original number systems. The ancient Greeks didn’t have a zero, and it puzzled them: “How can nothing be something?

Feb 9, 2020 - 5 minute read

Value-Based Pricing and TDD

I first heard about value-based pricing from an accountant who was creating a startup based on the idea. He tells a story about consulting for a family who inherited an estate. Because of the accountant’s extensive knowledge, he was able to give advice that saved the family a million or more. However, he only charged for his time, a couple of hours. To save that amount, the story goes, the family would have been happy to pay more, an amount based on the value of the work rather than the time it took.

Dec 24, 2019 - 4 minute read

Unspoken Assumptions Underlying OO Design Maxims

For Atomic Kotlin, I’ve been struggling with an “atom” (very small chapter) during the last couple of months. It’s on object-oriented design, and it brought up a lot of feelings I’ve had for quite awhile about some of the various maxims and design guidelines that have appeared in recent decades, since OO became mainstream. I couldn’t quite put my finger on what bothered me about these design ideas. Then @codingunicorn did it for me by writing a post called Flexible code considered harmful.