Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am a fresher. My job is not very demanding of me when it comes to exercising my programming prowess. So, I have started to write code on my own (a simple space invasion program, chat application, etc). I will be completing some of these in a few weeks, but what i am worried about is how I shall get my code evaluated/criticised . I am new and they say it takes years to become a good programmer, so obviously I am making mistakes. But who can tell me what mistakes I am making? The amount of code that I write at my company and gets checked or revised by senior developers is too small to make any significant impact on my career. Please help.

share|improve this question
3  
If you are a .NET programmer FxCop is a good start. msdn.microsoft.com/en-us/library/bb429476(v=vs.80).aspx –  P.Brian.Mackey Apr 14 '11 at 14:14
1  
I'd also recommend reading other people's code. It will give you insights into style, clarity and may present ways of doing things that you hadn't considered. –  SHug Apr 14 '11 at 15:40

2 Answers 2

up vote 19 down vote accepted

There's always our sister site Code Review

It's still in beta (as of 14th April 2011), and please check their FAQ before posting. I would expect that they wouldn't like a whole project posted in a question, but a method or two would be OK.

As Michael points out in his comment it's usually easier to review short sections of code so you would be advised to post one (short) method per question. Once you've had a couple of questions answered you could then post more linking back to the original ones to give people context. However, having the whole project available (e.g. as Github project) might also be good practice.

share|improve this answer
    
That is correct - The larger the code posted, the harder it is to review. It works best if you post the sections that you want eyes on the most, one section per post. –  Michael K Apr 14 '11 at 14:10
1  
@Michael - Not always true. A medium-sized piece of code rarely compiles on its own and is thus more difficult to refactor. Best scenario is sometimes to post the whole project as a github link and copy the part you want people to focus on into your question. –  pdr Apr 14 '11 at 14:49

If you don't have anyone to review your code, you can always make an approximation by asking yourself the following questions:

  1. Is my code easy to test?: Can you write JUnits for your code without wanting to throw your computer out the window? Easy-to-test code is a good thing!
  2. Is it easy to modify your code?: If your project requirements change, does your codebase let you do that, or do you need to do significant amounts of re-writing?
  3. Does my code smell?
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.