Using Google for Programming

Is Google the ultimate programming tool? 


Five years ago, given a project in a new environment, you would get several books on the language; you would get a manual or two (possibly online) on the frameworks and libraries. Then you would learn the language and libraries by trial and error, and, after considerable blood sweat and tears, would be able to program in that environment at a professional level. But that's all changed now...


No longer is it so hard for a programmer to move to a new environment. We still need a book (usually obtained online) to learn the language basics. But now, all of the things that used to be hard tend to be written up on the web in response to other people asking questions. If StackExchange hasn’t answered a question, it is probable that somewhere there is a forum discussion, a programming manual, a blog or something else with an answer of one sort or another. 


So, for example, the other day I needed to know how to convert a Java ‘PrintStream’ object into a string. Although it’s clearly something one might want to do, it’s not obvious how. So I Googled it and sure enough came up with a magical piece of code, very neatly and tightly written, that someone had submitted in response to a similar question. Job done in three lines; I was ready to carry on.


So what does this mean for a real programmer? The inescapable conclusion is that for programming we've all got to be experts at using Google! I studied this sometime back – for using search engines is a skill in itself. I wrote a lighthearted paper with James Noble on the subject; that paper is still as valid now as it was when we wrote it many years back. The tricks are: to think of words or phrases – preferably unusual ones – that would appear in the answer; and to iterate, like a ‘bumblebee’, going from search page to result and back, to develop a knowledge of what those phrases are. And to keep a personal list of websites that may be better suited for specific kinds of enquiry.


Another useful trick I’ve learned recently is using a minus before a word or phrase to remove cluttering results. So if I’m looking for the programming language ‘Scala’, I might add –“La Scala” to remove references to opera.


Of course, we’re professionals, and Google searching can take a lot of time and sometimes delivers nothing.  So we need a further armoury of things to do when Google doesn’t help.  We can:

  • Ask a colleague. It’s too easy to get wrapped up in a problem, and forget that another mind may be able to give you a quick answer, or just help us rephrase the question. 
  • Ask in a relevant programming forum. Most well-used forums have people who are delighted to show their expertise by answering questions.
  • Use paid support. Though typically slower, if we pay for support from a professional service, they’re likely to find you some sort of answer. 

Or finally, we can:

  • Abandon the quest and find another way to solve the problem!

But in general, I find that picking up a new language and knowing the erudite and difficult things to do with it has suddenly become easy. Google and the programming forums have changed programming knowledge from arcane to readily available to anyone.


This is valuable to any development team as it allows programmers to move from one project to another much more easily.  Though alas Google helps much less with the core skills that make us professionals:  negotiating functionality, estimation and planning, writing tests, communicating with other teams, handling issues, and generally reliably delivering on time and to budget.  


Still, we are all expert programmers now; Google makes us so.


- Charles


 Text by Charles Weir, copyright (c) Penrillian Ltd, used by permission.