frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Ask HN: Best Practices for Writing Tests?

5•chistev•4h ago

Comments

Gusarich•3h ago
That's too generic a question. There are many different techniques, frameworks, and approaches, so there's no single universal answer. But assuming you're asking about testing general-purpose software without specific requirements, I'd recommend the following approach:

1. Basic tests that ensure your software runs without crashing or breaking.

2. Specific test cases for various inputs, settings, and invalid scenarios.

3. Edge-case tests covering extreme inputs or unusual combinations.

4. If your software's behavior is predictable or you can easily verify correctness, consider randomized testing to validate thousands of random inputs automatically.

aristofun•58m ago
1. Test the outcomes (what), not implementation (how)

2. 1 good e2e test worth thousands unit tests (because unit tests tend to fall into "testing how" category).

3. Unit tests are more often useless than not, they give false sense of reliability.

4. Write explicit straightforward tests, avoid too sophisticated dynamic tests (unless specific requirements call for it). Tests are for people to maintain and fix quickly, not for machines to have fun.

5. Test coverage for the sake of it is a stupid metric. You better cover well 1% of the most important end user use cases than cover 99% of everything else.

Show HN: Drop-In Checkpointer for LangGraph (No DB Setup Required)

https://www.npmjs.com/package/convo-sdk
2•raunaqvaisoha•1m ago•0 comments

That Taste of Wine a Server Offers Is Not to See If You Like

https://www.cnet.com/home/kitchen-and-household/no-youre-not-tasting-the-wine-to-see-if-you-like-it-heres-whats-really-happening/
1•Bluestein•2m ago•0 comments

Show HN: Near – All-in-one OSINT toolkit

https://github.com/rdWei/Near
2•osuser99•2m ago•0 comments

Show HN: Free Unicode font generator with 19 styles, client-side processing

https://cursivetextgenerator.org/
1•qinggeng•5m ago•0 comments

Ask HN: Should movie theaters show closed captions you need glasses to hide?

1•amichail•6m ago•0 comments

Authoritarian citizens? Spanish youth are losing faith in democracy

https://www.frontiersin.org/articles/10.3389/fpos.2025.1553307
1•PaulHoule•6m ago•0 comments

Show HN: GitHub Action for Publishing to Repoforge.io (Python, Docker, NPM)

1•chris140957•7m ago•0 comments

Paylias: A payment network alternative to Visa and Mastercard

https://paylias.xyz/blog/payment-demo
2•ziyadparekh•8m ago•0 comments

Have you ever seen this font?

https://fayziev.com/blog/simsun-a-default-with-a-legacy
1•lr0•9m ago•0 comments

My Favourite 10 Maths Fun Facts

https://www.youtube.com/watch?v=sbU_cGZ9B74
1•em-bee•14m ago•0 comments

A picture of the future: humans checking AI didn't make a mistake – forever

https://www.theregister.com/2025/07/16/if_you_want_a_picture/
2•cratermoon•15m ago•0 comments

French villages have no more drinking water. The reason? PFAS pollution

https://www.lemonde.fr/en/environment/article/2025/07/18/these-french-villages-have-no-more-drinking-water-the-reason-pfas-pollution_6743479_114.html
4•rawgabbit•20m ago•0 comments

Hexanitrogen Energies

https://www.science.org/content/blog-post/hexanitrogen-energies
1•thomasjb•22m ago•0 comments

Ask HN: What are interesting do you know any terminal utilities?

2•FerkiHN•24m ago•2 comments

An average human breathes out roughly 1kg of carbon dioxide a day

https://twitter.com/ID_AA_Carmack/status/1945948569246027934
2•tosh•25m ago•0 comments

"I think about this often" (2023)

https://dejavucoder.substack.com/p/i-think-about-it-often-part-1
1•gk1•25m ago•0 comments

Show HN: Day by Day – Visualise your entire life as a daily timeline

https://day-by-day.life
1•mrroryflint•26m ago•0 comments

UC divests hedge funds as CIO criticizes high fees, low returns

https://www.pionline.com/institutional-investors/endowments-foundations/pi-university-california-hedge-funds-endowment-asset-allocation/
1•hhs•26m ago•0 comments

Show HN: NoteSub – A no-setup, offline-first Notion alternative

https://notesub.com
1•zahirbmirza•28m ago•0 comments

Review: The NovaCustom V54 is a Linux laptop with Dasharo coreboot fw

https://www.osnews.com/story/142758/review-the-novacustom-v54-is-an-outstanding-linux-laptop-with-dasharo-coreboot-firmware/
1•pietrushnic•28m ago•1 comments

Booting EDK2 (UEFI Reference Implmentation) on Hardkernel Odroid M2

https://blog.3mdeb.com/2025/2025-07-17-edk2-on-odroid-m2/
1•pietrushnic•29m ago•0 comments

MDBG Chinese Dictionary

https://www.mdbg.net/chinese/dictionary
1•throwaway328•30m ago•1 comments

The Great Unracking: Saying goodbye to the servers at our physical datacenter

https://stackoverflow.blog/2025/07/16/the-great-unracking-saying-goodbye-to-the-servers-at-our-physical-datacenter/
2•notfoss•34m ago•0 comments

Malicious MCP code execution through Shortwave AI Email

https://www.tramlines.io/blog/why-shortwave-ai-email-with-mcp-integration-is-a-phisher-s-white-whale
2•coderinsan•34m ago•0 comments

Show HN: Mock FedCM Integrations

https://mockfedcm.com/
4•portaouflop•34m ago•0 comments

$19,000 a year for a longer life? Inside a luxury Bay Area longevity clinic

https://www.sfchronicle.com/health/aging-longevity/article/human-longevity-health-clinic-20277643.php
10•brandonb•34m ago•3 comments

Vistra Operations Company, LLC; Perry Nuclear Power Plant, Unit No. 1; Exemption

https://www.federalregister.gov/documents/2025/07/18/2025-13556/vistra-operations-company-llc-perry-nuclear-power-plant-unit-no-1-exemption
2•impish9208•35m ago•0 comments

Junior developer's code worked in tests, destroyed data in production

https://www.theregister.com/2025/07/14/who_me/
3•Bender•38m ago•0 comments

Show HN: Tips for getting great Text2Cypher outputs from LLMs for Graph RAG

https://blog.kuzudb.com/post/improving-text2cypher-for-graphrag-via-schema-pruning/
1•laminarflow027•38m ago•0 comments

Another max-severity, make-me-root Cisco bug on the loose

https://www.theregister.com/2025/07/17/critical_cisco_bug/
1•Bender•39m ago•0 comments