3 ms·
The primary use case I experience for searching for idiomatic usage patterns is to know how to do a higher level refactoring, meaning I don’t want results that
by mlthoughts2018 8y ago
The primary use case I experience for searching for idiomatic usage patterns is to know how to do a higher level refactoring, meaning I don’t want results that have syntax tree similarity to what I’ve got or even the small bit I start from to create the query. I want the intention of my search query but expressed in a better design.
Separately, for very micro-level idiomatic things, like use of a certain data type operation or efficient constructor patterns, I need to search by natural language descriptions of the subtle differences between options. This is what makes Stack Overflow so helpful, the accompanying natural language description of intentionality or special cases, even if the code that is found isn’t precisely what’s needed, it demonstrates directionally what to do.
This tool seems like yet another example of trying to force machine learning solutions to problems nobody actually has.
Considering the idea that I’d need to integrate this into my coding environment, I’ll say No Thanks!
- xpaulbettsx 8y ago> This is what makes Stack Overflow so helpful, the accompanying natural language description of intentionality or special cases, even if the code that is found isn’t precisely what’s needed, it demonstrates directionally what to do. You're entirely right, but if you're in an incredibly huge monorepo like Facebook, this information literally doesn't exist; that's part of the problem that Aroma is trying to solve - "how can we show people the Facebook App Way To Do That Thing, even if That Thing doesn't have current documentation" (Disclaimer: I worked on the coding environment UX for Aroma)
- mlthoughts2018 8y agoWouldn’t it make more sense to spend the effort annotating these things? Or building models to provide the annotation? I mean, I work professionally in embedding models for computer vision and NLP, and my reaction to the article is that this seems like totally the wrong approach. You’re putting all this effort to create the embedding model out of the part that is both most superficial and least human interpretable (the AST).
- franklsf 8y agoBuilding models for natural language _and_ code for either NL/intent-based code search or automatically annotating code is indeed another hot research area! I'd argue Aroma solves a different problem in that it surfaces more idiomatic patterns based on the code you already have. This also can be important especially in production environment, when you need to do things "the right way".