Live data from Hacker News

Show HN: RefactorMe – Stackoverflow for Refactoring

refactormeplz.com

11–18 of 18 posts

Re: Show HN: RefactorMe – Stackoverflow for Refactoring

#11

The name (especially the 'plz') might be off-putting for some people (i.e. me). A future idea may be to refactor your name (heh). Best of luck, I hope it takes off!

Yeh the domain name 'refactorme.com' was taken, so I had to look for an alternative.

My wife suggested the 'plz' and while it wasn't perfect it was much better than the others I thought about...so in the spirit of shipping something, I ran with it :)

Re: Show HN: RefactorMe – Stackoverflow for Refactoring

#12
post #6

Looks really great.. However I'd recommend putting a "Learn more" button, that describes the goal(s) of the platform. For example what can people post and what they cannot. I really would like to use this service but I'd also want it be clean and specific, so I know what to expect here.

Great idea. The truth of the matter though is, I don't really want to make it too restrictive.

I would love to see what people use it for and then we can kinda pivot from there.

The general purpose is, do you have some code that you think could do with some loving, post it and let's see if we can get the community to refactor it.

If enough people start using it for other things, then I would definitely shift in that direction if that's where the usage is taking me.

Re: Show HN: RefactorMe – Stackoverflow for Refactoring

#13
By the way, I would love a suggestion with finding content to beef it up a bit.

I know GH is a huge source of OSS code, but how do I (easily & quickly) find code I can use that could be a good candidate to be refactored?

Ideally, it would be good if the code didn't have too many dependencies or it would be easily understandable so I can explain what the goal is for the refactor.

I tried just searching GH for the phrase "please refactor me", but that turned up a lot of old code and crap...basically.

I would love to be able to go through some of the large OSS projects (Rails, jQuery, any other large ones) and quickly find code that needs to be refactored and preferably have an explanation.

Anyone have any suggestions for how I might be able to do that without actually fully understanding the code snippet I am referencing?

Edit: Hat Tip to pkroll for also confirming that this should be a viable strategy to get content in his comment on this thread.

Re: Show HN: RefactorMe – Stackoverflow for Refactoring

#14
This is interesting, how many languages do you support?

This can be very useful for people learning new language, for example I'm learning angularjs and javascript, I write a lot of code with them that work but I'm pretty sure they can be improved a lot by a angular/js expert.

How about a feature to open a bounty and pay real money to people who refactor the code, and only the refactoror and initiator can see the code?

Also may I ask which editor do you use in the new question form?

Re: Show HN: RefactorMe – Stackoverflow for Refactoring

#15

This is interesting, how many languages do you support? This can be very useful for people learning new language, for example I'm learning angularjs and javascript, I write a lot of code with them that work but I'm pretty sure they can be improved a lot by a angular/js expert. How about a feature to open a bounty and pay real money to people who refactor the code, and only the refactoror and initiator can see the cod…

> This is interesting, how many languages do you support?

Well..it depends on what you mean by 'support'. There are two modes. You can either make your code runnable or not. In terms of the code being runnable, 32 languages. In terms of pretty syntax highlighting, but just static code....much more than that. If you try to add a question or suggestion, you will see a dropdown list that contains all the languages. I believe it is roughly 90+ languages for static, syntax highlighting.

> This can be very useful for people learning new language, for example I'm learning angularjs and javascript, I write a lot of code with them that work but I'm pretty sure they can be improved a lot by a angular/js expert.

Hrmm...this is a very interesting perspective. I've never quite thought about it from that angle, but you are right.

> How about a feature to open a bounty and pay real money to people who refactor the code, and only the refactoror and initiator can see the code?

So I have thought about implementing the first part, and I probably am going to facilitate this.

The latter part is interesting, I guess the obvious question would be.....why would we want to prevent people from seeing the code? Because the code belongs to a proprietary project or for other privacy reasons? I am not being facetious, just genuinely trying to dig into this issue fully because I have gotten similar feedback about making it private.

So assuming we decide to allow a private feature, I guess the obvious question is...what's private? It would have to be only the refactors, right? Otherwise, no one will know what to refactor and whether or not they want to bother trying.

Taken further still, so let's assume that we can settle on a reason and mechanism to keep it private and allow the refactoror to see it, I would think that it would be in your best interest to have as many people viewing both your original post and the refactored suggestions so you can be sure the refactor that was produced is indeed the best possible refactor for your desired solution.

I can empathize with the need for privacy and keeping some code proprietary, but I guess the real question is, is it a safe assumption to make that the person that does the first refactor does the best job? Or even the person willing to jump through the hoops to see your refactor, does the best job? I would figure the only way to know is by making everything open and open to feedback from the community.

That way, if I submit something to you, someone else can build on my suggestion and we both get credit. You get the best refactor possible, and we both get credit and likely both learn.

That's my initial thinking on this stuff, but I am open to hearing other perspectives for sure.

> Also may I ask which editor do you use in the new question form?

Summernote - http://summernote.org/ - it works beautifully with Bootstrap and Simple Form (if you are using Rails).

