One of the many forms of punctuation introduced by Crockford is whitespacing. Whitespacing, simply, is having a blank space to separate characters. Crockford mentions that "whitespace is usually insignificant, but is it occasionally necessary to use whitespace..." (Crockford 5). Although Crockford states that whitespace can be more or less unimportant, I find that it makes a significant difference in writing and editing code, since the spaces make it much easier to read. However, I was still hesitant in putting a small space between words.
| Code with whitespacing |
| Code without whitespacing |
Making your code easier to read can be extremely beneficial, not only for you, but peers who investigate your code. When something is easy to read and understand, the process for revision and editing becomes significantly less difficult. Again, I was hesitant to go the extra mile for readability, but after having my dad, a software engineer, explain to me how important readability was, I realized how important it could be, and made it into a habit to whitespace consistently. With my newfound knowledge of punctuation, I was able to more code with much more efficiency and clarity, allowing for easy revision and readability.
After a few hours of experimenting with a multitude of grammar and conventions using Crockford's guide, I created a simple visual reference chart for the future as I start learning how to create advanced and complex code. The testing process helped me better understand what to do with some of the conventions. Just as writing helps to reform memory, continuously writing code reinforces my understanding of computer language.
After a few hours of experimenting with a multitude of grammar and conventions using Crockford's guide, I created a simple visual reference chart for the future as I start learning how to create advanced and complex code. The testing process helped me better understand what to do with some of the conventions. Just as writing helps to reform memory, continuously writing code reinforces my understanding of computer language.
When I finished my attempts to practice and learn the grammar of JavaScript, I had gained more understanding of how and when to use some commands, and what I should type. Additionally, I had learned that the learning process can be extremely slow and difficult, and possibly boring, but it can pay off in the end when you have mastered the contents.
After reading this, would you like to try to learn something difficult? If you have already done so, when have you devoted time and effort into learning something?
Works Cited:
Crockford, Douglas. JavaScript: The Good Parts. O'Reilly Media, Inc., 2008.
