News for hackers. Stuff that matters.
Re:Ask HN: Should I publish my research code? by rvanlaar on Friday January 14, 2022 @09:41AM (#29934969)
What a great question. You've come to the right community.

My main concern would be to make sure there are no passwords or secret keys in the data, not how it looks.

You'll open yourself up for comments. They may be positive or negative. You'll only know how it pans out afterwards.

Is the code something that you'll want to improve on for further research? If so publish it on github. It opens the way for others to contribute and improve the code. Be sure to include a short readme that you welcome PRs for code cleanup, etc. That way you can turn comments criticizing your code into a request for collaboration. It'll really separates helpful people from drive by commenters.

Re:Ask HN: Should I publish my research code? by stickfigure on Friday January 14, 2022 @11:29AM (#29936532)
> My main concern would be to make sure there are no passwords or secret keys in the data, not how it looks.

Worth mentioning specifically: If you make a git (et al) repository public, make sure there are no passwords or secret keys in the history of the repository either. Cleaning a repository history can be tricky, so if this is an issue, best to just publish a snapshot of the latest code (or make 100% sure you've invalidated all the credentials).

Re:Ask HN: Should I publish my research code? by 999900000999 on Friday January 14, 2022 @11:53AM (#29936879)
The brute force way around this is to remove the .git folder and re init the git repo.

For my 2 cents I'd prefer to see sloppy code vs no code.

If you did something wrong, you did it wrong. Hopefully someone would put in a PR to fix it

Re:Ask HN: Should I publish my research code? by cephei on Friday January 14, 2022 @03:49PM (#29940232)
If there is sensitive data to remove and the history is important to keep, then GitHub has some recommendations for scrubbing the history

https://docs.github.com/en/authentication/keeping-your-accou...

Re:Ask HN: Should I publish my research code? by jonas21 on Friday January 14, 2022 @11:51AM (#29936857)
> My main concern would be to make sure there are no passwords or secret keys in the data, not how it looks.

Also personal data of any human subjects.