# Which is the preferred way?

**URL:** <https://www.ruby-forum.com/t/which-is-the-preferred-way/111122>\
**Category:** Ruby\
**Created:** [August 2, 2007, 9:04pm UTC](https://www.ruby-forum.com/t/which-is-the-preferred-way/111122 "2007-08-02T21:04:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rorjeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b9e5f3/32.png) [@rorjeff](https://www.ruby-forum.com/u/rorjeff)\
**Post date:** [August 2, 2007, 9:04pm UTC](https://www.ruby-forum.com/t/which-is-the-preferred-way/111122/1 "2007-08-02T21:04:10Z")

</div>

I see that “p” is the same as “puts”. Which would  
most programs use in a program?

Jeff

---

<div class="post-metadata">

**Author:** ![rorjeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b9e5f3/32.png) [@rorjeff](https://www.ruby-forum.com/u/rorjeff)\
**Post date:** [August 2, 2007, 9:15pm UTC](https://www.ruby-forum.com/t/which-is-the-preferred-way/111122/2 "2007-08-02T21:15:12Z")

</div>

Jeffrey B. wrote:

> I see that “p” is the same as “puts”. Which would  
> most programs use in a program?  
> It’s not the same - p foo is equivalent to puts foo.inspect. They’re  
> used for different things; p is for debugging output, puts for general  
> text display.
