It's not a "bad" idea at all. In fact, it might be rather good.
The problem is implementing it in an MSPrj file.
You need to consider how five different fields (and the values you can assign to each) will be handled by MSPrj.
Work, Duration and Units are impacted by Type. On top of that, there's also Effort Driven which controls how work is divided when a new resource is added to (or an existing resource is deleted from) a task.
Read what I wrote
here on creating a hammock task. That'll give you a start. One big issue you'll find is that it's not easy to identify when a field is using a link (there's a *tiny* triangle in the corner of the field) and it's, for all intents and purposes, impossible to determine from a field where the source data comes from. (I say "for all intents and purposes" because I couldn't find out how ... if you do find out then please let me know.)
If you do go this way then you will have to use an intermediate value for the calculated duration. Basically, set up Duration1 to contain the percentage value of Duration -- if Prepare Specifications is (by your observations) one quarter of the time that Code will take (in other words, you take 1 week to Prepare Specifications and those specifications will take 4 weeks to Code) then you'll want to set up Duration1 so that it is 4 times the value in Duration.
Here's a tip: rename Duration1 to Duration*4 to note this.
Now you use the paste link process (described in the hammock task article) to paste a link from the Duration1 field of the Prepare Specifications to the Duration field of Code.
If you change the Duration of Prepare Specifications then the Duration1 of Prepare Specifications will change and that change will be propagated to the Duration of Code. (Still with me <grin>?)
But what happens if you change the resource on Code from the experienced programer you were promised by the Resource Manager to the new hire that HR gave you?
In short, it can be done. You can also use an automatic transmission in an F1 -- but you don't because you know the driver (the PM!) can choose the correct gear (duration) better and faster than the automatic transmission ever will.