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
Feral Integral
Jun 6, 2006

YOSPOS

TheFluff posted:

why do people not use interactive debuggers? literally my first instinct when i'm asking myself "hey hold on what's going on here" is to launch a debugger on it. meanwhile when i'm pairing with my coworkers they, like, start running tests and adding print() statements to poo poo, and when i ask them "hey can you run it in a debugger" they go "uuuuh, haven't really gotten around to setting that up...". even really experienced people who are definitely better programmers than me do it. weirds me the gently caress out.

this all day

i pretty much dev a majority of the time through the ipython and ipdb traces. Also doing browser stuff with selenium turns from a chore into kind of a fun and intuitive flow with an interactive interpreter: messing around with different xpaths/whatever in the terminal on-the-fly and then just copying lines that worked from your interpreter history into your final script

Adbot
ADBOT LOVES YOU

Maximum Leader
Dec 5, 2014
the platform I develop for doesn't have a debugger or breakpoints, I wish I could use a debugger :(

Corla Plankun
May 8, 2007

improve the lives of everyone
(please remember that this is a safe space for terrible programmers when you read my question, im sorry)

if the code needs a debugger to debug it doesnt that mean it's too complicated in the first place? i don't ever use debuggers because everything is written in such a way that it's all unit-testable and i dont need the whole thing to be running to find bugs

Arcsech
Aug 5, 2008

Corla Plankun posted:

(please remember that this is a safe space for terrible programmers when you read my question, im sorry)

if the code needs a debugger to debug it doesnt that mean it's too complicated in the first place? i don't ever use debuggers because everything is written in such a way that it's all unit-testable and i dont need the whole thing to be running to find bugs

very often production software is complex enough that you can’t hold every execution path in your head at once, and interactions between components are the source of way more problems than bugs within a single function/class/whatever. integration tests help but you’ll never cover every scenario

my top use cases for debuggers:
1) doing things I *could* do with logging, but with a 100x faster turnaround and less info to sift through
2) poking state at runtime to force a failure
3) figuring out what the gently caress type a variable is. mostly in dynamic languages, but sometimes in Java if there’s an interface or inheritance tree that has more than like 2 things in it

cinci zoo sniper
Mar 15, 2013




Feral Integral posted:

this all day

i pretty much dev a majority of the time through the ipython and ipdb traces. Also doing browser stuff with selenium turns from a chore into kind of a fun and intuitive flow with an interactive interpreter: messing around with different xpaths/whatever in the terminal on-the-fly and then just copying lines that worked from your interpreter history into your final script

yea i do ipython stuff a lot, not sure if it counts as debugger. run script interactively until the point of failure and then prepare your balls for teh door

redleader
Aug 18, 2005

Engage according to operational parameters

Corla Plankun posted:

(please remember that this is a safe space for terrible programmers when you read my question, im sorry)

if the code needs a debugger to debug it doesnt that mean it's too complicated in the first place? i don't ever use debuggers because everything is written in such a way that it's all unit-testable and i dont need the whole thing to be running to find bugs

sometimes i don't know what data is going in to a thing
sometimes i'm just too lazy to understand the code without running it
sometimes it's useful being able to pause execution while i look at what's happened in the db

gonadic io
Feb 16, 2011

>>=
also our code can only really run in docker (compose for integration tests) so adding and then remembering to remove the debug port forwarding is another hassle

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
back when I first joined Apple I was amazed that everyone just debugged everything at the assembly level with MacsBug because it could handle debugging interrupt-time code

since I have a personal license for Jasik’s Debugger, I installed that on my Quadra at work and it was wonderful to have source for anything and everything while I was debugging

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

eschaton posted:

back when I first joined Apple I was amazed that everyone just debugged everything at the assembly level with MacsBug because it could handle debugging interrupt-time code

since I have a personal license for Jasik’s Debugger, I installed that on my Quadra at work and it was wonderful to have source for anything and everything while I was debugging

before you return to 1997, I have some terrible news for you about everything

toiletbrush
May 17, 2010

eschaton posted:

back when I first joined Apple I was amazed that everyone just debugged everything at the assembly level with MacsBug because it could handle debugging interrupt-time code

