At 14, he broke into the computer science department at the University of Calgary in Canada and taught himself to write software; he later received a computer science degree there.
The title of his PhD thesis from Carnegie Mellon University was The Algebraic Manipulation of Constraints.
He has built satellite data acquisition systems, a multiprocessor version of Unix, several compilers, mail systems and window managers. As well, he has built a WYSIWYG (what you see is what you get) text editor, a constraint-based drawing editor and a text editor called "Emacs" for Unix.
But, as they usually are, Mr Gosling is insightful, friendly, and highly amusing, wearing when we met the requisite technology T-shirt du jour, Galileo. He was in Australia recently for a couple of developer conferences.
At 52, Mr Gosling is a researcher at Sun Microsystems where his main interest is software development tools. "The reason why I stay is it's filled with a bunch of nutcases. Sun is a (relatively) small organisation, so there is a culture of tolerating craziness. It is open and understanding to risk; to an idea that might not be what people are expecting."
Mr Gosling says organisations have to reward risk and not penalise failure.
"Innovation is about new and interesting things. Innovation ends up being about risk, and thinking that risk and failure are good things.
"If you know it's going to work, it's probably boring," he says. "You've got to learn to trust crazy people. It's the people on the edge that have the most interesting insightful comments."
Mr Gosling says he never orders the same meal at a restaurant. That's akin to a lack of innovation.
"You've had a bad experience, so you stick with what's safe and you order the same meal all the time.
"A lot of innovation is about ignoring past failures, which can become obstacles. Innovation is a fearlessness about risk; a lack of concern about imagined negative consequences. Whatever goes wrong will be OK; it's a positive learning experience."
The biggest mistake Mr Gosling says he ever made was to not have enough confidence in himself. Not so much the engineering side, where he clearly excelled, but in "the stuff on the edges".
"Business and marketing people would come up with a position on stuff," he says. "They seemed wrong but I believed they were older and wiser and I didn't have the confidence to question them. People you think are oracles of wisdom - they're just making it up."
Mr Gosling learnt early on that clients who hire you don't know what they're talking about. "The trick is to listen and try to figure out what the problem is to solve. (For example) a company had a piece of software to do a simulation of an oil refinery but the simulation was taking more time than the machine could stay up for. They hired me to do tuning so the computation could be check-pointed, so it could be restarted.
"But when I saw the machine, I could hear that it was too noisy - the sound of a diskpad going back and forth, so it was a hardcore hardware problem. I fixed it and the runtime went down from three days to three minutes," he says. "Their views of the solution were bounded by their (limited) view of the problem."
Before joining Sun in 1984, Mr Gosling worked at IBM. He remembers a professional development course where an expert spoke on the history of warfare. "Get a bunch of business folk and their favourite book is The Art of War," he says. "I've met a lot of military folk, and they view their job as peace but business folk view their job as war. Folk at lower levels care about their jobs and at the top levels it's warfare. That was my epiphany."
Management at Apple is different from Sun, he says. "It is as black and opaque as a company can be. They have Chinese walls within the organisation, so they don't know what the others are doing, or even know that they are working on the same project.
"We at Sun are the goofballs. We're the most open guys on the planet. We have no secrets. We talk to our customers and our competitors a lot. There's a shortage of corporate lines and public positions on things."
At Sun, Mr Gosling and his colleagues once wrote a page of scenarios of what they thought people were likely to do in terms of technology. It was like an exercise in writing science fiction, he says. "We wondered what if cellphones got more capability? What if cellphones were computers? Most people thought we were goofs but we were spot on."
And the future of the web? "Gloriously unanswerable," he says. "All the important stuff is a surprise. It's a social experiment.
"The most interesting thing about the web is its unpredictability. People tend to focus on the technology but on the web you can build anything. The question is not so much can you build it but will anybody find it interesting?"
The Gosling creed
- Reward risk and don't penalise failure.
- Innovation is about risk and thinking that risk and failure are good things.
- You have to learn to trust crazy people. It's the people on the edge that have the most interesting, insightful comments.
- Have confidence in yourself. People you think are oracles of wisdom - they're just making it up.
- Listen carefully, and try to figure out what the problem is to solve.