I am reading the book The Pragmatic Programmer and read about the Tracer Code and Prototyping, but I don't understood when to use Tracer Code instead of Prototyping.

As I understood about Tracer Code, I try to hit the target implementing a code that the customer can test in practice and provide me feedback in real time, and the implemented code is a part of the final system. When I do Tracer Code it must be as a standard project with all good practices and a architecture(a skeleton, not all implemented). However Prototyping is a disposable code where I use it only to learn requirements from customer. After learning from the customer I must throw away the prototype.

When I must use Tracer Code instead of Prototyping? Can I use both?

  • 1
    Sharing your research helps everyone. Tell us what you've tried and why it didn't meet your needs. This demonstrates that you've taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Also see How to Ask
    – gnat
    Mar 10 at 12:29
  • @gnat Thank you for your feedback. I have changed the question. If still there is anything lost in my question, feel free to tell me.
    – Alan Nunes
    Mar 10 at 13:28
  • 1
    Do you know how tracer bullets are used in real life? They are often used in heavy machine guns, where every x'th bullet (e.g. every 10th or so) is a tracer bullet. You can't really aim a heavy machine gun, so you just point it roughly in the right direction, fire a burst, see where the tracers land, adjust, fire, adjust, fire. It's more like aiming a garden hose, where you don't actually aim along the hose, but simply see where the water lands and adjust accordingly. So, a tracer bullet allows you to see roughly where you're aiming at. Mar 10 at 16:16

I no longer have a copy of the first edition of The Pragmatic Programmer, so I'm basing this answer on the contents of the second (20th Anniversary) edition. My understanding is that much of the content remains the same, but has been refined based on changes in the last 20 years.

The use of "prototyping" in The Pragmatic Programmer (such as in Topic 13 Prototypes and Post-it Notes) is constrained to throw-away prototyping. Tracer bullets are closer to evolutionary prototyping or evolutionary design techniques. The idea behind tracer bullets is to get a working version in front of stakeholders and obtain feedback on that version without throwing it away.

The final paragraph in the Tracer Bullet chapter explains it succinctly:

Prototyping generates disposable code. Tracer code is lean but complete, and forms part of the skeleton of the final system.

It is possible to use both together, for different parts of the system. They are complementary techniques that help to figure out what needs to be built and ensure that the effort is being spent on building the right thing. The use of throw-away prototyping versus tracer bullets (or evolutionary prototyping) depends on the context.

  • Great answer! When you said tracer bullets is more closer to evolutionary prototyping it made me easier to understand it. As I understood I must use them depending on the context. I will give two different contexts and try to figure out which one I must choose for "prototyping". Context 1: the customer asked me to make a simple form and provided me only the information needed to be in the form. So in this case I can make a simple Prototype in HTML or even in a paper to discover from the customer what he expected. Context 2: a e-commerce that sells only clothes. I can use Tracer Code.
    – Alan Nunes
    Mar 10 at 13:39
  • 1
    @AlanNunes That's not enough context to choose. It's not just about what you're making, but how well you understand the problem domain, the requirements, if you've established a technology framework or not.
    – Thomas Owens
    Mar 10 at 13:54

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.