Remix.run Logo
Aaargh20318 7 hours ago

I’m missing Curly’s Law: https://blog.codinghorror.com/curlys-law-do-one-thing/

“A variable should mean one thing, and one thing only. It should not mean one thing in one circumstance, and carry a different value from a different domain some other time. It should not mean two things at once. It must not be both a floor polish and a dessert topping. It should mean One Thing, and should mean it all of the time.”

inetknght 7 hours ago | parent | next [-]

> It must not be both a floor polish and a dessert topping.

I worked as a janitor for four years near a restaurant, so I know a little bit about floor polishing and dessert toppings. This law might be a little less universal than you think. There are plenty of people who would happily try out floor polish as a dessert topping if they're told it'll get them high.

otterley 6 hours ago | parent | next [-]

It’s a reference to a very old SNL sketch called “shimmer”. https://www.youtube.com/shorts/03lLPUYkpYM

It probably won’t be up very long but it’s a classic.

dhosek 5 hours ago | parent | next [-]

Of course for maximum confusion, there’s Gen X me, making this reference to my Gen Alpha kids who have absolutely no idea what I’m talking about.

I’m still waiting for the moment in the ice cream shop when I can ask them, “sugar or plain?” https://mediaburn.org/videos/sugar-or-plain/

gpderetta 4 hours ago | parent | prev | next [-]

ah, I thought it was an Ubik reference!

inetknght 5 hours ago | parent | prev [-]

Hah, nice!

rapnie 6 hours ago | parent | prev | next [-]

Borax is an example of a substance that is simultaneously used for skin care, household cleaning, as soldiering flux, and ant killer. But I guess it is a constant with variable effects. Hard to be found in local shops anymore.

otterley 2 hours ago | parent [-]

Really? It's at practically every hardware store I've been to (US, things may be different elsewhere).

rapnie 30 minutes ago | parent [-]

Yes, Netherlands, think it is quite different in retail in comparison.

aworks 6 hours ago | parent | prev | next [-]

I worked for awhile as a janitor in a college dorm. Not an easy job but it definitely revealed a side of humanity I might not have otherwise seen. Especially the clean out after students left for the year.

inetknght 5 hours ago | parent | next [-]

> it definitely revealed a side of humanity I might not have otherwise seen

It definitely revealed a lot of falsehoods and stereotypes.

rapnie 6 hours ago | parent | prev [-]

We had a large green plant growing in an unused fridge. Fungus yes, but this was a new experience. As students we learned a lot.

js8 5 hours ago | parent | prev | next [-]

I thought that you were about to write: "as a janitor in a restaurant, the dessert topping is sometimes used as a floor polish".

inetknght 5 hours ago | parent [-]

Something as expensive as dessert toppings would only be used as floor polish by the people who truly were high... and only if they could do it without the boss knowing what they were doing.

CyberDildonics 4 hours ago | parent | prev [-]

floor polish as a dessert topping if they're told it'll get them high.

I think that would be called a drug, not a desert topping.

shermantanktop 5 hours ago | parent | prev | next [-]

Oh! I didn’t have a name for this one, but it’s a lesson I’ve learned. E.g. if variable x is non-zero, then variable y will be set to zero. Don’t check variable y to find out whether x is zero. And definitely don’t repurpose y for some other function in cases where it’s otherwise unused.

pc86 3 hours ago | parent [-]

For modern day web developers there are very, very, very few things that fall into the "if you do this you should probably be escorted out of the building on the first offense" category, but "reusing a variable because it's 'not being used'" might be on that list. I can maybe see the argument in very low memory embedded systems or similar systems where I'm not even qualified to come up with examples but not in anything that regularly shows up on HN for example.

estimator7292 2 hours ago | parent | prev | next [-]

Shellac is both a floor polish and a food additive, particularly in candy.

Used to be, anyway. Modern alternatives are much better. It's still used as glue in wind instruments though.

2 hours ago | parent | prev | next [-]
[deleted]
ipnon 7 hours ago | parent | prev | next [-]

I usually invoke this by naming with POSIWID.

huflungdung 7 hours ago | parent | prev [-]

[dead]