Coder Social home page Coder Social logo

thinkingaboutfixing's Introduction

Thinking about fixing

A large part of a software developers job is to find problems. To find problems in existing applications and to minimize problems in applications.

This project is a broken epress application that you should fix to help you to think about fixing error in your application. Because errors will be there for sure. How you interact and use them is crucial in your programming career.

Background

In this session we will look at tips, tricks and techniques for tracking down problems in our applications.

We will look at:

  • How to track down errors
  • Analyzing stack traces
  • Isolating an issue
  • Debugging tools

How to track down errors:

  • Understanding the big picture
  • What areas in the application are error prone
  • What clues do we have?
  • How to read error messages

Analyzing stack traces:

  • Which code is yours?
  • At which line is the error?
  • Why could things go wrong at that line?
  • Silent failure?

Isolating an issue:

  • Remove code - check if it still fails
  • Put code back until the error happens again
  • Look at lines before & after the problem

Debugging tools

  • Chrome developer tools - break points
  • print things to the console.
  • break problem down into components
  • use log files - with various log levels

#Setup

Create a database

CREATE DATABASE debugging_tips;
CREATE USER debugger@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON debugging_tips.* TO debugger@localhost;
FLUSH PRIVILEGES;

Create tables

create table issues (
  id int not null auto_increment,
  heading char(100) not null,
  description text,
  primary key(id)
);

Install the dependencies

Using: npm install

Tools for break points

Node Inspector

Using MS Visual Code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.