GD
Geodynamics

The Sassy Scientist – Faulty Segments

The Sassy Scientist – Faulty Segments

`Segmentation fault’. One of the most annoying things ever to appear on our screens. Right up there with `fftw.h not found’. Compilation errors are the (rock-hard) bread and (rancid) butter of any of us that need to debug write codes. Tahina is deeply down the rabbit hole and asks:


Why does my code not compile?


Dear Tahina,

I am assuming you already thoroughly searched Stack Exchange for your specific error(s) and rage-quitted after reading some of those cringe-worthy answers: “But why would you want to do that?”, “It works on my machine.”, “Why don’t you use this simpler code instead?”. Because I gave you a minimal working example, you dufus! Obviously printing `2+2=4′ on my GPU cluster is not the end goal here!

Anyway, I digress.

If after ticking all the boxes your code does not compile when it should, it’s because your machine does not want it to. It may sound petty, but I firmly believe computers have their own personality. And most of the times that personality expresses itself as “I don’t wanna!”. I can already hear you telling me: “Come on Sassy! Computers only do exactly what you tell them to.”. I heard this dogma many times. To that I reply that if you still believe that, you simply have not coded enough. How many times have you successfully compiled a code one day, only for the same exact steps to result in an unhelpful error message the day after. And you changed nothing. How many times have your simulations mysteriously crashed, but resubmitting the exact same job an hour later results in a successful run? And you changed nothing. If your answer is “never”, I must repeat myself: you have not coded enough.

Some may say: “It’s because some processes are so complex that some errors are due to the state of the system. But the machine still does only what you tell them to.”. Fair enough, but aren’t our own personality the result of our brains being very complex machines too? Aren’t we sometimes bad at something we should normally be good at? Potayto, potahto.

Your computer might simply be a dunce. Yell at it, threaten him, ask it to compile your code over and over again. Like a stubborn toddler, it may take a while, but you will eventually educate it.

Yours truly,

The Sassy Scientist

PS: My laptop did not like this piece. It crashed multiple times while writing it. Bad laptop! Bad!

Avatar photo
I am currently employed at a first tier research institute where I am continuously working with the greatest minds to further our understanding of the solid Earth system. Whether it is mantle or lithosphere structure and dynamics, solid Earth rheology parameters, earthquake processes, integrating observations with model predictions or inversions: you have read a paper of mine. Even if you are working on a topic I haven’t mentioned here, I still know everything about it. Do you have any problems in your research career? I have already experienced them. Do you struggle with your work-life balance? Been there, done that. Nowadays, I have only one hobby: helping you out by answering the most poignant questions in geodynamics, research and life. I am waiting for you right here. Get inspired.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*