GitHub’s New Code Search is Bad for Finding Code

GitHub's New Code Search is Bad for Finding Code

Just a few days ago (May 8th, 2023) – the GitHub team published a blog post saying that the new GitHub Code Search feature is generally available. What they meant to say is that Code Search is no longer an optional feature preview, but every GitHub user is now stuck with it. To each his own, of course.

What’s interesting to me about this is that back in February, I made a comment on one of the GitHub feedback threads, I made it clear that not being able to sort code by new is a serious issue, so I disabled the preview. This was rebuked by colinwm, I’m not exactly sure who he is, but he is part of the project. In his own words:

The vast majority of people don’t sort by new. Okay then…

github amazing code search

My own comment (I was the first to comment, so fortunately for me, that comment is getting the GH team’s attention no matter what) that I made in the new thread also got some likes and feedback from the community. And if you scroll down in the same thread, there are more comments saying exactly the same.

Instead of replying to me directly, someone from the GitHub team made a comment on Hacker News,

(I work on code search.) Yeah, sorry about that. We’ve heard this feedback a lot. There’s two reasons why we haven’t implemented this. First, content is shared between repositories which makes this harder than before, when it wasn’t. Second, we rebuild the index weekly or even more frequently, so the proxy of “when was this added” that was used doesn’t work any more. What we would like to use is “when was this blob added to this branch” but that’s extremely expensive to retrieve from Git because Git trees don’t record it.

That is actually a pretty good response. It’s not downplaying my feedback (looking at you, Colin, I even emphasized one part in particular just for you.) and there is clearly a technical challenge to get this feature out.

How important is the ability to sort by new?

It’s pretty darn important. I don’t use GitHub for work, so for me – the actual new features are kind of whatever. From what I have seen, there are plenty of bugs in those as well. But as someone who writes code, who writes blogs, and who tries to keep up with the latest tech – the ability to sort code by new is pretty critical for my use case.

Let’s check out some awesome LangChain code that’s been published today.

As you know, GitHub now lets you use >YYYY-MM-DD format to check out the latest and freshest code on the same day it’s pushed out of the oven!

Now that is some delicious code, wouldn’t you agree?

Let’s check out some cool and awesome Python projects (let’s give GitHub a chance and go back a day, we don’t mind our code having sat on the table for a day!) based on the GPT-4 model. Are you excited?

That is so awesome. And maybe Colin is right. Maybe nobody uses GitHub for this, and it’s just me and those few other people that I showed in the screenshot earlier. Anything is possible, except finding code.

The Advanced Search feature is also busted. It doesn’t save your history for what you were searching in the first place, so the first time you use it, you will put in all the settings, and it will reset your original query.

I’m not sure what was the rush at GitHub to push this out in the state that it is, but I do hope that this will get addressed because I would hate not being able to use GitHub how I have always used it.

Previous Post
Best WooCommerce Organic Shop Themes

10 Best Organic Store WordPress Themes

Next Post
Video Conferencing Tools for Small Business

The 5 Best Video Conferencing Tools for Small Business

Related Posts