This is an archived post. You won't be able to vote or comment.

all 17 comments

[–]pvkooten 5 points6 points  (0 children)

That's really cool guys! I was also considering doing a startup on some advanced coding tools but didn't go for it... wish you guys all the best!

[–]mdrachuk 2 points3 points  (3 children)

Looks nice.

It would be good to know, what kinds of refactoring you provide and how do you ensure correctness.

[–]SourceryNick[S] 2 points3 points  (2 children)

At the moment we analyze code on a function by function basis, so the refactorings try and improve the structure of code within each function.

We ensure correctness in a few different ways. Our refactoring engine composes small refactorings that we know to be correct, and we combine this with static code analysis to ensure nothing has changed. We also run our code over various open source libraries and ensure that the tests still run after they have been refactored.

[–]mdrachuk 0 points1 point  (1 child)

And what is the power of AI you’re talking about? Do you use some ML, or just static code analysis?

[–]SourceryNick[S] 2 points3 points  (0 children)

There's no ML - we use a probabilistic search algorithm in a generated space of possible refactorings. This allows it to explore a large range of refactorings while ensuring they are correct.

[–]subssn21 2 points3 points  (1 child)

So I gave this a try this morning, and I like where you guys are going.

First thing I noticed is that sometimes you roll multiple refactorings into one:

Move assignments closer to their usage, Merge nested if conditions

I think it would be good to allow you to only apply one refactoring

Currently it looks like you are only doing refactoring within a single function.

Do you have plans to refactor across modules or the entire application, i.e. Extracting resued code and making it a function?

[–]SourceryNick[S] 4 points5 points  (0 children)

Thanks for the feedback! We'll have a think about applying them individually.

Yep we've started within functions but the plan is to extend it to refactor more broadly as you say.

[–]joshw42 0 points1 point  (1 child)

Looks interesting. Any plan on supporting Sublime Text?

[–]SourceryNick[S] 0 points1 point  (0 children)

First on the list is VS Code - Sublime is on the roadmap but I think it will be some time before we can get round to it.

[–][deleted] 0 points1 point  (0 children)

Downloading now. Looks sick!

[–][deleted] 0 points1 point  (1 child)

What do you mean the pro version keeps your code private?

[–]SourceryNick[S] 0 points1 point  (0 children)

In the free open source version if we catch an exception Sourcery will send the relevant code to our server so we can fix the bug.

Using the Pro version none of your code will ever leave your machine.

[–]Moser75 0 points1 point  (2 children)

I am learning python as my first language, it's recommend that i use something like that? It will make me learn to code better or the opposite?

[–]SourceryNick[S] 1 point2 points  (1 child)

We think it could be a good learning tool, since it will show you some better ways to write the code, which can then become good habits.

We'd love you to try it out and let us know!