My name is Andreas Zeller. I'm a researcher at Saarland University in Germany.
And I am researching large programs and why they fail.
I have done some fail work in automatic debugging, also in mining the histories of programs.
I've been working with companies such as Microsoft, SAP, or Google,
examined their bugs, finding out what was wrong, and it struck me
that there's almost no teaching material available on debugging and how to debug programs.
So today, I'm going start with you a course on how to do debugging systematically,
effectively, and in many cases, even automatically--enjoy.
Welcome to the Udacity course on debugging.
The aim of this course is to teach a systematic approach to debugging
and we're even going to explore a number of automatic tools that do the debugging for you.
We're going to explore how debuggers work.
In particular, the scientific method of debugging by which
through a series of experiments we gradually refine a hypothesis
until we end up with a diagnosis on why the program failed.
On top of that, we're going to build our own interactive debugger in Python.
In the next unit, I'm going to introduce you to one of the most
powerful debugging tools ever invented, that is assertions.
Assertions are statements in the program that automatically check
whether the state of the program is still correct.
That is, while you're program is executing, the computer constantly monitors
the program on whether a bug has occurred.
This allows you to very quickly and effectively find out where a bug was first introduced.
On top of that, we're going to build a tool that makes you infer assertions from executions.
In unit 3, I'm going to show you a technique named delta debugging
which automatically simplifies problems.
For instance, here's this 900-line HTML file which causes to crash in a program which processes it.
With delta debugging, you can reduce this to just the eight characters
that produce the bug just as well and all of this automatically.
In the next unit, I'm going to show you how to find out where a specific failure came from.
You see an execution as a series of states.
We are going to explore techniques that help you in tracking
the way of an error all through the program execution.
And on top of that, we're going to build a tool that isolates such cause effect chamge automatically.
In unit 5, we've been looking at reproducing failures.
We're going to look at all the various input sources for your program
and discuss how to capture and replay them such that you can faithfully
reproduce a failure that happens in the field.
Plus, we're going to explore statistical debugging which collects data from the field
to tell you which parts of your program are most likely to be related to the failure.
In unit 6, we're going to see how to mine information
from bug data bases and change data bases in order to figure out
where bugs have been in your program in the past, where they accumulate,
and which parts of your program therefore are going to be the most back prone in the future.
And again this is a fully automatic technique.
This is so far, you've had no fun in debugging because it just sucks the life out of you.
The aim of this course is to get most of the debugging effort off your shoulders
because you can have the computer take care of most of the debugging work.
So your mind is free for doing something more creative than debugging.
Hallo mein Name ist Andreas Zeller und ich bin ein Forscher an der Universität Saarland in Deutschland.
Ich erforsche große Programme und warum sie fehlschlagen.
Ich habe am automatischen Debugging und an der Erforschung der Entwicklungsgeschichte von Programmen gearbeitet.
Ich habe mit Firmen wie Microsoft, SAP oder Google gearbeitet,
habe deren Bugs analysiert, gesucht was falsche gelaufen war, und mir fiel auf,
dass es fast kein Lehrmaterial für Debugging und wie man Programme debuggen soll gibt.
Heute werde ich mit einem Kurs beginnen wie man systematisch,
effektiv und in vielen Fällen sogar automatisch debuggen kann. Viel Spaß!
Wilkommen im Udacity Debugging Kurs.
Das Ziel dieses Kurses ist einen systematischen Ansatz zum debugging zu lehren.
Und wir werden einige automatischen Werkzeuge ausprobieren die das debugging für dich übernehmen.
Wir werden erforschen wie Debuggers funktionieren.
Besonders die Wissenschaftliche Methode des Debuggings, bei der
durch eine Serie von Experimenten die Hypothese schrittweise verfeinert wird,
bis wir eine Diagnose haben warum das Programm fehlgeschlagen hat.
Zusätzlich werden wir unser eigenen interaktiven Python-Debugger schreiben.
In der nächsten Einheit werde ich euch eins der
mächtigsten Debug Werkzeuge das je erfunden wurde zeigen: Assertions (wörtlich: Behauptung, Beteuerung)
Assertions sind Anweisungen im Programm die automatisch verifizieren
ob der Status des Programms immer noch richtig ist.
Das bedeutet, dass während das Programm läuft, beobachtet der Computer andauernd
das Programm um zu sehen ob ein Bug aufgetreten ist.
Dies erlaubt dir sehr schnell und effektiv zu finden wo ein Bug zuerst aufgetaucht ist.
Zusätzlich werden wir ein Werkzeug bauen, dass Assertions aus Programm-Ausführungen ableitet.
In der dritten Einheit werde ich euch eine Technik namens Delta-Debugging vorstellen,
die Probleme automatisch vereinfacht.
Hier ist zum Beispiel diese 900-Zeilen HTML Datei die ein Programm, dass die Datei verarbeitet zum Absturz bringt.
Mit Delta-Debugging könnt ihr dies auf nur 8 Zeichen reduzieren,
die den Bug genauso verursachen, und all dies automatisch.
In der nächsten Einheit werde ich euch zeigen wie man rausfindet wo ein spezifischer Fehler herkam.
Eine Programm-Ausführung kann man als eine Serie von Zuständen sehen.
Wir werden Techniken ausprobieren die helfen Fehler
durch die gesamte Ausführung zu verfolgen.
Zusätzlich werden wir ein Werkzeug bauen, dass solche Ursache-Wirkung Effekte automatisch isoliert.
In der Einheit 5 werden wir uns damit beschäftigen Fehler zu reproduzieren.
Wir werden die unterschiedlichen Input-Quellen für eure Programme ansehen
und wir werden diskutieren wie man sie aufzeichen und abspielen kann so dass man einen Fehler
der "in der Natur" auftaucht zuverlässig reproduzieren kann.
Ausserdem werden wir statistisches Debugging, dass Daten sammelt
und uns sagt welche Teile des Programms am wahrscheinlichsten mit einem Fehler zusammenhängen.
In der Einheit 6 werden wir sehen wie man Information
in einer Bug-Datenbank suchen kann, und werden Datenbanken verändern um herauszufinden
wo Fehler in deinem Programm in der Vergangenheit waren, wo sie sich ansammeln,
und welche Programmteile daher am fehleranfälligsten in der Zukunft sein werden.
Und erneut ist dies eine vollkommen automatische Techik.
Bis jetzt hattest du nie Spaß mit Debugging weil es einfach das Leben aus dir heraussaugt.
Das Ziel dieses Kurses ist den größten Teil des Debuggin-Aufwands von deinen Schultern zu nehmen
weil dein PC das meiste selbst erledigen kann.
So ist dein Geist frei für kreativere Dinge als Debugging.
Mi nombre es Andreas Zeller. Soy investigador en la universidad Saarland en Alemania.
Y estoy investigando grandes programas y por qué fallan.
He hecho algo de trabajo de fallas en depuración automática, también en extracción de la historia de los programas.
He estado trabajando con compañias como Microsoft, SAP o Google,
examinando sus bugs, encontrando lo que estaba mal y me pareció
que casi no hay material de enseñanza sobre depuración y como depurar programas.
Entonces hoy, voy a empezar con ustedes un curso sobre como depurar sistemáticamente,
eficazmente y en algunos casos, incluso automáticamente... Disfrutenlo!
Bienvenidos al curso en depuracion de Udacity.
El objetivo de este curso es enseñar un enfoque sistemático para depurar
e incluso vamos a explorar un número de herramientas automáticas que hacen la depuración por ustedes.
Vamos a explorar como funcionan los depuradores.
En particular, el método científico de la depuración por el cual
mediante una serie de experimentos gradualmente vamos a refinar una hipótesis
hasta que finalicemos con un diagnóstico sobre por qué el programa falló.
Además de eso, vamos a construir nuestro propio depurador interactivo en Python.
En la siguiente unidad, los voy a introducir a una de las mas
poderosas herramientas de depuración inventadas, que son los "assertions"
Los "Assertions" son sentencias en el programan que automaticamente verifican
si el estado del programa sigue siendo correcto.
Esto es, mientras tu programa está ejecutandose, el computador constantemente monitorea
el programa sobre si ha currido un bug.
Esto les permite encontrar rápidamente y efectivamente dónde se introdujo primero un bug.
Además, vamos a construir una herramienta que les haga inferir "assertions" de las ejecuciones.
En la unidad 3, les voy a mostrar una técnica llamada "delta debugging"
la cual simplifica los problemas automáticamente.
Por ejemplo, aquí esta este archivo HTML de 900 líneas que causa el bloqueo en el programa que lo procesa.
Con "delta debugging", se puede reducir esto a sólo ocho caracteres
que producen el bug igual de bien y todo esto automaticamente.
En la siguiente unidad, les voy a mostrar como encontrar de dónde viene una falla específica.
Verán una ejecución como una serie de estados.
Vamos a explorar técnicas que les ayudará en rastrear
el camino de un error a través de todo la ejecución del programa.
Y además de eso, vamos a construir una herramienta que aisla la cadena causa-efecto automaticamente.
En la unidad 5, estaremos mirando sobre reproducción de fallas.
Vamos a ver todas las fuentes de entrada en su programa
y discutiremos cómo capturarlas y repetirlas para que realmente puedan
reproducir una falla que ocurrió en el campo.
Además, exploraremos la depuración estadística, la cual recolecta datos del campo
para decirles cuales partes de su programa son las más relacionadas con la falla.
En la unidad 6, vamos a ver como extraer información
de las bases de datos de errores y cambiarlas para así averiguar
dónde han estado los errores anteriormente en el programa, dónde se acumulan,
y cuales partes de su programa por lo tanto van a ser las mas propensas en el futuro.
Y de nuevo, esta es una técnica automática.
Esto es... No han tenido ninguna diversión en la depuración porque simplemente les absorbe la vida.
El objetivo de este curso es quitar de sus hombros el mayor esfuerzo en la depuración
porque pueden dejar que el computador se encargue de este trabajo.
Así su mente está libre para hacer algo mas creativo que depurar.
Mi chiamo Andreas Zeller. Sono ricercatore all'universita' Saarland in Germania
e studio programmi di grandi dimensioni e il motivo per cui si inceppano.
Ho lavorato molto sulle procedure automatiche di debugging, ho scavato pure nella storia dei programmi.
Ho lavorato in aziende quali Microsoft, SAP o Google,
esaminato i loro bugs, trovato cosa non funzionava e mi ha colpito
il fatto che non c'e' praticamente nessun materiale disponibile sul debugging e su come fare il debug ai programmi.
Percio' oggi iniziero' con voi un corso su come fare sistematicamente il debug
efficacememente e, in molti casi, pure in automatico. Buon divertimento.
Benvenuto al corso di debugging Udacity.
Lo scopo di questo corso e' insegnare un approccio sistematico al debugging
ed andremo pure ad esplorare una quantita' di strumenti automatici che faranno debugging al posto vostro.
Andremo ad esplorare come funzionano i debuggers,
In particolare, l'approccio scientifco al debugging col quale,
attraverso una serie di esperimenti, affineremo gradualmente un ipotesi
al fine di concludere con una diagnosi sul perche' il programma si e' inceppato.
Ma soprattutto, costruiremo il nostro debugger interattivo in Python.
Nella sezione che segue, vi introdurro' ad uno degli strumenti
di debugging piu' potenti mai inventati, cioe' le assertions.
Le assertions sono istruzioni di un programma che rilevano automaticamente
il corretto stato di funzionamento di un programma.
Vale a dire, mentre il vostro programma e' in esecuzione, il computer monitorizza costantemente
se si sia verificato un errore nel programma.
Cio' vi consente in modo rapido ed efficiente di capire il punto in cui l'errore ha avuto origine.
Soprattutto, noi creeremo uno strumento per farvi dedurre le assertion dalle esecuzioni.
Nella sezione 3 vi illustrero' una tecnica chiamata "delta debugging"
che semplifichera' automaticamente i problemi.
Per esempio, ecco un file HTML di 900 righe che manda in crash un programma che lo esegue.
Con il delta debugging possiamo ridurre il tutto a soli otto caratteri,
che riproducono il bug cosi' com'e' e il tutto in automatico.
Nella sezione successiva, vi faro' vedere come scoprire da dove vien fuori un guasto specifico.
Vedete qui l'esecuzione di una serie di stati?
Noi andremo ad esplorare le tecniche che vi aiuteranno a seguire
le tracce di un errore lungo tutta l'esecuzione di un programma.
E soprattutto, costruiremo uno strumento che isoli automaticamente questi fenomeni di causa-effetto.
Nella sezione 5 osserveremo come riprodurre i guasti.
Osserveremo tutte le sorgenti di input del vostro programma
e discuteremo su come catturarli e ripeterli per riprodurre
fedelmente un guasto che si verifichi "sul campo".
Poi, andremo ad esplorare il debugging statistico, che raccoglie i dati sul campo
per dirvi quali parti del vostro programma sono piu' portate ad incepparsi.
Nella sezione 6, vedremo come scavare le informazioni
dai database di debugging e di modifica per riuscire a capire
dove si trovavano i bug nel vostro programma in passato, dove si accumulano
e quindi dove saranno in futuro le parti di "ventre molle" del vostro progamma.
E anche qui, tutto in automatico.
Finora non vi siete divertiti molto a fare debugging perche' vi ha reso la vita uno schifo.
Lo scopo di questo corso e' di alleggerire dalle vostre spalle la fatica di fare debugging
perche' sara' il vostro computer a fare il lavoro per voi.
Quindi la vostra mente sara' libera di fare cose ben piu' creative che fare debugging.
私はアンドレアス・ツェラー
ドイツのザールラント大学の研究者です
私は大規模なプログラムと
それが失敗する理由について研究しています
自動デバッキングとプログラム履歴検索の
失敗作業を何度か行ったことがあります
私はMicrosoftやSAP、Googleのような企業でバグを調べ
間違いの原因を見つけ出す仕事をしていますが
困ったことがあります
プログラムをデバッグする方法を扱う教材が
ほとんどないことです
ですから今日私は系統的、効果的に
そして楽しみながら学ぶことのできる
様々なケースに対応したデバッグ方法について
講座を始めたいと思います
UDACITYデバッグ講座へようこそ
講座の目的は系統的なデバッグ方法を
教えることです
そしてデバッグする複数の自動ツールも
検証していきます
デバッガがどのように機能するのか
検証していきましょう
プログラムが失敗した理由を診断できるようになるまで
仮説を徐々に精密化するという一連の実験を使って
科学的なデバッグ手法を検証します
さらにPythonで対話型デバッガを自ら作成します
次に今まで開発された中で
最も優れたデバッグツール
アサーションを紹介します
アサーションはプログラムの状態が正確かどうかを
自動でチェックするプログラムの命令文です
プログラム実行中にバグが起きていないかどうか
コンピュータが常に監視するのです
これによって初めにどこでバグが起きたのか
素早く効果的に見つけ出すことができます
さらにプログラムの実行から
アサーションを推測するツールを作成します
ユニット3では不具合を自動で単純化する
差分デバッグという技術を紹介します
プログラムがクラッシュした900行のHTMLファイルも
差分デバッグをすれば
バグを8つにまで絞ることができます
嬉しいことにこれをすべて自動的に行ってくれるのです
続いてのユニットでは不具合がどこで起きたのか
見つけ出す方法を紹介します
このようにプログラムの実行は連なっています
プログラム実行中のエラーをトラッキングするための
役立つ技術を検証していきます
さらに変化をきたす不具合の原因を
自動的に特定するツールを作成します
ユニット5では不具合の再現を解説していきます
プログラムの様々な入力ソースをすべて見ていきます
またフィールド内で起きた不具合を
正確に再現できるよう
入力ソースの保存、再生方法を説明します
さらに不具合の一番の原因と思われる
プログラムを見つけるために
フィールドからデータを集める
統計的デバッグを検証していきます
ユニット6ではバグデータベースと
変更データベースの情報を
利用する方法を見ていきます
以前プログラムのどこでバグが起きていたのか
どこでよくバグが起きるのか
今後どのプログラムが不具合を起こしやすいのかが
分かるようになります
強調しますがこれはすべて自動的に行われます
これでは退屈すぎてデバッグの面白さが
あなたに伝わっていないかもしれません
この講義の目的はデバッグの負担を
減らすことにあります
コンピュータのデバッグ作業というのは
一番手間取るからです
負担が減れば
デバッグよりも面白いことに時間を費やせます
我叫安德烈亚斯.采勒。是一名德国萨兰德大学的研究员。
我致力于大型程序与其失效原因的研究
我曾在自动程序调试的工作中有过一些失败的经历,在程序历史挖掘的工作中也同样如此。
我曾在诸如微软,SAP与谷歌这样的公司工作过。
检查他们的程序漏洞,发现出错的原因,这些工作给予过我打击。
因为几乎没有可用的关于如何进行程序调试的教学材料。
因此今天,我将为你开始讲解“如何去调试程序”。
系统的,高效率的,以及在大部分情况下自动化的。请拭目以待。
欢迎来到Udacity的程序调试课程
该课程的目的是教习如何系统化的进行程序调试,
同时我们将会为你介绍一些自动调试工具。
我们将研究调试器是如何工作的。
特别是,通过一系列试验来逐渐完善
程序调试科学方法的假设。
直到我们分析出为何程序会出错。
首先我们将适用Python语言来构建一个交互的调试器。
下一节,我们将会介绍一款有史以来最强大的调试工具
那就是“断言”
“断言”是程序中的一系列自动检查的声明,
声明程序状态是否仍然正确。
也就是说,在你程序执行中,计算机持续的监视
程序是否有错误产生。
这可以让你非常迅速有效的找到在那里首先出现了错误。
所以首先,我们会构建一个工具,让你能在程序执行中加入断言。
在第三节课中,我将为你展示一项名为“delta debugging”的技术。
该技术会自动的简化问题。
例如,有个900行语句的HTML文件,处理该文件的过程中会导致程序崩溃。
通过delta debugging,你能将出错原因归咎至八个字符。
当然这些都是自动化的。
在第四节,我会告诉你如何去找到一些具体的错误是由何产生的。
你将程序执行视为一系列状态。
我们会去探讨一些技巧,来帮助你
跟踪一个错误在整个程序执行过程中的路径。
因此首先,我们会构建一个工具,来自动分离这些有效的变动
在第五节,我们会着重关注错误的重复产生。
我们会检查你程序的所有不同的输入源,
然后讨论如何捕获与再现那些会肯定在此区域内
重复产生的错误。
此外,我们会讨论统计化调试方法,此方法收集该区域内的数据
来告诉你程序的哪部分最可能与出错相关联的。
在第六节,我们将会看到如何去做信息挖掘。
在错误数据库与变更数据库内进行信息挖掘,来发现
那些程序错误过去存在于程序的哪部分,并在那里积累。
以及会在程序的哪部分爆发。
当然这些全都是完全自动化技术
至今为止,你在程序调试过程中完全没有乐趣,因为这是相当糟糕的过程。
该课程的目的是尽量减少亲自进行程序调试给你带来的负担。
因为计算机会处理大部分的调试工作。
因此你能更多的去思考一些更具创造性的东西,而不是程序调试。