I sort of went the other direction. Went to school for mechanical engineering, near the end of it I realized that software development was kind of fun too. As much fun as it is to work with free body diagrams and simulate control systems in Matlab (SimuLink), the development and iteration cycle with physical product is a lot longer, and you end up spending months designing eg a ball bearing. On the other hand, with software, you can get a lot further a lot faster, and it becomes a constant cycle of near-instant gratification.