🗓️ Week 03
Computational Thinking and Programming

DS101 – Fundamentals of Data Science

30 Jan 2023

The old data science Venn diagram

  • This diagram (Conway 2010) is quite outdated, but today, it will prove helpful to think about the computer skills required in data science projects.
  • We will focus on elements of these “hacking” skills today.
  • Hands-on in-class exercises

Computational Thinking

What is computational thinking?

The mental skills and practices related to the following aspects of computing:

1️⃣ Designing computations that get computers to do the jobs for us

2️⃣ Explaining and interpreting the world as a complex information process

1️⃣ Designing computations

We usually have to think like computers to design the proper computations for the job.

  • Input: numbers, symbols, lists
  • Output: a solution
  • Computation: deterministic calculations & symbolic manipulation

2️⃣ Explaining and interpreting the world

We can use computers to create models of the world.

Let us look at a simple, old example of a computational model for urban segregation (McCown 2014) ➡️

What is computational thinking?

Today our focus is on the first aspect:

1️⃣ Designing computations that get computers to do the jobs for us

2️⃣ Explaining and interpreting the world as a complex information process

Algorithms

Recipes for computers

Let’s look at an example

Problem Definition:

Whenever I receive a list of numbers, I want to ensure this list is ordered.

Breakdown

  • Input:

    [10, 20, 30, 23, 50]

  • Output:

    [10, 20, 23, 30, 50]

  • Computation:

    How would you solve it❓

🎯 Action Point

  • Pair up with a neighbour to come up with a recipe that solves the problem, regardless of the list size.

  • Test that your recipe works for the following list:

[237, 153, 311, 33, 854, 212, 368, 356, 100, 892, 805, 755]

Time for coffee ☕

After the break:

  • R vs Python
  • Computational Notebooks
  • Markdown
  • Examples from Kaggle

(no slides, all live demos)

References

Conway, Drew. 2010. “The Data Science Venn Diagram.” Drew Conway. http://drewconway.com/zia/2013/3/26/the-data-science-venn-diagram.
Denning, Peter J., and Matti Tedre. 2019. Computational Thinking. The MIT Press Essential Knowledge Series. Cambridge, Massachusetts: The MIT Press.
HackerEarth. 2023. “Bubble Sort Visualize Sorting Algorithms.” HackerEarth. https://www.hackerearth.com/practice/algorithms/sorting/bubble-sort/visualize/.
McCown, Frank. 2014. “Schelling’s Model of Segregation.” Schelling’s Model of Segregation. http://nifty.stanford.edu/2014/mccown-schelling-model-segregation/.