Can I hire someone to write code for my dissertation (if I've designed the algorithm)? Barring any extremely unfortunate disaster, I am five weeks away from a final defense and a Ph.D. 

At this point, we are in the re-write stage ("of my unforgivably horrible and weak thesis") but it is expected to work and be ready for my final defense in a month. 

Prior to the thesis, my advisor REALLY wants me to program the algorithm I give as part of my dissertation. Though I have the algorithm pseudocoded, I have no idea anymore about basic commands, data structures, counters, declaring local and global variables, and just general grammar and structure for what he REALLY wants me to program on (though I don't HAVE to): Mathematica. 

Worse, every time I try to get a dry, discrete checklist of what he wants for the program, it varies, often leading him to talk about ill about computer scientists and lament about how traditional languages just don't do the job PASCAL used to do (dead serious). Hence, the last piece of progress required of me by his say so - a piece not really contributing to my original work and that could represent time better spent revising my writing and preparing for my final defense instead of learning how to print "LEOOH WHIORLD" on MATHEMATICA - is setting up, after two years of back-cracking dissertation work, to be what ultimately "does me in." 

When (or even if) I get standards for this program he wants to see, would it be unethical of me to hire a tutor to help me code the program, or even hire a programmer to help me write the program, even given that I pseudocode the program myself? Skipping the hours and hours of manual searching to learn how to read in files (and files with gigantic matrices at that) and how to look up code corresponding to pseudocode, keep up with counters etc. really seems like a good investment for me, but my moral bells are a ringing on this one, even if I pseudocode the project myself.
Misrepresenting the hired work as your own would be inappropriate, but the following strike me as safe conditions for academic subcontracting:


Have your advisor's consent (thanks mdiener)
Find a suitable programmer and get them to understand the algorithm
Verify and document that the program operates correctly
Disclose everything in both thesis and defense