Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
pram
Jun 10, 2001

The Management posted:

I realize that in school they taught you to use print statements to trace your code. that’s amateur level poo poo. if you’re being paid to write code, it’s time to start using tools like a professional. learn how to use a debugger. I’ve debugged all kinds of code, from low level boot loaders whose only io was blinking a single LED to great big multithreaded monsters that spew gigs of logs. and I was able to use a debugger on all of them to make my life better and so can you.

when you start a project, the first thing you do after writing the boilerplate main function is get the debugger working. for most of you writing normal programs, it’s as easy as running the debugger that comes with your tool chain, zero effort. remember to add the debug symbols flags to your build. if you’re working with an embedded target or simulator or FPGA or gpu or whatever, it will take more work. whether it’s a debug server or jtag or ICE or some other nonsense, get that poo poo up and running before writing any more code. set up core dumps. get stack traces from crashes.

if you are asked to join a project, ask them how they debug. if they say printf tell them to get hosed. or fix that. whichever. but if they don’t want to fix it, definitely the former. if the language doesn’t support a debugger, it is a bad language and you should not use it. if your board doesn’t have a debug port, send it back to the idiots that made it and tell them it’s broken.

it’s time to put on our big boy pants and start acting like professionals.

lol

Adbot
ADBOT LOVES YOU

pram
Jun 10, 2001
osx has lldb and dtrace which is p good

pram
Jun 10, 2001
i meant dtrace is good

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply