Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,358 members, 7,800,721 topics. Date: Thursday, 18 April 2024 at 03:14 AM

Programmers Need Better Debugging Ideas. Here's How To Handle Bugs. - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Programmers Need Better Debugging Ideas. Here's How To Handle Bugs. (938 Views)

Post Your Programming Projects Ideas Here / POC Of Bypassing Anti Debugging With Some Dirty Code I Wrote / Differences Between Testing And Debugging In Programming Of Software Application (2) (3) (4)

(1) (Reply)

Programmers Need Better Debugging Ideas. Here's How To Handle Bugs. by classicdude1(m): 9:35pm On Sep 18, 2017
We all hate when we have to stay up all night or work for days just to find bugs in our code.

This is very annoying.�

So what's the best way to debug?

I talked to Patrick Triest, and he shared how he handles bugs to meet up deadlines.

The first is to avoid the “I’ll do the hacky solution now and fix it later” mentality.

It is always much more time-efficient to do it right the first time, since the hacky solutions rarely get fixed “later”, and are likely to cause major issues (in the form of bugs, poor performance, and developer productivity) down the road.

The second piece of advice is to utilize TDD (test-driven-development) or BDD (behavior-driven-development).

Including a test suite with your code (and ideally writing tests *before* writing the code itself), is a great way to catch bugs early on, and will provide some assurance that future code updates don’t break existing functionality.

The third piece of advice is “take your time”.

Make sure that you understand the code you are writing. Do thorough research instead of making guesses on the correct way to do something.

Don’t be afraid to take a few hours to refactor your code structure.

And the final tip is:

Always add comments.

An hour spent polishing your code today can save multiple days of work in six months.

What's your take?

(1) (Reply)

A Spotify, But For Programmers / Html,css,php And Mysql Learning Software / MLM Script Available

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 6
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.