There are multiple scenarios in your question. Your final objective is to run Xcode 4.2. Since Xcode is free, you can always try an Apple Store, they may be able to give you a hand with that and install the SL version for you if you charm them enough. That's the simple route, never underestimate an Apple store.
If you want to go ahead and install a Lion, you can connect any external drive (8GB Penn Drive won't cut, too small, too slow), you should rather get a cheap USB2/FW800 (if your hardware supports it) 500GB drive (or even less) and you could use that as the installation drive (make sure it's connected when you boot your Lion's bootable media).
Another alternative (more time consuming but more "secure") is to use an external drive the same (or bigger) size as your current drive, clone your current bootable Snow Leopard into it, make sure it boots (more on this later) and then install Lion in your current drive, as an Upgrade. You can always boot back your old backup drive with SL (and clone it back to Lion if you prefer, including the "hidden" Lion Recovery Partition).
This way you know your original drive stays untouched in the Backup and you can always bring it back. I wouldn't, being so close to ML, I'd just stick with Lion for a month or so, but that's just me.
So how do you boot an external drive or a different bootable partition?
When the computer is starting (and you hear the chime), press and hold ⌥ and wait for things to happen, you should see a list of bootable media (and partitions).
How do you clone your drive(s)?
Using the very reliable and free of charge Carbon Copy Cloner. Rather simple to use.
Remember, after you make a bootable clone, always restart your computer and test the clone making sure it boots and that your data is there. You don't want to find out in a couple of weeks that what you thought was your backup, doesn't work at all.
Last but not least, if you need help installing OS X on an external drive, here's a simple tutorial.
Good luck in your Xcode endeavors!
[thisAnswer release];
Quick and Simple: Since it's a GPT disk you can run gpart recover /dev/disk1
to fix the table. You blew away the first ~700MB of the drive, so any partitions touching that area are gone too (more or less). The rest of the disk should be fine. I'm not sure if OSX comes with gpart, so you may need to download it somewhere.
The longer details: Concerning the partition(s) that were only partially overwritten, some of the files may be recoverable. The tools to do so are much more complicated and you'll be wanting to find someone who really knows what they're doing for this. If you're concerned with any of these files don't even try anything except unplugging the drive. Also, the overwritten data can probably be recovered by a data recovery service, but this would cost tens of thousands of dollars.
Also, if this was a MBR disk you'd be completely hosed unless you happen to know the exact size and offsets of all partitions. This information can be printed from fdisk, but it's best to simply not make mistakes like this.
Best Answer
No - the original state had files in specific locations and your recovery shows that that directory structure was lost.
So it sent "all the kings horses and all the kings men" to collect the parts of Humpty Dumpty but since the location of the parts is missing - it's not clear that even if you retrieved all the pieces - you would be able to get them in the correct places.
I would advise you restore all the files to a macOS formatted drive and set it aside. When you find you need to search for a specific file or text - you can use spotlight to search that drive for potential matches and copy them over to a place where you would like them to live. It's almost certain that the software you choose has instructions covering exactly how to do this operation in detail.
To summarize, data recovery isn't a substitute for a proper backup system. Those record durable and often redundant copies of file location data so you can always put things back where they belong as well as know if any one piece is missing since everything is cataloged "before the fall."