since I have a personal license for Jasik’s Debugger, I installed that on my Quadra at work and it was wonderful to have source for anything and everything while I was debugging
MacsBug was where I learned just enough assembly to NOP out a bunch of stuff in Carmageddon so that the enemy cars would never die, no matter how much I smashed them up, so I could go on smashing them forever

akadajet
Sep 14, 2003

toiletbrush posted:

MacsBug was where I learned just enough assembly to NOP out a bunch of stuff in Carmageddon so that the enemy cars would never die, no matter how much I smashed them up, so I could go on smashing them forever

lol nice

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


redleader posted:

sometimes i don't know what data is going in to a thing
sometimes i'm just too lazy to understand the code without running it
sometimes it's useful being able to pause execution while i look at what's happened in the db

all of the above, plus:

sometimes i changed something in the returned data from the db because it "feels like it will work" and I need to step through a load of iterations to see if it actually does (it's 50/50)

Powerful Two-Hander fucked around with this message at 01:42 on Nov 18, 2018

floatman
Mar 17, 2009

uncurable mlady posted:

that said 'effective logging and metrics' is also a skill that isn't taught very well

I worked on a website that somehow lived for 5 years without anybody doing application level debugging.
There just wasn't any framework placed inside whatsoever.
What developers did when they wanted to figure out what was happening in its complex internals was to Jerry rig a call to save strings into a database table on their local development environments.
There was no such thing in production so production was this magical black box of poo poo whenever anything went wrong.
When I asked them where's the logging they pointed me to this "database row change tracker" which was this giant convulted extension to the ORM that hijacked delete/update calls to create an XML representation of the table before update, do the update, create an XML representation of the table after update, then figure out what data changed.
So what you had was this table full of information such as "value 1 has changed to 0", or "value Bob has changed to Bobb" but you could never figure out the INTENT of the change.
God help you if one update affected multiple rows of data since there was no way to link them together.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

gonadic io posted:

also our code can only really run in docker (compose for integration tests) so adding and then remembering to remove the debug port forwarding is another hassle

you can still open the port manually using iptables

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

floatman posted:

I worked on a website that somehow lived for 5 years without anybody doing application level debugging.
There just wasn't any framework placed inside whatsoever.
What developers did when they wanted to figure out what was happening in its complex internals was to Jerry rig a call to save strings into a database table on their local development environments.
There was no such thing in production so production was this magical black box of poo poo whenever anything went wrong.
When I asked them where's the logging they pointed me to this "database row change tracker" which was this giant convulted extension to the ORM that hijacked delete/update calls to create an XML representation of the table before update, do the update, create an XML representation of the table after update, then figure out what data changed.
So what you had was this table full of information such as "value 1 has changed to 0", or "value Bob has changed to Bobb" but you could never figure out the INTENT of the change.
God help you if one update affected multiple rows of data since there was no way to link them together.

what the gently caress

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
I'm trying to learn of good ways to debug embedded C lately, it's kicking my rear end

FlapYoJacks
Feb 12, 2009

by vyelkin

(and can't post for 30 days!)

Symbolic Butt posted:

I'm trying to learn of good ways to debug embedded C lately, it's kicking my rear end

remote GDB

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

uncurable mlady posted:

before you return to 1997, I have some terrible news for you about everything

the incredible future of 1997? surely by then everyone will be using Copland!

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

toiletbrush posted:

MacsBug was where I learned just enough assembly to NOP out a bunch of stuff in Carmageddon so that the enemy cars would never die, no matter how much I smashed them up, so I could go on smashing them forever

4E71, bicth!

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

ratbert90 posted:

remote GDB

LLDB via remote GDB protocol

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
comedy option: GDB with Apple’s MacsBug-for-GDB package, which doesn’t just provide commands but a complete MacsBug-style UI

eschaton fucked around with this message at 08:31 on Nov 18, 2018

Nomnom Cookie
Aug 30, 2009



spent several hours last week wrestling with tomcat and intellij to get a tomcat install that intellij could run, and then a run config that would run and not barf about quotes being present/not present, so i could debug a thing for five minutes. most likely i won't need to debug that thing again for months if ever. it sucked

other point in favor of debugging by reading logs is that logs are what you have in prod and going straight from error log to failing test to fix is the best

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


floatman posted:

I worked on a website that somehow lived for 5 years without anybody doing application level debugging.
There just wasn't any framework placed inside whatsoever.
What developers did when they wanted to figure out what was happening in its complex internals was to Jerry rig a call to save strings into a database table on their local development environments.
There was no such thing in production so production was this magical black box of poo poo whenever anything went wrong.
When I asked them where's the logging they pointed me to this "database row change tracker" which was this giant convulted extension to the ORM that hijacked delete/update calls to create an XML representation of the table before update, do the update, create an XML representation of the table after update, then figure out what data changed.
So what you had was this table full of information such as "value 1 has changed to 0", or "value Bob has changed to Bobb" but you could never figure out the INTENT of the change.
God help you if one update affected multiple rows of data since there was no way to link them together.

reading this post made me feel stressed

gonadic io
Feb 16, 2011

>>=

Kevin Mitnick P.E. posted:

spent several hours last week wrestling with tomcat and intellij to get a tomcat install that intellij could run, and then a run config that would run and not barf about quotes being present/not present, so i could debug a thing for five minutes. most likely i won't need to debug that thing again for months if ever. it sucked

other point in favor of debugging by reading logs is that logs are what you have in prod and going straight from error log to failing test to fix is the best

I'm theory intellij can attach to a running process's debug port, so you can start it yourself

I'm practice if intellij can't compile it then debugging is useless so idk

floatman
Mar 17, 2009

Powerful Two-Hander posted:

reading this post made me feel stressed

Don't get me wrong, my current job is great, except for the one main thing which is the codebase for it.
Designed by idiot hellfucker with a hard-on for databases, and the more and more I uncover, the more I realised for all the poo poo they laud aforementioned idiot for his databases, turns out his databases are just as loving bad as his software (lmao "custom" ORM overrides that cast every value of plang into a unicode string. This means all nulls become 0s when shoved into into columns, also casting ints into unicodes means database has to cast it back, row by row, to do comparisons.)

I'm just barely contained rage on most days.

cinci zoo sniper
Mar 15, 2013




floatman posted:

Don't get me wrong, my current job is great, except for the one main thing which is the codebase for it.
Designed by idiot hellfucker with a hard-on for databases, and the more and more I uncover, the more I realised for all the poo poo they laud aforementioned idiot for his databases, turns out his databases are just as loving bad as his software (lmao "custom" ORM overrides that cast every value of plang into a unicode string. This means all nulls become 0s when shoved into into columns, also casting ints into unicodes means database has to cast it back, row by row, to do comparisons.)

I'm just barely contained rage on most days.

piss holy gently caress

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Symbolic Butt posted:

I'm trying to learn of good ways to debug embedded C lately, it's kicking my rear end

debug pins and a logic analyzer, the print statements of embedded

toiletbrush
May 17, 2010

floatman posted:

Don't get me wrong, my current job is great, except for the one main thing which is the codebase for it.
Designed by idiot hellfucker with a hard-on for databases, and the more and more I uncover, the more I realised for all the poo poo they laud aforementioned idiot for his databases, turns out his databases are just as loving bad as his software (lmao "custom" ORM overrides that cast every value of plang into a unicode string. This means all nulls become 0s when shoved into into columns, also casting ints into unicodes means database has to cast it back, row by row, to do comparisons.)

I'm just barely contained rage on most days.
Please tell me more about this custom ORM!

A few years ago I was on a project where we built our own custom ORM. There were no one-to-many relationships between entities in the db - every relationship was modelled in the schema as a many-to-many with a join table which made everything atrocious and meant that genuine many-to-many relationships had hilariously long convoluted table names. There were also no constraints whatsoever and poo poo loads of code all over the place to decide how to navigate a relationship and wether it was 'fooToBar' or 'barToFoo' etc and poo poo broke silently or in strange ways if it got it the wrong way round. The lead and several other devs at the time insisted it was the only way it could possibly work and that it 'wasnt that bad'.

The second he left I ripped all of that poo poo out and it took literally a day to get the whole application working just fine with a perfectly normal looking schema with like foreign keys and constraints and everything. By the time the project was done, it was actually a pretty decent needs suiting ORM.

FlapYoJacks
Feb 12, 2009

by vyelkin

(and can't post for 30 days!)

Phobeste posted:

debug pins and a logic analyzer, the print statements of embedded

lol, look at this guy with his fancy poo poo.

If it's truly embedded, you blink LED's or make beeps, or in one of my cases, toggle a spare pin on the processor and watch it on the oscilloscope (because no LED's or buzzers were available on the board)

DrPossum
May 15, 2004

i am not a surgeon

floatman posted:

Don't get me wrong, my current job is great, except for the one main thing which is the codebase for it.
Designed by idiot hellfucker with a hard-on for databases, and the more and more I uncover, the more I realised for all the poo poo they laud aforementioned idiot for his databases, turns out his databases are just as loving bad as his software (lmao "custom" ORM overrides that cast every value of plang into a unicode string. This means all nulls become 0s when shoved into into columns, also casting ints into unicodes means database has to cast it back, row by row, to do comparisons.)

I'm just barely contained rage on most days.

pwnd

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

ratbert90 posted:

lol, look at this guy with his fancy poo poo.

toggle a spare pin on the processor and watch it on the oscilloscope (because no LED's or buzzers were available on the board)

yes, that would be what i said. try using a logic analyzer like a saleae though it's a little better at the digital workloads and long capture times

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Phobeste posted:

yes, that would be what i said. try using a logic analyzer like a saleae though it's a little better at the digital workloads and long capture times

logic analyzers own and I wish I had more reasons to use them

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
also I wish the saleae instruments worked with differential signals though

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

my stepdads beer posted:

hm we use confluence for this. it's like perl where it's write only and no one reads it

at old job we used confluence for everything: specifications, brainstorming, meeting minutes, internal procedures, and all documentation for customers (product manuals, faqs, quick start guides, etc.). it was invaluable. I hate to think what clownshoe operation you run

hackbunny fucked around with this message at 22:34 on Nov 18, 2018

moonshine is......
Feb 21, 2007

My issue with debuggers was, learning gdb/or figuring out what gui frontend is good for gdb. My first language was C++ in college, it sucked I never got beyond making useless console apps with it. Now I'm working with C#, when it comes to writing C#, I love the debugger built into visual studio, it's way better than using console.writeline to sort something out.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

moonshine is...... posted:

My issue with debuggers was, learning gdb/or figuring out what gui frontend is good for gdb. My first language was C++ in college, it sucked I never got beyond making useless console apps with it. Now I'm working with C#, when it comes to writing C#, I love the debugger built into visual studio, it's way better than using console.writeline to sort something out.

hot take: the gdb protocol is good

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Arcsech posted:

very often production software is complex enough that you can’t hold every execution path in your head at once, and interactions between components are the source of way more problems than bugs within a single function/class/whatever. integration tests help but you’ll never cover every scenario

my top use cases for debuggers:
1) doing things I *could* do with logging, but with a 100x faster turnaround and less info to sift through
2) poking state at runtime to force a failure
3) figuring out what the gently caress type a variable is. mostly in dynamic languages, but sometimes in Java if there’s an interface or inheritance tree that has more than like 2 things in it

it me

i got real lucky with one of my current projects when it comes to debugging. it's composed in a way that i can write throwaway scripts to reproduce internal bugs. then i can turn the script into a spec and run it through a debugger while i fix it

unsurprisingly, none of my other projects make it that easy

FlapYoJacks
Feb 12, 2009

by vyelkin

(and can't post for 30 days!)

The GUI front end for GDB is either Eclipse CDT or CLion.

brap
Aug 23, 2004

Grimey Drawer
any new programmer would be reasonably scared off of debuggers if they thought they all worked like gdb or lldb on the command line

Adbot
ADBOT LOVES YOU

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

brap posted:

any new programmer would be reasonably scared off of debuggers if they thought they all worked like gdb or lldb on the command line

my friend let me introduce you to debugging vb6->mumps remote procedure calls

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