## CS50 Week 2: Shorts Part 2

My Advice These next 3 shorts, binary search, recursion, and merge sort were very frustrating at first. Don’t get discouraged. Take lots of breaks, and use the repl.it website so you can write code and see the results quickly. My goal was to write each of these without looking at any reference material, and it …

## CS50 Week 2: Shorts Part 1

Computational Complexity How quickly computers run tasks depends on two factors, generally: Physical Resources Source code optimization Let’s take a \$5,000 computer, and imagine we run a simple “hello world!” program. An expensive computer can handle it, but so can a cheaper \$200 laptop. Run that same program inside a while loop with a condition …

## CS50 Week 2: Lecture

Introduction When a program runs, values are created, modified and destroyed in some cases. Our system needs a medium that can both hold the data and access the data very quickly while the program is running. Another important part of our system is responsible for how fast our programs can run. Because there are many …

## CS50 Week 1 Continued: Walkthroughs

Caesar The Caesar cipher is justĀ nĀ steps away from the letter you are given. If the cipher key is 1, and I give you “GH,” then you would move one step to the right of the alphabet for each letter giving you the decoded message “HI.” The cipher key is the same for every letter given. …

## CS50 Week 1 Continued: Shorts

Debugging This short explains several ways of debugging code in the CS50 IDE. First there is the help50 command. below, I’ve written some code that has a compilation bug. This is the output when we run the make command without help50: Using the help50 command: Now we see a human readable message. On line 10 it …

## CS50 Week 1 Continued: Lecture

Rant CS50 is more often structured in week long units. I can get through that much learning material in about 10 days, including writing a series of articles. The class starts at week 0, and I can only guess that is because programmers count from 0. Week 1 is two units long (week 1 and …

## CS50 Week 1: Walkthroughs

The walkthroughs start off simple then quickly become challenging. Hello(c) How do you create a program that prints to the terminal window when run? Zamyla Chan walks us through our first challenge. View the code on Gist. ~/workspace/pset1/ \$ ./hello Hello, world! Some things to note here are the “int” part of “int main(void),” which …

## CS50 Week 1: Shorts

After the week 1 lecture there are some shorter videos (shorts) explaining specific topics that were mentioned in the previous lecture. Doug Lloyd is the speaker. The shorts discuss the following topics: CS50 IDE (integrated developer environment) Command Line Data Types Operators Conditional Statements Loops CS50 IDE The CS50 IDE is an amazon/cloud 9 web …

## CS50 Week 1: Lecture Part 2

When I first started writing part 2, I thought I could cover the entire lecture from week 0. Turns out there was a lot to cover. Also I was writing this CS50 updated the course from the 2017 version to the 2018 version, which meant the videos are slightly different. But that’s okay, i’m just …

## CS50 Week 1: Lecture Part 1

Last week was about creating a simple program in scratch, so I took what I learned and created a simple game. It’s called protect the penguin, and you can play it here.   Building this simple game helped me understand abstraction and how helpful it can be when trying to create more complicated relationships. Instead …