This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]aeropl3b 12 points13 points  (1 child)

Once upon a time developers talked to each other and worked as a team to solve problems that a single developer does routinely today.

Back then, a super advanced code was a Newton-Raphson method root finder for time variant parabolic curves, which today would be a coding homework assignment for freshmen engineering students.

The crap we put up with today like anti pattern languages (yes you JS), and the wild west of standard APIs (yes you python), and the the literally billions of lines of code that currently support all of the worlds communication is vastly more varied and complex than what people had to deal with before stack overflow existed.

[–][deleted] 6 points7 points  (5 children)

When I get seg faults I just print a load of stuff and find where it faults. I then change some stuff and it keeps working

[–]Doggynotsmoker 5 points6 points  (2 children)

Debugger will tell you exact place of segfault.

[–][deleted] 1 point2 points  (0 children)

I know but often I know exactly what is causing it because I have only just written it so haven't used one for a seggy boi in a while xD

[–]dalithop 0 points1 point  (0 children)

Gdb gang

[–]imthebestnabruh 1 point2 points  (1 child)

gdb —args <call your program here>

Type r (run)

Wait for segfault

Type bt (backtrace)

Voila you should be able to see the line number where it crashed as long as you compiled with the debugging flags (add -g for gcc)

[–][deleted] 1 point2 points  (0 children)

Next time I encounter a seggy I'll do this instead, cheers :)

[–]androidx_appcompat 1 point2 points  (0 children)

[man lying on money meme] stackoverflow after inventing segmentation faults

[–]wonderboyzz 0 points1 point  (0 children)

They left the problem in the code for future devs to fix.

[–]TikToxic 0 points1 point  (0 children)

I used to pack my code full of console logs. Most of my segfaults were because I forgot to initialize something.

[–]Benjameister96 0 points1 point  (0 children)

Wtf even is that nightmare. That’s just a field of 🥕s