The 7 commandments of debugging

Image for post
Image for post
Squash it quick!

Thou shalt keep Calm!

Thou shalt check the Plug!

Check your data sources, are some APIs down? Is there any outage? Do you have a CDN in front of your service? Is it blocking requests? Can your server reach the database? Is your database overloaded?

I can remember during a conference when a sudden pick of traffic from one IP address, the IP address of congress center got pretty much banned by a “smart”security algorithm. Indeed it confused the congress attendees for a DDOS. As you can imagine, everything was working fine, the servers, all dashboards were green, and yet no one of the 25000 people gathered for the conference could use the app, the website or access the program. Only some lucky fews could get one of the 10 concurrent connections the security algorithm allowed for that IP…

Thou shalt reproduce it!

Thou shalt divide and conquer!

[…] it will always happen that, by exercising a little dexterity, the one will be able to divide the many, and weaken the force which was strong while it was united. (Chap. 3.11)

The key here is exercising a little dexterity. When you know it is not the plug, it’s most certainly the code… The debugger is your best friend. Even simple console.log() will save the day.

Just put a breakpoint in the middle of your code, of the service that is falling, the class that is most likely betraying you. If you can reach the breakpoint, then the issue is happening on the other half. Divide the second half in half and put a breakpoint there. Continue! It is a binary search. When you have isolated the problem, you are almost there!

Thou shalt change one thing at a time!

Thou shalt take notes!

Thou shalt share with others!

Written by

Tech Lead/Software engineer at Axa REV. I am currently working on Legal Technologies and Computational Law. I enjoy opera, philosophy and literature.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store