# Adventures in SonicPi! getting started: common issues and questions from newcomers

**URL:** <https://in-thread.sonic-pi.net/t/adventures-in-sonicpi-getting-started-common-issues-and-questions-from-newcomers/8131>\
**Category:** Support, Help & Resources\
**Created:** [September 11, 2023, 9:16am UTC](https://in-thread.sonic-pi.net/t/adventures-in-sonicpi-getting-started-common-issues-and-questions-from-newcomers/8131 "2023-09-11T09:16:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonny](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@jonny](https://in-thread.sonic-pi.net/u/jonny)\
**Post date:** [September 11, 2023, 9:16am UTC](https://in-thread.sonic-pi.net/t/adventures-in-sonicpi-getting-started-common-issues-and-questions-from-newcomers/8131/1 "2023-09-11T09:16:24Z")

</div>

Hello lovely human and wise coders 🙂

In week one learning / testing, with plans to share all my progress and ideas, however weird and wonderful they may be!

First question: it appears the **log** command is supported, but doesn’t output to the log panel (despite what bing-gpt claims:)

Is this outputting anywhere and how to access?  
(Not sure if it’s writing to a file, or if a file can be set as logging option, or if **log** should simply be ignored as n/a and use **print** and **puts**

```ruby
log 'hello'

```

Many thanks

---

<div class="post-metadata">

**Author:** ![jonny](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@jonny](https://in-thread.sonic-pi.net/u/jonny)\
**Post date:** [September 11, 2023, 3:36pm UTC](https://in-thread.sonic-pi.net/t/adventures-in-sonicpi-getting-started-common-issues-and-questions-from-newcomers/8131/2 "2023-09-11T15:36:56Z")

</div>

ℹ alias methods

Mainly as a proof-of-concept, but also after noticing repetition and keystrokes with **comment** and **uncomment** do blocks.

I saw use of the **p** alias to print with ruby, so defined this first

```ruby
define :p do |n| print n end

```

usage: `p 'test'`

I then made aliases for **comment** and **uncomment**

**comment** / **uncomment**

```ruby
define :c do |code|
  comment do
    run_code(code)
  end
end

define :u do |code|
  uncomment do
    run_code(code)
  end
end

```

usage: `c "puts 'hey'"` to comment, `u "puts 'hey'"` to uncomment

---

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [September 11, 2023, 9:18pm UTC](https://in-thread.sonic-pi.net/t/adventures-in-sonicpi-getting-started-common-issues-and-questions-from-newcomers/8131/3 "2023-09-11T21:18:58Z")

</div>

Hi there,

`log` is an internal method and not part of the documented API so it should be ignored. As you mentioned prefer `puts` and `print` instead 🙂

---

<div class="post-metadata">

**Author:** ![jonny](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@jonny](https://in-thread.sonic-pi.net/u/jonny)\
**Post date:** [September 11, 2023, 10:19pm UTC](https://in-thread.sonic-pi.net/t/adventures-in-sonicpi-getting-started-common-issues-and-questions-from-newcomers/8131/4 "2023-09-11T22:19:59Z")

</div>

adopting shorthand notation

```ruby
def u(code)
  uncomment do
    run_code code
  end
end

```

same usage: `u "puts 'hey'"`