Re: Show HN: RefactorMe – Stackoverflow for Refactoring

#16

This is interesting, how many languages do you support? This can be very useful for people learning new language, for example I'm learning angularjs and javascript, I write a lot of code with them that work but I'm pretty sure they can be improved a lot by a angular/js expert. How about a feature to open a bounty and pay real money to people who refactor the code, and only the refactoror and initiator can see the cod…

> This is interesting, how many languages do you support? Well..it depends on what you mean by 'support'. There are two modes. You can either make your code runnable or not. In terms of the code being runnable, 32 languages. In terms of pretty syntax highlighting, but just static code....much more than that. If you try to add a question or suggestion, you will see a dropdown list that contains all the languages. I be…

I tried to post a refactor request, as a C++ developer I can't help but noticing C++ is not in the dropdown list :)

> How about a feature to open a bounty and pay real money to people who refactor the code, and only the refactoror and initiator can see the code?

Privacy is the trick bit, I guess you are right there's no way to keep code completely proprietary.

I was thinking from my own experience, I have worked for big companies that have tons of legacy code that were written in subpar standard, sometimes developers were asked to refactor a piece of code written in a technology they are not familiar with. Have a refactor tool like this can serve as a mini contract to outside developers (or QA in some perspective).

Any reasonable sized company will have some rules regarding proprietary information, it's very unlikely they'll allow employee to publish company's code to an open community, so some restrictions need to be applied. However, if you want to focus on open source projects then none of this matters.

How about create a group, and only people with certain privilege can join, for example, a "Java Consultant" group that only people with >1000 reputations can join. On joining this group you also have to agree to extra terms and conditions, ie. not to disclose code you've seen or use it on your own. And when you start a refactor request, you can choose only to publish to this group, and only people in this group can take bounties (or you can choose to label your code with a particular license to prevent reuse).

It would also help if you can provide a feature that the initiator can force the refactor to provide a mini document to explain why the refactored code is better.

Re: Show HN: RefactorMe – Stackoverflow for Refactoring

#17

Earlier quoted context omitted.

> This is interesting, how many languages do you support? Well..it depends on what you mean by 'support'. There are two modes. You can either make your code runnable or not. In terms of the code being runnable, 32 languages. In terms of pretty syntax highlighting, but just static code....much more than that. If you try to add a question or suggestion, you will see a dropdown list that contains all the languages. I be…

I tried to post a refactor request, as a C++ developer I can't help but noticing C++ is not in the dropdown list :) > How about a feature to open a bounty and pay real money to people who refactor the code, and only the refactoror and initiator can see the code? Privacy is the trick bit, I guess you are right there's no way to keep code completely proprietary. I was thinking from my own experience, I have worked for…

> I tried to post a refactor request, as a C++ developer I can't help but noticing C++ is not in the dropdown list :)

It is there...just as "cpp". The "+" would mess with the form & parser input :|

>I was thinking from my own experience, I have worked for big companies that have tons of legacy code that were written in subpar standard, sometimes developers were asked to refactor a piece of code written in a technology they are not familiar with. Have a refactor tool like this can serve as a mini contract to outside developers (or QA in some perspective).

Hrmm...this is a very interesting use-case that I never quite thought about.

Perhaps even encouraging companies to increase their employee productivity by using this marketplace to refactor old code and have them focus on more valuable tasks.

Very interesting idea.

Your idea about the group is interesting. Not sure if that exact implementation would work, but I do get where you are going.

I love these thoughts.

Thanks again!

Re: Show HN: RefactorMe – Stackoverflow for Refactoring

#18
post #4

Earlier quoted context omitted.

Could be great. Couple things some obvious I'd guess: Can run the code... but, not the tests, which would make in-place refactors considerably easier. Clicking Gear for settings doesn't go back to edit window when you're done and you click the Gear again, which is how I first tried to get back to the editor. No place to set "license" specifically for each piece (and maybe a default in your account settings) making it…

> Can run the code... but, not the tests, which would make in-place refactors considerably easier. That's definitely something that I would love to implement in the future - if I can find a way to make it viable. This was just v1 to see if there is even a path that makes sense. >Clicking Gear for settings doesn't go back to edit window when you're done and you click the Gear again, which is how I first tried to get b…

You're welcome: thanks for making the thing in the first place. :)

I don't think people have trouble posting snippets to Stack Overflow and the like, but I do think people have trouble (now or later) USING the snippets posted. Some discussion of the issues at [1].

Still only a few items there. Honestly, for a refactoring site? I'd suggest the things to add would be: all the classic refactorings, for any language you're familiar with.

The problem with searching Github for examples is they apparently took out commit-message search a few years back, so you can't search for "refactored" in the commits... just the Issues, which are going to be fewer and less useful.

Tried searching Google for "github example refactor" and that shows up several projects. They won't be as "in the wild" as a good refactoring, but they're probably a reasonable place to start.

[1] http://meta.stackexchange.com/questions/12527/do-i-have-to-w...

Post reply on HN