How can I ensure my freelance developers are writing good code?


1

I'm the one that posted the question, "Do I need a CMS?" Thank you for all the answers, they were very helpful. I decided on going with a framework, codeigniter to be exact, due to its reported ease of use (ultimately I want to learn it, and I only know a tiny bit of php right now).

Im very active on odesk and know how to hire well, but my concern is now that I am no longer doing this "cheap and dirty" I need to make sure that the code delivered not only works, but is clean, semantic, well structured, etc.

With my limited knowledge, it will be impossible to know if what I'm getting is quality code or not.

So I have a few questions:

Who can I hire to review the code submitted to me by the freelancer, and what would be a fair hourly rate?

Does the fact that they are working with a framework essentially force them to write quality code? Or will there still need to be quality control measures as outlined above, or others?

I appreciate any help, I want to make sure i know what I'm doing before moving forward, so thank you for your suggestions and feedback.

EDIT: Thanks for all the answers. It sounds like a "test plan" is going to be important in this. For anyone interested, here's a great article I found that explains what this is.

Test plan

Web Dev

asked Nov 16 '12 at 04:59
Blank
Jdh
182 points

3 Answers


2

I agree with the poster who states that "good quality code" should come 2nd to "working code", but any strategy for sane software development does the following:

Step 1. Provide a SPECIFICATION that states exactly what you want the code to do. Please note that this is not as simple as it sounds - you need to list absolutely EVERYTHING that you expect to be able to do with the software. Note that general goals are not good enough here.

As an example, take an online shop. The goal "Sell a tshirt" is useless. Your spec needs something closer to "Upload thumbnail picures, set prices, interface with Paypal, store user's email, put sale icons on top of pictures." This will help your initial developer create exactly what you want with no surprises. Note that many companies pay someone to do this step for them as well as the next step.

Step 2. You should then pay your independent developer to develop an even longer list of UNIT TESTS from your SPECIFICATION that test multiple cases of each feature. This list is typically called a TEST PLAN. Bonus points (i.e. more value to you) if your independent reviewer can provide you a test suite/piece of software that you can re-run when updates to your site get performed.

Good luck! (The caps lock words are google search words that may help you find more books on this expansive topic.)

answered Nov 17 '12 at 07:03
Blank
Frisbee
36 points
  • Thanks so much for the clarification, knowing what to search for was a huge help. So I read a couple good articles, and came to the conclusion (wrong though it may be), that my app is probably to small to necessitate having a "test plan" or doing unit tests right now. The functionality is just too straightforward at this point and I can within 30 seconds test all variations of actions myself. Is it typical to only implement something like these tests once your app reaches a certain degree of complexity? – Jdh 11 years ago
  • I like this answer. With regard to your comment on complexity, things are usually more complex than they first seem. The best steps I've used/seen go something like this: specifications of requirements (generally something like 1000 rows in an excel file that explain everything the thing should accomplish, for a smaller project this might only be something like 10-100 lines), from there you do some wireframing which is like a rough draft of the visual layout (what's on each page, what kind of controls are needed), then visual design, then test creation, both for testers and for unit testing. – Shaunhusain 11 years ago

1

I think the first priority in deliverables should be working software rather than coding quality.

Ensuring working software is not easy. Beyond your manually checking the functionality, the best way is Test Driven Development.

So, if you are going to build something seriously, you need to ask the freelancer to write tests, both unit tests and integration tests.

I believe any developer who can write tests will not produce cheap codes, but not all developers could write tests or be comfortable at it.

You can check the testing code by yourself or ask a fellow coder to check it. It should take only a few hours since you probably don't need further checking once you know this freelancer could write acceptable tests. I guess the rate for a decent PHP coder who checking it may be $50-$70 per hour.

However, if you are going to build a very simple app you may not need such an overkill.

A side note about the framework. CodeIgniter is light and don't have good support on testing built-in. Yii is better and support test driven development more naturally, and Yii has nicer code base than CodeIgniter in my opinion.

answered Nov 16 '12 at 06:03
Blank
Billy Chan
1,179 points
  • I haven't heard of tests like this, can you explain In very layman terms? Is it a script created? Who writes the specs for this? How is the test executed and where are results shown? – Jdh 11 years ago
  • It seems I can only add comment here. For the terms you asked, a better way is to do a Google search, as it is too long to write here. Just as @Chris said, "You're searching for an easy way to do what software engineering professionals have spent decades trying to solve." Though everybody including me want to do that :-) frisbee mentioned the waterfall process, which is traditional but easy to understand, and easy to follow in small projects. I suggest you to do it by that way. – Billy Chan 11 years ago

1

You're searching for an easy way to do what software engineering professionals have spent decades trying to solve.

Here are a few things you can do:

  1. Follow a good development process with appropriate reviews along the way. What reviews? Review any design documentation, functional specifications, architecture document, interface specifications, etc.... You should have somebody else looking at the code being produced by every developer. (If they're pair programming, then you may already have this.)
  2. Come up with a testing strategy -- you ought to have regression testing, to make sure that your coders don't break anything along the way. You also need to systematically test new functionality. And, you need somebody to consider the security of the software.
answered Nov 16 '12 at 07:01
Blank
Chris Fulmer
2,849 points

Your Answer

  • Bold
  • Italic
  • • Bullets
  • 1. Numbers
  • Quote
Not the answer you're looking for? Ask your own question or browse other questions in these topics:

Web Dev