Undergrad using method 1 here. Is the last line true?

Undergrad using method 1 here. Is the last line true?

Attached: Screenshot_20180331-122635~2.png (1440x793, 235K)

Other urls found in this thread:

twitter.com/id_aa_carmack/status/745638167068319744
twitter.com/NSFWRedditImage

Pic related

No, not every language can have line by line debugging.

I step by step through. But I'm used to my debugger being as easy to use as Fisher Price toy (Visual Studio).

>Professional programmer almost never do.

Bullshit. Print statements are the fastest way of telling if the compiler is actually updating the executable file instead of glitching up.

Avoid such languages.

Method 1 is by far the best one though.
Name a single debugger that isn't overblown and unintuitive.

No, but I don't rely on it as my primary debugging method.

Visual Studio debugger

> I'm too dumb to understand debuggers.

FIXED

yes

>Professional programmers almost never do
Bull. GDB gives meaningless generic stack traces for non-main threads about 80% of the time, print statements do not.

Attached: 1521006114353.gif (500x281, 1.79M)

Visual studio doesn't have this problem.

Professionals use a glorified version of method 1 called logging frameworks.

Where did you get this image user? Don't tell me this is part of some actual school program.

Consider the following
>writing a graphics library
>want to check relative x/y coordinates or something
>>set a breakpoint and painstakingly check the variable each time it get hit, potentially up to 60 times a second, maybe pause the debugger and resume it later
>>just add a print and see the data in effectively real time

One is much more convenient than the other, stop going to school.

this is true. And cutting through them is where the ugly languages (e.g. perl) shine.

I've tried single stepping source code and assembly in debuggers, and honestly find #1 to be most convenient.
You shoulnd't NOT do #1 just because some people tell you it's not """professional""" or some other stupid buzzword.

It probably doesn't, but all the other horribleness of using Visual Studio more than makes up for it.

Got it from cs.toronto.edu
Found the link in a google search about how Java manages memory

gdb

java is actually one of the few languages where I tend to use a debugger

>understand what the fuck you're doing
>use a linter for inconsequential autismal bullshit

there, solved it for you
_understanding_ the consequences of every single instruction you write works much better than any debugging method

veseal stedeo/jedbrenz/crem

1) set breakpoint
2) click debug
3) ???
4) ?????
5) it just werks

>want to analyze code line by line
>*click**click**click* for the rest of the day

you can use keyboard shortcuts, they're rather handy

Professional programmers call the first thing a logging system and then we "review logs" to find bugs.
But yes. Debuggers are not that useful unless you know a small section is interesting and then you might as well use the third option.

nigga you don't need to "analyze" every line of code unless you're a total noob

you can set breakpoints while you're debugging you know.

First rule of debugging: a debugger will always betray you.

>professional programmers never do printing

*unzips 20 kloc logging framework*

gdb with the -tui flag has saved me alot of time and solved problems printf couldn't

>not printing build time on startup

One of my professors said this the other day. Don't understand how using print statements to check a variable or if a method gets called or something could possibly be a bad thing

honestly, sometimes just doing a log out is faster than using a debugger.

depends how fucked your shit is.

Actual professional programmers prefer using a debugger when they can. The reality isn't as kind and often you just have to use logging (you can't use debugger on a working production application), but using a debugger if you know how to use it is usually faster and gives you much more information (especially with intellij and visual studio allowing you to execute arbitrary code during debugging). Fuck gdb, though, using it is a huge waste of time and only spergs who say that C is the best language known to mankind will defend this garbage.

>not just checking the TimeDateStamp from the IMAGE_FILE_HEADER

>Professional programmer almost never do.
pfffffffffffft
that's a good one
what's next in this line of fairy tales they tell kids, "the world is fair"?

yes. if you need to do line by line debugging you use a debugger and step through the code line by line.
ignore the clever replies about logging frameworks, those serve a similar but distinct purpose and you never use them to print the program state for every line

The one in Turbo Pascal.

lmao

I trust carmack is right about everything
twitter.com/id_aa_carmack/status/745638167068319744

Just so that you know, OP, Clover shortens your post to "Undergrad using meth..."

It depends.

gdb my boy

>I don't know how to use make

>I don't know how to use a debugger

>I choose to use shitty language

I work in embedded. Debuggers for this hardware literally cost tens of thousands of dollars per seat. I just print to an I2C bus and look at it on an oscilloscope.