I did a prelim-surgery intern year. The hours are worse than medicine, but there are way less "mandatory" activities (no lectures, no endless rounding, etc.). For the most part, you're on the floor waiting for pages. I used the time between pages to write code.
Now I'm a radiology resident and have much more time.
Someone make this: a plugin for an IDE that pops up a page from a whitelist (probably of documentation, but it could be anything you want to study) whenever you compile.
Now I'm a radiology resident and have much more time.