frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Ask HN: Anyone Using a Mac Studio for Local AI/LLM?

44•UmYeahNo•1d ago•27 comments

Ask HN: Ideas for small ways to make the world a better place

10•jlmcgraw•9h ago•17 comments

Ask HN: Non-profit, volunteers run org needs CRM. Is Odoo Community a good sol.?

2•netfortius•4h ago•1 comments

Ask HN: Non AI-obsessed tech forums

18•nanocat•7h ago•13 comments

Ask HN: 10 months since the Llama-4 release: what happened to Meta AI?

42•Invictus0•1d ago•11 comments

AI Regex Scientist: A self-improving regex solver

6•PranoyP•11h ago•1 comments

Ask HN: Who wants to be hired? (February 2026)

139•whoishiring•4d ago•512 comments

Ask HN: Who is hiring? (February 2026)

312•whoishiring•4d ago•511 comments

Tell HN: Another round of Zendesk email spam

104•Philpax•2d ago•54 comments

Ask HN: Any International Job Boards for International Workers?

2•15charslong•6h ago•1 comments

Ask HN: Why LLM providers sell access instead of consulting services?

4•pera•17h ago•13 comments

Ask HN: Is Connecting via SSH Risky?

19•atrevbot•2d ago•37 comments

Ask HN: Has your whole engineering team gone big into AI coding? How's it going?

17•jchung•1d ago•12 comments

Ask HN: What is the most complicated Algorithm you came up with yourself?

3•meffmadd•19h ago•7 comments

Ask HN: How does ChatGPT decide which websites to recommend?

5•nworley•1d ago•11 comments

Ask HN: Is it just me or are most businesses insane?

7•justenough•1d ago•5 comments

Ask HN: Mem0 stores memories, but doesn't learn user patterns

9•fliellerjulian•2d ago•6 comments

Ask HN: Is there anyone here who still uses slide rules?

123•blenderob•3d ago•122 comments

Ask HN: Anyone Seeing YT ads related to chats on ChatGPT?

2•guhsnamih•1d ago•4 comments

Ask HN: Does global decoupling from the USA signal comeback of the desktop app?

5•wewewedxfgdf•1d ago•2 comments

Kernighan on Programming

170•chrisjj•4d ago•61 comments

We built a serverless GPU inference platform with predictable latency

5•QubridAI•2d ago•1 comments

Ask HN: How Did You Validate?

4•haute_cuisine•1d ago•4 comments

Ask HN: Does a good "read it later" app exist?

8•buchanae•3d ago•18 comments

Ask HN: Have you been fired because of AI?

17•s-stude•3d ago•15 comments

Ask HN: Cheap laptop for Linux without GUI (for writing)

15•locusofself•3d ago•16 comments

Ask HN: Anyone have a "sovereign" solution for phone calls?

12•kldg•3d ago•1 comments

Test management tools for automation heavy teams

2•Divyakurian•1d ago•2 comments

Ask HN: OpenClaw users, what is your token spend?

14•8cvor6j844qw_d6•4d ago•6 comments

Ask HN: Has anybody moved their local community off of Facebook groups?

23•madsohm•4d ago•18 comments
Open in hackernews

Ask HN: Best practices for research code?

13•Eugeleo•3mo ago
Writing research code (in my case ML/AI) is very different to writing production code. The goals are different, and thus so are the best practices, patterns, and values.

What's your favorite resource on how to write code in research? What are the research-code-specific equivalents of Rich Hickey's talks or SPJ's posts or the many many SWE blogposts posted to HN?

Comments

elasticventures•3mo ago
for llm's it's a github repo - spec driven development prompt or skill with a "WIP" (work in progress) status and a broad context summary with <AGENT> instructions to chunk the document.
softwaredoug•3mo ago
I feel like SWE skills are underappreciated in research code. I've seen a lot of bugs creep in due to poor design or bad testing practices. Leading to the wrong conclusions. Not to mention that its harder for readers to consume if its unreadable code.

Researchers that think their code is "throwaway" dramatically limit their reach.

cool_man_bob•3mo ago
It makes sense. I can’t speak for the AI/ML field, but a lot of the software jobs I’ve seen in scientific research areas were pretty obvious they wanted scientists who could do a little code, as opposed to developers who can do a little science.
bjourne•3mo ago
If people can comprehend your code they can point out flaws in it that invalidate your experiments. But be a good researcher and don't think like that. :)
conditionnumber•3mo ago
I've seen a very broad spectrum of research code. In general research code translates O(1e1-1e2) lines of mathematics into O(1e3-1e4) lines of code. I find mathematics easier to understand than code, so that's going to color my opinion.

My favorite research code tends to look like the mathematics it implements. And that's really hard to do well. You need to pick abstractions that are both efficient to compute and easy to modify as the underlying model changes. My favorite research code also does the reader a lot of favors (eg documents the shape of the data as it flows through the code, uses notation consistent with the writeup or standard conventions in the field).

Industry research code... I'm happy to see basic things. Version control (not a bunch of Jupyter notebooks). Code re-use (not copy+paste the same thing 20x). Separation of config and code (don't litter dozens of constants throughout thousands of lines of code). Functions < 1000 lines apiece. Meaningful variable names. Comments that link the theory to the code when the code has to be complicated.

Overall it's probably most helpful to find a researcher in your field whose code you like to read, and copy the best aspects of that style. And ask readers of your code for feedback. I really enjoy reading Karpathy's code (not my field), but that may be an exception because a lot of what I've read is intended to teach a more or less codified approach, rather than act as a testbed for iteration in a more fluid design space.