Email or username:

Password:

Forgot your password?
Matt Keeter

wishing a very happy

"is it safe to use __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?"

day to everyone who celebrates

30 comments
Erik Haugen

@shellheim @mjk what kinds of interview questions do people use to filter out this mindset?

Ricky Reusser

@ech @shellheim @mjk We put a marshmallow on the waiting room table and promise candidates an additional reward if they can wait fifteen minutes.

DELETED

@shellheim @mjk I'm honestly kind of heartened by the fact that they appeared to listen and not actually do it.

Maybe people can learn after all.

evana

@shellheim @mjk my favorite part:

> > We offer no guarantees about what will happen if you access things there.
>
> Why don't you provide stable API for some internal state of React itself...

... misunderstands what either "stable API" or "internal state" means _so hard_.

The maintainer did a great job of being polite and pointing out that there was a scary name and you could break, but that at the end of the day, it's the author's choice to reach into library internals.

Alexander The 1st

@shellheim @mjk This does beg the question still though; why *does* the variable exist? What does it actually do that it needs to exist, but *also* indicate that you will be fired if you use it?

It also presumes that ever developer is proficient in English.

Imran Nazar

@AT1ST @shellheim @mjk The variable exists because React needs some way to pass around internal state; it has a scary name because all variable names in the code are visible and developers will latch onto any undocumented state value that has the thing they need at that moment, and complain when it moves or breaks.

It's the reason the Windows APIs are such a mess: they have to maintain bugs in the old versions that some program happens to rely on.

Relevant xkcd: xkcd.com/1172/

Alexander The 1st

@Two9A @shellheim @mjk I guess my next question is why it is such a large encompassing internal state variable, and they didn't instead go with "__INTERNAL_STATE_X" and "__INTERNAL_STATE_Y" for individual X and Y parts of the internal state.

Instead it's one *giant* "Do Not Touch" variable that does not explain *why* it needs to exist.

nepi

@mjk this still wouldn't stop half of the devs i work with regularly

Wyatt (🏳️‍⚧️♀?)

@mjk Good reminder that a majority of people can be wrong

rain 🌦️

@remmy @mjk in the sense that Facebook's engineering culture is performance art, yes. (I was there for ~10 years)

remmy

@rain @mjk

("It can't be performance art when it this slow.")

Masq31 || Gamer and Tech Expert

@mjk One of my favorites to see when looking at web banking app security xD

Foone🏳️‍⚧️

@mjk when I worked at a storage company we had a special kind of disk-erase that was only supposed to he used in special circumstances, because it could cause physical damage to the drive if used wrong.

The flag was --my-resume-is-up-to-date

Foone🏳️‍⚧️

@4censord @mjk I think our tool was actually a forked version of hdparm with some added functionality to deal with our Special Drives

Eloy

@4censord @foone @mjk oh yes, I once attended a CCC talk and the guy giving a live demo entered such a flag ON THE WRONG DISK 😂

4censord :neocat_flag_pan:

@eloy @foone @mjk ohno. Do you remember what talk, and maybe know if its on media.ccc?

4censord :neocat_flag_pan:

@eloy @foone @mjk nice, ty! It seems like some demo starts at 30min, but havent watched it yet.

Ripp_

@mjk This is my faviroute property name I've ever seen, I always laugh a little when I see it.

Also reminds me of a simular warning I put in some weird experimental python

glaebhoerl

@mjk ...has people asking a lot of questions already answered by...

DELETED

@mjk
It's CLOSED...
(Did Eliav2, get fired?)

waffles

@mjk ah yes. This code base belongs to my employer and we have a meeting room named the same, and it’s always free because ppl are afraid to book it

xanathar

@mjk Tbh I'm tempted to learn js AND React just to use that property.

Go Up