GitHub code search is generally available
github.blog
github.blog
credit to Microsoft for rehabbing their reputation with developers but it seems like a massive trojan horse
But do they? In my day job, outside of the occasional use of Visual Studio and developing on a Windows machine, I use no Microsoft products for development.
> credit to Microsoft for rehabbing their reputation with developers
With a fair number of younger developers, but certainly not all. Most devs I know don't think of Microsoft any more kindly now than in the past.
GitHub is the defacto "point" of software these days, with most devs jumping to that before anything else.
VSCode is the highest ranked editor from the StackOverflow 2023 survey, with (IIRC) something akin to 70%.
Azure is the icing on the cake, because now you have an entire generation of developers building on GitHub, from VSCode, and deploying onto Microsoft infrastructure.
That said, the numbers are hard to compare because they allow selecting multiple choices and they split the JetBrains products up, while VSCode is considered as one tool.
If you add together all the JetBrains products they reach 94%. I expect there's a ton of overlap that brings that number back down, but it's enough to make me suspect that VSCode's lead isn't as high as the numbers in the survey make it look.
[0] https://survey.stackoverflow.co/2022/#technology-most-popula...
According to your comment history, you are using JavaScript or used it in the past at least, which usually means you've used npm, which is owned by Microsoft.
And since lots of "young" developers use JavaScript and TypeScript, most of them are also interacting with npm.
Microsoft has captured maybe a larger part of the developer market than you realize. Not by being amazing or with "Microsoft <3 FOSS", but by buying up lots of the market.
Then Dependabot for large swatches of more developers outside of the earlier mentioned ecosystems. LinkedIn for everyone's career.
GitHub? fair
OpenAI? how is this a part of dev. ecosystem?
Vs Code? wtf? there's a lot of other IDEs/editors and many would argue that they are better
>embrace, extend, extinguish strategy with WSL
They are EEEing their product - Windows?
VS Code is hugely dominant in terms of IDEs used by developers per the StackOverflow survey. It commands more than double the percentage of the next most used… and the second place is Visual Studio.
https://survey.stackoverflow.co/2022/#most-popular-technolog...
Also, I suspect that most people who mark a JetBrains IDE also mark a secondary editor that's lighter weight, but it's hard to tell how that all breaks down with the way they present the data. I spend about 90% of my work day in WebStorm and occasionally move over to VSCode for loading a large directory that I don't want to index. When I filled out the survey, due to they way they worded it, I marked both tools.
Those numbers are a bit misleading because they split up the JetBrains products, making JetBrains look like a smaller market than it actually is. If you add up all their tools, they hit 94% to VS Code's 74%. Obviously there are a lot of people using multiple JetBrains tools and that bloats that number, but the huge difference demonstrates how flawed SO's numbers are for gauging market share. Also, I suspect that most people who mark a JetBrains IDE also mark a secondary editor that's lighter weight, but it's hard to tell how that all breaks down with the way they present the data. I spend about 90% of my work day in WebStorm and occasionally move over to VSCode for loading a large directory that I don't want to index. When I filled out the survey, due to they way they worded it, I marked both tools.
If you haven't already, would you mind reading about HN's approach to comments and site guidelines?
Add Comment lolinder 11 days ago | parent | context | on: GitHub code search is generally available
Those numbers are a bit misleading because they split up the JetBrains products, making JetBrains look like a smaller market than it actually is. If you add up all their tools, they hit 94% to VS Code's 74%. Obviously there are a lot of people using multiple JetBrains tools and that bloats that number, but the huge difference demonstrates how flawed SO's numbers are for gauging market share. Also, I suspect that most people who mark a JetBrains IDE also mark a secondary editor that's lighter weight, but it's hard to tell how that all breaks down with the way they present the data. I spend about 90% of my work day in WebStorm and occasionally move over to VSCode for loading a large directory that I don't want to index. When I filled out the survey, due to they way they worded it, I marked both tools.
If you haven't already, would you mind reading about HN's approach to comments and site guidelines?
> They are EEEing their product - Windows?
No, Linux obviously.
First they like and integrate Linux into their own products. Azure, WSL and others.
Then, they provide extensions that are closed-source on top of those.
With the goal to extinguish the original project so they have more control over the direction.
I did just now learn that systemd was finally added to WSL. Originally that was never going to be added and back in the days of WSL 1 I remember the WSL writing blog posts about that being ridiculous. Who knows, proper container support might be added soon.
Microsoft has also already added proprietary extensions to WSL2, like the integration with the VSCode remote development plugin and DirectX passthrough for machine learning and maybe other things (there's a DirectX driver on Linux which is usable only on WSL guests).
And if you run WSL, you usually end up with a special kernel, it's not just the upstream one without changes.
Both my Arch and Ubuntu WSL is on kernel `Linux desktop 5.15.90.1-microsoft-standard-WSL2` rather the ones the distributions ship with by default if installed normally. This is the one they ship via Windows Update which you end up using on WSL: https://github.com/microsoft/WSL2-Linux-Kernel
Watch them slowly make it different than the upstream one, without contributing patches upstream.
Notice how, as much as .net core is cross-platform, the desktop UI side of MAUI is absolutely not, and left 'to the community'.
They do not want to enable desktop developers under Linux, as they know that a decent environment would likely remove any need for Windows in that space.
Yes, they have expanded in many ways - but developer tools/languages/IDEs/libraries is their bread & butter.
The famous “Developers Developers Developers” by Steve Ballmer.
at a high level they pretend to embrace open source but many of the best features of vscode are closed source, such as remote editing and various language servers (pylance, etc.) the lsp saga is particularly unfriendly, since they pushed it as an open standard, tons of people contributed and adopted it, and then they closed the source to their most valuable language servers, making them only compatible with their product (vscode).
there are countless similar examples. the way i see microsoft and the way they want to be perceived are entirely different.
After all, the capabilities of ChatGPT are basically proportional to how well a topic is represented in the training data, which is largely the internet.
If anything is classic EEE of what you listed it’s GitHub, given it’s basically a series of extensions on an open standard. Its Linux EEE program is Azure where Microsoft sells you a Linux server running in its datacenter in fancy ways that lock you in.
I feel Microsoft’s monopoly around development is not that strong and it’s not terribly hard to completely avoid them.
Open source would be a lot healthier if social proof were portable across platforms.
And it also gives a good indication what common de-facto standards are within an ecosystem.
They already run a .NET stack....
With Code Search, I have:
* Rewritten a CMake build system, which would have been practically impossible without access to real-world examples because of how poorly designed and documented it is;
* Validated machine-generated translations by looking up language strings from projects that used human translators;
* Tracked down bugs in unfamiliar codebases, using symbol-based navigation, without the downtime of fetching a bunch of files and waiting for a language server to process them locally;
* Reviewed how projects were using the APIs of a library I work on to determine whether high-maintenance features were actually used, and whether tricky features were being used correctly or needed redesigning to reduce programmer error
Kudos to the team at GitHub. Genuinely stellar work.
For translations I would search a phrase using `<phrase> lang:"Gettext Catalog" path:/<language iso code>/`.
For reviewing library consumers I would just search for `<my library name> (<function name> OR <other function name> OR <third function name>) NOT path:<my library name>/**`.
There may be better queries for some of these, but I really didn’t have to do any magic or weird tricks. Everything more or less just works.
Searching how an API is used.
Searching how people configured something.
Searching accidental uses of an attribute:
https://github.com/dotnet/csharplang/discussions/5657#discus...
The previous standard GitHub search I found to be remarkably bad. I would be looking at some small public repo, search for an exact string match I know exists in the code, scope the search to that repo only, and still see zero results. Even copy-pasting a line of code from a file in the repo often resulted in zero matches.
I can see how it would be handy to search a codebase online, especially one you don't have cloned locally, but for my own codebases, I can search the entire thing just fine in VS Code with ctrl-shft-f.
It's also great if you drank the GitHub kool-aid as you can do a single search and find related code snippets, issues, pull requests and discussions that could possibly help. I'm personally not to big into the ecosystem, in fact I'm considering moving to Fossil so I can have everything inside the repo, but for those who are it's a great feature.
GitHub code search pretty much solves that. For any API you can find an example of someone else using it.
I've been using it for this for a year now and I wouldn't want to live without it.
Amazing. This was the light bulb moment for me. I work at [big tech co] and we have an internal code search tool, and anytime I need to use a new API I pull it up to find examples of how it's used.
Now I can do this for the entire world of OSS, amazing.
Searching for non-documented or badly documented API, find implementation of an algorithm or specific pattern, find how people are using a niche tool, etc.
I have even used it to find my own API in the wild to look for potential breaking changes and improvements to do.
For more info on how we built this, you can check out our technical blog post from a few months ago https://github.blog/2023-02-06-the-technology-behind-githubs...
(Pleeeease make the right click context menu just be the normal default menu though, I (apparently) "Right-click > Back" a lot when using a mouse rather than a trackpad and I keep getting that goofy Emoji dialog.)
lang:tsx /<Button[^\\].\* color="red"/
Example:https://github.com/search?q=lang%3Atsx+%2F%3CButton%5B%5E%5C...
Edit: correction it looks like that's been fixed since last week, nm
The old code search had the ability to sort by indexed date. This wasn't perfect, but it was something.
I like keeping up with who's using my code and whether they're leaving comments or commit chains that outline trouble they're having with it. Sometimes old code pops up in the recently-indexed sort, but if I regularly search and look at the top page, I can see most new uses.
Without it, code search is basically useless for this purpose :/
Barring that though, the equivalent of a post-commit git hook that updates the DB with 'when this blob was added to this branch' and then run a backfill-enough job.
The easy answer, though, would seem to be keep a copy of last week's index, and run the query twice and figure out a way to efficiently compare results to figure out if something is this week's but not last weeks index.
Also of note, "when was this blob added to this branch" isn't even actually the same as git blame, which means that if a file was touched that matched the search but the latest change to the file doesn't affect the matching line of code, it'd show up as recent, which is not what the user wants.
I am working with .NET and .NET has seen lots and lots of changes in the past years. I often have to see the usage of a library in the current form of the .NET ecosystem, instead of say, an outdated .NET Framework project from 5 years ago.
Is there any equivalent for doing such a search in the new Code Search?
[1] https://tree-sitter.github.io/tree-sitter/
https://stackoverflow.com/questions/43891605/search-partial-...
It's been almost 6 years, though... for a search scenario that would be trivial to implement with grep (at scale that's another thing...) Still, a nice example of perfect being the enemy of good, I guess.
"today, our new code search and code view are generally available to all users on GitHub.com"
Scale. You can read more about their engineering at https://github.blog/2023-02-06-the-technology-behind-githubs...
Though GitHub will probably have all the same features eventually and cheaper too.
it's mind bogglingly insanely good compared to the garbage that was there before for years and (I think) still is in Azure DevOps.
Why is this an issue? I do have a clone of all my company repos, doesn't everyone? Memory is cheap and ripgrep/ag are fast.
Bitbucket has a 2GB max size on each repo, I'd suspect other providers have similar restrictions. Would be a problem on mobile but repos that hit that limit are rare.
> Whoa there!
> You have exceeded a secondary rate limit.
> Please wait a few minutes before you try again; in some cases this may take up to an hour.
Requiring an account makes rate limiting vs botnets easier.