Looping Along
Week 4 musings on coding
As I continue this journey into JavaScript, I notice how much coding can be done without knowing the entire language. Even a programmer having little knowledge of the language can accomplish a great many tasks, albeit not as elegantly or refined as a more experienced person can. Taking the time to come to programming “clean” has allowed me to explore more of the language than I have been able to in the past. It has also highlighted for me how little of the language I might have known myself. In all fairness, however, most web developers often don’t do a lot of work in JavaScript, relying rather on other libraries that are built on top of JavaScript or that abstract much of the base language away from the coder (jQuery is one such tool, as are many others that are themselves built using jQuery).
Looping in any language is fundamental. For inexperienced programmers knowing which looping mechanism to use for a specific task might be quite clear-cut, but the ability to iterate over arrays and other types of collections is a critical task. In my coding exercises, I am trying to experiment with other ways of achieving my goals without having to rely on techniques that I already know. So, when I read that Array.Map could potentially be used in these dailies, I thought this would be a great opportunity to learn something I didn’t know before. I have the Array.Map working when I am iterating over the array (to update and to display), but Scott’s notes seem to allude to the possibility that it can be used to perform the initial loading of the array (500 bubbles, for example), without having to resort to a for-next construct to do so. I haven’t figured this piece of it out yet.
Joe, in his blog post, notes the effects of the slowing pace for this set of dailies. For me, this has allowed me to play with the coding a little more than I was able to do in the past couple of weeks, so I echo Joe’s sentiments that there’s an accompanying sense of relief with the slower pace, but at the same time, I want to continue to explore every avenue that I possibly can as we progress through the materials.
There’s something else, however. I’m enjoying this portion of the class, and I’m learning from it. But I’m not quite certain how to connect this yet to the theory or to the work being done currently in the field. I feel as though I am still missing something. At the end of the day, I’ll get the Array.Map function figured out, and I’ll add it to the toolkit. But then what? What will I ever do with it in the end? This is my version of Joe’s “slower-creeping dread.”