Monday, November 28, 2011

Learning to Write Code

Learning to write code was one of the most exciting, and yet intimidating, challenges that I've faced in library systems work. Not only are there many languages out there in which to write code, all with strong and weak points in specific contexts, but each language is a large entity to grasp. I think it is somewhat important to note that two separate challenges exist. One is the process of designing the logic, which is on the whole independent of the programming language and the other is the writing of the script - that is, embodying the logic in a specific programming language.

In addition, once one becomes familiar with one language, there are many concepts and practices which are transferable to other languages. There are subtle syntax nuances, however, that make each way of writing something unique. A very basic example is the "if....elseif.....else" structure of PHP. In JavaScript "elseif" becomes "else if" whereas in Python it becomes "elif". But once you remember that, you proceed in the same manner in each language.

I use a variety of resources to learn a language, typically using them as references. Most languages have a web site with a user guide/manual, like PHP's http://www.php.net/. This is the primary authority. Then tutorial-based web sites such as http://www.w3schools.com/ are very handy. Formal books are diverse. My favorites are usually published by O'Reilly, a publisher with which I became familiar during my MLIS studies, as some of my texts were their work. Lastly, on specific issues I frequently conduct internet searches and often end up reading discussion forums where practitioners help each other online. My preferred forum is http://stackoverflow.com

As I said before, knowing where to find the answers is key.

No comments:

Post a Comment

Please leave useful comments. Constructive criticism welcomed.