Anyone embarking on a career as a data scientist or any other software development related field should understand that learning is a lifelong enterprise. On the first day of bootcamp at the Flatiron school, it was stated “one of the most important things that you’ll learn here is how to learn.” And that’s because you can’t possibly learn everything there is to know about data science no matter how much time you’re given. There are always new algorithms beings developed, new languages (some of them proprietary) to learn and new applications.
Consequently, every project involves stepping into the unknown to figure out something that you don’t know. Sometimes you’ll sift through older projects you’ve worked on, youtube videos, or you might google a question.One common place to search would be the questions and answers on stack overflow. Stackoverflow is a forum for developers to share coding knowledge. The problem is you often need to read a complex question with several possible approaches when all you need is a quick line of code. In such cases, I have found grepper to be a valuable tool.
I first found out about grepper through a classmate who slacked it to our cohort. Grepper is a google extention that allows you to store code samples that you search for using your browser. It it keyed by the question you are searching for. I have found that it has saved me lots of time searching for things that are relatively straightforward. I’ll walk through how to use it.
First, download the grepper extension.
Once you’ve done so, the greper icon will appear with your other extensions. When you want to search for answers you’ve already saved, you’ll click the icon. More on that in a moment.
Generally, unless you’ve already saved an answer related to your question, your search will begin the same as any other search- through google. Let’s say for example, you forgot how to execute a groupby function in pandas. You’l begin by typing in your question:
You’ll get a page just like this:
We’ll take a look at the first page, which happens to be the documentation page for pandas itself. We’ll scroll down past the parameters until you start to see some code examples for how to implement the method you’re searching for. You’ll see in the upper right-hand corner of the code box, that black and white version of the grepper symbol appears:
Clicking on the symbol, a box pops open with the text from the example box.
You can edit the text before saving it so that the saved snippet reflects how you might use the code.
At a later time, if you want to see your saved code snippets, you can click the grepper extension icon in the upper left-hand corner of your browser:
When you do so, the grepper extension box will drop down; click “My Code Answers:
When you’ve done so, your code snippets will be listed with the most recent at the top. But if the snippet you need wasn’t the most recent, you can search for it by one of the keywords of your original google search:
When I searched using the keyword “groupby”. two snippets came up, including the one we just saved a moment ago. Next to the box, you can see the search terms you originally used to find the snippet. Additionally, on the left side, you can see that grepper supports many programming languages outside of python. It’s easy to use, and I think it’ll make your code worker easier. So have fun checking it out!