7 ms·
Currently I'm working on a few different developer tools, as part of my continuing mission to make my own life easier. I figure they're probably cool because if
by philbo 13y ago
Currently I'm working on a few different developer tools, as part of my continuing mission to make my own life easier. I figure they're probably cool because if I'm scratching my own itch then I should be scratching itches for other devs too.
* GitHubReminder - serendipitous email reminders about your starred repos on GitHub. https://githubreminder.org/ https://githubreminder.org/
* JSComplexity - code complexity metrics for JavaScript. http://jscomplexity.org/ http://jscomplexity.org/
* CoffeeComplexity - code complexity metrics for CoffeeScript projects (still in development).
* GrepSrc - regex-based source code search engine (still in development).
- mercuryrising 13y agoFor JScomplexity, you should round your complexity values :). Halstead difficulty: 4.666666666666666 Halstead volume: 55.506595772116384 Halstead effort: 259.0307802698764 Do you do storage on the back end? Can you target a particular open source project to analyze it? Can you target languages other than JS? Make a Github bot that makes pull requests that analyze a project's complexity, areas where it's more complex (refactor), areas where there's fluff, projects that don't follow 'standards'. That'd be cool if it was an opt-in thing, like I add a "ComplexityBot.MD" blank text file, complexity bot comes by, analyzes my project, pull requests the complexitybot.MD file, gives me some nice data, comes by again whenever it gets some down time and updates the analysis.
- philbo 13y agoYeah I should, you're right. I'm working through a huge to-do list on that and CoffeeComplexity right now, but I'll add that on the pile too. :) There is no storage on the back-end, it just calls a little node library that I wrote and spits out the result. The work to target other languages is underway, I've split out the AST walking to a separate repo, so it just requires writing a walker implementation for the target parser and you're done. The CoffeeScriptRedux walker is currently in development, with LiveScript planned for after that. So I met a guy recently who is building something similar to the ComplexityBot idea you describe. It's called sidekick and looks pretty awesome from my initial play around with it. * https://www.sidekickjs.com/ https://www.sidekickjs.com/
- mtdewcmu 13y agoHave you tried using Lucene for the source code search engine?
- philbo 13y agoIt's still pretty early days with it at the moment so things are liable to change, but I have elastic set up right now. I'm completely new to search though, so I don't really know the ins and outs of different solutions. Plenty of time to learn though, as I'm still working on the crawler part right now.
- mtdewcmu 13y agoGoogle wrote a regex code search engine based on trigrams, and you can download it[1]. I don't think Lucene supports regexes, but it can do some somewhat simpler pattern matches, and I don't necessarily see why regexes are necessary for searching code. Lucene does a lot more for search than match strings, and I don't necessarily see why searching code is fundamentally unlike searching other kinds of documents, so a lot of those features might help you get much better results. [1] http://swtch.com/~rsc/regexp/regexp4.html http://swtch.com/~rsc/regexp/regexp4.html