Well, I’d advise anyone to constantly look for opportunities. I used to job-hop roughly every 2-3 years because I got a better opportunity. But I stayed more than 6 years at my previous workplace. Not the best financial decision but I liked my job in applied research.
Then I’m guilty of breaking the license. I have always been stealing code from Stack Overflow. Well, since I’m a senior dev right now I steal only from answers.