Once during a meeting, my manager said to us "In this age of information and the internet, everything is a search problem. If you know how to search, half your troubles are over."
As a programmer most of your days are spent editing code written by either you, or other people. These coding tasks have objectives. You need information to fulfill them. Information about your coding language, about the project your are working on, and about how it fits in the big picture of your company's success.
The places from where you could get these information can be classified into 4 categories:
- The person who assigned you this task. Your project lead or manager. If you get to pick the task instead of getting assigned, then the product owner might be this person. (If you are the product owner, then it's the business stakeholder who wants this task to be done. We aren't talking beyond this level.)
- The system. It's your company's knowledge repository. Confluence, wiki softwares etc. And other secondary places like google drive, dropbox, trello, github (source code is info too), slack, your email (recurring news coming from a distribution-list you are part of) etc.
- Other people. More often than not, you'll have to pull information from others, within your team and across teams, people in partner services, clients etc. Ping or email them or setup a meeting to get the information out.
- You. Well that's what you get paid for right? Your unique set of technical skills and the knowledge you can draw from your past experiences contribute the most to solve the puzzle at hand.
For the puzzle at hand, assuming you've got everything you need to know about it from your manager and other people, what's left is the system and you. It pays to be able to find information quickly from the system using your advanced search skills.
Here's a list of places where you could practice and improve your search skills.
- Search for a word across a project:
- search for a whole word, case-sensitive or case-insensitive
- search using regular expression
- search within a specific sub-folder
- search within a file, forward or backward
- Search for a file:
- within a project and across the system
- within current directory and within all levels of subdirectories of current directory
- fuzzy search (where you type part of the absolute path as well)
- ignoring certain files and directories (modern search tool like ripgrep can respect your
- catch-all item: google "vim advanced search" or "vs code advanced search". Read the manual and blog posts you find. Print them out, keep by your desk and deliberately practice.
- Learn to do these two items above both within your favorite editor and from terminal command prompt (
findfamily of commands).
- Search for a bug (aka debug). Ok, it's not fair to put debugging as yet another line-item. But it's still a search and you need to master your stack's best debugging tools so you can find and squash that bug.
- Your code has a lot of dependencies ('gems' in ruby, 'jars' in java, 'packages' in node etc). Your debugging rabbit hole might lead you to code within these dark zones. You need to be able to quickly search them (eg: in ruby we can run the terminal command
bundle open activerecordwhich will open the locally installed library's root path in an editor)
- Learn to navigate around your code. I use ctags in vim to go to method/class/module definitions. But VS code and sublime text have much better version of these functionalities. (I was blown away when VS code showed the css rule defined for the class my cursor was under in a pop-up!)
Jira is the most widely used issue-tracking system. Tell yourself to love it. It's JQL (Jira Query Language) is such a joy to use (because it auto-suggests unlike psql or mysql). You can create advanced queries and save them so you don't have to type the query again.
Use it quickly to find all sorts of tickets. I have saved queries for:
- finding tickets my teammates are assigned to, or even just participate etc.
- specific kinds of tickets. Eg: I often have to run a specific kind of task in production. The details are in the previous such ticket. I have a query that returns all instances of such deployment tickets.
- mentions of my project in any jira ticket in the whole company.
- mentions of a word within 2 weeks. Because in this case only the recency matters.
Once you have created and saved all the queries you can think of, go and ask your lead or other experienced person about their own saved queries. You will get a lot of ideas of how to search jira and get what you want.
And do I have to say there's also the equivalent CQL?
Most people from "English-is-not-my-native-tongue" countries don't know to use basic email features. Once you read a new mail, you process it by either deleting it or archiving it or by applying some labels and moving it off of your site.
But you can find many junior developers, especially from developing countries, keep all their mails sitting in the inbox. For years. (Just look at the "Inbox (9876)" counter). They don't know the concept of inbox or archiving. (I blame it on the words used to describe them. Instead it should be "tabletop" (or "desktop") and "basement rack-room".)
Anyway, learn the email basics first (assuming you use gmail). Because, to search it effectively, you'll first need to put things there effectively in a structured manner. Use "filter messages like this" liberally and apply labels of all sorts (emails from your immediate boss, emails from your teammates, automated emails from the services you use like jenkins, jira, code review tool etc.)
And then, learn to search it effectively.
Your coding problems aren't older than 2008 which is when StackOverflow came into existence. There's a green-ticked solution waiting just for you. In the worst case, there's somebody who've toiled hard to write a blog post detailing the solution for your problem.
You just need to ask google nicely to show that page to you. You need to know Google-Fu. Learn to search for specic words, ignore words, search within a set of websites, search for specific filetypes etc.
- Slack - here and here.
- Github - here.
- Google Drive - here. I didn't know that drive can also search the contents of the files.
- Your internal log search/parse tools. Eg: Kibana (they have KQL and LQL. And you only know SQL.)
My manager went on to say that if your company can't find a good candidate then it's still a search problem, not a lack-of-candidate problem. It then led to discussions of how to search certain websites to find the best candidates.
In the night I dreamed of him telling one of our unmarried colleague "that's a search problem too. You just need to know the advanced filters."
So... learn to ask interesting questions and also where and whom to ask them. You don't deserve to be frustrated.
In our jobs, not every day we get to write great code showing off our algorithm, data-structure and recursion skills. It's mostly CRUD. But we could solve important business problems by deliberately seeking the right information and putting two and two together. I look up to people who can do that and try to up my own search game.
Please share in comments any other 'searches' that might help us all become better at our jobs.
(Thanks to my manager for bringing this to my attention.)