The Most Common Debugging Styles

Debugging code is an activity that shows a lot of the developer’s personality. It is a process that looks a lot like an investigation, leading to the detection of a failure in an application.

During the investigation, a programmer has to employ some techniques, like information gathering, testing of hypothesis, performing quick instrumentation, etc.

When it comes to learning how a program works, though, there are two main “schools” of debugging: the ones that use print statements, and the ones that use a debugger.

Print Statements

From these two techniques, certainly printing is the most “primitive”, in the sense that it is available in almost any programming environment. As long as there is an output device (which doesn’t need to be the screen/stdio), this technique might work.

The advantage of printing statements is that they are easy to use and program. They also don’t require the program to slow down in order to be used. For example, when working with multithreaded code, printing may be more useful than debugging, because it doesn’t require one or more of the threads to slow down.

Interactive Debuggers

Using a debugger, on the other hand, is not a privilege for everyone. There are many platforms these days with very decent debuggers; however there are still lots of environment that don’t have one.

For example, I remember reading somewhere that Linus doesn’t create a debugger for the Linux kernel because he thinks it is not important.

Despite the rant, it is  nice to have a good debugger available. Depending on the quality of the debugger, it can do some things that would be possible only on dynamic languages. Things like changing the value of variables during a debug session, or going up in the call stack and repeating some code path, can be very useful when determining where a bug is hidden.

I personally like debuggers, but agree that they should not be an excuse for sloppy thinking. Some programmers believe that is normal to use debuggers to poke at a program, instead of stopping and thinking about what the application is doing.

I like to keep in mind that debugging is a research exercise, and it works much better when we use our head more than the debugger.

Similar Posts:

Similar Posts

5 Comments

  1. Der Hauptcasino-Bereich zum Beispiel ist nach dem Times Square benannt, während die Restaurants nach dem Vorbild von Greenwich Village gestaltet sind.

    Es ist ein Restaurant mit dem Thema Vereinigte Staaten, das eine Vielzahl von Steaks, Wein und Bieren aus den gesamten USA anbietet.
    Eines der kultigsten Restaurants in New York-New
    York, ein irisches Restaurant und Pub, das 2003
    eröffnet wurde. März 2014 mit einer großen Eröffnungsparty eröffnet, die mit Live-Musik auf der Brooklyn-Brücke des Hotels begann und von dem aus Brooklyn stammenden DJ
    Jonny Santos gestaltet wurde. Das neue Geschäft würde mit
    der nahe gelegenen M&M’s World am Showcase Plaza konkurrieren, die fast
    20 Jahre vor der Ankündigung eröffnet wurde.
    Anstatt einen solchen bargeldintensiven Kauf zu tätigen, stimmte MGM jedoch zu, Primadonna für 276 Millionen Dollar an Aktien plus
    336 Millionen Dollar an Schulden zu kaufen. Die japanische Firma Universal Distributing
    besaß das Grundstück und hatte ein Joint Venture mit
    den Promus Companies zum Bau eines Hotelcasinos diskutiert, konnte aber keine Einigung erzielen. Stattdessen ist es über
    Fußgängerbrücken mit den benachbarten Casinos im Süden (Excalibur, über die Tropicana Avenue) und
    im Osten (MGM Grand) verbunden.

    References:
    https://online-spielhallen.de/kingmaker-casino-cashback-ihr-weg-zu-mehr-spielguthaben/

  2. If the account locks after several attempts, wait a short while or contact live chat so they can unlock it after confirming your details.
    How do I fix issues with my dollycasino login when the site won’t let me in? If you enjoy pokies and live tables without craving heavy extras, this
    platform gives you a solid place to spin, bet, and
    unwind.
    First withdrawals require identity verification, which typically completes within 24 hours of submitting documents.
    Bitcoin withdrawals complete within hours. Customer support operates around Australian schedules.
    Every game scales perfectly to smartphone screens without downloads or apps.

    The welcome bonus package exceeds industry standards.
    Dolly casino distinguishes itself through genuine Australian focus.

    References:
    https://blackcoin.co/crownplay-casino-majestic-gambling-for-australia/

  3. Investor Trip does not endorse any third party or recommend using any third party’s services, and does not
    assume responsibility for your use of any such third party’s website or services.
    Any trading or other financial decision you make
    shall be at your full responsibility, and you must not rely on any information provided through the
    website. The information contained on this website is not necessarily provided
    in real-time nor is it necessarily accurate. It does not constitute,
    and should not be read as, any recommendation or advice to take any action whatsoever, including making any investment
    or purchasing any product. It then creates a diverse asset
    portfolio (stocks, bonds and ETFs), often using Modern Portfolio Theory (MPT) to
    help serration of the risk-reward ratio.
    If a hacker gets into your email, they’ve basically got your account—no need for a password or username.

    Basically, accounts with email-based 2FA are actually weaker than accounts without any extra verification at all.

    When the login code and the 2FA code are both sent to the same email address,
    it leaves the account exposed, even though 2FA is enabled.

    With your email, they can log into your account without ur password or username.
    It’s hard to understand why anyone would care about the way the post is written when millions of accounts are at risk.
    It’s baffling to me that the focus of the post is on how it’s written, rather than on the significant security flaw it addresses.

    Step into a world of elevated elegance at Nobu Hotel, the world’s first hotel by legendary chef Nobu Matsuhisa—tucked inside the iconic Caesars Palace.
    Book your stay at Harrah’s Las Vegas now and let the good times roll.

    Welcome to where it all began—Flamingo Las Vegas,
    the OG of Las Vegas hotels on the Strip. Book your stay at The Cromwell now and experience
    boutique luxury with a bold twist. Whether you’re here to
    party, chill, or just live your best life, The Cromwell is your
    luxe little secret among Las Vegas hotels on the Strip.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.