I work backwards from choice of operating system. I also recommend owning more than one laptop if that’s an option, especially if writing cross-platform stuff out-of-browser. Short of that, getting something beefy enough to run VirtualBox (or the like) is essential for those needing more than one platform (developers commonly do).