A true laptop-esque setup is probably not possible on WP8.1 (though W10M should help there). However, if you're willing to go through Remote Desktop software, that's an option. There are two high-quality remote desktop clients for WP8 that I know of, both just called "Remote Desktop":
- The one from Microsoft is "official" and free, and should work pretty easily with minimal effort on your part, but is less configurable.
- The third-party client from Topperware (which predates the Microsoft version) has a free trial (but it's time-limited per connection), but I found it worth paying for. That one is highly configurable and tweakable, and has an excellent alternative keyboard to the built-in WP one (which is really not good for coding).
You can also try to get a Bluetooth keyboard working with the phone. That would save the screen real estate for the on-screen keyboard and would let you type a lot faster. I'm not certain if WP8.1 supports such peripherals, though (W10M does).