Try to figure out what code sample is doing theoretically.
Test parts of code sample and/or look up documentation to confirm guesses.
Make small tweaks (e.g. change an input) to code sample to change/modify or to achieve what I intended to do with the code sample and see if the result is as I intended.
I always find it easier to build up my own theoretical understanding of what I think something does, then confirm it against written documentation. It also involves a lot of error-free and experimentation with minimal consequences.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Mine's a bit more practical but it's more like:
I always find it easier to build up my own theoretical understanding of what I think something does, then confirm it against written documentation. It also involves a lot of error-free and experimentation with minimal consequences.