frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

The Economic Benefit of Refactoring

https://martinfowler.com/articles/exploring-gen-ai/refactoring-economic-benefit.html
18•javaeeeee•51m ago

Comments

defrim•12m ago
Being a bit cheeky here -- the amount of comments on this post is a telltale sign of how common / desirable refactoring is for the majority of developers (xD). It isn't our fault though, maybe if those pesky managers read this article then they would understand..
sltr•5m ago
It's been on HN for 45 minutes. It's before 9am on the west coast
imoverclocked•8m ago
It’s interesting that cyclomatic complexity or cognitive complexity scales with token usage. A codebase that enforces upper bounds on one of these two also (potentially) helps AI agents stay efficient.
vaylian•6m ago
Interesting take-away:

> Claude is unable to look at code, look at refactorings in general and work out which are suitable to apply: a human needs to actively guide it.

Claude is happy to produce a very large Rust file. But you need human guidance to make it smaller.

sltr•6m ago
the punchline: "Refactoring reduces token consumption"

I appreciate Martin's effort to quantify the benefit rather than pontificate. It's worth mentioning Martin wrote a whole book on refactoring [1], in which he states, "to refactor, the essential precondition is [...] solid tests", which I think is the real benefit here, AI or not. Good tests protect against regressions, whether human or robot. They also help encode the spec, which humans and robots can read.

[1] https://www.oreilly.com/library/view/refactoring-improving-t...

pmg101•5m ago
It's very interesting to have some data on this.

It matches my experience which is that LLMs greatly benefit from well factored code, but are not particularly adept at creating such code.

Much like most human developers I suppose!

Intel providing ATOM to startup led by co-investor of Tan in rare deal

https://www.reuters.com/world/intel-providing-chip-technology-startup-led-by-co-investor-tan-rare...
1•ksec•50s ago•0 comments

Every Paul Graham essay, narrated in his voice

https://www.youtube.com/AceNallawar
2•acewashere•52s ago•0 comments

Citadel Buys Situational Awareness's Stock Portfolio After Big Losses in AI

https://www.wsj.com/finance/citadel-buys-situational-awarenesss-stock-portfolio-after-big-losses-...
1•mudil•1m ago•0 comments

Why compute might get 10x+ more expensive in coming years

https://www.dwarkesh.com/p/why-compute-might-get-10x-more-expensive
1•nlpnerd•2m ago•0 comments

Show HN: Drug Boat, Strike

https://drugboatstrike.com/
1•stoli_man•2m ago•0 comments

To understand the experience of life, don't look to the mind. Look to the body

https://www.theguardian.com/commentisfree/2026/jul/30/alive-body-life-experience
1•rectang•2m ago•0 comments

I would like to show my open source eval framework for agents

https://github.com/Thomeras/agent_detective
1•Thomeras•2m ago•1 comments

A data center wanted to buy a farm to use water legally reserved for irrigation

https://www.techradar.com/pro/a-330-mw-data-center-wanted-to-buy-a-farm-switch-off-the-irrigation...
2•hn_acker•4m ago•1 comments

Postgres on NVMe Benchmarks

https://clickhouse.com/blog/benchmarking-nvme-managed-postgres-planetscale-vs-clickhouse
1•cauchyk•4m ago•0 comments

Uefa agrees to boycott FIFA competitions if World Cup sell-off plans proceed

https://www.theguardian.com/football/2026/jul/30/uefa-agrees-to-boycott-fifa-competitions-if-worl...
1•alexander2002•5m ago•0 comments

The anatomy of an AI agent on Google Cloud: a complete guide

https://ykdojo.github.io/awesome-agents-on-google-cloud/anatomy-of-an-ai-agent-on-google-cloud.html
1•ykev•6m ago•0 comments

'Wastelands' No More: India Charts a Future for Its Grasslands

https://e360.yale.edu/features/india-grasslands-restoration
1•Brajeshwar•6m ago•0 comments

People have saved 60M litres of water using this open source tool

https://github.com/kunal12203/GrapeRoot
1•krishnakantk876•6m ago•1 comments

Kimi-code not performing well

1•airbreather•6m ago•0 comments

Netflix lands global streaming deal for 'The Walking Dead'

https://techcrunch.com/2026/07/30/netflix-lands-global-streaming-deal-for-the-walking-dead/
1•andsoitis•6m ago•0 comments

Towards End-to-End Automation of AI Research [pdf]

https://arxiv.org/abs/2606.15497
2•dgellow•7m ago•1 comments

Innocent man spends 18 months in prison after Skyrim username mixup

https://www.dexerto.com/gaming/innocent-man-spends-18-months-in-prison-after-skyrim-username-mixu...
2•nixass•8m ago•0 comments

Growth Theory

https://cruel.org/econthought/essays/growth/growthcont.html
2•jdcampolargo•8m ago•0 comments

Situational Awareness Liquidates Public Positions

https://www.cnbc.com/video/2026/07/30/leopold-aschenbrenneras-situational-awareness-sells-entire-...
3•imaginaryunit01•10m ago•0 comments

World's First Room-Temperature Quantum Material Sorts Light in Unprecedented Way

https://scitechdaily.com/worlds-first-room-temperature-quantum-material-sorts-light-in-an-unprece...
1•bookofjoe•10m ago•0 comments

Pgtestdb's template cloning approach to testing is fast

https://brandur.org/fragments/pgtestdb
2•peterldowns•12m ago•0 comments

Nub 0.5.0

https://nubjs.com/blog/nub-0-5-0
2•andrewstetsenko•12m ago•0 comments

Selling to Carol

https://longform.asmartbear.com/icp-ideal-customer-persona/
2•tosh•13m ago•0 comments

Show HN: Wasted Cycles – Local wall-clock profiler for AI coding agents

https://zozo123.github.io/wasted-cycles/
1•zozo123-IB-IL2•14m ago•0 comments

CVE-2026-64560: Linux UAF

https://nvd.nist.gov/vuln/detail/CVE-2026-64560
1•c0balt•14m ago•0 comments

Show HN: LeetCode side panel with Socratic hints and AI interview practice

https://leetcopilot.dev
1•alexwang24•16m ago•0 comments

Squares – Browser-based quantum circuit designer, simulator, and AI assistant

https://squaresquant.com
1•Ferra•16m ago•1 comments

Introducing ctx.traits · Agent Traits & Workflows typed, versioned & in-sync.

https://ctx.company/blog/introducing-ctx-traits/
2•rpunkfu•16m ago•1 comments

Ask HN: Do older programmers/CS academics view AI safety as a form of arrogance?

3•amichail•17m ago•4 comments

Cambridge Algorithms Course

https://www.cl.cam.ac.uk/teaching/2021/Algorithms/
2•ibobev•17m ago•0 comments