views:

142

answers:

5

Hi,

Is there any guidelines for what order of programming you should do? In other words, what should you code first?

Stone

+1  A: 

I'd recommend doing tests first

Samuel Carrijo
Why have you written two answers? Also, I don't think your answer is anywhere near complete enough, hence the downvote.
Noon Silk
The question is ambiguous. I don't know if he wants to know where to start programming a feature, or how to decide which feature to program...
Samuel Carrijo
+3  A: 

I tend to break my code up into little chunks of functionality. My personal habit is to work on the chunk/function that I think seems the most fun at the time. I go from there. I think it is mostly a personal preference unless dictated by spec.

sdmiller
+1  A: 

Considering you're asking which type of functionality to start working on first (if you know this already, then check my other answer).

Usually you have some idea of what is more/less useful for your client and what is more/less risky to do (you don't know for sure if you can do it, or how long it should take).

One approach I'd suggest is starting in the riskier and most useful stuff first, so you can fail fast (if you're going to fail). This way you won't lose much time (and money) and frustrate your client a few days before the deadline.

The order would then be:

  1. riskier and most useful
  2. safer and most useful
  3. safer and least useful
  4. riskier and least useful (probably these will be kicked out anyway...)
Samuel Carrijo
A: 

Different processes recommend different approaches. Lets consider teh agile/unified/incremental/user driven approach.

  1. Identify user stories
  2. Analyse and create a list of tasks
  3. decide the most critical tasks
  4. Work from most critical to least critical

This way the items that are going to cause the project to fail if they do not get done are done first. The fun stuff are left to version 2.

Vincent Ramdhanie
A: 

Review the functional specification. I prefer to then attack the problem using a top-down approach to development.

  1. Identify a logical flow to your application.
  2. Start creating stubs of functionality you expect to be working (classes, methods etc).
  3. Fill these out by creating calls to stubs within each of these stubs.
  4. Flesh out as necessary

If following a Test Driven Development approach, to development, then begin by writing tests before step 4 before implementing working code.

Topdown