08
Fall
Warm-up exercise: jargon, jargon, jargon
Place an X in the column that best describes your familiarity with the terms below. Be honest! There are no right answers here, just a chance to review what you know, what you’ve heard, what you’d like to learn – even what might be irrelevant. Add more terms to the bottom of the table that are not already represented.
Term
|
Unfamiliar
|
Somewhat familiar
|
Very familiar
|
Script
|
|
|
|
Compiled code
|
|
|
|
API
|
|
|
|
PHP
|
|
|
|
Ruby (maybe even on Rails)
|
|
|
|
Content management system (CMS)
|
|
|
|
HTML
|
|
|
|
JavaScript
|
|
|
|
jQuery
|
|
|
|
CSS
|
|
|
|
Drupal
|
|
|
|
WordPress
|
|
|
|
Strings
|
|
|
|
Floating-point number
|
|
|
|
JSON
|
|
|
|
Python
|
|
|
|
ASCII
|
|
|
|
UTF-8
|
|
|
|
Array
|
|
|
|
HTTP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example problem for exercises 1-4
The problem (from Code4Lib):
“A Linn-Benton Community College librarian took a bookstore data dump and searched each title in the ILS and in their vendor database to find out whether e-book access was already available or could be purchased. I'm interested in whether it's possible to write a script to automate this process that could be used at any school, regardless of ILS or vendor.”
Bookstore data dump
ISBN Title Price
0805088113 Everything is Miscellaneous 24.95
0590353403 Harry Potter and the Sorcerer's Stone 19.95
1133067654 Calculus 79.00
Exercise 1
-
Clearly state the problem that the user wishes to solve.
-
What sets of data need to be compared?
-
What systems house the data?
-
Result: beginning of a program
-
What facets of information will you need from your data? (Don’t try to solve it just yet.) Assume you have no time or money to do this manually. A computer has to do it. Think about:
-
What are some of the unique identifiers that will persist no matter what system is consulted?
-
What information would be useful to have at the end?
-
Result: a good set of variables to have in mind when writing the program
-
The problem. I need to compare a list of books that I have to two data sources: my ILS and my vendor databases. The ILS will tell me if an e-book version is already available. The vendor databases will tell me if an e-book purchase is possible. So I really need to know: does an e-book already exist, and if so, did my library already purchase it?
-
Facets. I need a list of books with this information at the end: title|ISBN|lccn|e-book already available?|e-book for sale?
-
Common to each system should be ISBN.
-
I want lccn because I want to be able to easily reference my local catalog in the future
Exercise 2
-
Identify each variable type:
-
Title
|
String
|
ISBN (assume no dashes)
|
Integer
|
LCCN (assume no punctuation)
|
Integer
|
E-book already available?
|
Boolean
|
E-book available for sale?
|
Boolean
|
-
Write pseudocode for your program.
For (every ISBN in the bookstore data):
Check for that ISBN in the ILS.
If (the ISBN is in the ILS)
Then: check if there is an e-book version
If (e-book version)
Then: e-book avail = TRUE
Else: e-book avail = FALSE
If (e-book available = FALSE)
Then: check the vendor database
If (ISBN in vendor database)
Then: check if there is an e-book version
If (e-book version)
Then: e-book for sale = TRUE
Else: e-book for sale = FALSE
-
Circle any parts of your code that are similar to other parts. Could you make them identical in procedure, just with different input?
Yes – the “check to see if there is an e-book version” part. “Available” is either in the vendor database (which tells me the e-book is for sale) or the ILS (which tells me the e-book has already been purchased). But the lookup itself is the same and the answer can be constructed through a yes/no question.
Exercise 3
Write code to take in the bookstore data and store it in an array. Using the comments and structure you see, fill in variables, functions, and return statements.
Exercise 4
Building on your code, connect your array data to WorldCat to check for an e-book version of the item.
Exercise 5: Crafting your RFP
Think about a current problem in your library that you would like to solve, and imagine that you have some funding to hire someone else to solve the problem.
Excellent resources:
-
Chris Peters, “An Overview of the RFP Process for Nonprofits, Charities, and Libraries.” http://www.techsoup.org/support/articles-and-how-tos/overview-of-the-rfp-process
-
Tito Serra, The Project One-Pager: http://www.slideshare.net/tsierra/the-projectonepager
-
Clearly state the problem that you are trying to solve.
-
What elements or parts of the problem are already solved? (For example, if you would like to undertake a website redesign, you may have logos or other graphical branding elements already available to use.)
-
Identify:
-
Objectives of the project (be specific!)
-
Audience
-
Required/desired features
-
System integration needs
-
Preferred tools/systems to solve the problem
-
Front end vs. back-end work needed
-
What is out of scope?
-
Who are the major stakeholders?