David Cohen

Sourcery - Grammarly for code

Sourcery instantly reviews your Python code and refactors it, making it cleaner and more readable. It’s like having a pair programmer always working next to you. Install into PyCharm, VS Code, or your GitHub repos in 1 minute. It's free!

Add a comment

Replies

Best
Teddy
This is amazing! Congrats on your PH launch team! Are you saying that Sourcery will auto-suggest improvements on my GitHub repos directly 🤯? Interested to hear more!
Tim Gilboy
Thanks @_teddy !! And exactly. If you add Sourcery to your GitHub repos Sourcery will automatically review any new pull request you make. Or you can have Sourcery review your entire repo anytime you want from your Sourcery dashboard. We're Python only for now - so we won't review sections of your repos in other languages - but we'll get there in the future :)
Jimi Desmet
Considering how coding can be so tedious, this product is much needed. Have you had feedback on the accuracy of the suggestions Sourcery makes?
Tim Gilboy
@jimi_desmet great question! In general we see roughly 97.5 suggestions accepted to every 2.5 rejected. But many of these rejected suggestions aren't inaccurate, but might be changes that a developer doesn't want to make at a certain time. For example we might suggest that you inline a variable that is defined and immediately returned, but you may want to reject that suggestion for now because you're using that variable for debugging. But that's not to say we're perfect (although we're trying to get closer :) ). We still occasionally get the bug flagged for a refactoring that would change the outcome of the code and then we immediately work to fix that and make sure that situation doesn't come up ever again.
Rogier
Congratulations on the launch! I see you are offering a solution for teams as well. How does Sourcery help make life easier for engineering teams? Can you share more about your plans / roadmap for this product?
Tim Gilboy
@rogiervanwilligen thank you! Teams can use Sourcery individually in their IDE to get instant feedback while they're working on their code. Or they integrate Sourcery into their GitHub organisation and Sourcery will review every new pull request they make. You can think of it as a first layer of the code review process. You can also add Sourcery in as a pre-commit hook or as a script in your CI so every new commit will be reviewed and improved before it's merged. In terms of our plans for the next few months we're primarily focused right now on making Sourcery more powerful - increasing the number of suggestions we make and handling more libraries and frameworks, expanding our analysis to the class level (thing like extracting methods and constants to start, then more complex refactorings), and building out more tools to help you handle duplicate code across your project. Then we'll focus on more integrations and in depth support for teams and likely start focusing on other languages.
Aleks Bochkov
Brilliant idea! Congrats on the launch 🚀
Tim Gilboy
Thanks @bochkovaleks !!
Maurice Iwunze
Shared the product with our tech team, they love it!
Tim Gilboy
@maurice_iwunze thanks for sharing it with them and thanks for the feedback!
Manthankumar Satani
This is excellent, Congratulations,
Tim Gilboy
@its_mnthn thank you! Glad to hear you like it :D
Subhendu
Looks amazing. Just wondering how different it it from https://jshint.com (Tho this is just for JS, but from the concept perspective).
Nick Thapen
@thisissubhendu Thanks! Hadn't seen JS Hint before and it looks cool. The main difference in concept I think is that whenever we see an issue, we always suggest a code change you can implement right away. We've seen that with lots of tools you can get kind of overwhelmed with warnings if you're not sure how to fix them. We want our changes to be actionable straight away.
David Anderson
Just works!
Nick Thapen
@ukwiz That's what we love to hear!
Steve
Great, looking for javascript!
Tim Gilboy
@stefano_marchetti definitely something we're planning on adding in the future. First we want to make Sourcery more powerful for Python and build out some of our more complex code improvement tools. But then the plan is to start supporting other languages and javascript is one of the first on the list :)
Tinks
This looks fantastic - how exciting! I was wondering, will there be a Sourcery community where users can come together to talk, share practices or just connect? Look forward to seeing the journey, well done!
Tim Gilboy
@tinks1 thanks!! We don't have anytype of community yet - but it's something we've thought about. There are only 3 of us on the Sourcery team right now - so trying to find the bandwidth to do everything we want to do!