Writing code snippets to view instead of log