Code used to produce Covid-19 projections released. (15,000 line C file)

Go look up the bugs in the Linux kernel, or the original ID games from Carmack’s days and tell me that being a competent coder means you write bug free C code 100% of the time.

As soon as you understand it…You know how truely screwed we are :slight_smile:

No one writes bug free code.
And I am not starting the eternal debate of which language/framework is better, because there isn’t a silver bullet, let’s get over that.
It is just another tool in the toolbox, you don’t have to know or use all of them, and you certainly should not pick on someone who does, unless there is a specific objective reason that makes that tool not the best fit for that specific case. Saying that C sucks period (or any other language for thar matter) just because projects using it have bugs, is not objective to say the least.
And by the way, most game engines until today are written in C/C++ almost exclusively, are they all stupid and you know better?

That’s not what I said, so don’t go claiming I did. I myself use C for some projects (mostly due to the legacy code base being written in C, but it is what it is - none of them are being used for billion/trillion dollar decisions).

C is a perfect language for low level systems development, or highly performant code that doesn’t need to be safe.

It is NOT an ideal language for statistical modelling upon which billions of dollars are risked, which is what it is being used for in this instance. It’s also not an ideal language for things like aircraft avionics - witness the calamities in the F35 avionics program.

Using a low level systems development language for statistical modelling is bad choice and even back in the 70s there were more appropriate choices for that, such as FORTRAN.

Fortran is SAFER and for heavy calculation based code can often be FASTER. FORTRAN was literally made for this type of workload.

I maintain: using C for this specific job was a dumb idea.

1 Like

I should have known this would turn into an argument about whether faults in a C program are due to the language or due to the programmer. Anything where C is involved always does. But the processes are a major problem with this project, as much as the language. And it’s for that reason I’ve semi-necro’d the thread. Trust me, it’s worth it.

So one of the many criticisms of their processes was the poor testing but they at least had some - or so I thought Get this, their regresion tests involved… oh, boy… :joy: their regression tests
involved generating an image of the outputted results in bar chart format. And struggles to breathe creating a hash of that image and comparing the hash to the one from the last one.

If the idea alone doesn’t offend you, just one of the ways in which this is flawed is that their charts are not very granular. I.e. if it’s 980 people infected in one run and 870 in the second run, that’s not going to make a pixel’s worth of difference at the resolutions they were using. Got that? Their regression tests depended on what resolution you export your image at.

There’s more; but I just want to remind everyone that this is what the UK government locked down the country on the basis of. If I did that at my place of work, I’d fire myself!