Wednesday, April 15, 2009

Searching for the Answer

It's remarkable how much time as a programmer I spend scouring the web for answers to problems or for some sort of example of the use of a function due to under-documentation. Which always brings to mind how to adequately search for solutions. The two stages are choosing your keywords carefully, and trying to find relevant results. This occurred to me today while I looking for uses of Cucumber involving seeing whether or not with_tag could take a regular expression as an argument.

The first part is trying to choose keywords. Obviously, I didn't want use just Cucumber otherwise I'd a hundred salad recipes but nothing to do with testing. (As it turns out a search for Cucumber wields links to the github repository at 2 and 4 with an article about it at 3) so to narrow my search I added the method I was looking for. After a few tries of various combinations of keywords (including Rspec, regex, :text, etc.), I found a set of results that I could search through for the answer I was looking for. Using the small blurbs of the websites included, I had to make sure that all my keywords were found within the same portion of text. In the end, after several searches I found that with_tag ('td', /#{regex}/) was possible and was able to go green with my tests.

This is a process that many of us go through at least a couple times each day, and most of the time we don't really think about what we are actually doing. We just go through the actions that we believe will get us to the most viable and relative answer the fastest. But underneath, there is a certain level of practice and skill needed to make sure that our time is not spent wasting away through piles of unrelated content, but rather quickly finding that nugget of knowledge needed to move forward.

1 comment:

  1. Good point, Turner. There is certainly an art to efficiently googling for technical details. It also helps to build up a long IM buddy list of geeks, just in case.

    ReplyDelete