Skip to content

Commit 19bd62f

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 17dad23 + e70ce1d commit 19bd62f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+588
-583
lines changed

agile/03-user-stories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Since the class is our product, and we're going to run it using agile, lets do s
2020

2121
### User Stories ought to be
2222

23-
* **I**ndependant - stories can be worked on in any order
23+
* **I**ndependent - stories can be worked on in any order
2424
* **N**egotiable - A story is not a contract. A story IS an invitation to a conversation.
2525
* **V**aluable - If a story does not have discernable value it should not be done.
2626
* **E**stimable - What happens if a story can’t be estimated? You can split the story and perhaps gain more clarity. Or do more research to estimate it.

agile/06-reading.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77

88
## Required Reading
99

10-
**Due 1/7, Tuesday**
10+
**Due 1/6, Tuesday**
1111

1212
- [Scrum: The Art of Doing Twice the Work in Half the Time](https://www.agileleanhouse.com/lib/lib/News/More_Praise_for_Scrum_The_Art_of_Doing_T.pdf) [Chapter 1 linked here]
1313
- [Elements of Scrum](https://www.amazon.com/Elements-Scrum-Chris-Sims-ebook/dp/B004O0U74Q/ref=sr_1_2?s=digital-text&ie=UTF8&qid=1546492282&sr=1-2&keywords=elements+of+scrum) [Part I]
1414
- Read the [agile manifesto](https://agilemanifesto.org/) and [agile principles](https://agilemanifesto.org/principles.html). **Section A only**: Spend 30 minutes independently researching the Agile Manifesto principle that you have been assigned. Come to class ready to explain and discuss what that principle means in practice and in a software development concept.
1515

16-
**Due 1/8, Wednesday**
16+
**Due 1/7, Wednesday**
1717
- [Elements of Scrum](https://www.amazon.com/Elements-Scrum-Chris-Sims-ebook/dp/B004O0U74Q/ref=sr_1_2?s=digital-text&ie=UTF8&qid=1546492282&sr=1-2&keywords=elements+of+scrum) [Part II]
18-
- Scrum: The Art of Doing Twice the Work in Half the Time](https://www.agileleanhouse.com/lib/lib/News/More_Praise_for_Scrum_The_Art_of_Doing_T.pdf) [Chapter 2 linked here]
18+
- [Scrum: The Art of Doing Twice the Work in Half the Time](https://www.agileleanhouse.com/lib/lib/News/More_Praise_for_Scrum_The_Art_of_Doing_T.pdf) [Chapter 2 linked here]
1919

2020
## Additional Resources
2121

agile/07-reading2.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
## Assignment
44

5-
1. Spend some time reading whatever intersets you from the menu of choices below - feel free to go off script and read about anything else tangentially related that you find valuable. **This is your opportunity to think about real-world applications of agile in government and get your most burning questions answered.** If your research takes you to something interesting, send it to your classmates on Slack. Participate in a discussion in slack about any of the topics you've read about (there is a channel called #agile where we can discuss). Remember, participation in discussions on slack is required and will be graded.
6-
2. Write down questions you might have about agile and tech projects in government as you go along. One of our guest speakers will be [David Eaves](https://www.hks.harvard.edu/faculty/david-eaves), who will discuss running agile teams in government.
5+
1. Spend some time reading whatever intersets you from the menu of choices below - feel free to go off script and read about anything else tangentially related that you find valuable. **This is your opportunity to think about real-world applications of agile in government and get your most burning questions answered.** If your research takes you to something interesting, send it to your classmates on Slack. Participate in a discussion in slack about any of the topics you've read about (there is a channel called #agile-2025 where we can discuss). Remember, participation in discussions on slack is required and will be graded.
6+
2. Write down questions you might have about agile and tech projects in government as you go along. One of our guest speakers will be David Eaves, who will discuss running agile teams in government.
7+
78

89
## Menu Of Readings
910

@@ -17,7 +18,7 @@ Do you have burning questions about Scrum? Like "What are the most common pitfal
1718
- OIG Report on Healthcare.gov (you can skim it after the Executive Summary)
1819
- https://oig.hhs.gov/oei/reports/oei-06-14-00350.pdf
1920
- The aftermath
20-
- https://blog.newrelic.com/wp-content/uploads/80893.pdf
21+
- https://web.archive.org/web/20160321170655/https://blog.newrelic.com/wp-content/uploads/80893.pdf
2122
- https://www.theatlantic.com/technology/archive/2015/07/the-secret-startup-saved-healthcare-gov-the-worst-website-in-america/397784/
2223
- http://www.nytimes.com/2013/10/25/opinion/getting-to-the-bottom-of-healthcaregovs-flop.html
2324
- Creation of USDS (our guest speaker David Zvenyach will discuss this further)
@@ -30,12 +31,6 @@ Do you have burning questions about Scrum? Like "What are the most common pitfal
3031
- Chaos Report: https://www.projectsmart.co.uk/white-papers/chaos-report.pdf
3132
- What is Code: https://www.bloomberg.com/graphics/2015-paul-ford-what-is-code/
3233
- Few additional thoughts
33-
- https://fcw.com/blogs/lectern/2017/06/dont-reform-procurement-eaves.aspx
34-
- Also check out micropurchases, something that iterative development and open source collaboration has enabled: https://micropurchase.18f.gov/
34+
- https://www.nextgov.com/digital-government/2017/06/dont-believe-the-hype-procurement-reform-is-a-red-herring/240778/
35+
- Also check out micropurchases, something that iterative development and open source collaboration has enabled: https://web.archive.org/web/20161123065846/https://micropurchase.18f.gov/
3536
- Spend some time thumbing through the some of the micropurchases
36-
37-
38-
## Submit your questions for David Eaves
39-
40-
https://docs.google.com/forms/d/e/1FAIpQLScEYEGjXldj4ZLXsnYXKTBQnaxQUUQj4Mcgq0s9JSL9c8BTWA/viewform?usp=sf_link
41-

apis/06-apis.md

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
# APIs
2+
3+
> ... there is software that, using “APIs,”
4+
**treats other web sites as just another part of the software infrastructure, another
5+
function it can call to get things done.**
6+
>
7+
>Our computers are so small and the Web so great and vast that this last scenario
8+
seems like part of an inescapable trend. Why wouldn’t you depend on other
9+
web sites whenever you could, making their endless information and bountiful abilities
10+
a seamless part of yours? And so, I suspect, such uses will become increasingly common until, one day, your computer is as tethered to the Web as you yourself are
11+
now.
12+
>
13+
>\- [Swartz: Introduction](https://web.archive.org/web/20220121020916/https://www.morganclaypool.com/doi/pdfplus/10.2200/S00481ED1V01Y201302WBE005)
14+
15+
16+
## How Web Apps are Structured
17+
18+
> The other week I made one of my rare excursions from my plushly-appointed bed
19+
and attended a local party. There I met a man who made a website for entering
20+
and visualizing data. I asked him whether he had an API, since it seemed so useful
21+
for such a data-intensive site. He didn’t, he said; it would be too much work to
22+
maintain both a normal application and an API.
23+
>
24+
> I tell you this story because the fellow at the party was wrong, but probably
25+
in the same way that you are wrong, and I don’t want you to feel bad. If even well dressed
26+
young startup founders at exclusive Williamsburg salons make this mistake,
27+
it’s no grave sin.
28+
>
29+
> See, the mistake is, that if you design your website following the principles
30+
in this book, **the API isn’t a separate thing from your normal website, but a natural
31+
extension of it**. All the principles we’ve talked about—smart URLs, GET and
32+
POST, etc.—apply equally well to web sites or APIs. The only difference is that
33+
instead of returning HTML, you’ll want to return JSON instead.
34+
>
35+
> \- [Swartz (Chapter 5)](https://web.archive.org/web/20220121020916/https://www.morganclaypool.com/doi/pdfplus/10.2200/S00481ED1V01Y201302WBE005)
36+
37+
38+
## Resources
39+
40+
> “The key abstraction of information in REST is a resource. **Any information that can be named can be a resource**: a document or image, a temporal service (e.g. "today's weather in Los Angeles"), a collection of other resources, a non-virtual object (e.g. a person), and so on. In other words, any concept that might be the target of an author's hypertext reference must fit within the definition of a resource. A resource is a conceptual mapping to a set of entities, not the entity that corresponds to the mapping at any particular point in time.” - Roy Fielding’s dissertation.
41+
42+
### URLs (Uniform Resource Locators)
43+
44+
45+
![](https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Web_mechanics/What_is_a_URL/mdn-url-all.png)
46+
47+
[https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_is_a_URL](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_is_a_URL)
48+
49+
50+
51+
### Thinking in terms of "Resources"
52+
53+
#### ❇️ Example
54+
55+
What are the "Resources" on Crunchbase? (Lets try to map out their database, what do we think it looks like?). [https://www.crunchbase.com/](https://www.crunchbase.com/).
56+
57+
58+
### What a URL reveals about a web app
59+
60+
> Furthermore, URLs have to last. Those t-shirts and links and blogs will
61+
not disappear simply because you decided to reorganize your server, or move to a
62+
different operating system, or got promoted and replaced by a subordinate (or voted
63+
out of office). They will last for years and years to come, so your URLs must last
64+
with them.
65+
>
66+
> Moreover, URLs do not just exist as isolated entities (like “http://
67+
example.org/lunch/bacon.html”). They combine to form patterns
68+
(“bacon.html”, “lettuce.html”, “tomato.html”). And each of these
69+
patterns finds its place in a larger path of interaction (“/”, “/lunch/”,
70+
“/lunch/bacon.html”).
71+
>
72+
> Because of all this, URLs cannot be some side-effect or afterthought, as
73+
many seem to wish. Designing URLs is the most important part of building a web
74+
application and has to be done first. Encoded in their design are a whole series of
75+
implicit assumptions about what your site is about, how it is structured, and how it
76+
should be used; all important and largely-unavoidable questions.
77+
>
78+
> \- [Swartz (Chapter 2:: Building for Users: Designing URLs)](https://web.archive.org/web/20220121020916/https://www.morganclaypool.com/doi/pdfplus/10.2200/S00481ED1V01Y201302WBE005)
79+
80+
81+
## A Case Study
82+
83+
Let's take a look at https://www.fec.gov/. This is the website for the Federal Election Commission (FEC). It contains data about federal campaign finance in the United States in a format for humans to consume.
84+
85+
And let's look at the FEC API: [https://api.open.fec.gov/developers/](https://api.open.fec.gov/developers/). This API has the same data as the website, but in a format that computers can consume (JSON).
86+
87+
## Querying APIs With Python
88+
89+
To query an API with python, we're going to use the `requests` library (http://docs.python-requests.org/en/master/). The `requests` library makes it very simple to run basic HTTP commands like issue a GET request and parse the response or issue a POST request.
90+
91+
Here is a simple example using that library to get some data on candidate H8WI01024, Paul Ryan.
92+
93+
```python
94+
import requests
95+
96+
url = "https://api.open.fec.gov/v1/candidate/H8WI01024/?sort=name&page=1&api_key=DEMO_KEY&per_page=20"
97+
98+
# Issue a GET reequest to the URL specified
99+
response = requests.get(url)
100+
101+
# Parse JSON data out from the response
102+
data = response.json()
103+
```
104+
105+
### Querying the FEC API
106+
107+
Lets take a look at the script Ihsaan has written to hit the FEC API. You can find the script here: https://github.com/dmil/code4policy/blob/master/apis/
108+
109+
or pasted below:
110+
111+
```python
112+
import requests
113+
import json
114+
import os
115+
116+
# base url for specific api
117+
base_url = 'https://api.open.fec.gov/v1/'
118+
119+
# operation to execute for the api
120+
operation = 'candidates'
121+
122+
# get key from environment variable
123+
key = os.environ['FECKEY']
124+
125+
# additional api parameters specific to the operation
126+
api_parameters = {'api_key': key, 'office':'H', 'sort':'name', 'state':'MA', 'election_year':[2016]}
127+
128+
# ping api
129+
response = requests.get(base_url + operation, params = api_parameters)
130+
131+
# print status code and load returned data into json
132+
print('Response Code: {0}\n'.format(response.status_code))
133+
data = json.loads(response.text)
134+
135+
# save raw data
136+
with open('fec_api_results.json', 'w') as outfile:
137+
json.dump(data, outfile)
138+
139+
# loop through results and print name
140+
for candidate in data['results']:
141+
print(candidate['name'])
142+
```
143+
144+
## JSON/XML & More about APIs
145+
146+
![](https://www.evernote.com/shard/s150/sh/e700e882-9ada-44b0-8f0e-aef58f2a1f39/bf14351db3d329e4/res/d4b5c513-f127-4268-b312-9af0059a9123/skitch.png?resizeSmall&width=832)
147+
148+
source: [https://www.infoq.com/presentations/API-design-mistakes](https://www.infoq.com/presentations/API-design-mistakes)
149+
150+
151+
APIs from Programmable Web till December 2013
152+
153+
![](https://www.evernote.com/shard/s150/sh/d9d3e18e-8209-4ea4-ba3c-dd606a9a88d7/7ff673fe21f09207/res/28b78161-2d50-42e4-bc19-13e9b17c916c/skitch.png?resizeSmall&width=832)
154+
155+
![](https://www.evernote.com/shard/s150/sh/46b2d712-aad5-4098-b28d-5738102147ce/7755ad888bb941fd/res/94b12abb-fc75-496d-97e4-6a4aef5cb952/skitch.png?resizeSmall&width=832)
156+
source: [https://www.infoq.com/presentations/API-design-mistakes](https://www.infoq.com/presentations/API-design-mistakes)
157+
158+
> And so the “Semantic Web Activity” at the Worldwide Web Consortium
159+
(W3C) has spent its time writing standard upon standard...Few have received any widespread use and those that have (XML) are uniformly
160+
scourges on the planet, offenses against hardworking programmers that have
161+
pushed out sensible formats (like JSON) in favor of overly-complicated hairballs
162+
with no basis in reality (I’m not done yet!—more on this in chapter 5).
163+
164+
[Aaron Swartz’s A Programmable Web](https://web.archive.org/web/20220121020916/https://www.morganclaypool.com/doi/pdfplus/10.2200/S00481ED1V01Y201302WBE005): Chapter 1 - Introduction: A Programmable Web
165+
166+
> JSON (pronounced like “Jason”), for the uninitiated, is a simple format for
167+
exchanging basic pieces of data between software. Originally based on JavaScript
168+
but quickly adopted by nearly every major language, it makes it easy to share data
169+
over the Web.
170+
171+
> Wait!, you may cry, I thought XML was for sharing data on the Web. Sadly,
172+
you have been misled by a sinister and harmful public relations campaign. XML is
173+
probably just about the worst format for sharing data. Here’s why:
174+
175+
176+
[Aaron Swartz’s A Programmable Web](https://web.archive.org/web/20220121020916/https://www.morganclaypool.com/doi/pdfplus/10.2200/S00481ED1V01Y201302WBE005): Chapter 5 - BUILDING A PLATFORM: PROVIDING APIS

apis/huffpostAPI.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

codeconcepts/function.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ A function has inputs and an output. The inputs are known as the "arguments", an
4141
below is an example of a function in python
4242

4343
```python
44-
def multiply(a,b):
44+
def multiply(a, b):
4545
return a * b
4646
```
4747

@@ -64,7 +64,7 @@ In the above exercise you have simply defined a function, but you haven't asked
6464

6565
```python
6666
# This part of the code defines a function
67-
def multiply(a,b):
67+
def multiply(a, b):
6868
return a * b
6969

7070
# This part of the code then calls that function and assigns the variable x to its return value
@@ -94,7 +94,7 @@ console.log(x)
9494
The function can also contain other logic and do other things. For example, you could write the function above like this:
9595

9696
```python
97-
def multiply(a,b):
97+
def multiply(a, b):
9898
print("I'm multiplying two numbers")
9999
return a * b
100100
```
@@ -103,4 +103,3 @@ This would both print to the terminal and return a value. The return is the very
103103

104104
## ➡️ Try It
105105

106-
Complete the following assignment: https://classroom.github.com/a/9pY8aTQJ

commandline/02-filesystem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Last, when reading long files page by page (like when using `man`), you can use
134134

135135
#### `subl`
136136

137-
If you don't have Sublime Text installed, run `brew cask install sublime-text` on macOS and on ubuntu follow [these](http://tipsonubuntu.com/2017/05/30/install-sublime-text-3-ubuntu-16-04-official-way/) instructions.
137+
If you don't have Sublime Text installed, run `brew cask install sublime-text` on macOS and on ubuntu follow [these](https://www.sublimetext.com/docs/linux_repositories.html) instructions.
138138

139139
* `subl <folder>` **open**s the folder in sublime
140140
* `subl <filepath>` **open**s the file in sublime

commandline/03-redirection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Count number of **files** in the `universe` folder.
114114

115115
## Slackcat
116116

117-
Lets install a new command-line tool. On macOS use `brew install slackcat`. For linux, see the bottom of this page https://github.com/vektorlab/slackcat for instructions.
117+
Lets install a new command-line tool. On macOS use `brew install slackcat`. For linux, see the bottom of [this](https://github.com/bcicen/slackcat) page for instructions.
118118

119119
Configure slackcat by running this command and following the instructions in your web browser:
120120

0 commit comments

Comments
 (0)