part of code appended into string, resulting in very strange serial output

tzijie:
perhaps ive used the wrong word.

The word you're looking for is "snippet".

We hate snippets