For coding and light photo editing within that budget, the M3 MacBook Air is probably the better choice. The M3's efficiency gives it a significant battery life advantage, often lasting several hours longer than the XPS 13. While the latest Intel processors are decent, the M3's performance-per-watt is superior. The macOS ecosystem can be a plus, especially if you value a Unix-like environment for development, but it does have a learning curve. Regarding screen quality, both are excellent, but the MacBook Air tends to have slightly better color accuracy out of the box, which is beneficial for photo editing. If you prefer Windows, the XPS 13 remains a solid option, but be prepared for shorter battery life. Test drive both if you can.