Lecture 26 Slides - Programming and Thinking Paradigms

1 of 12

Lecture 26

Programming Languages and Paradigms

2 of 12

engineering v. programming

3 of 12

What’s the best language?

  • There isn’t one
    • Different languages for different projects
    • Languages come and go pretty fast
    • “We use about 10 languages a year, but they change from year to year
  • You want to learn to program
  • You want to learn programming paradigms/styles
    • Functional (declarative)
    • Imperative
    • Object-oriented
    • We’ll do all three of these this quarter
  • You want to learn to learn languages
    • No matter what we teach you, 80% of you won’t be using at your jobs

4 of 12

The Racket language

We started the quarter using Racket’s Intermediate Student Language and then moved to the Advanced Student Language. These are dialects of Racket!

  • Low barrier to entry (for those with and without programming experience)
  • More powerful than more conventional languages
  • Specifically designed to use to learn how to program
  • Racket itself is a language-oriented language. You can use it to build your own programming languages for specialized content domains.
    • Multi-paradigmatic – functional…imperative…object-oriented
    • VideoLang is an example of a domain-specific language
    • Racket's parser can be modified to emulate any kind of syntax

5 of 12

Currently Popular Text-based Languages

  • Python (CS 150) - popular in machine learning and data science
  • C and C++ (CS 211 and upper-level compilers courses)
  • JavaScript - popular in web development
  • Java - popular in security focused applications
  • Rust - this is the hot new thing
  • Perl - popular in networking contexts
  • Go - popular in video/audio editing
  • Swift - iOS/Mac development

6 of 12

Most popular programming languages over time

7 of 12

How do you choose what language to use?

  • Performance
    • What is the most common operation you'll be doing?
    • What sort of hardware will you run on?
    • How crucial is performance and will it be distributed?
  • Talent
    • Programmers are by far the most limited resource in software engineering.
    • Is there an existing talent pool?
    • Will you have to have training?
  • Domain-specificity
    • What sort of work are you doing?
    • Will it need to be used by non-software engineers?
    • Can you take advantage of domain-knowledge to improve the development process?

  • Security - Has the programming language been verified to be secure? What about your 3rd party libraries?

  • Licensing - Is it free to use? Is it extensible? What about libraries? What's the attitude of the community?

8 of 12

Learning new languages

Open-source Projects

Tutorials

Documentation

StackOverflow

9 of 12

Domain/context specific languages

10 of 12

Bifrost (Maya)

11 of 12

Max (from Cycling 74)

12 of 12

NetLogo (designed at Northwestern)