Cory Brown

365JSThings.tech

Spy vs Spy

FlipFromBlacktoWhiteBasedonBackgroundColor

17 Feb 2024

I found myself with the need to toggle between black & white for text color based on whether the background-color of the element was darker or lighter. I didn't know if it could be done, but after just 5 minutes of research, I think I came up with an answer.

Photo by Merri J on Unsplash

HaveweforgottenhowtothinkinReact?

12 Dec 2021

Let's stop making up overly complicated ways of explaining react, hooks, and its concepts. There's already a simple way to think about them.

The terminator

Theperilsofknowledge

29 May 2021

“Knowledge is power” it is said. It is also said that “power tends to corrupt”.

A ball of string

Stringconcatenationoperatorconsideredharmful

12 May 2021

Let’s do our selves a favor and stop using + for string concatenation. Let’s use template literals instead.

Deiter Rams

DieterRams’designprinciplesappliedtosourcecode

6 May 2021

We are going to apply Dieter Ram’s ten principles of Good Design to software. Not the end user product — much can be found about that — but to the source code.

A Rube Goldberg machine

JavaScriptClassesAreJustRubeGoldbergMachinesforObjects

20 Apr 2021

The whole job of a class is to ultimately create an object. But JavaScript has one of the simplest, most clear and succinct ways of creating an object, and a familiar dead simple way to do it over and over again in a particular way.

We've been going about this all wrong clip from The Sandlot

TheMiseducationofCSS

26 Jan 2021

All CSS tools and frameworks seek to tame complex CSS, and they all fail at that goal to one extent or another. We've been going about this all wrong!

An arrow made of an equal sign and a greater-than sign

Tohellwithnuance,arrowfunctionallthethings

6 Jan 2020

Here is why I haven’t used the function keyword in over four years, and I don’t intend to.

underscore?

Maybeyoudon'tneedthatutilitylibraryafterall:PartII

10 Dec 2018

Many of the utilities in libraries like lodash are trivially implemented. Let's look at how to do many of them.

underscore?

Maybeyoudon'tneedthatutilitylibraryafterall:PartI

24 Sep 2017

Many of the utilities in libraries like lodash have a direct native replacement. Let's look at some of them.