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.


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.

| 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?
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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