How does Codelf help you to name function/variable better?
Tags: opensource, github
Published: 2019-10-10 02:58:26


Do you have the problem to make a function/variable name? Of cause you do. It does not matter how long you’ve been written codes. Naming things is hard. Especially for developers.

Plih Karlton said, “ There are only two hard things in Computer Science: cache invalidation and naming things.”

![](https://cdn-images-1.medium.com/max/1112/1*mc8uC4LU1vjhB0Ii1HR8GQ.png)

> [**bliki: TwoHardThings**](https://martinfowler.com/bliki/TwoHardThings.html)
>
> <small>There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton Long a favorite saying of mine, one for which I couldn't find a satisfactory URL. Like many good phrase, it's had a host of riffs on it.</small>

> “The results were based on 4,500 votes developers provided on Quora and an older [Ubuntu Forums thread](http://ubuntuforums.org/showthread.php?t=690304). Naming things got (just about) as many votes as the next 8 hardest tasks combined. Wow!”

> [**Don't go into programming if you don't have a good thesaurus**](https://www.itworld.com/article/2833265/cloud-computing/don-t-go-into-programming-if-you-don-t-have-a-good-thesaurus.html)
>
> <small>Last week I wrote a piece about the hardest tasks programmers have to do. It was based primarily on a recent discussion thread on Quora. Based on the responses and the votes, there was a clear number one, hardest task for software developers: naming things (e.g., variables, classes, functions, procedures, etc.).</small>

And more and more developers have then the common problem, they keep commenting on Reddit.

<iframe
                width="600"
                height="400"
                src="https://cdn.embedly.com/widgets/media.html?type=text%2Fhtml&key=a19fcc184b9711e1b4764040d3dc5c07&schema=reddit&url=https%3A//www.reddit.com/r/ProgrammerHumor/comments/2f2on0/programmers_hardest_tasks/&image=https%3A//i.embed.ly/1/image%3Furl%3Dhttps%253A%252F%252Fb.thumbs.redditmedia.com%252FjbtAg23UsYIJv6AFEDEn3xPup4Unf-43BUQgHiC5Qos.jpg%26key%3Da19fcc184b9711e1b4764040d3dc5c07"
                frameborder="0"
                allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
                allowfullscreen
              ></iframe>

Believe or not, there is a search engine called Codelf save your time when you have the problem to name function/variable. It’s the first tool out there try to solve the hardest problem for developers. The engine powered by [Search code](https://searchcode.com/).

![](https://cdn-images-1.medium.com/max/2976/1*MldM2WC1BfevXS9XmafXvg.png)

> [**CODELF**](https://unbug.github.io/codelf/)
>
> <small>Best GitHub stars, repositories tagger and organizer. Search over projects from Github, Bitbucket, Google Code, Codeplex, Sourceforge, Fedora Project, GitLab to find real-world usage variable names.</small>

It’s open source and popular, it gets more than 8k+ stars on GitHub.

> [**unbug/codelf**](https://github.com/unbug/codelf)
>
> <small>codelf - Best GitHub stars, repositories tagger and organizer. Search over projects from Github, Bitbucket, Google Code, Codeplex, Sourceforge, Fedora Project, GitLab to find real-world usage variable names</small>

It just like any other search engines, you give it a keyword, it gives you the result, the difference is it only gives you real-world usage variable names. It searches over projects from GitHub, Bitbucket, GitLab to find them.

![](https://cdn-images-1.medium.com/max/1472/1*ZExRy7irPD27wsLjv1JMdg.png)

You even could choose your favorite language. You can also view the source codes too, and it will highlight where the variable name is using.

![](https://cdn-images-1.medium.com/max/1088/1*4uswFnizaxLV9QI_eBvY8w.png)

The most fun part is, you don’t need search with English keyword, search with your mother language, Codelf will translate it to English then search for the results.

![](https://cdn-images-1.medium.com/max/1578/1*FSh2C7pKCDOK4FEZF5gt-g.png)

Codelf is really nice to every developer, there are plugins for VSCode, Atom, Sublime Text and Chrome app.

![Fro VSCode](https://cdn-images-1.medium.com/max/2084/0*PygMwFiXrvAmc7Nc.png)

![For Atom](https://cdn-images-1.medium.com/max/2510/1*zTxspz6tOQFJV1vJrCeO_w.png)

Code + Elf = Codelf. Means there is an elf side by side when you are coding. Isn’t it so cute?