Two Wrongs

(don't make a right)

How Much Does an Experienced Programmer Use Google

by ~kqr

I often hear beginners ask, "Is it okay if I use Google a lot?" while they nervously throw glances around the room.

The answer couldn't be a more emphatic yes.

Google is an essential part of every software developers' job. The kind of people that need to do a lot of thinking on the job are called knowledge workers, and it's been suggested that knowledge workers spend 40% of their time looking for information. In other words, almost half of your job as a software developer is about being skilled with Google.

I've been making software for over ten years, and that's what enables me to eat every day. JavaScript is not my main language, but I do use it sometimes in as part of my work. Recently, I needed to develop a little 15-line script to figure out if one of my ideas worked. Here are the Google searches I did.

  • javascript random
  • javascript put string in html element
  • javascript add to list
  • javascript element from id
  • javascript array length*

Granted, I could probably remember some of those if I tried really hard, but it's much easier to look them up.

So for 15 lines of code, I used Google 5 times. That's once every third line. I'm no expert – I'm especially no expert in JavaScript – but I am a competent software developer. Google is okay.

* Getting the length of a sequence is something I'll never remember for any language, because they all do it differently. There are usually four alternative names: len, length, count and size. Sometimes it's a method or field of the object, and sometimes it's a standalone function. In total, that's 12 combinations, only for the most common alternatives. To give concrete examples, I've used all of the following:

  • sizeof(seq)/sizeof(seq[0]), C, statically allocated;
  • strlen(seq), C, null terminated;
  • len(seq), Python;
  • length seq, Haskell;
  • (count seq), Clojure;
  • seq.length, JavaScript lists, Java arrays;
  • seq.size(), Java sequences, jQuery expressions (deprecated)
  • seq.count(), Django querysets; and
  • SeqType'Length, Ada arrays

I've probably forgotten some, but please excuse me if I don't remember the ones I need when I need them.

If you enjoyed this article, you might like others tagged with