Good Science, Good Engineering.

August 01, 2023 · 4 mins · 847 words

To do great science you need to do great engineering. I said that a few times during the last few years, and thought writing a post about it several times, but never had time. This last week with the superconducting material events I found myself reflecting about it again, and taking advantage of my summer holidays I took some time to write about it.

Science and engineering are tightly coupled, but usually, we think that one follows the other. Scientists first discover laws about the universe and then engineers build things with these laws. However, I believe that engineering is a critical piece of science and that you can’t do great science if you don’t do great engineering. This might sound weird to you if you came from a scientific background. In my case, I studied physics, and the idea I got during my degree was that physics is altruistic, solely seeking knowledge, while engineering is capitalistic, using that knowledge to generate income (notice how engineers are not even included in this comic).

However, this view changed after I started working as a data scientist, where -surprise surprise- I had to do science with data. There I discovered that without following best engineering practices it was almost impossible to get good scientific results. Sure, I could run analyses and experiments on my local laptop with hardcoded parameters, poor code quality, and no version control system. But replicating those results became a pain after a few days. Then, after much pain and tears, I realized that to do great science I needed to stick to great engineering practices.

You might think this only applies to data science or computer engineering, but it’s not the case. Let’s study the biggest experiment ever: CERN. I think everyone agrees that CERN is an incredible engineering project. Without great engineering, it would be impossible to accelerate particles almost to the speed of light. Also, high-energy results are usually reported at a confidence level of $5 \sigma$ or more, which means that experiments need to be highly replicable. Without excellent engineering work, it would be impossible to do so.

Another example of good engineering practices is the creation of COVID vaccines. The first version of the vaccine was available only a few days after the outbreak of the virus. This would have been impossible without a great engineering platform. Also, all the tests that were run to determine the safety of the vaccines were an example of good engineering practices. If the vaccine discovery process had not been designed following the best practices, we would still be waiting for the vaccine locked up in our house.

Basically, all I’ve said can be derived from the definition of the scientific method, which roughly consists of four steps: (1) observation, (2) hypothesis, (3) experiments, and (4) analysis. Steps (1) and (2) don’t require reproducibility; you can conceive a hypothesis while skiing (like Schrödinger) or even while sleeping (like Ramanujan). No one will ask how you arrived at your hypothesis. Preliminary experiments can be done with less concern about result replicability, with the objective of hypothesis generation. However, once a hypothesis is generated, steps (3) and (4) must be reproducible almost by definition, and achieving reproducibility necessitates adhering to sound engineering practices. Essentially, engineering involves designing processes to achieve specific goals. So, to carry out steps (3) and (4), you need to embrace engineering principles. While serendipity is a huge driver of science, it’s always followed by a meticulous scientific process.

IMHO, this is what has failed with the current superconducting papers and reviews. The authors had to rush to publish their work to avoid having credit taken from them (apparently one of the authors decided to publish the paper without the other knowing it). This lack of time has made it impossible for the authors to clarify the exact methods they followed to generate the superconducting material. Also, the authors said they are only succeeding around 10% of the time to create this material, which makes it even more difficult to explain the method followed. This is what is causing the repetition of the experiments in other laboratories to be giving such different results. I’m not blaming the authors for that, probably in the same situation I’d have done exactly the same, but I’m only using this situation to highlight why good engineering practices are important to do science.

My objective with this rant is to challenge the idea that science somehow surpasses engineering, a misconception I encountered all too often during my study of physics, where it wasn’t uncommon to see physicists looking down on engineers. For the ones that usually deal with engineering processes all this text may sound obvious, however, I know a bunch of people who do “pure” science that will grind their teeth at this perspective. The truth is, both fields are intrinsically interconnected and rely on each other’s strengths for progress. I hope this text can help some “science hooligans” to appreciate the need and beauty of engineering and stop looking down on our science-applied colleagues.