# equals

Published articles for equals.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Exploding Words: An Interactive Canvas Demo

DevFeed: [Exploding Words: An Interactive Canvas Demo](<https://devfeed.tech/articles/exploding-words-28089.md>)

Original publisher: [Read original article](<https://jlongster.com/exploding-words>)

Author: James Long

Published: 2025-04-12T12:00:00Z

Content type: article

Language: en

Sources: [James Long](<https://devfeed.tech/sources/james-long.md>)

Topics: [Canvas](<https://devfeed.tech/topics/canvas.md>), [function](<https://devfeed.tech/topics/function.md>), [object](<https://devfeed.tech/topics/object.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [copy](<https://devfeed.tech/tags/copy.md>), [equals](<https://devfeed.tech/tags/equals.md>), [experiment](<https://devfeed.tech/tags/experiment.md>), [function](<https://devfeed.tech/tags/function.md>), [object](<https://devfeed.tech/tags/object.md>), [return](<https://devfeed.tech/tags/return.md>), [svg](<https://devfeed.tech/tags/svg.md>)

### AI overview

An interactive canvas demo titled "Exploding words," accompanied by JavaScript code defining vector creation, comparison, copying, subtraction, multiplication, and addition operations.

### Source excerpt

body { background-image: url(https://static.jlongster.com/20251008/purple-grain.svg); background-size: 500px 500px; background-color: #2E264E; } ^67fd6e <div class="demo-full-screen"> <div class="relative" style="width: 100%; height: 100%; max-width: 800px; max-height: 700px;"> <canvas style="width: 100%; height: 100%; object-fit: contain"></canvas> <div class="demo-touch-area absolute" style="top: 25%; left: 25%; right: 25%; bottom: 25%; user-select: no-repeat"></div> </div> </div> ^043ea2 (function () { 'use strict'; var X = 0; var Y = 1; var Z = 2; var W = 3; function vec(x, y, z, w) { var arr; var len = w != undefined ? 4 : z != undefined ? 3 : y != undefined ? 2 : 1; if (typeof ArrayBuffer !== 'undefined') { var buffer = new ArrayBuffer(4 * len); arr = new Float32Array(buffer); } else { arr = []; } arr[X] = x; len >= 2 && (arr[Y] = y); len >= 3 && (arr[Z] = z); len == 4 && (arr[W] = w); return arr; } function vec_equals(v1, v2) { function fleq(x, y) { if (isNaN(x) && isNaN(y)) return true; return Math.abs(x - y) < 0.0000000001; } return ( fleq(v1[X], v2[X]) && fleq(v1[Y], v2[Y]) && fleq(v1[Z], v2[Z]) && fleq(v1[W], v2[W]) ); } function vec_copy(v1) { if (typeof Float32Array !== 'undefined' && v1 instanceof Float32Array) { var buffer = new ArrayBuffer(4 * v1.length); var arr = new Float32Array(buffer); arr[X] = v1[X]; arr[Y] = v1[Y]; arr[Z] = v1[Z]; arr[W] = v1[W]; return arr; } return Array.prototype.slice.call(v1); } function vec_pure_operation(op) { return function(v1, v2) { v1 = vec_copy(v1); op(v1, v2); return v1; }; } function _vec_subtract(v1, v2) { v1[X] = v1[X] - v2[X]; v1.length >= 2 && (v1[Y] = v1[Y] - v2[Y]); v1.length >= 3 && (v1[Z] = v1[Z] - v2[Z]); v1.length == 4 && (v1[W] = v1[W] - v2[W]); } var vec_subtract = vec_pure_operation(_vec_subtract); function _vec_multiply(v1, v2) { v1[X] = v1[X] * v2[X]; v1.length >= 2 && (v1[Y] = v1[Y] * v2[Y]); v1.length >= 3 && (v1[Z] = v1[Z] * v2[Z]); v1.length == 4 && (v1[W] = v1[W] * v2[W]); } function _vec_add(

## Data Classes and Destructuring

DevFeed: [Data Classes and Destructuring](<https://devfeed.tech/articles/data-classes-and-destructuring-25052.md>)

Original publisher: [Read original article](<https://typealias.com/start/kotlin-data-classes-and-destructuring/>)

Author: author@typealias.com (Dave Leeds)

Published: 2023-10-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [classes](<https://devfeed.tech/tags/classes.md>), [copy](<https://devfeed.tech/tags/copy.md>), [data-class](<https://devfeed.tech/tags/data-class.md>), [destructuring](<https://devfeed.tech/tags/destructuring.md>), [destructuring-assignment](<https://devfeed.tech/tags/destructuring-assignment.md>), [equals](<https://devfeed.tech/tags/equals.md>), [hashcode](<https://devfeed.tech/tags/hashcode.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [learn-to-program](<https://devfeed.tech/tags/learn-to-program.md>), [object](<https://devfeed.tech/tags/object.md>), [open](<https://devfeed.tech/tags/open.md>), [operator](<https://devfeed.tech/tags/operator.md>), [override](<https://devfeed.tech/tags/override.md>), [programming](<https://devfeed.tech/tags/programming.md>), [properties](<https://devfeed.tech/tags/properties.md>), [tostring](<https://devfeed.tech/tags/tostring.md>)

### AI overview

A Kotlin tutorial introducing data classes and destructuring. It explains how data classes relate to equals(), hashCode(), and toString(), beginning with reference equality and overriding inherited functions.

### Source excerpt

At the end of the last chapter, we saw how all objects in Kotlin inherit three functions from an open class called Any. Those functions are equals(), hashCode(), and toString(). In this chapter, we're going to learn about data classes, which are super-powered classes that are especially helpful when we've got an immutable class that mainly just holds properties. To better understand data classes, let's first explore each of the three functions above, and see what's involved when we override them!

## For mathematicians, = does not mean equality

DevFeed: [For mathematicians, = does not mean equality](<https://devfeed.tech/articles/for-mathematicians-does-not-mean-equality-40421.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2018/04/13/for-mathematicians-does-not-mean-equality/>)

Published: 2018-04-13T08:00:05Z

Content type: opinion

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [equals](<https://devfeed.tech/topics/equals.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>)

Tags: [equals](<https://devfeed.tech/tags/equals.md>), [functional-programming](<https://devfeed.tech/tags/functional-programming.md>), [logic](<https://devfeed.tech/tags/logic.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [operator](<https://devfeed.tech/tags/operator.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

This opinion article examines how the equals symbol is used in mathematics and programming. It argues that mathematical equality is often context-dependent, while programming languages give operators such as =, ==, and === distinct documented meanings. Examples include summation notation, set-builder notation, and function definitions.

### Source excerpt

Every now and then I hear some ridiculous things about the equals symbol. Some large subset of programmers--perhaps related to functional programmers, perhaps not--seem to think that = should only and ever mean "equality in the mathematical sense." The argument usually goes, Functional programming gives us back that inalienable right to analyze things by using mathematics. Never again need we bear the burden of that foul mutant x = x+1! No novice programmer--nay, not even a mathematician!

## A Canonical equals() For Java

DevFeed: [A Canonical equals() For Java](<https://devfeed.tech/articles/a-canonical-equals-for-java-32219.md>)

Original publisher: [Read original article](<https://bruceeckel.com/2017/01/07/a-canonical-equals-for-java/>)

Author: Bruce Eckel

Published: 2017-01-07T00:00:00Z

Content type: tutorial

Language: en

Sources: [Bruce Eckel - Computing Thoughts](<https://devfeed.tech/sources/bruce-eckel-computing-thoughts.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [code](<https://devfeed.tech/tags/code.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [equals](<https://devfeed.tech/tags/equals.md>), [fields](<https://devfeed.tech/tags/fields.md>), [interface](<https://devfeed.tech/tags/interface.md>), [java](<https://devfeed.tech/tags/java.md>), [object](<https://devfeed.tech/tags/object.md>), [override](<https://devfeed.tech/tags/override.md>), [subclass](<https://devfeed.tech/tags/subclass.md>), [subtype](<https://devfeed.tech/tags/subtype.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

This Java tutorial explains how to implement a concise equals() method using Java 7's Objects.equals(). It covers the equals contract, identity and type checks, selected-field comparisons, and tests using example classes and a factory method.

### Source excerpt

Even with the help of Java 7's Objects.equals(), the equals() method is often written in a verbose and messy fashion. This article shows how you can write a succinct equals() in a format that allows easy checking with visual inspection. When you create a new class, it automatically inherits class Object. If you don't override equals(), you'll get Objects equals() method. By default this compares addresses, so only if you are comparing the exact same objects will you get true.

## Why Java hashCode and equals implementations must satisfy the contract

DevFeed: [Why Java hashCode and equals implementations must satisfy the contract](<https://devfeed.tech/articles/consistent-return-of-hashcode-in-java-27260.md>)

Original publisher: [Read original article](<https://blog.pchudzik.com/201610/changing-hashcode/>)

Published: 2016-10-19T00:00:00Z

Content type: tutorial

Language: en

Sources: [Paweł Chudzik](<https://devfeed.tech/sources/pawe-chudzik.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [hash](<https://devfeed.tech/topics/hash.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [test](<https://devfeed.tech/topics/test.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [equals](<https://devfeed.tech/tags/equals.md>), [hash](<https://devfeed.tech/tags/hash.md>), [hashcode](<https://devfeed.tech/tags/hashcode.md>), [implement](<https://devfeed.tech/tags/implement.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [intellij](<https://devfeed.tech/tags/intellij.md>), [java](<https://devfeed.tech/tags/java.md>)

### AI overview

This article explains why Java hashCode and equals implementations must follow their documented contract. It focuses on the requirement that repeated hashCode calls on the same object during one application execution return the same integer, and demonstrates problems caused by violating it.

### Source excerpt

HashCode and equals implementations are hard. Usually, it's tricky to properly implement hashCode and equals method to fully fulfill contract from Java documentation. I'm going to focus on just one the point from the hashCode contract: whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer. Read it already? Do it again. Let it sink and think about impact of "hashCode method must consistently return the same integer" Read more

## The Java IAQ

DevFeed: [The Java IAQ](<https://devfeed.tech/articles/the-java-iaq-40570.md>)

Original publisher: [Read original article](<http://norvig.com/java-iaq.html>)

Published: 2005-08-08T00:00:00Z

Content type: tutorial

Language: en

Sources: [Peter Norvig](<https://devfeed.tech/sources/peter-norvig.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [boolean](<https://devfeed.tech/tags/boolean.md>), [class](<https://devfeed.tech/tags/class.md>), [equals](<https://devfeed.tech/tags/equals.md>), [java](<https://devfeed.tech/tags/java.md>), [object](<https://devfeed.tech/tags/object.md>), [subclass](<https://devfeed.tech/tags/subclass.md>)

### AI overview

A collection of infrequently answered Java questions covering finally-block execution, runtime class identity, and common errors in implementing equals for use with Hashtable.

### Source excerpt

Infrequently Answered Questions for Java