|[ LiB ]|
As your experience grows, it makes sense that you'll start recycling approaches and techniques that have proven useful. The best techniques are often the ones you developed on the job. In any event, the true craftspeople continually add to their toolsets. This chapter is dedicated to developing and maintaining your bag of tricks.
I tend to think it's more important to learn how to develop useful skills than just to be good at archiving them. Often something you find useful early in your career turns out to be not as useful as you grow to develop more skills. It's sort of like how you might be embarrassed of the clothes you thought were cool a decade ago. At least in my experience, I tend to look at my old projects the same way: "What was I thinking when I wrote that code?" For this reason, you want to be careful not to dedicate too much time-saving code for posterity and more time living in the here-and-now. Having said that, I find some tricks and code algorithms as useful today as the day I picked them up years ago. In this chapter, you'll learn how to "generic-size" code to make it transferable as well as learn techniques to store that code in a convenient form for easy access.
Specifically, this chapter covers the following topics:
Making your own simple components
Recognizing and addressing places to modularize your code
Saving code snippets as behaviors for quick access
The basics of constructor functions, the prototype property, and class files
|[ LiB ]|