this post was submitted on 02 Sep 2024
893 points (99.1% liked)
Programmer Humor
32375 readers
1107 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
A friend of mine whose research group works on high throughout X-ray Crystallography had to learn C++ for his work, and he says that it was like "wrangling an unhappy horse".
I'm not sure how I feel about someone controlling an X-ray machine with C++ when they haven't used the language before... At least it's not for use on humans.
https://en.m.wikipedia.org/wiki/Therac-25
Yep, I learned about this exact case when I got my engineering degree.
He doesn't directly control anything with C++ — it's just the data processing. The gist of X-ray Crystallography is that we can shoot some X-rays at a crystallised protein, that will scatter the X-rays due to diffraction, then we can take the diffraction pattern formed and do some mathemagic to figure out the electron density of the crystallised protein and from there, work out the protein's structure
C++ helps with the mathemagic part of that, especially because by "high throughput", I mean that the research facility has a particle accelerator that's over 1km long, which cost multiple billions because it can shoot super bright X-rays at a rate of up to 27,000 per second. It's the kind of place that's used by many research groups, and you have to apply for "beam time". The sample is piped in front of the beam and the result is thousands of diffraction patterns that need to be matched to particular crystals. That's where the challenge comes in.
I am probably explaining this badly because it's pretty cutting edge stuff that's adjacent to what I know, but I know some of the software used is called CrystFEL. My understanding is that learning C++ was necessary for extending or modifying existing software tools, and for troubleshooting anomalous results.
Neat, thanks for sharing. Reminds me of old mainframe computers where students and researchers had to apply for processing time. Large data analysis definitely makes sense for C++, and it's pretty low risk. Presumably you'd be able to go back and reprocess stuff if something went wrong? Or is more of a live-feed that's not practical to store?
The data are stored, so it's not a live-feed problem. It is an inordinate amount of data that's stored though. I don't actually understand this well enough to explain it well, so I'm going to quote from a book [1]. Apologies for wall of text.
It's very cool, I wish I knew more about this. A figure I found for approximate data rate is 5GB/s per instrument. I think that's for the European XFELS.
Citation: [1]: Yoon, C.H., White, T.A. (2018). Climbing the Data Mountain: Processing of SFX Data. In: Boutet, S., Fromme, P., Hunter, M. (eds) X-ray Free Electron Lasers. Springer, Cham. https://doi.org/10.1007/978-3-030-00551-1_7
That's definitely a non-trivial amount of data. Storage fast enough to read/write that isn't cheap either, so it makes perfect sense you'd want to process it and narrow it down to a smaller subset of data ASAP. The physics of it is way over my head, but I at least understand the challenge of dealing with that much data.
Thanks for the read!
Probably makes 7 figures working for big pharma though
Unfortunately no. I don't know any research scientists who even make 6 figures. You're lucky to break even 50k if you're in academia. Working in industry gets you better pay, but not by too much. This is true even in big pharma, at least on the biochemical/biomedical research front. Perhaps non-research roles are where the big bucks are.