This advice is only for a very specific situation. If you can certainly find a better position quickly, but your boss is a decent person who's interested in your success, then absolutely tell them that you're thinking about leaving.<p>But that's a rare situation. Basically, it's people who were hired as junior engineers and have leveled up. Years 2-5 of your career are when your position can become mismatched with the broader market.<p>If you're just testing the market, and you might find that your current job is your best available option, don't tell your boss. Similarly, if you're fleeing a bad situation but you need the paychecks for a little while, don't tell your boss.