Live data from Hacker News

GitHub Code Search – Programmers' Goldmine

jakubdziworski.github.io

51–60 of 63 posts

Re: GitHub Code Search – Programmers' Goldmine

#51
post #30

Shameless plug: there’s also Debian Code Search at https://codesearch.debian.net/ . It’s based on the same idea as Google Code Search (using regular expressions sped up by a trigram index) and indexes everything that is available in Debian sid. If your search on GitHub isn’t fruitful, consider giving Debian Code Search a spin. Disclaimer: I built it. Happy to answer questions if you have any.

It shares the biggest problem of Github code search. Duplicate results.

Re: GitHub Code Search – Programmers' Goldmine

#52
post #51
post #30

Shameless plug: there’s also Debian Code Search at https://codesearch.debian.net/ . It’s based on the same idea as Google Code Search (using regular expressions sped up by a trigram index) and indexes everything that is available in Debian sid. If your search on GitHub isn’t fruitful, consider giving Debian Code Search a spin. Disclaimer: I built it. Happy to answer questions if you have any.

It shares the biggest problem of Github code search. Duplicate results.

Partly this is because DCS is indexing Debian sid, in which multiple versions of packages can be present (due to transitions):

$ curl -s http://ftp.ch.debian.org/debian/dists/sid/main/source/Source... | zgrep '^Package: git$' | wc -l 4

If we didn’t index Debian sid, you’d only get one version per package, but also the results wouldn’t be as fresh.

You can follow one of these two issues: https://github.com/Debian/dcs/issues/40 (at most 1 result per package) https://github.com/Debian/dcs/issues/49 (limit by suite, where you could search something else than Debian sid)

If you have any other ideas about how to address the issue, please let me know.

Re: GitHub Code Search – Programmers' Goldmine

#53

I wonder how feasible it would be to implement a higher order programming language based on searching code snippets. If it could be made to work, it could potentially speed up development time by an order of magnitude.

Order of magnitude? How could anyone possibly know this if it doesn't exist?

It could just as easily turn out to be no better than CASE or rational or any other junk that's come before.

Re: GitHub Code Search – Programmers' Goldmine

#54

More than a programmer's goldmine, this is Github's. Stack Overflow is trying to become the go-to for sample code and documentation, Github could have a lot to offer in a partnership.

Considering most devs copy and paste code from SO, I would say they don't need github at all.

Re: GitHub Code Search – Programmers' Goldmine

#56

I wonder how feasible it would be to implement a higher order programming language based on searching code snippets. If it could be made to work, it could potentially speed up development time by an order of magnitude.

Order of magnitude? How could anyone possibly know this if it doesn't exist? It could just as easily turn out to be no better than CASE or rational or any other junk that's come before.

Well, theoretically, it would make it possible to abstract away writing traditional fine-grained code, just like our languages today abstracted away assembly, which in turn asbtracted away flipping mechanical switches.

Re: GitHub Code Search – Programmers' Goldmine

#57
post #2

This is what I've been using as of late to learn new technologies. I always seem to forget to tell younger developers about using this approach to learn. Something else I would add is that you should try to find well known OSS contributors that work on projects that use tech/languages you use. If you monitor their projects you can pick up great habits from reading through their code.

Sounds like a great approach. Can you (or anyone else) recommend contributors to follow?

I usually watch the Apache projects.

Apache Arrow (https://github.com/apache/arrow/) is very interesting and promising project. It is in early state; you can watch the design decisions taken and how they are implemented. Plus it is multi-language project, you can find code in C++, Java and Python.

Re: GitHub Code Search – Programmers' Goldmine

#59
post #27

Earlier quoted context omitted.

And what is the simplification? I can't see it in your git repo

"Percentage: {:.2f}%".format(foobar * 100) vs "Percentage: {:.2%}".format(foobar)

its actually harder to read, in my opinion, since the % character is often used for formatting,eg '%s' % somevar.

personally, i dislike such spammy prs. it adds nothing to my code, and its not like accepting the pr is going to attract you as a developer on my code.

Re: GitHub Code Search – Programmers' Goldmine

#60
You can do even more now that all github public data is publicly available on Google Big Query [1] [2], where you can use not only SQL commands but also code (JS) [3] to search for anything on github.

There was a small lag between repo code and the dump done on Big Query (some days) last time I checked, but it seems that the delay has been getting smaller and smaller over time.

[1] https://cloudplatform.googleblog.com/2016/06/GitHub-on-BigQu...

[2] https://changelog.com/209/

[3] https://cloud.google.com/bigquery/user-defined-functions

Post reply on HN