1. CODING FOR LIBRARIANS
PART 2: CODING 101
HANDS-ON INTRODUCTION
Bohyun Kim
Associate Director, Health Sciences & Human Services Library
University of Maryland, Baltimore
ReachingAcross Illinois Library System -Webinar
Tue, May 31, 2016 1:00 PM - 2:00 PM CDT
2. WHY AREYOU INTERESTED IN CODING?
• Q.What do you want to be able to do once you learn how to code?
• Q. Do you have previous experience with coding, and if so what is it?
• Q. If you tried to teach yourself how to code before, what were some of the difficulties?
4. WHAT IS JAVASCRIPT?
• JavaScript is a cross-platform, object-oriented scripting language. It is a
small and lightweight language. Inside a host environment (for example, a
web browser), JavaScript can be connected to the objects of its
environment to provide programmatic control over them.
• JavaScript contains a standard library of objects, such as Array, Date, and
Math, and a core set of language elements such as operators, control
structures, and statements. Core JavaScript can be extended for a variety
of purposes by supplementing it with additional objects;
• https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Guide/Introduction
5. JS
• Default scripting language for theWeb.
• Runs in a browser!
• Minimal dev environment setup
6. SET-UP
• A computer with access to the Internet
• Web browser
• Firefox
• Web Console (http://www.howtogeek.com/105320/how-to-use-
firefoxs-web-developer-tools/)
• Or, Firebug: https://addons.mozilla.org/en-
US/firefox/addon/firebug/
• Or, Chrome
• Devtools (https://developer.chrome.com/devtools)
7. LET’STRY RUNNING A SCRIPT!
• Open up your web browser – FF or Chrome.
• Press F-12 to open up a browser console.
31. MORE CODE EXAMPLES BY ME
WITH EXPLANATION
• The simplest AJAX: writing your own code (1)
http://www.bohyunkim.net/blog/archives/2186
• More APIs: writing your own code (2) http://www.bohyunkim.net/blog/archives/2219
• Playing with JavaScript and JQuery – the Ebook link HTML string generator and the
EZproxy bookmarklet generator http://www.bohyunkim.net/blog/archives/255
• Fear no Longer Regular Expressions http://www.bohyunkim.net/blog/archives/2595
• Using the StripeAPI to Collect Library Fines by Accepting Online Payments
http://www.bohyunkim.net/blog/archives/3009
• More simple code examples at https://github.com/bohyunkim/examples
32. TIPS
• Don’t be discouraged or frustrated.You are teaching yourself a language.
• Be persistent and realistic.
• Set small goals that solve real-life problems.
• Form or join a study group & find like-minded folks!
• Comment your code and document since you will forget what you have
learned and made.