6
\$\begingroup\$

I had some confusions about a particular piece of code that I wrote: Thoughts on refactoring a generic DAO. I placed it on programmers.SE when I thought it was just a design thing. Now I am thinking that it may need a code review also. So I want to know: is such a question appropriate for the site?

asked Dec 1, 2013 at 18:24
\$\endgroup\$

1 Answer 1

9
\$\begingroup\$

is such a question appropriate for the site?

Yup.

Though your CR post should include more of the code1, not just a high-level overview. And since you know you're solving a solved problem and don't want to be bothered with ORM alternatives you could also tag it with , which is meant for that, and the tag looks like it was created for this question :)

1 If it's a lot of code, you may consider breaking it down into several, more digestible posts.

answered Dec 1, 2013 at 18:39
\$\endgroup\$
9
  • \$\begingroup\$ Actually confused about how much should be placed for review. Is 500-600 lines of code considered a lot of code? Or should I upload it on github and link it? \$\endgroup\$ Commented Dec 2, 2013 at 14:16
  • \$\begingroup\$ @AseemBansal We like our posts self-contained, github+link is nice as an extra, but only github+link will get your question closed (all code to be reviewed must be in the question). I think it mostly depends on the scope of your code - if it's well-written cohesive code, 500-600 lines might read like a novel. If it's a spaghetti nightmare, best split it into multiple posts; in all cases, break your code blocks to ease reading, use formatting, subtitles, etc., and ask yourself: "would I want to review this code, as posted?" \$\endgroup\$ Commented Dec 2, 2013 at 14:22
  • \$\begingroup\$ I know about the rule of self-contained but it is my first time posting such a big code so just wanted to clear things about that. The code is well-written, at least as far as I know. If 500-600 lines are not a big deal then I'll post it all with a github link. \$\endgroup\$ Commented Dec 2, 2013 at 14:26
  • \$\begingroup\$ Added the question. codereview.stackexchange.com/questions/36519/… \$\endgroup\$ Commented Dec 2, 2013 at 15:19
  • \$\begingroup\$ @AseemBansal just saw your original post mentioned in the Programmers newsletter :) \$\endgroup\$ Commented Dec 2, 2013 at 19:57
  • \$\begingroup\$ @Where is this newsletter? \$\endgroup\$ Commented Dec 3, 2013 at 13:59
  • \$\begingroup\$ @AseemBansal Click that "Preferences" link in your user profile :) \$\endgroup\$ Commented Dec 3, 2013 at 14:02
  • \$\begingroup\$ So we can subscribe to the newsletters? I didn't know that. What was the mention about? Anything particular? \$\endgroup\$ Commented Dec 3, 2013 at 14:06
  • \$\begingroup\$ @AseemBansal it was under the Can you answer these? section, so your post might have gotten a couple more eyes on recently :) \$\endgroup\$ Commented Dec 3, 2013 at 14:10

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.