Personally, if my brain is struggling with something, nothing I do can change its “mind”. I usually allow for this kind of thing to happen, some days will be better than others.
Some things that help me:
Spend enough time on a task so that you get tired, then pause. Come back either hours later, or the next day. It’s incredible how much sleep helps on solving problems.
Talk about your task with someone else, you might involuntarily find out a better approach to solve it and your brain may even get interested in working on that immediately.
Go “grab a coffee”, even if you won’t grab a coffee. Walking around, taking some daylight in, usually helps clear the mind a bit.
Try working at another place, bring your laptop to a common area at your workplace, or a coffee shop nearby.
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.
Personally, if my brain is struggling with something, nothing I do can change its “mind”. I usually allow for this kind of thing to happen, some days will be better than others.
Some things that help me: