Sounds like Jack Vance's Gateway to Strangeness.
Eight space trainees apprehensively await their new instructor, Henry Belt. Despite the many strange and outrageous stories they have heard about him, including his legendary drunkenness, one of them notes that all of the top men in space seem to have trained under Belt.
Since they are too many for their ship, Belt first assigns each man to build two devices using identical piles of assorted parts. Two men become utterly frustrated by the nearly impossible tasks and are dropped. The other six board a small spaceship propelled solely by a solar sail for a flight to Mars. Belt leaves the navigation entirely in their hands. All the while, he makes careful note of their faults (according to his idiosyncratic standards), recording their demerits in his little black book.
However, a mistake repairing a malfunctioning navigational device causes them to miss their rendezvous, first with Mars, then with any other planet whose gravity could halt their outward flight. (Their solar sail can only propel them away from the Sun.) Their "radio" turns out, when unpacked, to be Belt's bottles of liquor, so they cannot call for rescue. It seems that they are doomed. One man commits suicide, while two others become catatonic. Henry Belt insists that he is fated to die in space and offers no way out of their predicament.
The three remaining men come up with a way to return safely to Earth. Belt tells them that he will recommend them for advancement. As they prepare to debark, one of the trainees presents the other two with replacement parts for the navigational device. They mysteriously appeared at the end of the trip.