Skip to content

Latest commit

 

History

History
83 lines (52 loc) · 2.86 KB

File metadata and controls

83 lines (52 loc) · 2.86 KB

Lecture 4


Browser Developer Tools

Showing Chrome, but it's similar in other browsers.


HTTP


Remember when we were working with APIs?

requests.get(url)


Visit http://127.0.0.1:5000/echo.


curl -I http://127.0.0.1:5000/echo
curl -X POST http://127.0.0.1:5000/echo
curl -X POST -d "hello" http://127.0.0.1:5000/echo
curl -i http://127.0.0.1:5000/echo > response.txt

curl 'http://127.0.0.1:5000/divide?numerator=5&denominator=2'
curl 'http://127.0.0.1:5000/divide?denominator=2&numerator=5'
curl 'http://127.0.0.1:5000/divide?numerator=5&denominator=0'
curl 'http://127.0.0.1:5000/divide?numerator=5&denominator=abc'
curl 'http://127.0.0.1:5000/divide?numerator=5'

Like cURL, but for downloading files.



Reading response questions

Design responsibility

  • It also raises an important question that the readings only briefly touch on: if users are largely unaware of how files actually work, who bears responsibility for data loss, privacy breaches, or misuse---users, designers, or institutions?

AI & the modern relevance of CLI

  • Elements of the command line: the prompt, followed by a command, and an option reminds me of talking to an AI chatbot. Is this the right way of understanding how it works, or are there differences between the two? I guess one key difference is perhaps that your computer can't "talk back to you", but instead, runs your command, unlike a chatbot.
  • The video mentioned that early interfaces prioritized making things easy for computers, not humans. Will AI change this? When we can talk to computers in natural language, will command lines become like Latin---something only specialists need?
  • Does the efficiency of the CLI still hold true for professionals whose main focus is policy analysis rather than software engineering?