A good text editor (I use Peter Borg’s Smultron for Mac OS X) will help you avoid mistakes. It will color code functions and keywords, as well as strings of text. It will automatically indent for you when you open and close curly brackets, and it will show you where a particular bracket or quote begins or ends.