Easy: I don't
The subtle differences between programming languages means that I never know how to upper-case text in Python and Javascript, as they don't use some equivalent of .ToUpper (Python is .upper(), Javascript is .toUpperCase()), but the rest come without thinking about it if it will work or not.
As for C, there is actually meaning behind the gibberish.
For example wcstombs (I never remember the last 's' though, lol) means Wide Character String TO MultiByte String (so, wchar_t[] to UTF-8 char[]).
Similarly, strtol is STRing TO Long.
It gets tricky with swprintf and fwprintf, as I can never remember the order of the modifiers, just like in old (SUBNES, LDMNEIA) and new ARM syntax (SUBSNE, LDMIANE).
But most of the time there is logic and reasoning behind the chaos. For example, I remember MRC/MCR direction by saying it out loud with words memorized. MRC == Move *to* Register *from* Coprocessor.
I've even programmed by... not programming.
No joke!
When I made I2C driver for GBA, I actually laid out the logical flow of behavior in an .md file, and implemented the English text in ASM basically exactly like I've written in the document, and it worked first try