For context, I'm working as an undergraduate researcher for the summer. Last week I felt like I was on a roll. Everything was going my way and I ended up deriving an interesting method which was different from anything anyone in my research group had heard of. With my method hashed out, it was a little easier to search for something similar in the literature, and lo and behold there's a somewhat obscure paper from like 20 years ago with my idea in it. This is the first time I've had a research idea actually work out, and also the first time someone beat me to the punch. I'm not really upset about this (it was just a few days' worth of summer work, not my entire PhD thesis), but it made me curious: how often does this kind of thing happen in the research world? Does it happen less as you spend more time getting familiar with the landscape of literature in your field?