Tuning code snippets