I hate that the convention for naming React.useState variables is [color, setColor], rather than [color, colorSet]. After I declare ‘color’, I want to copy/paste that variable and append ‘Set’, rather than copy the variable then writing ‘set’ then pasting then navigating to the 4th character then flipping the case.
Granted there could be some ambiguity if there was a variable containing a unique collection (aka set) but that is far less common than declaring a useState variable. I’d even settle for appending ‘SET’ to quell the confusion.
This is very relatable, whenever someone asks for anything of any size then they’ll never know what they want until you show it to them.
I’ve started to do a bit of overengineering every now and then when I have a hunch they might want to charge something about it later.
I created a GUI for changing every single string of text on a webapp for admins, showed it to them 10x and they complimented me on how easy it is to use and change any small string in it.
Project then gets halted for Corp approval reasons and they come back with a PDF of changes they want where half of it is text changes.
I recommend insulating yourself from stuff that is subject to change like payment providers or other third party integrations. In ecommerce everyone wants something like “shipping but different if the client’s name ends with ‘SHIP1’ but use default if his number is the default number” and since they asked for the wrong thing you’ll have to do a fast revert.
Never mind, this is getting into rant territory, lol.
programmer_humor
Top
This magazine is from a federated server and may be incomplete. Browse more on the original instance.