An ever-smiling full-stack developer, specializing in the rapid development of custom web applications. Always eager to learn new technologies and concepts and share knowledge.
Discuss few cases where junior's code will fail and ask how his/her code will work in such scenarios. That way he/she will learn and will keep these kind of scenaios in mind from next time and they will also be greatful as they've learnt something from you each time.
Note : Don't tell them exactly what to do, just put such test-cases or scenarios on which they can think and code.
Good stuff, this is something I do currently, seems to have a good effect. It makes them feel like they found the problem themselves. This was also mentioned in another answer, that we should try to guide them so they found the problem or solution themselves.
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.
Discuss few cases where junior's code will fail and ask how his/her code will work in such scenarios. That way he/she will learn and will keep these kind of scenaios in mind from next time and they will also be greatful as they've learnt something from you each time.
Note : Don't tell them exactly what to do, just put such test-cases or scenarios on which they can think and code.
Good stuff, this is something I do currently, seems to have a good effect. It makes them feel like they found the problem themselves. This was also mentioned in another answer, that we should try to guide them so they found the problem or solution themselves.