21. 4ThemesforToday
1) Why learn how to code?
2) What does coding, scripting, programming exactly mean?
3) What is it like to teach oneself how to code?
4) Tips and resources
22. (1)WhyLearnHow toCode?
• Dress up or dynamic webpages
• Website redesign
• LibGuide customization
• How to use CMS
• Mobile-friendly/responsive library website
• Customize/Add features to library systems
• Example:GVSU Library Lab
(https://gvsulib.github.io/)
• Data processing in batch; automation
23. WhatYouCan Do withCoding
• Write plug-ins
• LibX, Zotero, etc.
• Full-blown programs
• http://showoffyourapps.challengepost.com/
• http://librarylab.law.harvard.edu/projects.html
• http://www.nypl.org/collections/labs
• http://code.library.arizona.edu/gots/
• Relevance to librarianship
• Understand better the information systems and everyday software
• Improve communication and collaboration with IT
28. It’sCalleda Languagefora Reason
• Syntax: It has its own quirks.
• Core concepts:
• Variable
• Constant
• Array
• Loop
• Function
• Object
• Class
• A programming language CANNOT be learned in a day or
a month.
• Practice: It takes a lot of time to master.
• Very cool to see mastery in action.
29. Funky
andforeign-looking
• var a = ["do", "re", "mi", "fa"];
var len = a.length;
for (var i = 0; i < len; i++) {
console.log(a[i]);}
• $a = array("do", "re", "mi", "fa");
for ($i=0; $i<count($a); $i++){
echo $a[$i]."<br/>";}
• $a = array("do", "re", "mi", "fa");
foreach ($a as $i=>$note){
echo $note."<br/>";}
• a = ['do', 're', 'mi', 'fa']
for i in a:
print i
• JavaScript
• PHP
• PHP
• Python
31. (2)WhatIs Programming?
• What do you and others mean when they say “coding,”
“scripting,” or “programming”?
• Programming is NOT knowing how to use a CMS (Wordpress,
Drupal) or a certain computer software like Dreamweaver
(except IDEs).
• Programming is NOT the same as editing HTML, CSS, XML.
(http://www.cs.tut.fi/~jkorpela/prog.html )
• Programming is knowing and writing the logic for a computer
to execute in a programming language that a computer
understands.
• N.B. Markup language vs. Programming language
34. • JavaScript
• PHP
• PHP
• Python
Programming
Language
• var a = ["do", "re", "mi", "fa"];
var len = a.length;
for (var i = 0; i < len; i++) {
console.log(a[i]);}
• $a = array("do", "re", "mi", "fa");
for ($i=0; $i<count($a); $i++){
echo $a[$i]."<br/>";}
• $a = array("do", "re", "mi", "fa");
foreach ($a as $i=>$note){
echo $note."<br/>";}
• a = ['do', 're', 'mi', 'fa']
for i in a:
print i
36. IsCoding Programming?
• The distinction between these two can be murky.
• Usually the term, ‘coding,’ is used to include the knowledge of
a programming knowledge beyond that of a markup language.
• http://blogs.jbllanda.com/markup-language-versus-programming-
language/
• Here, I will use both terms – coding & programming –
interchangeably.
• See the difference between scripting. vs. programming:
• https://en.wikipedia.org/wiki/Scripting_language
• http://stackoverflow.com/questions/17253545/scripting-language-vs-
programming-language
50. ExampleCode
• “Query a Google Spreadsheet like a Database with Google
Visualization API Query Language”
http://www.bohyunkim.net/blog/archives/2831
(Source code: https://github.com/bohyunkim/examples )
• “Playing with JavaScript and JQuery – the Ebook link HTML string
generator and the EZproxy bookmarklet generator”
http://acrl.ala.org/techconnect/?p=3098
• http://htmlpreview.github.io/?https://github.com/bohyunkim/exam
ples/blob/master/link.html
• http://htmlpreview.github.io/?https://github.com/bohyunkim/exam
ples/blob/master/ezproxy_bookmarklet_generator.html
• Source code:
https://github.com/bohyunkim/examples/blob/master/link.html
55. MyThoughtsonCoding
• Not everyone, every child, or every librarian needs to learn
how to code.
• Learning how to code does not have to result in you becoming
an expert or full-time coder.
• Identify your goal in learning how to code.
• Understanding how computer code works will help you
navigate everyday information landscape.
• You will understand better how software and systems are
built, function, and maintained.
56. • Variable
• Array
• Loop
• Function
• Objet
• Class
• …..
http://cheezburger.com/6240227584
62. LotsofResources
• Many resources online – discussions, tutorials, books…
• W3SchoolsTutorials
• Tuts+
• MOOC
• Codecademy / CodeYear
• Lynda.com;Treehouse; Code School
• Pick One and ACTUALLY DOING IT
• Code4Lib listserv/IRC/journal/conference
• LibTechWomen (http://libtechwomen.org/)
• Library CodeYear Interest Group – ALA (LITA/ALCTS)
63. It IsHard…
• Syntax will throw you off.
• More time will be spent on debugging than code writing.
• A slow learning curve.
• Not enough time to dedicate to intensive learning.
• Not always a clear connection with your library work.
• Life intervenes.
• Coding is more BORING than exciting.
66. 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.
67. MoreResources
• See the resources section in my previous presentation at the
2012 Charleston conference,
“Geek out:Adding Coding Skills toYour Professional
Repertoire” - Slides
athttp://www.slideshare.net/bohyunkim/geek-out-adding-
coding-skills-to-your-professional-repertoire
• Bohyun Kim and Kathryn Harnish, “Geek out:Adding Coding
Skills toYour Professional Repertoire,” inAccentuate the
Positive: Charleston Conference Proceedings 2012, edited by
Beth R. Bernhardt, Leah H. Hinds, and Katina P.Strauch,
Purdue University Press, 2013. (Available as open access:
http://docs.lib.purdue.edu/charleston/2012/Tech/8/)