The best location for a home smoke detector is on or near a ceiling close to the sleeping area, away from corners, windows and doors. The top of a stairwell is also good.
Never paint your smoke detector. Twice a year (perhaps at the same time you change your clocks for daylight saving time), dust or vacuum it and change the battery.
If cooking causes false alarms, put a shower cap over the detector while you’re in the kitchen. It’s obtrusive enough that you’ll remember to take it off right after you’ve finished cooking.