News for hackers. Stuff that matters.
Re:Show HN: Muler, a search engine for drug info built with ... by louis___ on Monday July 19, 2021 @11:11AM (#27883507)
I do not know anything about drugs, but I searched for "heroin", and was brought to the "Diamorphine" page, which seems a bit different.

Regarding your request on unit tests : do not do too much of them, too low-level. Try to write tests whose output should not change, should you refactor, this way they will help you avoid side-effects of refactoring. If your unit tests are too low-level, you will need to change them everytime you change your code.

One good think to test would be your fuzzy-matching logic, with edge cases taken into account.

Happy hacking !

Re:Show HN: Muler, a search engine for drug info built with ... by jordanwallwork on Monday July 19, 2021 @12:01PM (#27884086)
Diamorphine is heroin, so that's correct
Re:Show HN: Muler, a search engine for drug info built with ... by pizzicato on Tuesday July 20, 2021 @11:38AM (#27895054)
Someone else suggested including a disambiguation to highlight synonyms, which should be helpful in cases like codeine/heroin.

Thanks for the helpful advice re unit tests!

Re:Show HN: Muler, a search engine for drug info built with ... by meepmorp on Monday July 19, 2021 @01:41PM (#27885269)
Heroin is the (former) Bayer trade name for diamorphine.

Edit: it was available over the counter and was pitched as a less addictive alternative to morphine