From 9699da83ed2a1f9d0073ff86fe69aeaf862c705f Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 6 Apr 2016 21:38:50 +0200 Subject: [PATCH 01/27] Commit changes --- src/paper.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/paper.md b/src/paper.md index 710a271..730c726 100644 --- a/src/paper.md +++ b/src/paper.md @@ -2,7 +2,7 @@ title: "Debugging" subtitle: "What you should know as developer" author: Ben Spoor -date: March 2, 2016 +date: March 2, 2016 lang: en-US reference-section-title: References bibliography: src/reference.bib @@ -13,13 +13,13 @@ geometry: margin=2cm ![Altran](bld/altran_logo.pdf "Altan logo"){ width=30% } -# Introduction -According to Google Scholar [@google2016], there are more then 10,000 articles that mention 'Debugging' in their title. +# Introduction +According to Google Scholar [@google2016], there are more than 10,000 articles that mention 'Debugging' in their title. With such an amount of research on this topic, it is a pity it is still not adequatly addressed in programming texts [@mccauley2008debugging]. Research by Cambridge university shows developers spend around 50% of their time finding and fixing bugs [@britton2013reversible]. This paper presents the debugging basis to become more effective at it. -## You're probably non-structured debugger +## You're probably non-structured debugger If you are a novice, there is a good chance you are using non-structered methods to debug programs. [SOURCE] Education currently lacks proper instruction of debugging. [SOURCE] You might not even be a novice. [SOURCE] From ea53b0553d63182687e1c2df1475edecd91fff31 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 6 Apr 2016 21:50:33 +0200 Subject: [PATCH 02/27] Added vim swp files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4e5d6e8..ca1b1f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.pdf +*.swp bld From 9928730ea5d193596ddaaf0497cc1b109acf58ca Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 6 Apr 2016 21:50:48 +0200 Subject: [PATCH 03/27] Created travis.yml file --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5458708 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: haskell +install: + - cabal install pandoc +script: + - make pdf From 80c8b4e3e1451bf80721c82b2cbafe4635c2b9bb Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 6 Apr 2016 22:07:35 +0200 Subject: [PATCH 04/27] Added correct make target --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5458708..baee37e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,4 @@ language: haskell install: - cabal install pandoc script: - - make pdf + - make full From 3dbe3c0b7a6a6bf0641879696a1927669f8a038d Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 6 Apr 2016 22:24:22 +0200 Subject: [PATCH 05/27] Switched to apt-get --- .travis.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index baee37e..0bed3e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,9 @@ -language: haskell -install: - - cabal install pandoc +addons: + apt: + packages: + - imagemagick + - pandoc + - pandoc-citeproc + script: - make full From 14c4a9927d9da8800d9c1084ee41f9490ca92650 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 6 Apr 2016 22:35:50 +0200 Subject: [PATCH 06/27] Added sudo flag --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0bed3e1..2eb5d8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +sudo: false + addons: apt: packages: @@ -5,5 +7,5 @@ addons: - pandoc - pandoc-citeproc -script: +script: - make full From 80a1e897f4872281934cdef237f33ecafcd3e6b1 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 6 Apr 2016 22:38:02 +0200 Subject: [PATCH 07/27] Commented out citeproc --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2eb5d8f..fd8b984 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ addons: packages: - imagemagick - pandoc - - pandoc-citeproc + #- pandoc-citeproc script: - make full From 64b7ad9ab49086d35bebc0242b0c58819d9b044e Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 6 Apr 2016 22:41:55 +0200 Subject: [PATCH 08/27] Re-enabled citeproc --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fd8b984..2eb5d8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ addons: packages: - imagemagick - pandoc - #- pandoc-citeproc + - pandoc-citeproc script: - make full From 18aad1efc502764fc3ca10fd489aab624fb4be15 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 6 Apr 2016 22:52:16 +0200 Subject: [PATCH 09/27] Upgraded to trusty --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2eb5d8f..bd91f06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ -sudo: false +sudo: required +dist: trusty addons: apt: From 43a46e785b8d31dc419684c7a3d9e90585f222c3 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 6 Apr 2016 22:55:28 +0200 Subject: [PATCH 10/27] Added pdflatex dependency --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index bd91f06..46e8849 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ addons: - imagemagick - pandoc - pandoc-citeproc + - pdflatex script: - make full + From 4ba8f062d186666ba6f84dafe01d3e26beccff68 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 6 Apr 2016 23:25:02 +0200 Subject: [PATCH 11/27] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 46e8849..3779855 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ addons: - imagemagick - pandoc - pandoc-citeproc - - pdflatex + - texlive script: - make full From d5b95a15e363f9e13b3eb37478e6c5e5fc55e36b Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 6 Apr 2016 23:30:44 +0200 Subject: [PATCH 12/27] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 3779855..36146dd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ addons: - pandoc - pandoc-citeproc - texlive + - lmodern script: - make full From 4a30cef6899c161e58a7eb2380d3f0fd5643fdb8 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 6 Apr 2016 23:35:59 +0200 Subject: [PATCH 13/27] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 36146dd..f72533e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ addons: - imagemagick - pandoc - pandoc-citeproc - - texlive + - texlive-full - lmodern script: From fa7e95277a81b638dc9cfb4b3df9ac7f62c68107 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 7 Apr 2016 06:33:38 +0200 Subject: [PATCH 14/27] Update paper.md --- src/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/paper.md b/src/paper.md index 730c726..fee3bfa 100644 --- a/src/paper.md +++ b/src/paper.md @@ -3,7 +3,7 @@ title: "Debugging" subtitle: "What you should know as developer" author: Ben Spoor date: March 2, 2016 -lang: en-US +lang: english reference-section-title: References bibliography: src/reference.bib keywords: debugging From 2511e82ce54807bfa26044b6e37ee9a21c51162f Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 7 Apr 2016 08:22:13 +0200 Subject: [PATCH 15/27] Added pandoc version print --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index f72533e..7d93099 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,6 @@ addons: - lmodern script: + - pandoc --version - make full From 3432b9402dd793e7d0ac602a2a50187b2ac5df53 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 7 Apr 2016 09:55:48 +0200 Subject: [PATCH 16/27] Switched back to cabal due to too old pandoc in apt-get --- .travis.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d93099..69a861e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,15 @@ -sudo: required -dist: trusty +sudo: false +language: haskell addons: apt: packages: - imagemagick - - pandoc - - pandoc-citeproc - texlive-full - - lmodern + +install: + - cabal install pandoc + - cabal install pandoc-citeproc script: - pandoc --version From a35f2550d27b185a53678e5ab4d3016c2d1d95dc Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 7 Apr 2016 12:07:00 +0200 Subject: [PATCH 17/27] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 69a861e..ff53ef1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ addons: - texlive-full install: + - cabal install caball-install - cabal install pandoc - cabal install pandoc-citeproc From f99ba00987d410f8f8202c64655bd05773d95d35 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 7 Apr 2016 12:16:33 +0200 Subject: [PATCH 18/27] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ff53ef1..685278a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ addons: install: - cabal install caball-install - cabal install pandoc - - cabal install pandoc-citeproc + - cabal install pandoc-citeproc --reorder-goals script: - pandoc --version From 3f37c098ae6dff0a21b2fc035e4b45c46287ccf3 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 7 Apr 2016 12:17:03 +0200 Subject: [PATCH 19/27] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 685278a..9cb237c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ addons: - texlive-full install: - - cabal install caball-install + - cabal install cabal-install - cabal install pandoc - cabal install pandoc-citeproc --reorder-goals From cd993e26035e935fbf4a60e6ff68bd8c22b842eb Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 7 Apr 2016 13:14:38 +0200 Subject: [PATCH 20/27] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9cb237c..2502510 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ addons: install: - cabal install cabal-install - - cabal install pandoc + - cabal install pandoc --reorder-goals - cabal install pandoc-citeproc --reorder-goals script: From 70c6b9b655610b7739e720d5dc802000f0f21d7a Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 7 Apr 2016 14:47:38 +0200 Subject: [PATCH 21/27] Update .travis.yml --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2502510..2b53df1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,9 @@ addons: - imagemagick - texlive-full +before_install: + - tlmgr update --self --all + install: - cabal install cabal-install - cabal install pandoc --reorder-goals From 5167477870fdd3fe44a4a0518ca4c1321295ca06 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 7 Apr 2016 14:53:03 +0200 Subject: [PATCH 22/27] Update .travis.yml --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2b53df1..41d78d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,9 @@ sudo: false language: haskell +cache: +- apt + addons: apt: packages: From fae54df09031416c3f3c9208686af2eab2131f1e Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 7 Apr 2016 15:01:26 +0200 Subject: [PATCH 23/27] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 41d78d2..9714588 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ addons: - texlive-full before_install: + - tlmgr install babel - tlmgr update --self --all install: From 723f2c735a7919b7ff644ac3d854dd9cf0db8254 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 7 Apr 2016 15:43:20 +0200 Subject: [PATCH 24/27] Update .travis.yml --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9714588..3e37547 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,10 +10,6 @@ addons: - imagemagick - texlive-full -before_install: - - tlmgr install babel - - tlmgr update --self --all - install: - cabal install cabal-install - cabal install pandoc --reorder-goals @@ -22,4 +18,3 @@ install: script: - pandoc --version - make full - From 544a96ada8ceca98b6d3cfa8fd97f5b80989bf96 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 7 Apr 2016 16:14:22 +0200 Subject: [PATCH 25/27] Update .travis.yml --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3e37547..3d9945c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,9 @@ addons: install: - cabal install cabal-install - - cabal install pandoc --reorder-goals - - cabal install pandoc-citeproc --reorder-goals + - cabal update + - cabal install pandoc + - cabal install pandoc-citeproc script: - pandoc --version From a98a6293601f104ef87b083acf7892f41ac1616e Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 7 Apr 2016 16:30:16 +0200 Subject: [PATCH 26/27] Update .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3d9945c..6bf8894 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,8 @@ addons: install: - cabal install cabal-install - cabal update - - cabal install pandoc - - cabal install pandoc-citeproc + - cabal install pandoc --reorder-goals + - cabal install pandoc-citeproc --reorder-goals script: - pandoc --version From 8525836eadf27ee92410deb9966bfb4baf6e91e3 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 16 Dec 2016 16:41:53 +0100 Subject: [PATCH 27/27] Remove non-printing chars --- src/paper.md | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/paper.md b/src/paper.md index fee3bfa..e960f1f 100644 --- a/src/paper.md +++ b/src/paper.md @@ -1,4 +1,4 @@ ---- +------ title: "Debugging" subtitle: "What you should know as developer" author: Ben Spoor @@ -8,7 +8,8 @@ reference-section-title: References bibliography: src/reference.bib keywords: debugging geometry: margin=2cm ---- +------ + ![Altran](bld/altran_logo.pdf "Altan logo"){ width=30% } @@ -30,7 +31,7 @@ But debugging can also be as quick as 1 minute, when trying to find the source o A majority of good debuggers are also good programmers, but not vice-versa. [SOURCE] ## What is debugging? -There is trouble shooting and problem solving, problems cause trouble. +There is trouble shooting and problem solving, problems cause trouble. You can reduce the trouble, but to prevent trouble, solve the problem. Debugging is thus problem solving. @@ -67,7 +68,7 @@ One of the biggest challenges is getting the complete state clear of the program If you can reproduce a problem consisttenly, you know when you fixed it as well. #### Collect clues -Collecting clues gives you a first description of the problem. +Collecting clues gives you a first description of the problem. #### Isolate the problem @@ -83,27 +84,27 @@ One of the most challenging parts of solving is problem, is solving the right pr ### Don't make assumptions A common mistake made is misrepresenting a problem [Psychology of problem solving]. -For instance, I have two buckets; one half filled with ice tea and the other half filled with lemonade. +For instance, I have two buckets; one half filled with ice tea and the other half filled with lemonade. Both the lemonade and the ice tea have equal densities. If I pour the lemonade in the bucket with ice tea. The problem to be solved is that within 5 minutes the two drinks should be seperated again and be placed back in both buckets. -The most common assumption people make is that both are liquids. +The most common assumption people make is that both are liquids. This was never stated anywhere. Just pick up the block of frozen ice tea and place -it back in the other bucket. -The lesson here is to never make an assumption and double check every fact. +it back in the other bucket. +The lesson here is to never make an assumption and double check every fact. ### Proof yourself wrong One of the most powerfull techniques to cover a lot of ground is to always try to proof yourself wrong. When you have an hypothesis of a problem, test or check if you can proof your hypothesis wrong. -It only takes 1 proof to kill an hypothesis, but an infinite amount to proof it right. +It only takes 1 proof to kill an hypothesis, but an infinite amount to proof it right. This is the basis of the scientific method [@popper1959] -For example, all bugs always happen after a certain function is called. +For example, all bugs always happen after a certain function is called. Try to reproduce the problem without calling that function. ### Don't throw out refute hypothesis When a hypothesis proves to be wrong, also keep track of this. -The effort is not lost, a set of refuted hypothesis can lead to a correct one. [@araki1991]. +The effort is not lost, a set of refuted hypothesis can lead to a correct one. [@araki1991]. ### Strategies Strategies here, are techniques to isolate the problem to its smallest reproducible form. @@ -149,13 +150,13 @@ The process is repeated until a single component remains. ### Functional The functional method is the most difficult. Information about the system and its components forms the basis of hypothesis selection (Johnson, 1991). -Various types of functional search exist as well. Basing a hypothesis on known +Various types of functional search exist as well. Basing a hypothesis on known system behavior and expected outcomes is the basic type of functional search. Problem solvers can also construct a "runnable" mental model of the system in which the fault conditions are simulated (deKleer & Brown, 1981) #### Swaptronics This is the strategy of choice of novices [source]. -(Randomly) swap out parts untill something makes it work. +(Randomly) swap out parts untill something makes it work. This has a very unstructered nature. effective?? [SOURCE] #### Wolf fencing - How to catch a wolf in Alaska @@ -166,7 +167,7 @@ Assert that when the information, or something, transitions from one chunk to an At one of the transistions the information will be different than it should or is expected. Take the chunk, repeat, untill you found the problem. -How do you catch a single wolf in Alaska? +How do you catch a single wolf in Alaska? You build a fence, and listen and divide Alaska in two. You listen on which side you hear the howling, and split up that half. If you continue this long enough, you will catch the wolf. @@ -178,7 +179,7 @@ Your fix should should not fix the symptom, but the root cause. ## Test the solution -# Business Benefits +# Business Benefits This discusses the return on investments, usability, and adherence to standards. Customer quotes are always very helpful. It demonstrates that you are an authority in your field and can back it up with these endorsements. Don't take references for granted - not all your competitors will be able to supply such endorsements. @@ -187,7 +188,7 @@ Don't take references for granted - not all your competitors will be able to sup ## Effects of debugging knowledge -# Summary +# Summary Close the paper with a concise summary of your main points. As many readers will skip the entire document and read this section only, summarize the main selling points about your solution here.