I'm one of those people: I'm not actually a scientist, but I studied mathematics and build my own agent-based macroeconomic models (amongst other things). I am also a fairly autodidact programmer, meaning my code is an ungodly spaghettified mess that can be used to scare small children.
I am very much aware that my ‘programs’ are of the “big untidy spaghetti script” variety, and I simply consider them a kind of work-in-progress, notepad, or prototype for later professional implementation. I also have a couple of professional programmers (cough ahem, coders, they desire to be referred to as coders) that are entirely adept at taking my horrid final ‘thing’ and converting it into production-quality code that doesn't take down the enterprise (with the same tools I use, incidentally: Mathematica, Python (>3.3) including SymPy and NumPy, and ABAP/SQL/Java for interfacing with the SAP ERP system).
The important part of this is that I never be under any illusion that I something that I toss together and make capable of ‘running’ be definitive code that can be put into production or used as-is, and that under no circumstances must the coders have any bright ideas about fudging the underlying mathematics.