Depend on Abstractions: Testing Without the $50,000 Spectrometer
dev.to·1d·
Discuss: DEV
Circuit Design
Preview
Report Post

Part 5 of the SOLID Principles for Scientific Programmers series

The Problem Every Scientist Has Faced

You’ve written a data acquisition script that reads from your laboratory spectrometer—a $50,000 instrument that’s booked solid for the next two weeks. Your analysis code works perfectly... when you have access to the hardware. Then your advisor asks: "Can you run the analysis on last month’s data to compare?" You can’t—the code only reads from the live spectrometer. "Can you test the new averaging algorithm before the experiment?" You can’t—testing requires the actual hardware. "The spectrometer is down for calibration—can you still work on the code?" You can’t. Your colleague in another lab wants to use your analysis but has different equipment? Your code is hardwire…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help