Conclusion

Tips for navigating the slides:
  • Press O or Escape for overview mode.
  • Press the copy icon on the upper right of code blocks to copy the code

Class outline:

  • Conclusion

What did we learn?

Programming paradigms

Imperative programming: using statements to change a program's state.


                    nums = [1, 2, 4]
                    for i in range(0, len(nums)):
                        nums[i] = nums[i] ** 2
                    

Functional programming: expressions, not statements; no side-effects; use of higher-order functions.


                   list(map(lambda x: x ** 2, [1, 2, 4]))
                    

                    (map (lambda (n) (expt n 2)) '(1 2 4))
                    

Programming paradigms #2

Data-centric and object-oriented programming.


                    t = tree(3, [tree(1), tree(2, [tree(1), tree(1)])])
                    [b.label for b in branches(t)
                    

                    innocent_bee = Bee(5)
                    horrible_ant = Ant(10)
                    innocent_bee.fend_off(horrible_ant)
                    

Declarative programming: State goals or properties of the solution rather than procedures.


                    (.+)@(.+)\.(.{3})
                    

                    calc_op: "(" OPERATOR calc_expr* ")"
                    

                    SELECT parent FROM parents, dogs
                        WHERE child = name AND fur = "curly";
                    

Programming concepts

  • Data storage:
    • Primitive/simple types: booleans, numbers, strings
    • Compound types: lists, linked lists, trees
  • Environments: rules for how programs access and modify named objects
  • Higher-order functions: Functions as data values, functions on functions
  • Recursion: approaching a problem recursively, general recursive patterns
  • Mutability: mutable objects, mutation operations, dangers of mutation
  • Exceptions: Dealing with errors
  • Efficiency: Different programs have different time/space needs

Software engineering

  • Abstractions, separation of concerns
  • Specification of a program vs. its implementation
    • Syntactic spec (header) vs. semantic spec (docstring).
    • Example of multiple implementations for the same abstract behavior
  • Testing: for every program, there is a test.
  • Coding style (Composition)

What's next?

What's next?

After passing CS 111, you can now take the following CS courses:

  • CS 235: Data Structures
  • CS 260: Web Programming
    • Required for CS major, elective for CS minor
    • Language: JavaScript (similar to Python)

Specialized CS Courses

Here are some other CS courses you could take:

  • CS 202: Software Engineering Lab 1
    • 1 credit course for Software Engineering Emphasis
    • Language: Java
  • CS 180: Intro to Data Science
    • Language: Python

CS Courses Prerequisites

CS 235

CS 224 or CS 236 or CS 240

(All these courses are required for the CS Major. CS Minor requires 236 and 240. See BYU catalog for more course details: https://catalog.byu.edu/programs/34712

Teaching Assistants

Opportunity to be a TA for CS 111

  • Run a Section 💻
  • Build your peer network 👥
  • Share your knowledge and enthusiasm 🎉
  • Help other students succeed and feel they belong ⚓
  • Details 👇
    • Work from 4-15 hours per week
    • Flexible office hours
    • Contact your TA Section leaders

Don't forget to thank this semester's TAs 👏

Thank you!