I would buy an electronic copy as an ebook or borrow it from a library...
I agree. It has gotten to the point that I get all books in ebook form so I can read and code by switching back and forth when meddling with a project idea.
I've also found that owning a tablet makes ebooks feel much more bookish. I never much liked reading from a monitor, but I dont find that with a tablet, especially with a high DPI screen.
Now I do love being able to copy/paste though. I think it's fairly safe to say paper books are dead to me at this point, which is kinda sad.