Git Product home page Git Product logo

notes's Introduction

CME 211 Notes

2022 CME 211 Canvas page: https://canvas.stanford.edu/courses/158790

In each folder in the lecture directory contents page on GitHub (i.e. this page), there will be either a *.pdf or a *.ipynb file that contains the lecture notes; you can ignore the *.tex or the .md files. Sometimes, there will be other stand-alone code examples as well, these all end in *.py.

Contents

There will be 18 lectures this year.

  • Lecture 0: Getting started
  • Lecture 2: Introduction to Python
  • Lecture 3: Python containers
  • Lecture 4: Python functions and complexity analysis
  • Lecture 5: Python object model, modules, exceptions
  • Lecture 6: Python object oriented programming
  • Lecture 7: Data representation and NumPy
  • Lecture 8: Pandas, SciPy, Matplotlib
  • Lecture 9: Introduction to LaTeX
  • Lecture 10: Introduction to C++, static arrays, variable scope, looping
  • Lecture 11: C++ conditionals, file IO, dynamic memory
  • Lecture 12: C++ functions, IO formatting and stringstreams, preprocessor, and #include
  • Lecture 13: C++ containers: vector, tuple, map and set
  • Lecture 14: Compilation, Makefiles
  • Lecture 15: Boost MultiArray
  • Lecture 16: C++ object oriented programming part 1
  • Lecture 17: C++ object oriented programming part 2, memory management
  • Lecture 18: Introduction to Functional Programming in Scala

notes's People

Contributors

aasavari-kakne avatar alextsaptsinos avatar amyshoe avatar asantucci avatar axelpey avatar chkao831 avatar fredmell avatar fredriclam avatar gri9 avatar jhwetstone avatar sl4ven avatar tedayrit avatar trevormaxfield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

notes's Issues

Lecture 16

Consider adding

  • Examples of new and delete with classes.
  • Consider an example of static storage duration.
  • Qualitative comparison of Global variables with Static class attributes.

Lecture 04 Functions

Clarify further differences between when we can modify passed arguments vs. Not.

Use flags in command line input

Rather than passing input arguments in prescribed number and order, we should encourage students to use command line flags to specify input. For example, instead of giving example for launching area computation program as

$ ./compute_area 10 20

we should provide example that takes input arguments like this:

$ ./compute_area --width 10 --length 20

This way allows students to specify defaults for all input variables, and to enter input argument in any order at the command line.

Scala lecture

Clarify order of arguments for curried functions.

Lecture 10

Make mention of SIMD - single instruction multiple data, and its relation to numpy operations. GPU's excel at SIMD, but CPU's are still capable of executing instructions in parallel. Other common numpy (vectorized) operations include np.log, np.abs, np.maximum

Editor Tutorials

Put together simple set up guides for VIM and Emacs. Consider making config files downloadable.

Cerr and Return Non-zero

Explain cerr and ensure consistency in returning non-zero values upon exit. Clarify relationship (or lack of) between cerr and exiting a program.

Lecture 08 - Rework "Extra Topics"

Some of the material like iterators are already covered elsewhere. Consolidate material more appropriately. Or tie it in more cohesively.

Lecture 06 2-oop Declare GPA in Initialization Routine

To set expectations that useful intermediary data structures should be declared upfront.

Also, make init method initialize data attributes, and then load_name_data can populate them. But all attributes should. be defined in the init method.

Lecture 15 use of auto

Should be discouraged until we cover it properly and in detail. It may obfuscate the examples.

Lecture 11

We need to be a little bit more careful with the terminology used. I.e. we should remove dynamic array from introduction. We are really introducing the relationship between static arrays and pointers, the notion of a pointer (and the corresponding operations that can be applied to a pointer type), as well as the notion of Heap/free-store memory. We should really emphasize that as users of C++ whom are not writing software for other programmers, we shouldn't ever use naked news or deletes in our program, relying instead on the STL (wherein our dynamically sized (and separately, also heap-allocated) vectors come into play).

Create an FAQ document

  • Waitlist
  • Why develop on Rice? (Academic, professional, and efficiency reasons).
  • How to set up code completion via Emacs (and Vim), use 4-spaces instead of tabs, etc.
    See pinned Piazza posts.

Lecture 7

Consider moving underflow mention to section on floating point.

Lecture 02

  1. One of the print formatting statements is missing a digit (a 2 in between a 4 and a zero)
  2. One of the print statement showcasing use of enumerate is missing the first line of output.
  3. It wasn't Euler it was Gauss!

How to Ask a Piazza/Forum Question

We get many questions on homework in the forum. It could be useful to have a document/primer explaining how to ask type(s) of questions. Inspiration can be drawn from a Stack Overflow QA template. E.g. if the question involves understanding how code(s) should work: (i) clarifying details around the question, and possibly a MWE (ii) what has been tried/considered? (iii) attempting to use the Search function (and correspondingly, comping up with a relevant Title for the question if a new one must be created), etc.

Add description of `const` types for C++

In the introduction to C++ lecture, we should mention const types and provide examples for their use. Homeworks and the course project code and material should use and/or refer to const types where appropriate.

Better define variable scope

I think the notes are not so good on this matter:

"The scope of a variable is the region of code within which a variable is visible."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.