Building off of http://pad.p2pu.org/webcraft101challenges

Background
This is the first webcraft programming 101 challenge. It is meant to demonstrate basic, core programming skills with a fun data source that will return dynamic (interesting) results. It encourages the user to channel their own interests through the selection and construction of a custom query, and to "scratch that itch" by writing a script that will execute the API call and process the results. The result is a script that users will build on in different ways in later challenges. 
Need to convey the overall context more clearly>i.e. Learn how to program with APIs
Also, would add an image of an example, something that visually conveys "It is meant to demonstrate basic, core programming skills with a fun data source that will return dynamic (interesting) results."


Specific skills
- reading documentation
- working with json
- basic programming constructs (for loops, conditionals)
- HTTP requests
- introductory git (or any CVS) and code sharing


Get your Hack On! Programming with APIs

Summary: Execute an API call to a dynamic data source, process the
results in a language of your choice, and print them out to a terminal 
INSERT HERE: there will be some encouraging text about how this is hard the first time but you are unlcking the secrets to the information universe and it's ok if it's hard and we all do it wrong about 100 times before doing it right, so just keep at it and share your trials and tribulations with others in the comments!. 
CV: Is there some "metaphor" that we can use here? i.e. the data that has to do with something in your everyday life? or something in the news? see this for inspiration http://daytum.com/. You touch on this in Task1. Maybe there is a way to bring in the summary?
CV: I LOVE the titles you have used in the seprate tasks, could you somehow tie them into your summary above?

1. Unleash your curiosity   add tagline that explains what will you be doing in this task
   - think about a query - what do you want to search for? 
   - eg. a hashtag, a category, a date, etc. maybe your favourite team, a recent news story, an issue you are passionate about. for example, "open science" "toronto" "reputation" "election" etc. 
   - feel free to discuss what makes a good query!

2. Channel your vision   add tagline that explains what will you be doing in this task
   - you will be using the twitter API! 
   Add, why? how does this connect to the task above
   - Read the twitter api docs! 
   - answer these questions as you go. 
     a. how are queries constructed? is the query format using a path style query or an argument style query? (describe these). 
     b. what specific API call are you going to use?
     c. read (LINK) about http requests: GET, POST, PUT, etc. what kind of request are you issuing?
   - show some example queries and links to query results in the browser 

3. Hone your powers part 1   add tagline that explains what will you be doing in this task
link to 2. better, i.e. you will be using the twitter API query to....
   - Choose a language - either python, ruby or javascript.  
   - link to python, ruby, js docs
   - your API query will probably have a nice LIST of results for you to iterate over! 
   not many people know what iteration is, might want to include examples
   - read about FOR loops, DICTIONARIES or HASHES, and IF statements
   need to point them to resources or even better to have them research then and share them. WHY are you asking them to do this? why should they know about FOR loops, DICTIONARIES or HASHES, and IF statements? link back to what they will be making and why learning about this would be important.
   - (descriptive text here will mention using ruby or python interpreters, or executing script files for any of the three languages)
   - in your language, write out a simple FOR loop to iterate over a list 
   add example
   - make a simple dictionary/hash, add some items to it,and then retrieve some key-value pairs. 
      add example
   - what is the difference between retrieving an item from a list and a dict/hash?
   great reflection question, would try to ask them a "how" question as well
   - write some conditionals to check for a specific value in your list
   *new word* conditionals, might want to elaborate on what it is

4. Hone your powers part 2  add tagline that explains what will you be doing in this task
   - JSON parsing
   - links to json docs for the three languages
   - test json document (LINK) 
   - copy and paste the test JSON into a file 
   - iterate over each item inthe JSON list using your for loops from above
   - when processing results from an API we often refer to each item inthe list as a RECORD, and each record might have many different FIELDS (example...)
   - how many items are in the list?
   - how many different fields are in each record?
      great reflection questions, would add a question that helps them during the iteration phase
   
5. Suit up  add tagline that explains what will you be doing in this task
   - construct your specific query request
   - this will be the key nugget of your program (but is easily modifiable so don't worry)
   - we will GIVE the specific function call to make an HTTP request in each language 
   - hint: you can test out the query in the browser first
   - Q: why does the same query work in the browser as it does in your code (ie, because both are using HTTP - find a better way to express this question). > good idea for a question
   

6. Patience, young Padawan  add tagline that explains what will you be doing in this task
   assemble your code! 
   - take your query and the HTTP request method of your language, and put them into a script file. print out the raw results of the query. should just be a few lines!
   - in the instructions below we're going to slowly build up a script. do each line at a time and make sure it works, print out the results as you go. 
   -  now instead of printing out the raw results, we'll iterate over them using FOR loops. 
   -  construct a FOR loop to iterate over the list of results and print out the raw records, one at a time. between each record, print a newline or some other text, so you can see where new records begin and end. 
   - it might look kinda ugly still, that's ok! json isn't very pretty. 
   - put a COUNTER in your for loop, and increment it by 1 each time through the FOR loop. be careful to declare the counter variable outside the loop (why?). how many records are in your results? print the number AFTER your for loop ends. 
   - each RECORD actually contains a dictionary. remember that dictionaries have specific FIELDS or KEYS associated with a value for that key.  
   - modify the FOR loop. instead of printing out each record, pull out some specific KEYS and print their VALUES. 
   - format the results so that it looks nice. (show an example output)
   - use a CONDITIONAL to check if there's a link in the tweet. if so, print the link. otherwise, print a statement "no urls were found in this record." (or some other exercise involving conditionals; this one is kind of lame :p) 


7. The force is strong with this one 
   - a sort of celebratory task that also makes the script more useful
   - change your script so that the search term is a variable. 
   - link to using ARGV for ruby, python, js 
   - run it a few times with different argumemtns
   need some better context for this one, why is it celebratory? what am I looking to improve in the script?
                                                                                                                                                               
8. Take your rightful place in the hall of hackers!
   post your code to github (or another site/VCS of your choosing)
   - create an account
   - install git locally (if you don't have it already)
   - follow the instructions at github
are we assuming everyone knows how to use github? if not, i think there is a github challenge in p2pu that we should try linking to.
 
9. optional mods: 
   - do this challenge but change your script to work with XML
   - do this challenge with a different API or a data set (examples: NYT API, infochimps). 
   - do this challenge in a different language (ruby or python or one not documented in this challenge. if you do a new language, add some notes to the comments so others can follow along)
   -  
   love these ones, could be bonus tasks! You could also ask then to create their own bonus task.

OVERALL:



notes about challenge creation: no where to put a comprehensive summary/overview. even the one paragraph challenge description has a 700 character limit.