Programming - CS50 CDN

Transcription

Programming

Software

dell.com

apple.com

apple.com

google.com

Code

Algorithms

12345678910111213pick up phone bookopen to middle of phone booklook at namesif Smith is among namescall Mikeelse if Smith is earlier in bookopen to middle of left half of bookgo back to step 3else if Smith is later in bookopen to middle of right half of bookgo back to step 3elsequit

12345678910111213pick up phone bookopen to middle of phone booklook at namesif Smith is among namescall Mikeelse if Smith is earlier in bookopen to middle of left half of bookgo back to step 3else if Smith is later in bookopen to middle of right half of bookgo back to step 3elsequit

12345678910111213pick up phone bookopen to middle of phone booklook at namesif Smith is among namescall Mikeelse if Smith is earlier in bookopen to middle of left half of bookgo back to step 3else if Smith is later in bookopen to middle of right half of bookgo back to step 3elsequit

12345678910111213pick up phone bookopen to middle of phone booklook at namesif Smith is among namescall Mikeelse if Smith is earlier in bookopen to middle of left half of bookgo back to step 3else if Smith is later in bookopen to middle of right half of bookgo back to step 3elsequit

12345678910111213pick up phone bookopen to middle of phone booklook at namesif Smith is among namescall Mikeelse if Smith is earlier in bookopen to middle of left half of bookgo back to step 3else if Smith is later in bookopen to middle of right half of bookgo back to step 3elsequit

functions loops conditions Boolean expressions

functions loops conditions Boolean expressions variables threads events .

#include stdio.h int main(void){printf("hello, world\n");}

00000001000000010000000000000001000110 0000001000000000 0000000000000000 0000000100000000 0000000000000000 0000000000000000 0000000000000000 0100000000000000 0010010000000000 0000010100000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000000000000000 0000010000000000 0000000000000000 0000000000000000 0000000000000000 000000000000000000000000000000000000000

#include iostream int main(){std::cout "hello, world" std::endl;}

print("hello, world")

203691013LOAD GLOBALLOAD CONSTCALL FUNCTIONPOP TOPLOAD CONSTRETURN VALUE0 (print)1 ('hello, world')1 (1 positional, 0 keyword pair)0 (None)

class Hello{public static void main(String [] args){System.out.println("hello, world");}}

put "hello, world"

(print "hello, world")

console.log("hello, world")

functions loops conditions Boolean expressions variables threads events .

BashCC C#ClojureErlangF#GoHaskellJavaJavaScript Objective-COCamlPHPPythonRRubyScalaSchemeSQLSwift

wikipedia.org/wiki/List of programming languages

Programming

1 pick up phone book 2 open to middle of phone book 3 look at names 4 if Smith is among names 5 call Mike 6 else if Smith is earlier in book 7 open to middle of left half of book 8 go back to step 3 9 else if Smith is later in book . JavaScript Objective-C OCaml PHP Python R Ruby