Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Debugging

Name: Anonymous 2011-02-11 23:11

Graduating this May with BS in CS and I've only ever debugged with couts or printlns.  Am I doing it wrong?  No one ever taught us how to use a built in debugger so I guess it's not that important?

Name: Anonymous 2011-02-12 0:25

Yes. You ought to debug with printf, not with cout.

Name: Anonymous 2011-02-12 0:35

You're pretty much fucked OP, your degree is useless in the real world.

If you can't use a debugger, source control management tools, various *nix tools and IDEs, understand regular expressions and numerous application and systems development APIs and technologies outside of the basic standard libraries that you might have used with the languages you've learned, you're fucked.

If you don't understand the nuances of concurrency, socket programming, and database management systems, you're double-fucked.

Real developers don't use cout or println for even regular I/O, let alone debugging.

Best get cracking on trying to learn some of this stuff on your own personal projects if you want to find a job in the field that pays more than bottom of the barrel $30,000 a year.

Name: Anonymous 2011-02-12 0:46

>>3
Real developers don't use cout or println for even regular I/O, let alone debugging.

What do they use then?

Name: Anonymous 2011-02-12 1:40

(displayln)

Name: Anonymous 2011-02-12 2:13

>>3
They don't teach that because it's fucking simple.  All programs at the very least touch on your regular expressions and your double fucked list.

Name: Anonymous 2011-02-12 5:13

>>3
your degree is useless
He studied CS. So there.

OP, just get a book on C debugging and get it over with.

Name: Anonymous 2011-02-12 6:32

>>4
For file I/O, developers in the know use the lowest level file I/O system calls. On POSIX systems, this means using open, close, read, write, lseek. On Windows, this means, CreateFile, CloseHandle, ReadFile, WriteFile, SeekFile. They also use asynchronous file I/O to read in large portions of files at a time in another thread without blocking.

For logging messages, they'll build an abstraction system with runtime polymorphism that allows for log messages to be written to a variety of sources, whether that be the terminal, a file of a particular format, over a network, to a debugger window or IDE, or a database. Behind that, they may use printf or cout, but it's all abstracted away, they aren't using printf/cout directly.

Iostreams in C++ have a huge cost performance wise, they use shit tons of virtual calls, way more than is necessary, and that means lots of cache misses every time you use them for I/O. So at the very least, most developers use printf if they have to.

Name: Anonymous 2011-02-12 12:29

>>8

is f{write,read,puts,gets,putc,getc,printf,scanf} not ENTERPRISE quality?

Name: IHBT 2011-02-12 15:10

>>3,8
At first I thought he was serious.

Name: Anonymous 2011-02-12 18:56

>2011
>not using C#

Name: Anonymous 2011-02-12 19:27

gdb is pig easy, why not use that?

Name: Anonymous 2011-02-12 19:34

install gentoo

Name: Anonymous 2011-02-12 23:07

>>12
It has no rewind(step back) for amd64. Well it has rewind, but it's useless in its current state

Don't change these.
Name: Email:
Entire Thread Thread List