Harvard CS 50x — Week 9 (Flask)

(This is a summary of week 9 from the Harvard CS 50x series. Visit this page to see more from this series! )

It’s currently a Friday night in London, and I’m feeling a little exhausted. Really looking forward to the holidays now!

However, before I distract myself by dreaming too much of the upcoming holidays, I’m spending my Friday night catching up on the second last video of CS50x. This week’s focus was Flash.

Summary

  • Flask → A web app framework mainly used for Python
  • Design Pattern (Ways that humans write code)
  • MVC (Model, View, Controller)
  • Flask has certain organisational recommendations
Example of an organisational recommendation in Flask
  • “flask run” → starts flask app
  • GET → request.args
  • POST → request.form
  • Reusability of code
  • Layouts + use of Jinja
  • Froshims
  • Error checking
  • flask_mail
  • Sessions
Example of sessions represented by a “stamp on the hand”
  • Cookies
  • Logging in / out
  • JavaScript
  • “%” → wildcard for SQL commands
  • JSON(JavaScript Object Notation) → jsonify (takes a python list and returns it in a JSON format)
  • jQuery
  • AJAX

Thoughts

This week was really straightforward for me as the principals covered have already been explained to my previously during my Bootcamp course with Flatiron School. Nonetheless, it was intriguing to see everything written in Python using Flask. Can’t believe I only have 1 week of CS50x left - then I’ll be done :)!

Links to Assignments

No assignment this week.

--

--

--

Software Engineer @ Avast

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Retrying fetcher due to error: Bundler::HTTPError

20.6 Example 3: Lack of Pair Programming

images/Cause-effect-diagrams/Lack-of-pair-programming1-compressed.png

It is a very hard to time be a physician right now especially one who is working in the ICU

Using the collections Module for Concise Code

Data Preprocessing With Orange Tool

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Janine L

Janine L

Software Engineer @ Avast

More from Medium

FLASK Web Framework

5 Advantages of Using Python for Artificial Intelligence

I don’t want to use TestCase class anymore!

Top 10 git Commands Every Data Scientist Should Know