> ديفيد : مرحبا ، اسمي ديفيد مالان وهذا هو CS50. وهذه ليست لكم قصة نموذجية الكمبيوتر في المدرسة الثانوية بالطبع العلم. هذا بالطبع هو قليلا شيء خاص. وانها ليست لأنني تعليمه. ذلك لأن هذا هو واحد ، ونحن نحب ان نعتقد ، أن هذه الدورات نادرة فعلا العصرات عقلك الكثير والكثير من الجدول الزمني الخاص بك أنه بحلول نهاية فصل دراسي لكنت تشعر حقا أكثر ذكاء. لذلك ، وهذا هو الطريق شعرت نفسي عندما أخذت هذه الدورة مرة أخرى في عام 1996. لقد كنت كبيرا الحكومة في ذلك الوقت هنا يعيشون في البيت ماثر. و، I. [هتاف] وكما هي الأخرى ، وهناك خمسة اخرون. لذلك ، لقد كنت كبيرا الحكومة في ذلك الوقت. وكنت رئيسي الحكومة لأنني كنت دائما أحب التاريخ. أعجبني القانون الدستوري في المدرسة الثانوية. وهكذا ، أنا مجموعة من الموظفين الجدد على هذا الطريق العام ما أقوم به أفضل ، وتفعل ما كنت أعرف أعجبني. كنت وكنت دائما قليلا من المهوس ، هذى أنا دائما مع أجهزة الكمبيوتر. ولكن ، أنا نفسي ، ويا للسخرية وربما في وقت لاحق ، كنت دائما ينظر الرجال الذين كانوا يأخذون علوم الكمبيوتر في مدرستي الثانوية ، أصدقائي مثل المهوسون الحقيقي. وحتى الآن ، لم أخيرا ، طالبة في العام الدراسي وأغتنم هذه القليل CS50 التي تسمى في الواقع كان خائفا لي بعيدا سنتي طالبة الخاصة. وكنت مساعدا للمستخدم في ذلك الوقت. لذلك ، وكنت بالتأكيد تأهل بالفعل ، على الأقل ، أن يكون من بين هؤلاء ، تلك المهوسون الذي أدليت به من متعة في المدرسة الثانوية. ولكن ، كنت خائفا. كان هناك ، انها هذه السمعة في ذلك الوقت وربما لا يزال في جزء منه أنه كان ، وهو بطبيعة الحال مخيف. وكان هناك الكثير من العمل. كان من الصعب وحتى الآن ، انها واحدة من تلك الأشياء التي ، يا إلهي ، النباح كان أسوأ بكثير من قوته. وجدت نفسي طالبة سنة ، لأول مرة ، حيث وجدت فعلا متعة المنزلية. وأنا لا أقول هذا لمجرد أن هذا البرنامج الدراسي من الملعب لك. وكان هذا الإدراك الحقيقي بالنسبة لي. الآن ، وأعتقد ، في نقطة واحدة ، لم أكن لعبور خط geekdum صحيح حيث كنت في الواقع لنتطلع إلى ليلة الجمعة لأنني لم أتمكن عقص أمام ماكبوك بلدي قليلا والعمل على مجموعات مشكلة في CS50. لذلك ، عند هذه النقطة ، وأعتقد أنني قد عبر بشكل واضح على خط المرمى. وهدفنا في هذه الدورة ليست لتحويل كل واحد منكم في هذا الشخص ، ولكن ، لمجرد أن نقول أن هناك شيئا قليلا خاصة حول هذا البرنامج الدراسي ، وهو العلم شيئا قليلا خاصة حول جهاز الكمبيوتر بشكل عام وخاصة في هذه الأيام. و، والمزيد من تأقلم لدينا جميعا حصلت في التكنولوجيات ، والمزيد من اللعب ونحن تحملها في جيوبنا التي هي في حد ذاتها أجهزة الكمبيوتر. يعني ، اي فون بلدي هو في الواقع أعلى من أداء الكمبيوتر المحمول الخاص بي في الكلية. يمكنك أن تفعل الكثير من الاشياء أنيق مع هذه الأشياء. والآن ، أكثر منا في هذه القاعة ، وربما مجرد استخدام البرمجيات الآخرين ، وأدوات أخرى الناس ، والحلول الآخرين لمشاكل لأننا الذهاب الى اي تيونز ، ونحن تحميل بعض التطبيق من التطبيق المتجر ووالا يمكننا ان نفعل شيئا حقا أنيق. ولكن ، في نهاية هذا الفصل الدراسي ، يمكنك أن تفعل ذلك الشخص على حل المشاكل. يمكنك أن تكون الشخص حل بعض المشاكل ، وبناء هذا التطبيق ، أن قطعة من البرمجيات ، تلك الأداة التي ، إما واحد يسلي لي فقط ، ويسلي لك. على سبيل المثال ، والسيطرة ، ويقول ، لديك اي تيونز مكتبة تحتوي على شقق سكنية من التطبيق الخاص وبوضوح موجود مسبقا أو يمكنك العثور على جداول مكوك بسهولة أكبر على سبيل المثال. ذلك في الواقع ، واحدة من أول الأشياء جدا فعلت بعد أخذ CS50 ومرة أخرى ، فإنه ربما كان في هذه النقطة ليالي الجمعة والسبت ليال ، كان هناك هذه الفرصة في ذلك الوقت حيث تم تشغيل الحافلات هارفارد المكوك. والى هذا اليوم ، فإنها لا تزال مطبوعة الجداول. ولكن ، كان هناك فعلا يعني عدم وجود على الانترنت لمعرفة عندما كان المكوك المقبلة. الآن ، لكنني لم أكترث ، لأنه حتى وإن كنت أعيش في ماثر أنني لم أكن من بين أولئك الذين أخذوا عموما المكوك. ولكن ، كان لدي الكثير من الأصدقاء في Pfoho على سبيل المثال. واحد منهم طلب مني ، وأعتقد أن في عند نقطة واحدة. [هتاف] مقبول Pfoho أفضل من ماثر على ما يبدو. لذلك ، وحصلت على واحدة من هذا النوع من أصدقائي لي التفكير ربما أستطيع كتابة برنامج قليلا إلى نوع من المساعدة أصدقائي الاختيار جداول المكوك. وهكذا ولدت صبيا اسمه مكوك مؤلم ، وهذا جزء من المعجم الذي بقي في جميع أنحاء لبعض عدد من السنين على الأقل بين بعض من طلاب السنة الثالثة أو الرابعة. في ذلك الوقت ، كان هذا الأمر هذا الخط قليلا برنامج مماثل في روح لدوس. وكان يعمل في بيئة يونيكس. لذا ، لم يكن مثير جدا على الإطلاق. كتبته مجرد أوامر زوجين وقال لك عندما كان المكوك. حسنا ، في هذه الأيام هو قليلا أكثر تعقيدا. ، وتعبر عن الواقع بدقة من أنواع المشاريع التي الطلاب في نهاية هذا بالطبع الأمر جعل من حيث الغاية. لذلك ، وهذا هو الإصدار الأربعة ، نحو 15 عاما في وقت لاحق ، من Shuttleboy. يبدو خرائط جوجل يجري بطيئا بعض الشيء هناك. ولكن ، بالنسبة لأولئك منكم الذين يجب أن نخرج من هنا ويذهب بعد فئة ، ويقول ، من القاعة التذكارية والحاجة الى الذهاب الى ويقول ، ورباعية. حسنا ، يمكنك إما ترك في دقيقتين لو كان هذا حقا لا يعمل للكم فقط حتى الآن ، أو لديك كما العديد من الخيارات الأخرى كما قد شابه ذلك. وقريبا ، يمكننا من هذا الملعب CS50 ، سيكون من القدرة نفسها عن طريق الرسائل القصيرة. يمكنك Shuttleboy نص عبر الهاتف. يمكنك استدعاء Shuttleboy. عدد CS50 هاتف من هذا العام ، وأيضا ، وكان هذا مثير للدهشة المتاحة ، 617 - الشوائب - CS50. لذلك ، لاول مرة والتي في وقت قريب. لذلك لا يطلق عليه حتى الآن لمجرد أنني قد حصلت على توبيخ ل، الحق الآن في أن يتم توجيه الهاتف الخليوي نظام تعليم ابنائنا في الرأس و. لذلك ، ستحصل عليه فقط إذا كان لديك تساؤلات حول الجدول الزمني للمكوك الآن. ولكن ، التي ستبدأ قريبا تنفيذ. لذلك ، وأشياء أخرى ، في الواقع ، نحن أنفسنا أن هذا الصيف قضى على فعلا في التحضير لهذا الفصل الدراسي كان في مجمله مجموعة من المشاكل الأخرى التي كنا نرغب في حلها. على سبيل المثال ، هناك مجموعة كبيرة من الاشياء التي يدور في هذا الحرم الجامعي في يوم معين. وفي الواقع ، بعبارة أخرى ، هناك الكثير من الاشياء كله يجري في هذا الحرم الجامعي أنني بالتأكيد لن تستفيد من. وعلى الرغم من الآن وأنا ابن طغت مع كم من الأمور التي تجري في الحرم الجامعي ، وأنا لا يزال يبدو أبدا أن يجد الوقت. ولكن ، والا ، وحتى هناك ، في محاضرة CS50. وكان هذا وهذا هو المكان الذي هو ، لذلك كان هذا ، وهو برنامج كتبنا لتجميع جميع الأحداث التي وقعت في الحرم الجامعي. وكان هذا الشيء الذي قد تناول طلاب آخرين في هذه الدورة نفسها بنفسها. وقمنا بالتعاون مع الكيانات الأخرى في الحرم الجامعي لجعل هذا يحدث فعلا. ولكن النقطة لCS50 هذا المصطلح هو أن جميع هذه البرامج قليل كنا العمل على ما إذا كانت هذه واحدة أو ما إذا كان واحد لتجميع كل الأخبار جامعة هارفارد في مكان واحد ، وجميع أخبار جوجل ، كل هذه الأمور ستكون لدينا ما ودعا المعهد ، واجهات برمجة التطبيقات. وهذا هو مجرد نزوة تتحدث عن القدرة على ترك المجال للآخرين ، والأشخاص الموجودين في هذه القاعة ، والقيام فعلا شيء مع أن نفس البيانات. لذا ، من حيث الغاية ، إذا قررت تنفيذ المشروع النهائية المتصلة الأخبار أو الأحداث أو الخرائط ، وكذلك نحن ، على الأقل كوسيلة للبطبيعة الحال ، سوف يجعل ذلك أكثر سهولة للجميع هذا العام عن طريق توفير لكم مع واجهة ، وهو نوع من وظيفة ، إذا جاز التعبير ، والبرمجيات التي يمكن استخدامها في المشاريع الخاصة بك لتذهب بما يتجاوز فيها الطلاب ، ربما ، قد ذهبت في الآونة الأخيرة بسبب هذا الإطار لم يكن في مكان لهم. ومرة أخرى ، كل هذا بدأ ، بالنسبة لي على الأقل ، ما يقرب من 15 عاما منذ تنفيذ Shuttleboy. أنا بالبريد الالكتروني ثم كين صديقي في Pfoho. قلت يا ما رأيك؟ الفائدة من هذا؟ انه بالبريد بها على قائمة Pfoho مفتوحة والا ، وطوال هذه السنوات في وقت لاحق ابن حلب على ما يبدو لا يزال هذا المشروع. والشيء أنيق عن ذلك ، وهذا هو المكان للغاية بالطبع مثل هذا في الهندسة وعلوم الحاسوب ، كما أعتقد ، هو قليلا خاصة ، هو أنه عند القيام منزلك الأشغال وعند القيام مشاريعك في هذا بالطبع ، كنت أعرف ، وكثير منهم ، نعم ، أنت وضعت جانبا وعدم استخدام حقا مرة أخرى. ولكن البعض منها ، وسوف. وهناك هذا الشيء قوية حقا ، على الأقل بالنسبة لي ، وهذا شيء مثير حقا ، عند تقديم شيء وغيرهم من الناس يهتمون بالفعل ، الناس لا مجرد ابتسامة وبات الفرز الخاص على الظهر ثم من حياتهم الخاصة. يستخدمونها بالفعل ما قمت به في حياتهم حتى لو كان لشيء سخيف أو بسيطة كما الحقائق فقط عندما يمكن أن نخرج من هنا للقبض على الرحلة القادمة إلى رباعية. لذا ، من حيث الغاية ، وهذا هو أحد الأهداف لهذه الدورة ، لتمكين يا رفاق لتحديد فقط بعض المشاكل سواء كان ذلك داخل الحرم الجامعي أو أمل إلى أبعد من الحرم الجامعي ، وفعلا استخدام المهارات الخاصة بك ، واعتبارها الخاص بك وحل هذه المشكلة في بعض جزئيا ، من الناحية التكنولوجية. لذلك ، وهذا هو أيضا بالطبع كما نقول في المنهج ووصف مسؤول الدورات التي كنت تعلم كيفية التفكير ويعلم لكم كيفية حل المشاكل بطريقة أكثر كفاءة. حسنا ، ماذا يعني ذلك؟ حسنا ، عندما كنت قد حصلت على 600 ميغاهرتز في جيبك أو ثلاثة جيجاهيرتز تحت مكتبك في المنزل ، ويمكنك حل الكثير من المشاكل بكفاءة فقط عن طريق القوة الغاشمة القص. ولكن ، هناك الكثير من المشاكل في هذا العالم ، سواء كان البحث ، ويقول ، شبكة الفيس بوك ، او الانترنت عبر جوجل ، وأنه لا يهم مدى سرعة الكمبيوتر بشكل خاص ، وليس هناك وسيلة في الجحيم وأنت تسير إلى البحث المليارات من صفحات الويب بسرعة إلا إذا كنت فعلا نهج هذه المشكلة بذكاء. كنت لا مجرد البحث ، على سبيل المثال ، قائمة كبيرة من جميع صفحات الويب من على وجه الأرض من أعلى إلى أسفل تبحث عن شيء ذات الصلة لشروط البحث ما كنت تبحث عن جوجل جوجل نأمل ويفترض وفيس بوك وأي من هذه الكيانات الكبيرة لديهم الكثير من الناس الذكية التفكير في الكيفية التي يمكن أن تجد المزيد من البيانات بسرعة ، وكيف يمكن معالجة المعلومات بشكل أكثر كفاءة ، والكيفية التي يمكن أن مجرد عودة عموما النتائج بسرعة أكبر بحيث يمكنك القيام به حتى الآن ، وأشياء أكثر إثارة للاهتمام مع هذه الأجهزة. والأمر كذلك ، فما الذي نعنيه ، على الرغم من مدى ، تعليم الناس كيفية التفكير بعناية أكثر ، وأكثر حسابيا. حسنا ، هذا يبدو قليلا البصرية دائما أن يذهب أكثر من جيد. ويبدو أن لا تنسى. وسئلت حتى يوم أمس فقط من قبل طالب سابق ، يا أنت ذاهب الى ان تفعل الشيء دليل الهاتف مرة أخرى. وأنا الى حد كبير على الفور قرر متأكد ما يرام سنقوم بناء شيء دفتر الهاتف. كنت وطلب مني عند مزق في النصف الأيمن ، مثل نعم جيدا من الناحية التقنية نحن مزق في نصف ولكن ليس في الطريقة ، في الكمبيوتر طريقة العلم وسوف تكون قادرة على تمزيق هذا الشيء في النصف. وهكذا ، وهنا المشكلة التي طرحناها لبعض الوقت. لذلك ، وهنا دليل الهاتف. انها حصلت على ما لا يقل عن ألف صفحة أو نحو ذلك. والهدف بسيط في يد عالم حقيقي جدا هو أن يجد ، يقول ، وهو شخص هنا. لذلك ، مايك سميث ، اسم العائلة بدءا س لذا ، أنا إنسان عادي ، أنا التقط هذا الكتاب الهاتف. وأي شخص هناك ، وماذا كنت ، وهو شخص عادي ، لا لبدء البحث مايك سميث ، من الواضح عدم معرفة مسبقا ما الصفحة هو في الواقع على. الحق ، لذلك تذهب تقريبا في الوسط ، اليمين. وعند هذه النقطة في القصة ، وأنا على الارجح في ن أو لم ، كما تعلمون ، في منتصف الطريق تقريبا خلال دليل الهاتف. تبين ، في آخر مرة فعلت هذا المثال وجدت نفسي بطريقة ما في قسم الحراسة. لذلك ، فإنه في الواقع ليس متوازنا على قدم المساواة بين ألف ونون من خلال عمليات الاندماج من خلال ز. ولكن ، اليوم ، ونحن ، في الواقع ، في الرصد ، وذلك ما يرام ، والآن أنا في إمز. ولكن ما هو بلدي الآن الوجبات الجاهزة تماما كما قبالة الإنسان العادي في الشارع؟ أين أذهب المقبل لمايك سميث. [غير مسموع] وهكذا ، ربما فقط في هذا الشوط ، والحق ، لأنه يأتي بعد اس م وهكذا ، هنا تكمن المأساة البصرية. هذا ليس حقا في تمزيق نصف ، والحق. خدع النوع الأول من أسفل المركز. ولكن ، ونحن نعلم الآن أن مايك هو على الأقل ليس في هذا الشوط. يمكننا رمي حرفيا نصف المشكلة بعيدا. وأنا غادرت مع المشكلة التي لا تزال في الأساس الشيء نفسه ، والعثور على مايك سميث في كتاب كبير حقا. ولكن المشكلة الآن نصف كما كبيرة. إذا كان لديها قبل ألف صفحة ، والآن انه حصل على 500. أنت تعرف ماذا ، ويمكنني أن تفعل الشيء نفسه مرة أخرى. يمكن أن النوع الأول من متكرر أو بشكل متكرر تفعل الشيء نفسه. أنا الآن ليست واردة في س أنا في T. وهكذا ، يا ذهبت قليلا بعيدا جدا. أراهن ولكن ، وأنا أعلم الآن أن مايك ليست للحق ، وهناك سيكون بعض الطبقة يوما ما حيث لا يمكنني المسيل للدموع الشيء السد. ولكن الآن ، وأنا أعلم انه ليس على حق. حتى الآن ، وقد تم إيواء هذه المشكلة. لذلك ، لقد ذهبت من ألف إلى 500-250 صفحة. ومرة أخرى ، إذا كنت لا تزال في المنطق ، والاستمرار في الرياضيات ، وأنا تقطيع هذه المشكلة في نصف ، ونصف ، ونصف حتى النهاية انا ذاهب إما لعدم العثور على أي سميث في كل شيء ، من غير المحتمل ، أو سأشارك العثور على واحد أنا أبحث عن. ولكن ، هذا ، بعد ذلك ، يطرح السؤال ، هل هذا أفضل من أي نهج بسيط لمجرد القول ، كما تعلمون ، هناك ، كلا ، وباء ، لا ، بدءا من اليسار إلى اليمين الانتقال خطيا من خلال الكتاب؟ حسنا ، نعم غريزي. انها ستكون على نحو أسرع كثيرا. ولكن ، كم أقل؟ حسنا ، إذا كان لدي هاتف ألف صفحة كتاب أو دعنا نقول 1024 لأولئك منكم الذين يحبون سلطات اثنين ، كم من الوقت يمكن أن لدي لتقسيم هذه المشكلة في الشوط الاول قبل العثور على السيد سميث؟ > عشرة. > ديفيد : إذن ، 10 ، والحق. إذا كان لديك 1024 صفحة ، وكنت تقسيمها إلى النصف ، في نصف السنة ، في النصف ، والنصف ، أفعل ذلك عشر مرات وهو ما يعني أن أذهب من 1000 صفحة الى الشخص أنا أبحث عن عشر صفحات فقط في المنعطفات. وهذا النوع من أنيق ، ولكن ، كما تعلمون ، إذا كنت تفكر في ذلك قمت به كل هذا من حياتك. انها ليست مثيرة. ولكن الآن ، أن دليل الهاتف ليست مجرد لبوسطن ، انه بالنسبة للولايات المتحدة بأكمله أو العالم بأسره وهذا الشيء قد مليارات الصفحات في ذلك ، تخيل ذلك أرقام الهواتف ، مع أربعة مليارات الصفحات. كيف تحول كثير من الصفحة انا ذاهب الى ان تفعل الحد الأقصى للعثور مايك سميث في دليل الهاتف 4000000000 الصفحة؟ > قاعدة السجل <اثنين. > ديفيد : نعم ذلك ، إذا كنت نوع من نوع الرياضيات هذا هو سجل قاعدة اثنين. ولكن ، إذا كنت تعتقد 4000000000-2000000000 to المليار و حتى من نصف مليار دولار. أعني ، أن يذهب في الواقع نفسه ينجر إلى أسفل الرتق سريع. في الواقع مع 32 halvings من دليل الهاتف حتى من أربعة مليارات ، وسوف نبدأ صفحة واحدة. وذلك عندما يحصل على هذه الاشياء القوية ، وأعتقد. وذلك عندما تحصل على هذه الأفكار عند مقنعة يمكن أن يكون مشكلة 4000000000 وفي 32 صفحة الخطوات التي يمكنك العثور على الشخص الذي تبحث عنه. وهكذا ، وهذا ما نعنيه عندما نقول أن عليك أن تتعلم كيفية التفكير بعناية أكثر ، وأكثر حسابيا ، أكثر ذكاء حول حل المشاكل. ويعود ضخمة عندما يمكنك القيام به في الواقع هذا ، ومرة أخرى ، إلى هذه النقطة من جوجل من العالم Facebooks الذين لديهم ترف ان قواعد البيانات الضخمة. كنت قد حصلت على نهج هذه المشاكل في هذه الطريقة وإلا فإنه ببساطة لن تجدي نفعا. حسنا ، ما هو ماذا فعل الطالب أذكر في الواقع؟ الأول ، نود أن تفعل الأشياء التي هي قليلا سخيفة في بعض الأحيان إلى نوع من اتخاذ حافة الخروج من ما هو غير ذلك الكثير من المواد الجديدة. وهكذا ، فإنه في الواقع ، أرسلت هذا الطالب السابق لي هذه الوصلة التي ذهبت إلى الأمام ، لمجرد ركلات وأعرب عن أسفه بعد ذلك في النهاية ، وانسحبت حتى على uTube هنا. وهكذا ، اعتقدت انني سوف تتقاسم ما عالما غير الكمبيوتر يعني عندما الدموع أرقام الهواتف في نصف. [ضحك] [الصمت] [] غير مسموع > أنت تعرف أكثر من 200 صفحة ، خط نظيف لطيف وشرعية المسيل للدموع. [ضحك] > ديفيد : هكذا أفترض ، طريقه يعمل أيضا. الأمر كذلك ، فما خرجت من هذه الدورة كل تلك السنوات منذ ذلك هو نعم ، Shuttleboy ، ومن ثم نعم على شهادة البكالوريوس في علوم الكمبيوتر ، ومن ثم نعم على الدكتوراه في علوم الكمبيوتر. وهذا ليس ما نقوم بمحاولة تحويل معظم الطلاب في هذه الدورة في. معظمكم في هذا البرنامج لن يذهب على رئيسي في علوم الكمبيوتر. البعض منكم قد طفيفة ، ولكن للبعض منكم هذا سيكون بالطبع المحطة الطرفية. وهذا هو تماما غرامة لهذه الدورة هو ، في الواقع ، منظم بطريقة فيها حتى لو كنت مجرد دفع المستحقات الخاصة بك لعدة أشهر ، وكنت تركز حقا في وأنت تأخذ حقا كما وردت الكثير من هذه الدورة كما يمكنك ، سوف ، في واقع الأمر ، أن تكون مجهزة بشكل جيد للعودة إلى العالم الخاص من الاقتصاد ، وعلم الأحياء وعلم النفس والرياضيات التطبيقية ، وفعلا الاستفادة من ما هو في نهاية المطاف للاهتمام في دورة ونحن نأمل أن المفهوم كما هو في الأساس العملي. وهذا هو أيضا شيء أن يكون قليلا ربما من النادر أن تجد. كنت اعتقدت أن تشترك في بعض التعليقات أن الطلاب من الخريف الماضي وضعت في هذا الدليل الماضي جديلة سنوات ردا على سؤال حول ما اردت ان اقول طلاب المستقبل. حسنا ، إذا لم تكن قد بدا بالفعل في هذه التعليقات ، وقال أحد الطلاب هذا بالطبع سوف يستغرق قدرا كبيرا من وقتك فوق. ولكن ، إذا وضعت عملك في عالم جديد كليا ، في مجموعها ، إذا وضعت في العمل ، وإذا وضعت في العمل ، ما يرام ، لذلك هذا هو النحو الذي ليس من الألغام ، حتى انك اذا وضعت ، وضعت في العمل ، والعالم كله جديد يفتح لك. مذهل كم تعلمت فقط في 12 أسبوعا. كتب طالب آخر ، وانت تأخذ هذا أفضل أو وأنت تسير لنأسف لذلك. وكتب آخر ، أكثر من ذلك بقليل بصراحة ، سيكون من ركلة الحمار الخاص بك ، وأترك لكم شعور عظيم. ثم وأخيرا ، هذا هو واحد ربما شيء يمكن أن تظهر إلا في الكتابة ، ولكن ، الثاني من الأسفل هنا. [ضحك] لذا ، أنا لست متأكدا إذا كان لديك الكثير من الاصدقاء الذين تناولوا هذا بالطبع لكننا لم النوع من الكثير من الضرر للطلاب في العام الماضي. قدمنا ، في البداية ، عدة محاضرات ، ومسابقات قليلة ، وبضع مجموعات المشاكل ، وهذا مفهوم lolcats. لا يمكنك معرفة ما أستطيع أن أرى هنا ولكن في لحظة سترون شاب يدعى سعيد القط الذي هو زعيم ما يسمى lolcat. هذا هو واحد من المهاجمين الانترنت غبي بصراحة أعتقد أن الانقسام بين اثنين من هؤلاء السادة ، وهنا ما لدينا الآن على الشاشة وربما كان. [ضحك] واحدة من أكثر الاستخدامات غير الملائم لهذا المسرح حتى الآن. و، لماذا لا نجعل قليلا أكثر واقعية أكثر من ذلك بقليل الشخصية هذه الفكرة في الواقع حل مشكلة أكثر كفاءة. وهناك مشكلة بسيطة في يوم واحد من أي مدرسة هو الجلوس أو الوقوف والبدء في عد الطلاب ، وبنداء الأسماء حق من نوع ما. حسنا ، والنهج الأكثر ساذجة ولكنها مع ذلك ، صحيح جدا أن المعلم قد يستغرق واحد ، إثنان ، ثلاثة ، أربعة ، خمسة ، ستة ، سبعة ، وسنكون هنا بعض الوقت. اذن ، ما هي تحسن هامشي على هذا أنه حتى ربما كنت قد فعلت عندما كنت طفلا؟ كيف يمكنك أن عدد الناس أسرع؟ و، لا تبدأ من قراءة التعليمات الخاصة بي؟ ماذا كنت تفعل عندما كنت طفلا؟ بدء فرز ثنائي ، والحق ، مثل لذلك أنا جيدة في اثنين ، وأربعة ، ستة ، ثمانية ، 10 و 12. لذلك ، وهذا شيء حق مثيرة للاهتمام. لذلك ، كم من تحسن هو أن هناك؟ الأمر كذلك ، فمن الواضح أن عامل من اثنين. يستغرق مني نصف الكثير من الوقت. ولكن ، هل تعرف ما هي ، ونحن سوف تجد طوال هذا الفصل الدراسي ، صفقة كبيرة ، مثل تسريع تشغيل وقتك من قبل عامل واحد فقط من اثنين ليس كل ما للاهتمام لأن التناظرية هنا في عالم الكمبيوتر هو أن ابن وحدة المعالجة المركزية ابن كمبيوتر ، إضافة إلى هيك ، اذا كنت مجرد الانتظار 12 شهرا ، 18 شهرا ، وسوف يكون مجرد جهاز الكمبيوتر قادرة بحكم طبيعتها ، من قبل عدد من جيجاهيرتز لدي في أن أكون قادرة على الاعتماد الموجودين في هذه القاعة بشكل أسرع. لذلك ، هذه الأنواع من هذه الأنواع من speedups الخطية مثل عامل من اثنين من ثلاثة أضعاف ، وعامل حتى عشرة ، من يهتم؟ الحق ، لا يمكننا إلقاء الأجهزة في هذه المشكلة. ولا يمكننا الانتظار الامور. ويمكننا تطوير آلات أسرع. ولكن ، فكريا ، نعم هذا هو نوع من الذكاء لكنه لم حقا تغيير جذري للمشكلة. أنا لا تزال جارية من اليسار إلى الجبهة ، والحق في العودة. انها حقا نفس الخوارزمية. ولكن ، أنا أقدم ما يمكن أن نفعله على نحو أفضل. يمكننا أن نفعل أكثر ذكاء من ذلك ، والقيام أساسا أسرع التنفيذ. ولكن ، لإثبات هذا ، نحن بحاجة لكم النكتة لنا لمجرد لحظة. وانها في هذه المرحلة حيث انها سوف تكون لي الحديث أقل وتتحدث أكثر من ذلك. لكنني كنت بحاجة لتنفيذ خطوة واحدة معا ، وهو لو تفضلتم النكتة لنا ، الرجاء الوقوف. الاتجاهات هنا على متن الطائرة ، وأنت تعرف ، حسنا ، واثنين من لديك للجلوس. تلك التي كنت في العودة ، وهناك نذهب ، ما يرام. شكرا لك. لذلك ، هذا البرنامج هو هنا أمامكم. أنت الآن أجهزة الكمبيوتر تنفيذ هذا البرنامج. انها الذات إلى حد ما التفسيرية عند هذه النقطة. نعم ، يجب أن تكون رقم واحد. تحصل عليه؟ الحق ، فإن العديد من كنت تفكر على الارجح على أي حال هذا بالفعل ، السنة الحادية وطالبة. لذا ، اعتقد لنفسك ، أنت رقم واحد. لذا ، الخطوة الثالثة هنا ، زوج من يقف مع أي شخص ، إضافة رقمين الخاص معا ، واعتماد هذا المبلغ ورقم هاتفك الجديد وسنفعل شيك التعقل. [من الضوضاء] حشد هل تعرف كم لدينا؟ >] [> غير مسموع >> لا] [غير مسموع. > نحن بحاجة إلى أن يكون لها مفتاح الإجابة. [الصمت] >> نعم. [من الضوضاء] حشد > ديفيد : عند هذه النقطة يجب أن تكون الخوارزمية تتراجع حدتها. [من الضوضاء] الحشد ربما كان يجب ان تذهب ونحن مع وجهة نظري على كل حال. > 43. > 163. > ديفيد : أوه الحساب أمام 300 شخص زائد. [ضحك] ما لدينا حصيلة نهائية ستكون؟ > 180. [ضحك] > 1200. > 386. > ديفيد : 386 ، وأنت واحد يقف في الماضي؟ هو أن الجميع؟ هل تعرف الاجابة؟ > ماذا؟ > ديفيد : هل تعرف ما هو الجواب؟ ونحن لم نكن وضع مفتاح الإجابة معنا الآن ، هو في الواقع 386 على وجه التحديد الإجابة الصحيحة للمرة الأولى. [هتاف] [تصفيق وهذا على ما يرام. [تصفيق] جدا ، لطيف جدا القيام به. لذلك ، ما هو الوجبات الجاهزة لأنه شعر بالتأكيد أبطأ قليلا من وجهة نظري بسيطة جدا ولكن مع ذلك صحيح جدا من الذهاب فقط ونيسيس twosies ومجرد الحصول عليها القيام به مع من اليسار إلى اليمين. ولكن ، ماذا فعلنا حقا فقط هناك؟ حسنا ، إذا كان هناك ما يقرب من ، دعنا نقول ، و 400 من أنت تقف عند نقطة واحدة ، ومن ثم نصف لك ، بسرعة كبيرة ، من ما يمكن أن نقول ، يريد الجلوس. ذهبنا لذلك ، ونصف كنت جلست ، 400-200 ثم إلى 100 ثم إلى 50 ثم إلى 25. وهكذا مرة أخرى ، وهناك التي تقسم نفسها وقهر فكرة كانت لدينا مع دفتر الهاتف. النصف نحن مرة أخرى ، نحن مع كل تكرار النصف حجم المشكلة ، ونحن النصف هو ، هو. لذلك ، من الناحية النظرية ، ينبغي أن خوارزمية الخاص لقد أسرع بكثير من وجهة نظري لأن خطي نهجي ولقد اتخذت خطوات ويقول 400 أو ربما إذا أنا ذكي قليلا 200 الخطوات. ولكن ، ولقد اتخذت لك أقل بكثير ، والحق 400-200 ، 100 ، 50 ، 25 ، 13 ، 6 ، أقل حتى من عشر خطوات في النهاية بلدي مقابل 200 أو 400. وهناك جرثومه فكرة مثيرة للاهتمام حقا. قسمنا ونعم ، حسابيا ما فعلت فقط وكان ذلك على شيء يذكر في طبيعة لوغاريتمي من قاعدة سجل اثنين في اثنين واثنين من جديد. وسوف نعيد النظر في هذا لاحقا في هذا الفصل الدراسي. ولكن هنا تكمن مرة أخرى تنفيذ ذكي جدا. ونحن مجرد خدش السطح من النهج ذكي جدا وذكي جدا فعالة للمشاكل التي كنا قد يحل في نهاية المطاف. لذا ، من هم الناس الذي تحدث للتو مع لفترة وجيزة إذا؟ إن القلق السائد في دورة من هذا القبيل هو أن الجميع على يسار أنت والجميع على حق ، يجب ان نعرف بوضوح أكثر مما كنت. حسنا ، هذا ليس على الاطلاق في القضية. في واقع الأمر ، في السنوات الأخيرة ، حققت هذه الدورة تضافر الجهود للوصول إلى التحدث إلى أولئك الذين هم أقل راحة ، ذلك. وقبل ذلك ، فإننا لا يعني الناس الذين لم تطرق من قبل جهاز كمبيوتر لأنه في الحقيقة من الصعب العثور على حوالي هنا في هذه الأيام ، ولكن الناس الذين يستخدمون البريد الإلكتروني ، واستخدام فيسبوك ، وربما حتى الآن الحق ولكنها ليست بالضرورة متأكدا تماما ما يجب القيام به عندما سارت الامور بشكل سيء أو عندما يطلب منهم أي شيء التكنولوجية ، كما تعلمون ، على أيدي ترتفع أو أنها نوع من الضغط على الأجهزة لصديق من هو ضليع في ربما أكثر مما كانت عليه. حسنا ، هذه هي بعض الاحصاءات من فصل دراسي في العام الماضي. وهكذا ، عندما سئل ، وعندما طلبنا ذلك لدينا 400 طالبا في العام الماضي ، كما تعلمون ، وكتب أيضا 34 ٪ ما هو مستواك من الراحة القادمة إلى هذه الفئة ، على النحو نفسه بين هؤلاء أقل راحة. لذا ، إذا هل وصلنا إلى هذه الغرفة والتفكير لا يزال الآن ، أن ، أنت تعرف ماذا ، وهذا المصطلح غير مريحة يصف لي ، تعرف انك في شركة جيدة جدا. ولكن ، ندرك أيضا أنه إذا كنت المقبلة في هذا البرنامج الدراسي لديهم خلفية في علم الحاسوب وكنت حقا أن المهوس في المدارس المتوسطة والثانوية الذي كان كتابة رمز وتعليم اللغات أنفسكم ، وأيضا هذا شيء طيب أيضا لأن هناك بالتأكيد غير بديهي الحجم الجمهور مع هذه الخلفية أيضا ، حوالي 13 ٪ ، الموسم الماضي. ومن ثم ، لا يوجد أي شخص آخر ، نوع من شخص لا اعتقد انهم أقل راحة ، من المؤكد انهم لا يعتقدون انهم أكثر راحة لكنهم فقط في دورة للحصول على شيء للخروج منه. لذلك ، بالطبع لا يدركون ذلك تماما رسم الطيف من الطلاب. و، لوضع هذا بعبارات أكثر تحديدا ، 71 ٪ من الطلاب في العام الماضي ، وكان الصفر المقررات التي تقف وراءها. لذا ، إذا كنت تفكر في الدخول في هذا البرنامج الدراسي الذي يأخذ الجميع يا CS50 كان أزيز علوم الكمبيوتر في المدارس الثانوية ، انها ليست القضية. يفترض معظم الناس مهتمة فقط في ذلك. وكان عدد قليل ، نعم ، بالتأكيد قد اتخذت بعض المقررات ، وبعض ، أو على الأقل شخص واحد في العام الماضي اتخذت خمس دورات في السابق. لذلك ، لدينا بالتأكيد بعض القيم المتطرفة ولكن مرة أخرى لحوم المنحنى هو أقل في تلك القيم تماما. وآخر إحصائية للاهتمام شاركنا على مدى العامين الماضيين هي النسبة بين الجنسين. لذلك ، تاريخيا ، على الأقل في علم الحاسوب ، فإن هناك قليلا من انحراف الأنثى الذكور. أنا قبل عامين أنه كان أكثر وضوحا بكثير من العام الماضي. لذلك ، ونحن الآن تقريبا في مستوى 40 ٪. واذا تمكنت من القاء بانخفاض تحد لمجرد وجود مخطط دائري الثالث من العام المقبل ، وهذا حتى أكثر إنصافا. وأود أن أشير إلى أن هناك على الإطلاق أي سبب من وجهة نظر الدورات التي من الذكور والإناث لا ينبغي أن يسجل في هذا النوع من البرنامج الدراسي. في عدد متساو نسبيا ، وأن يدركوا أن 38 في المئة و 48 في المئة ، ونحن في الواقع سعداء جدا أن نرى أننا تقريبا في ذلك ، على الأقل ، حتى قيمة إحصائيا من 50 ٪. لذا ، إذا كنت ، في الواقع ، أنثى ، هل بقية أؤكد أيضا أن هذه ليست ، في الواقع ، فئة تحت سيطرة الذكور. حسنا ، هذا فقط حتى يحدث ليكون عيد ميلاد في 20 CS50. أنا ، شكرا لك أيضا. [هتاف] [تصفيق وهذا لطيف جدا منكم لأننا أحضر كعكة لك فعلا. وهكذا ، عند خروج هنا في وقت لاحق اليوم ، فسوف تحصل في الواقع فرصة للقاء العديد من دورات تعليم الزملاء الذين سوف العالقة في الردهة. ونعم سوف يكون نوعا من طريقة لطيفة لتحفيز اجتماع الزملاء التدريس. ولكن ، ونحن لا تأخذ في رحلة تصل إلى مخبز قليلا ومرة أخرى متفقة مع طبيعة هذه الدورة هو لعوب في حين يتوقع مع ذلك المبلغ غير بديهي للعمل بينما نحن بعد أن المرح. ولكن ، لدينا واحدة من هذه الكعك لك. [ضحك] لذا ، إذا كنت في الواقع أن يضحك جيدة لأن حتى لو كنت واحدا من بين أقل راحة على الأقل تلك التي كنت على علم به. ربما تلك التي كنت في 14 في المئة يفضلون هذا نكهة. [ضحك] وبعد ذلك ، إذا كنت لا تعرف ماذا الجحيم هو يحدث الآن ، لدينا أيضا هذا لبقية لك. [هتاف] [تصفيق] وهكذا ، يجري المفروم تلك إلى أجزاء خارج ونحن نتكلم. وهكذا مرة أخرى ، دعونا نلقي الامور قليلا ، وعلى الأقل إدخال بعض المستأجر الأساسية التي سوف نتخذ بعد ذلك أمرا مفروغا منه في ما تبقى من هذا الفصل الدراسي. ودعا هذه الأشياء هكذا ، نعلم جميعا أن أجهزة الكمبيوتر ربما تغلي في نهاية المطاف إلى أسفل على نحو ما الآحاد والأصفار و، بت. ماذا يعني ذلك؟ كذلك يمكن ان يخطر لك بصراحة ومصباح كهربائي ، هو قليلا لمبة ضوء ذلك إما أو أنها خارج. انها التبديل ، هو إما أو أنه خارج. الآن ، أعتقد علماء الكمبيوتر عموما من حيث الرقم صفر تعسفا و، وعلى فكرة واحدة. لذا ، إذا كنت القاء الضوء على هذا التحول واحد ايقافها وهذا هو صفر. أو مكافئ ، بدوره الضوء على هذا بدوره قيمة حقيقية تشغيله هذا هو قيمة خاطئة. لذلك ، وهذه هي مرادفات للتو. وفي نهاية اليوم ، نعم ، وحساب كل شيء ، كل الاشياء التي يمضي تحت غطاء محرك السيارة في الكمبيوتر لا تنصهر في النهاية في الآحاد والأصفار و. وعندما تتوقف للتفكير في الامر ، هو سد جميلة رائعة ما قام به العالم مع هذه اللبنات الأساسية بما في ذلك بعض الأجهزة كنت عقد في يدك. حسنا ، لماذا هي الآحاد والأصفار ومفيدة؟ يا إلهي ، حتى في العالم الحقيقي ونحن على الأقل عشرة أرقام ، من خلال تسعة صفر. لماذا يقتصر ذلك؟ كذلك من حيث الأجهزة فإنه من السهل جدا. انه من الاسهل بكثير لتمثيل دولتين ، أليس كذلك. إذا أجهزة الكمبيوتر موصول الجدار ، عادة ، لديك هذا المصدر من السهل الطبيعة الثنائية. انها إما أو إيقاف تشغيله. تتدفق الكهرباء أو أنه ليس كذلك. لذلك ، وهذا النوع من واحد من الأسباب الأولية التي ذهب في العالم مع الأصفار فقط وتلك الموجودة في أجهزة الكمبيوتر. ولكن ، يمكنك استخدامها لبنات. لذلك ، وهذا هو في الواقع قليلا الصغيرة التي تظهر على الشاشة ولكن هنا نستطيع أن نعول في ثنائي أو أننا يمكن أن تمثل أي شيء نريده في ثنائي تماما كما يمكننا ، مثلا ، عشري ، تماما كما يمكن ، حتى في واقع الأمر ، مع الحروف الأبجدية. وهكذا ، وهنا يكمن نظام سريع. في الوقت فقط بضع دقائق عليك أن تعرف الآن كيف نحسب ، وكيفية الكتابة ، وكيف يتكلم ثنائي مثل الكثير من أجهزة الكمبيوتر المحمول الخاص بك. حسنا ، لديك ، في العالم من نوع ، الثنائية مثل أعمدة المدارس الابتدائية أو قيم. لذلك ، في المدارس الابتدائية ونحن نعلم أن هذه هي العمود منها هذا العمود عشرات ، مئات العمود وهكذا دواليك. وبعبارة أخرى ، لماذا هو الرقم 123 كما نعلم عدد 123؟ وكان هذا حسنا ، أستاذي علمني هذا هو العمود منها ، وهذا كان عشرات ومئات. حسنا ماذا يعني ذلك؟ حسنا ، لمعرفة ما هي القيمة الإجمالية لما هو إلا سلسلة من الأرقام ، مجرد علامات التجزئة على متن الطائرة. حسنا ، لدينا واحدة من 100 ، لذلك أن 1 مرات 100 ومن ثم الجمع ما اثنين من 10 لذلك أن تلك 2 مرات 10 زائد ثلاثة ، لذلك أن 3 مرات 1 ، حسنا ، لذلك يبدو لي أن حصلت على العودة إلى حيث بدأت. ولكن ، هذه العملية بسيطة جدا من مجرد ضرب الأرقام من قيمة العمود هو بالضبط ما هو كل شيء عن ثنائي. ولكن ، في ثنائي استخدام صلاحيات السلطات التي لم اثنين من عشرة. لذلك ، وهنا سلسلة من ثمانية مصابيح الاضاءة. علماء الكمبيوتر مثل استخدام قيم مثل اثنين وثمانية و 16 و 24 و 32 لانهم كل القيم عموما مريحة للاستخدام. لذلك ، عندما نتحدث عن ثمانية القيم في تسلسل هذا هو مثل يسمى بايت. وهذه الأيام نادرا ما نتحدث في بايت فقط ، نتحدث ميغا بايت غيغا بايت ، وتيرابايت في هذه الأيام. ولكن الأمر كله في النهاية الشيء نفسه. وفيما يلي ثمانية بت اكا بايت واحد ، بلغة بسيطة. لذا ، فإن كل هذه المصابيح الكهربائية والخروج. لذلك ، والرياضيات هو في الواقع من السهل حقا. حتى أنه يوجد على اليمين ، على الرغم من انها صغيرة لرؤيته ، هو عمود واحد ، وثنائي ، وأربع وثمانى و16s ، 32s ، 64s ، 128s. حسنا ، ربما انه من الصعب ان استظهر في البداية ولكن لمجرد أنها ضرب من قبل اثنين من اليمين إلى اليسار. لذلك ، يمكنك دائما إعادة إنشاء هذه. حسنا ، انهم جميعا من ذلك أن العنصر النائب 0 مرات ، 0 مرات نائبا. لذلك ، وهذا هو الرقم 0 ممثلة في ثنائي. وبعبارة أخرى ، كيف يمكن كتابة عدد نعلم ك 0 في ثنائي؟ حسنا ، واحد ، إثنان ، ثلاثة ، أربعة ، خمسة ، ستة ، سبعة ، ثمانية ، وتقنيا فقط كما هو الحال في العشرية ، كل هذه الأصفار البادئة ، فهي لا تضيف شيئا إلى صيغة انهم هناك فقط لأننا نحن وقررت بصورة تعسفية نريد ثمانية من هذه الأشياء في صف واحد ، والحق. اذا كانا لا يزالان الأشياء المادية ، لدينا ثمانية بحيث أنها قد حصلت على أن يكون كل من. لذلك ، فإننا لا يمكن لقد حصلت للتو بعيدا مع واحدة صفر. حسنا كيف يمثل رقم واحد؟ حسنا ، غريزي وأنت تسير لرمي أحد مفاتيح. وأنت تسير لتحويل لمبة في. لذلك ، هناك رقم واحد لأننا الآن في وضع واحد ، لمبة ضوء ذلك يوم ، في موقف واحد. كيف نحن ذاهبون لتمثيل اثنين؟ حسنا ، نحن ذاهبون فعلا لرمي اثنين من مفاتيح الآن على الأقل مقابل هذه الدولة ، لدينا لتشغيل عمود اثنين من إيقاف تلك الأعمدة والآن لدينا قيمة واحدة في عمود ثنائي. لذلك ، أن القيمة الإجمالية للاثنين. الآن ، وممارسة سريعة العقلية ؛ ما الذي سيحدث مع التسلسل التالي؟ كيف يمكنني عرض عدد الثلاثة؟ حسنا ، أنا في حاجة واحدة من العمود ثنائي ، واحدة من العمود الثلاثات وآه هكتار. حتى الآن ، لقد زيادة لي ان واحد. والآن ، وهذا يكرر نفس النمط الأساسي. ما هو رقم أربعة؟ وأيضا دعونا نرى ، أنا فقط بحاجة الى واحد في العمود أربع ثم الأصفار في ثنائي ومنها. حتى ذلك الحين ، لا يزال على هذا النحو. و، انها مجرد هذا التسلسل من الخطوات. وفي مفهوم الثنائية في الحقيقة ليست بهذا التعقيد. في الجزء العلوي هناك لدينا ثمانية الأصفار. أدناه أن لدينا سبعة أصفار واحد من. أدناه أن لدينا ستة أصفار ، واحد ، وصفر ، وهذا الثنائي. Now, thankfully, we computer scientists, we programmers by terms end are not going to often be writing in binary, talking in binary, thinking in binary because we've built many layers of the traction on top of that. In fact, people rarely talk about bits except in a networking context they talk about bytes because one bit, not that useful, eight bits these days still not that useful, but at least eight bits, one byte is at least getting us toward more useful units of measure. But, when we start looking underneath the hood, when we do certain problems such as look at files and look perhaps at network traffic, it will become interesting to know how you're representing data because you're going to have to figure out how to display that same information. And, in fact, we, if we only have zeros and ones, how do we go about representing, say alphabetical letters? Well, we're going to have to have some mapping between binary and letters. But that's as of yet unclear. But to hammer this point home and to give me a break from speaking at, I thought I'd pause for a moment and see if we can't recruit eight volunteers, one byte eight people. Can I get eight people for whom it is not too awkward to come on up. good, good one, two, three, four, five, six, seven, eight very enthusiastic eight, come on down. So, you all, for just a moment here, oh and you have to be willing to not be on the internet because there is in fact a camera in the back of this room. So, turn back now if you don't want to be on the, hello mom, in perpetuity. So, let's see, you here will be the 128th column. And let me ask that you simply hold this before you. And actually, if you could scooch this way just a little bit, then I will get out of your way. You'll be the 64's column, you shall be the 32's column and the 16's. 32's, 16s, 8's, 4's, 2's and 1's. All right. So perfectly lined up with the place holders from before, but we need a little bit of mapping, so a quick set up. We just need an arbitrary way of mapping binary numbers, which really could be converted very easily to decimal numbers. So we need a way of converting numbers to letters if our computers are actually going to show us emails or type URL's or actually display non numeric information. And, in fact, there is a system for that, it's called ASCII, an acronym whose meaning is not so interesting, but whose utility is. This is just a mapping from letters to numbers and there's actually a lot more numbers on the screen, and you guys, don't worry, aren't going to have to test yourselves with this in just a moment. But there's a mapping between numbers and letters and I'm just going to get us started by pointing out a couple of these. The numbers of interest right now are going to be, whoops, are going to be this. Whoops. So in this column here, I can't seem to zoom in simultaneously, we have decimal. Dec for decimal. And then we have the character on the right hand side. So if I hop over into this column, thought it's a bit small on the screen, the number 65 represents what letter? Capital A. And the number 97? Lowercase A. All right. So those two alone, right, so do not go home and try to remember ASCII chart. Come quiz time, do not try memorizing an ASCII chart. Memorize two, 65 is capital A and 97 is lowercase A. And from there you can bootstrap yourself to all of the other alphabetical characters. But all this chart says, and I just downloaded this chart from ASCIItable.com, this is a standard that's been around for many, many, many years, but most computers still use it. What we now have is a means of encoding alphabetical information using what's ultimately numeric. So if these guys are just switches, light bulbs, computers, we can actually convey messages. So each of you has some hints on the back. We're going to have three rounds here where these guys are going to spell out in English, in ASCII, a very short message, a three letter word. It will involve them either raising their hand, thereby representing a one or just standing there awkwardly, thereby representing a zero. So why don't we proceed immediately with round one and you can either raise or not raise your hands. So the audience doesn't get off the hook. What number are they currently representing? 66. Right. Not hard because we have a one, a hand up in the 64s column, a hand up in the 2's column. 64 times one plus two times one is 66. They're representing the number 6, which means the first letter is B. So not too bad, right? Round two. First letter was a B. [ضحك] >> Seventy Nine. >> David: Can someone second that? Yes. All right. So 79, which means it's now an O. So B,O. There's a third letter. Actually that is kind of, yeah. Third round. Third and final round. What number is this? I heard an 87. Someone else agree? All right, yeah. This is in fact 87, which maps to, and this is a very clever set up at which point you all B, O, W, it's bow. Very good. So actually besides that little souvenir, that was not a very enthusiastic applause, so I'll take care of you. So we do have a little something for these guys here now that they just appeared on center stage doing perhaps the geekiest thing they could. So maybe if we could humor them if only because I'm feeling a little bit awkward now. A little round of applause for these guys here. [ Applause ] All yours. All right. Thank you very much. So, so, it turns out that we can take this one step further, but you are now entering a community of people who understand things like this. [ Silence ] It's slowly spreading, yes? [ Laughter ] It's not cool that you understand this now. So we've already done some damage here today, but yes, there is now such a thing as geek humor that you might just catch a little bit more on to. So what are we going to do throughout this semester? So there's 12 weeks, zero index, so 13 weeks in total. You'll find throughout the semester that computer scientists tend to count starting from zero for reasons that will soon become clear. But what we're going to do this week, starting this Friday, is introduce you to programming. Now you may already be coming at this course with a background in the same, and that's perfectly fine, but we'll also be able to introduce some more sophisticated topics than are typically covered, things like events and threading, so just to toss out a couple of buzz words for those unfamiliar. But what we're going to do is not dive into what the typically traditional language like Java or C++ or C sharp catch phrases that you might have heard in the past, but we're going to use a programming environment, a graphical programming environment that was actually developed by MIT's media lab. And this is an environment that allows you to program, quite literally, by dragging and dropping puzzle pieces that fit together logically that lets you implement these things called loops and conditions and Boolean expressions and you can actually, on day one, after this Friday, write a program that actually some of your friends might care about. So in yester year, say when you've taken a computer science course in high school, odds are one of your first programs was the equivalent of hello world, like wow mom, I just made the computer type some characters on the screen. It's a very underwhelming experience. Much more interesting is it to implement a little something like this, as one of last year's students did. So I give you the work of a former classmate. It's a love story, of sorts, about dancing cookies. [ Music ] So this was actually from a student who had never programmed before. And just to give you a teaser of this interface, and we're only going to use this for one week time, really to get the comfort levels up and to really get folks excited about what you can actually make these machines do, this is an environment where you'll be programming by, for at least a week, just dragging and dropping puzzle pieces that fit together, as we'll see, in a logical fashion. And it lets you do fun, silly things quickly. And for any of you who are a little bit familiar with things like Java and C++, it's usually a good semester or two or three before you finally get to start writing something that another person might actually enjoy watching. Well, in week one of the course, or the second week, zero index, where we dive into a little more traditional environment. In this course we'll spend much of our time on a language called C. This is one of the earliest languages that, unlike Java, actually gives us much greater access for better or for worse, to manipulating hardware and actual memory, and we can do a lot of damage with that. In fact, any time you read of web servers being exploited or computers being hacked into, very often to this day it's the result of people having run software in a language called C or C++ without sufficient care given to what are called buffer overruns or lengths of arrays, so some fairly technical concepts that are not that hard to understand, but there's been a lot of humans making a lot of mistakes for years and with this language we'll actually understand some of those security implications. But each week, typically, we'll introduce also an interesting domain that will inspire that week's problem set. So we'll also take a look this week at the field of cryptology, cryptanalysis, the notion that you can encipher information in such a way that people can't read your messages, but if clever enough perhaps you can, in fact, crack what are otherwise secret messages. In week three we'll then look at some basic fundamentals of computer science like searching and sorting and we'll actually look at this notion of recursion, how to debug things. In short, we'll take things up to the level of problem solving and not so much about mere syntax and implementing short little cookie cutter programs. In week four we'll introduce more sophisticated problems still. What does it mean to manage memory? What does it mean to run out of memory? What does it mean to actually segfault, if you've heard this expression, and odds are you haven't, but very bad things happen and frankly by terms end you'll understand terms like my code segfaulted which actually is generally not going to be a good thing. But then again, we'll introduce some domain specific stuff. So actually one of my internships during graduate school was to work for the local Middlesex County District Attorney's office doing forensic investigations in a digital sense. The local Mass state police would bring to our office hard drives and floppy disks and sometimes for no reason mice and keyboards. And we would be tasked with finding evidence. Now it turns out, maybe just an FYI, that the criminals in Cambridge, Massachusetts, at least, not necessarily that clever. Very often our forensic analysis boiled down to booting the computer up and double clicking on the My Documents folder, and therein laid the evidence. But what we'll do this week is give you a sense of what it actually means to store information on a hard drive, on a flash drive, and why can't otherwise private information be disclosed to third parties when you drop off a computer to be repaired or even when you discard it. Well someone might very well be sifting through those hard drives and it's really not that hard to find data if you know how to look for it. Well, in week five we'll look at more sophisticated data structures, tools and techniques that you can use ala phone books and ala searching huge data sets much more intelligently. And the week's problem set will task you competitively to see just how fast the code you can write is and how little memory you can use. Toward terms end though we'll take things up to a higher level in terms of programming languages and put C behind us and introduce a web programming language known as PHP, one of the popular languages these days. Much of Facebook is still written in PHP, at least outward facing, and it's just a very easy language to learn quickly once you already know another. So with PHP we'll be able to solve problems and implement websites that do interesting things. The news site I showed you, the events site, the shuttle boy site, all of those all happen to be written in PHP. But by no means is that prerequisite. What you'll also find throughout this course is that you're not going to exit this course knowing C. You're not going to exit this course knowing PHP. Those are not interesting skills to claim, but knowing how to program, knowing how to use data structures and algorithms in an interesting way, that's a compelling story. Even I, all these years later, throughout college and graduate school, the only time I ever learned a language was probably in CS50 where it was still taught in C and CS51, which is one of the successor courses. Everywhere along the way since has been go learn this language and then work on this problem set because computer science is not supposed to be about here's a language, let's spend seven weeks teaching you where the semi colons are. There are much more interesting ideas out there. Databases, for one. And in week two we'll introduce you to this query language called SQL that'll allow you to store information in databases and actually implement some fairly interesting final projects. The week after we'll look at what's called client side programming, doing interesting things on a user's computer, taking advantage of their CPU cycles, doing things ala Google maps and these websites that actually use JavaScript, which is actually a language we'll introduce to let you do client side things, make more interesting, more sophisticated user interfaces, but at the end of the day have to be really mindful when implemented of a lot of sticky issues like network speeds, network performance and security. So it's not about again just coding something up that's fun to use or pretty to look at, but actually thinking about the design that'll be the interesting process. And then, the end result aesthetically will often be a really neat toy to show yourself or a friend. And then we'll look at hardware. We're going to take for granted that there are these physical boxes throughout much of the semester that will do what we tell them to do. But how are they doing that. So we'll actually take a peak under the hood and talk about what a compiler really is, what a CPU really is and actually consider what's making all of this fanciness from stupid YouTube videos on down possible. So what are the expectations? Attending lectures and sessions, completing nine problem sets assigned roughly weekly, two quizzes, the final project and there is in fact no final exam. Grades, it's always a question, broken down as follows here. You can take the course pass-fail. But let me say it here, and I've said it many times. I personally care relatively little about grades. I think they are a wonderful, well, they are a useful pedagogical tool with which to motivate and unfortunately sometimes de-motivate, but you'll find in this course that at the end of the day it's more about seeing how far you can go from weeks zero to week 12, as we say in the syllabus than it is about absolutely ranking all students in this course. So if you're coming into this course among those less comfortable, though a large demographic do not assume that that's automatically putting you in the lower third of the so called distribution. At terms end do I sit down with the TF's and discuss each and every one of the students. We take into account where a student came from, what kind of trajectory they were actually on and so at the end of the day please focus more on, and I don't mean to sound too grand, the process of learning and less on the numeric's. And you'll actually see that we grade problem sets, in particular, very coarsely, whereby along three axis, you will get a score of 1, 2, 3, 4, or 5, where 3, is in fact good. 3 is not C. 3 is good, 4 is better, 5 is best. But more on that as the problem sets are released. So the course's website is where you will find, as in most cases, a whole lot of useful things, if not silly things, too. And we have the luxury, as computer scientists of implementing it ourselves. So over the course of the semester you will see various new features rolling out. You'll find out over the course of the semester that the bulletin board is a wonderful place, certainly in the course of this size, to turn when you have questions about the problem set, questions about some computer science concept. You'll be able to check your grades, download all handouts in advance of lecture typically will I post the slides, if you're the type who wants to scribble on notes. But as you've seen, usually I shy away from long lists of details and more like pictures of cats and other visual cues. So you'll find, too, that we will provide printouts of code when we actually think it particularly advantageous to write right on the paper. Software, videos will be available, usually around 1 to 2 to 3 days maximally after each lecture. So the courses are being filmed and every lecture will go online in various formats including QuickTime and MP3's for downloads to iPods and such. And also you will find a link to download what we call the virtual terminal room, which as you'll see is related to virtual office hours. Books are expensive and in the computer world also not that useful. They are on the shelves of the coop, although we're told that last year they ordered like 120 books for the course and 30 were actually purchased, but this perhaps speak to the fact that there are places like Amazon.com, so if you are the type who actually enjoys the sort of support structure that a book provides, if you like to read up more than say a course's typical materials offer, by all means, procure one or more of the books that we recommend here and discuss more in detail in the syllabus. But realize there are so many resources that this course provides in printed form and electronic form, and my God, there's the whole internet out there. Books are not something that are required for this particular course. Lectures, in general, will be Monday's and Wednesday's, except for this Friday and next Friday, simply because of shopping period and Labor Day. So we'll meet this Friday, next Wednesday, next Friday, but there after this is just a Monday, Wednesday course. So this little visual cue here is to remind me that yes, we do distribute videos in QuickTime formats, MP3's, fun ways that you can, if you're actually this type, maybe in the 14 percent, watch a computer science lecture on your iPod, but it reminded me that at terms end last year, the course culminates in final projects, in which students can design most anything they want, and we actually had some students tackle some iPhone applications. Some one of these at least is now in the Apple store. It's called Rover. It's been adopted essentially by Harvard agencies and it's the iPhone version of the unofficial guide to life at Harvard. They did a brilliant job. I bring this slide up too, just to point out what other technologies might very well be down the road. Some of you may have seen this before, but just to give you a teaser of apparently what's in the pipeline, I thought I would offer this brief distraction here. [موسيقى] >> With the MacBook wheel, Apple has replaced the keyboard with a sleek, touch sensitive click wheel. Apple CEO Steve Jobs introduced the product yesterday at the annual Mac Expo. Senior product innovator says the MacBook wheel will make typing a thing of the past. >> At Apple our philosophy is create products that are simple to use and nothing's more simple than a single giant button. >> Gilman showed me how the revolutionary new computer works. >> Gilman: Just open the intuit-type alphabet menu here, scroll to the letter you need and center click to select it and click again to capitalize and repeat this process for each new letter. It couldn't be simpler. You could also let the predictive sentence technology complete the sentence for you. >> Gilman says the MacBook wheel has also simplified organization of files, so searching your hard drive will be a snap. >> Gilman: Just press both sides of the wheel concurrently and center click and there, you have an alphabetical list of every file on your hard drive. Everything is just a few hundred clicks away. >> Apple is calling the MacBook wheel the most intuitive product every designed. >> Here at Apple we like to think that we're giving customers features they don't even know they want yet. >> While the MacBook wheel won't hit the shelves for another 3 to 15 months, many apple users already have it on their wish list. >> I'll buy almost anything [inaudible] and made by Apple. >> Alex [inaudible] was one of the lucky few to get to try out a MacWheel and spent 45 minutes typing an email to his friend. >> I never really realized how much I hated keyboards until I saw this thing. >> I like how it automatically says, sent with a MacBook Wheel, so people automatically know you have one. >> With a price tag of just under 2600 dollars for the lowest end MacBook Wheel, it is an investment. But the super thin laptop features numerous innovations, like the new ultra thin hummingbird battery, which can power the MacBook Wheel for a fill 19 minutes before needing to be recharged and the computer is virtually unbreakable unless dropped or hit. But Apple isn't resting on its laurels, Bryan Gilman says they're already hard at work on the next generation of the MacBook Wheel, which will be four ounces lighter due to its lack of streaming hard drive or wheel. For the Ugly news Network, I'm Jeff Tate. >> Thank you for that, Jeff. It remains to be seen if the wheel will catch on in the business world where people use computers for actual work and not just dicking around. Moving on, police warn. >> David: So I've seen that thing at least a half a dozen times now, including once at like two a.m. last night and I was scrolling down on YouTube and literally like an hour prior, some guy in all seriousness posted, just a wheel? That's the stupidest product I've ever seen. [ Laughter ] And then the rants ensued in the thread thereafter. So besides lectures there are also sections and it is your teaching fellow and the course's course assistants that you will get to know very well over the course of this semester. Sectioning won't begin for a week or so's time. More on that in the lectures to come. But know that the course will have several different tracks of sections, much like First Knight's has for music. Sections targeted more at those less comfortable, those more comfortable and those somewhere in between. And we also offer most Sunday nights before a problem set is due on the following Friday is what we call code walkthrough's where one of the course's teaching fellows will lead a session targeted specifically at the week's problem set and will help you answer the question where do I begin, how should I approach this? And that too will be filmed and made available online and always linked on the course's website. So this course has a huge staff. Our staff is larger than Harvard's average class size. We have over 50 people involved in the production of this course on a weekly basis. Some of them teaching fellows who hold sections, grade work, hold office hours and more. Course assistants who are former students, who are offering on a volunteer basis in fact multiple hours of office hours in the computer lab per week. System administrators, folks doing all of our AV and video production. Someone who will actually be taking notes for you. So it is actually my opinion that scribbling down almost every word that someone like me says is not a very good use of one's time. It's much more interesting I think to actually engage with what's on the screen, what's being presented. And so what we will do as a course is post PDF's online within a couple of days of lectures of scribe notes, which is essentially an authoritative version of course notes, unedited, but documenting what went on in lecture that day, thereby hopefully freeing your minds and pencils from jotting information down. We have some of our team here. Most of our team is actually shopping courses. But if a few of your guys would like to come on stage for a moment with our head teaching fellow and assistant head teaching fellow. Allow me to ask the latter to say a quick hello. And as these guys come up in absentia allow me to say that also on staff this year besides the folks you see here are Alex, Alice, Andrew, Batul, Charlotte, Chris, Dan, Dan, Daniel, David, David, David, Derek, Dev, Didi, Doug, Drew, Erica, Fil, Glen, Greg, Janice, Jason, Jean, Jeff, Jesse, John, John, Jonathan, Jordan, Josh, Karim, Kelly, Ken, Kent, Kyu Bok, Lee, Madhura, Marta, Matthew, Michael, Michelle, Mike, Mike, Nathan, Patrick, Peter, Peyton, Rose, Saba, Sanjay, Shannon, Stacey, Ted, Wellie, Yair and me. So our course is teaching fellows and course assistants, Cansu and Yuhki, would you like to say a quick hello? >> Hi. It's definitely a great honor to be back here for the third time. And if you're one of those who are like less comfortable. [ Laughter ] I think I can [inaudible]. Okay. [ Laughter ] If you're one of those [inaudible]. There's no need to be afraid. I walked in here two years ago with no experience what so ever, and I thought that I was like dumb and I was sure that I was going to fail the class. And I came back for the third time. I did not fail the class. This course is great because it has such a good community. As you can tell by the names listed by David. All the CA's and TF's are here to help you. So if you have any questions at all, just come up to us. Not taking this class because it's hard is not a good excuse. So, hi. >> [Inaudible]. >> Hi, so well both as a student and TF, I've really enjoyed being a part of this course. And even though it's a course that requires a lot of work from you, we've put a lot of work in to it for you as well to make it as enjoyable and as fun as possible. So, we really hope that all of you stay and take part in this very special experience. >> Thanks. >> David: So you will find, thank you, all of you, you will meet them in the hallway in just a few minutes as well. So you'll find that this course, perhaps more so than many is very much a shared experience. This is not a competitive course. This is not your premed course. This is a course which ultimately yes is about doing independent work, as you'll see each week by way of the problem sets. But you can't help but to get close to someone when you're fighting with some bug and banging your head against the computer screen proverbially to try to track down some bug. And I think you'll find that past students will concur that you exit this course with a lot of friends among students and also on staff. So where does that happen? Well, within office hours in the basement of the science center there's some large computer labs and we pretty much take them over five nights a week. These won't start for some time, and this, to be honest, is perhaps the most beautiful picture of the science center I've ever seen. [ Laughter ] It does not look like that on the inside. But it is a place where a good percentage of students do choose to spend time to get one on one assistance with each of the week's problem sets. Each week we will offer more than 100 hours of assistance one on one in the science center per the schedule that will eventually go online. And for those of you who live, say in the quad, or in Mather, or who just don't want to trek all the way to the science center to ask that quick question, we also offer what are called virtual office hours, much like remote technical support where you'll be able to log into a glorified chat room, in which yes, you can type back and forth with a TF or a CA, but you can also share your screen or share control of your mouse with them subject to your consent so that they can help you troubleshoot any problem or any question you have remotely. To give you a sense of what's involved in the course, these are statistics from last year. So you will, I think it's quite fair to say, work your ass off in this course. But per my promise from the start, this is one of those experiences that I don't think a typical student regrets. If you flip through, for instance, the Q Guide forms that are all on the course's website, you'll find that only by putting in the time to a course like this do you really exit having felt like you got something out of it and frankly might very well even have emerged even smarter. So what does it mean to actually write programs and implement problem sets? Well, the first problem set last year, a quick retrospective here, was to implement your very own programming scratch. And we spend just the first week there, and the goal is to implement your own game or animation or art or anything that appeals to you. In week one, then do you implement some basic C programs to get acclimated to some more traditional programming environments at the command line, at Linux so you get comfortable with some of these basics that will certainly serve you well in the long run. Last year's Problem Set 2 was about cryptography. We gave students the opportunity to implement some ciphers, some algorithms that let them encrypt information. And we also offered some students the opportunity to do the opposite. Each problem set, many problem sets, as you'll see are implemented in two editions. A standard edition that we expect almost everyone to do, say 90 percent of the class. And then a hacker edition, which presents the material from a more sophisticated angle, expects perhaps a bit more clever work for those more experienced, and for this one did those students get handed in the hacker edition pre existing user names and passwords in encrypted form and they had to figure out what those passwords for. We actually got into trouble for this a few years ago because all of the sudden FAS Computer Services saw like 50 people running a crack program on nice.fas.Harvard.edu, so they now have been given a heads up for programs like that. Last year students implemented the game of 15. Not all that much fun to play as a party favorite, moving the numbers up down, left, right, but a real stepping stone to implementing something interactive that involves a human and the hacker edition for this one had students implementing God mode, which actually solved this thing for the human, maybe cheat mode is the more apt term, in Sudoku, which was a step up toward that, where we provided the students, you, with a framework with a whole bunch of code that you needed to first understand before taking things the final mile and implementing some of the remaining functionality. And then we dabbled in forensics and this grew out of a real world experience between me and a friend. For this problem set last year, this buddy and I, who he being a particularly good photographer, strolled around campus and we shot photographs of unique, non obvious, but identifiable places on campus. And this was using his digital camera. All of these JPEGs got stored on a digital flash card or what not. And then I accidentally formatting the thing, or erased it. Well, it turns out formatting something or erasing something, usually means neither. It just means doing a little bit of work to make the human think their data has been erased, when in reality it hasn't. It's just been forgotten. And so we tasked last year's students with writing a program in C to actually recover these photos for my friend. We gave everyone a forensic image, so to speak, a big file representing that compact flash card, and they had to recover the several dozen photographs. And they also had to solve this little murder mystery. We provided folks with this image here. Those of you who've seen this before might be doing that squinting thing right now where you're trying to look through the picture, well you look pretty awkward, because this is not a magic eye puzzle. This is just random red noise that actually has behind it an actual message. And it turns out, I think it was Colonel, let's see, I've got my little solution here. Last year it was Colonel Mustard in the study with the candlestick. And this was the murder message recovered by students who wrote code to do so. And then in Problem Set 6 last year. We challenged students with implementing the fastest spell checker possible. What do we mean by that? Well, we handed the students a big text file containing 140 plus thousand English words, and we said write a program that loads all of these words into memory, but very quickly and very efficiently can tell us yea or nay, is this document perfectly spelled or are there errors? And what we provided was a testing framework, a harness, that students, if they wanted to compete, could run their code against some benchmarks, against some testing programs that we wrote. And then, ranked on the course's website from fastest to slowest were the running times, the amount of time it took for each student's code to actually execute, complete opt in. It's by no means required. And we took a bullet for the team and made sure that one of our own teaching fellows intentionally, I think, was at the very bottom of the list. So, there was definitely a lower bound. But the odd, the funny thing was we saw this in the cue guide evaluation, this problem set of all things, was apparently the one that people sunk the most time into. Not because it took any longer than all the other p sets, but they would come back from like dinner, look at the board, and realize dam my friend, my roommate just ever so slightly inch higher than me and so it incentivized people if only to one up their friends and roommates. In Problem Set 7, last year, we asked students to implement their own E*Trade like website, whereby you had to create a website using that language call PHP a database called mysql that actually lets people log in and then manage a portfolio of stocks, buy stocks quote unquote, sell stocks quote unquote, get stock quotes. And from where? Well, we have the students; we had the student patch into Yahoo Finance where they grabbed merely the Real time stock quotes to actually simulate the process of buying and trading stocks. Unfortunately some students, perhaps some economics majors or just folks with too much free time figured out last year how to gain the system. So, even though we gave everyone 10,000 virtual dollars, I think our winner turned teaching fellow this year actually, right don't push them away make them one of your own, for a billion dollars something like that ridiculous. Turns out we weren't really checking whether or not people were trading after hours. And it turns out that also, Yahoo stalk quotes are not in fact perfectly Real time which means if you just have a real E*Trade account you can see the future and see where the stocks are going. [ Laughter ] So, apparently you can exploit that if you put your mind to it. and then, in Problem Set 8, the course's final problem set last year, we had students implement a mash up where they take Google News and Google Maps and mash them together using JavaScript, PHP and SQL in such a way that they had a website that they could find all of the local news from whether it's zip code 02138 or 90210. And, you would actually pull the local current even articles by this thing called XML and integrate it into the view of a Google Map. And then, at very course's end was the true climax of the course. This course culminates in final projects, which ultimately will be your opportunity to design your very own piece of software, designed by you or two or three friends. And the course then climaxes with the new and improved, with the second annual computer science 50 fair which last year was an exhibition across the street in one of the engineering buildings with 300 laptops atop tables, popcorn was popping, music was playing, stress balls with CS50's logo were being thrown around. And this was an opportunity for our 300 plus students to exhibit their final projects not only to each other but also to some 900 attendees in total. And we also invited some recruiters as well. So, that is what you have to look forward in this course. You also have cake to look forward to in the hallway. This is CS50 and we'll see you on Friday. [تصفيق] ==== Transcribed by Automatic Sync Technologies ====