A series of short stories, collected in a book, circa 1950..1958.
Protagonists name is Gallagher. In a typical story, he gets a development comission, gets drunk on beer, wakes up to discover that he has built a device, and has to figure out how it solves his client's problem.
He is accompanied by a robot that he built while under the influence. He doesn't know the purpose of the robot but does not dare dismantle it.