I too use comments at the start of the sketch to remind me what board type I'm working with. I typically start development on one type only, say a 328p type and once working and all the bugs out I will add the stuff to allow it also to operate with a mega board and I will then update the comments to reflect that. Not all sketches require changes to apply to different boards types, but that depends on the specific sketch being used. Use of direct port access commands is one example where it would apply.
Lefty