I would just enter the work estimates for each resource as you assignment them to the task. Project will then calculate the duration of the task based upon the Work/Units.
For the junior programmer, because there is more work (effort) required to produce a product - it will take more time (duration) to complete the task.