Browse Source

New chapter: debuggers

master
Julio Biason 5 years ago
parent
commit
5e111ad53e
  1. 1
      content/books/things-i-learnt/_index.md
  2. 40
      content/books/things-i-learnt/debuggers/index.md
  3. 2
      content/books/things-i-learnt/integration-tests/index.md
  4. 2
      content/books/things-i-learnt/understand-shortcuts/index.md

1
content/books/things-i-learnt/_index.md

@ -18,6 +18,7 @@ template = "section-contentless.html"
* [Cognitive Cost Is The Readability Killer](cognitive-cost)
* [Learn The Basics of Functional Programming](functional-programming)
* [Shortcuts Are Nice, But Only In The Short Run](understand-shortcuts)
* [Debuggers Are Overrated](debuggers)
* Testing Software
* [Unit Tests Are Good, Integration Tests Are Gooder](integration-tests)
* [Testing Every Function Creates Dead Code](tests-dead-code)

40
content/books/things-i-learnt/debuggers/index.md

@ -0,0 +1,40 @@
+++
title = "Things I Learnt The Hard Way - Debuggers Are Overrated"
date = 2019-07-08
[taxonomies]
tags = ["en-au", "books", "things i learnt", "debuggers", "debugging"]
+++
I heard a lot of people complaining that code editors are bad 'cause it's hard
to attach a debugger. I'd claim that this vision is wrong.
<!-- more -->
But let's take a thing out of the way beforehand: I'm not saying debuggers are
_bad_ you should never use them. Debuggers have their use, but every time I
had to use one, it was because there was something missing.
Most recently, using a framework in Java, I had problems with my code. I'd
expect it [to crash](/books/things-i-learnt/crash-it) 'cause I didn't handle
things. What actually happened is that the framework silently hid the error
and restarted the processing. To find out what was happening, I had to attach
a debugger and see what was wrong with the data; otherwise, I'd have no idea
about what's wrong.
Was a debugger necessary there? I don't think so. If the framework actually
displayed the error (crashed, put a wall of text on the logs, whatever), I
wouldn't need to use a debugger. But, because something was missing, I did,
in fact, was _forced_ to use a debugger.
Besides this, in the long run, you'd end up with problems in locations that
you can't attach a debugger -- for example, your production environment. You
_could_ but you _shouldn't_ do this. On the other hand, if you [log
events](/books/things-i-learnt/log-events), then you can see what was going
on, without a debugger.
Again, I'm not taking the merits of debuggers, but in the long run, they are
mostly useless and actually point missing surrounding support to actually
understand what's going on.
{{ chapters(prev_chapter_link="/books/things-i-learnt/understand-shortcuts", prev_chapter_title="Shortcuts Are Nice, But Only In The Short Run", next_chapter_link="/books/things-i-learnt/integration-tests", next_chapter_title="Unit Tests Are Good, Integration Tests Are Gooder") }}

2
content/books/things-i-learnt/integration-tests/index.md

@ -72,4 +72,4 @@ of moving parts.
[^2]: Again, it's pure feeling from my experience. I have no data to back that
affirmation up, so take it with a grain of salt.
{{ chapters(prev_chapter_link="/books/things-i-learnt/understand-shortcuts", prev_chapter_title="Shortcuts Are Nice, But Only In The Short Run", next_chapter_title="Testing Every Function Creates Dead Code", next_chapter_link="/books/things-i-learnt/tests-dead-code") }}
{{ chapters(prev_chapter_link="/books/things-i-learnt/debuggers", prev_chapter_title="Debuggers Are Overrated", next_chapter_title="Testing Every Function Creates Dead Code", next_chapter_link="/books/things-i-learnt/tests-dead-code") }}

2
content/books/things-i-learnt/understand-shortcuts/index.md

@ -37,4 +37,4 @@ me awhile to actually get _what_ I needed to do different from the shortcut to
solve my problem: I had no idea what the shortcut did and, thus, I had no idea
what I needed differently from the shortcut to solve my problem.
{{ chapters(prev_chapter_link="/books/things-i-learnt/functional-programming", prev_chapter_title="Learn The Basics of Functional Programming", next_chapter_link="/books/things-i-learnt/integration-tests", next_chapter_title="Unit Tests Are Good, Integration Tests Are Gooder") }}
{{ chapters(prev_chapter_link="/books/things-i-learnt/functional-programming", prev_chapter_title="Learn The Basics of Functional Programming", next_chapter_link="/books/things-i-learnt/debuggers", next_chapter_title="Debuggers Are Overrated") }}

Loading…
Cancel
Save