frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Ask HN: Who is hiring? (June 2025)

228•whoishiring•8h ago•224 comments

Ask HN: Who wants to be hired? (June 2025)

87•whoishiring•8h ago•214 comments

Ask HN: How do I learn robotics in 2025?

246•srijansriv•10h ago•71 comments

Ask HN: How do startups create fancy websites?

2•ciwolex•2h ago•2 comments

Ask HN: Is offering a one-time payment stupid?

4•bigscrankus•3h ago•15 comments

Ask HN: Should science ensure NDEs are pleasant without damaging the brain?

2•amichail•3h ago•3 comments

My "tiny" Product Hunt alternative made $5.6k in revenue last month

3•jaisalrathee•4h ago•2 comments

Ask HN: Local AI for Handwriting Transcription?

3•i4i•4h ago•0 comments

Ask HN: Anyone making a living from a paid API?

232•meander_water•2d ago•166 comments

Google DMARC Policy Changes?

29•flajr•10h ago•9 comments

Ask HN: Cursor is productive for an hour, then burns my application down

5•campervans•8h ago•3 comments

Ask HN: How are parents who program teaching their kids today?

87•laze00•1d ago•89 comments

Ask HN: What is your current LLM-assisted coding tool?

4•HiPHInch•7h ago•2 comments

Built an AI tool to visualize large codebases - would love feedback

12•ilia_khatko•14h ago•7 comments

Understanding physical attacks on Android phones

4•alokq•14h ago•0 comments

Ask HN: What is the best LLM for consumer grade hardware?

233•VladVladikoff•3d ago•180 comments

Ask HN: Threshold Concepts in Mathematics

3•borysj•14h ago•4 comments

Ask HN: Why hasn't the Gemini protocol gained more popularity?

5•amiralul•15h ago•3 comments

Ask HN: What are the system requirements of autonomous military UAV?

6•eimrine•9h ago•11 comments

Ask HN: What should you ask to understand a new team and company?

5•laura2013•22h ago•4 comments

CQRS and Event Sourcing for the Rest of Us

4•odinellefsen•1d ago•1 comments

Ask HN: Why reinvent front-end frameworks and static site builders?

6•keepamovin•1d ago•12 comments

Proposal: Throw as a Special Variable for Auto Error Propagation in Go

2•iondodon•1d ago•1 comments

Ask HN: Who was hired using HN?

4•KolmogorovComp•6h ago•1 comments

Ask HN: How do I learn practical electronic repair?

12•juanse•2d ago•14 comments

What motivates you to contribute to open source projects?

17•rizs12•3d ago•14 comments

Ask HN: GEtting a Remote Job in the US

8•gsablewskinunes•2d ago•16 comments

Tell HN: Namecheap pre-purchasing searched domain names?

22•iamtoomas•3d ago•30 comments

Ask HN: Hardware for 1k RPS?

5•gsky•2d ago•3 comments

Ask HN: What's the best AI for meme creation?

2•faangguyindia•1d ago•2 comments
Open in hackernews

Ask HN: How do you improve code for future AI?

2•tmaly•2d ago
I am sitting on tons of legacy code at my day job. I keep looking at how fast AI is improving over the last few years.

I am thinking what can I do to improve the massive amount of legacy code I have to maintain so that eventually I can let a better AI in the near future help me more?

What are your best tips that are working now?

Comments

lucfranken•2d ago
Did you try running some ai over it to see if it is capable of being useful?

Legacy code is a statement but in the end it only matters if it works and is maintainable.

It might surprise you.

tmaly•1d ago
I got mixed results. A good portion of the code was written by former employees. There is little documentation.
apothegm•1d ago
AI has limited context windows and little ability to reason about what complex code does.

If you can refactor it to small modules with simple interfaces and properly document the interfaces and what the modules do, AI can work with your code more easily. Think of the ideal AI codebase as being assembled from libraries (even if private internally developed ones) with a small amount of glue code in between.

tmaly•1d ago
This is exactly the thought I had. The challenge is starting with messy undocumented code that sprawls out all over the place.

How to you go from spaghetti code to nice neat modular code using AI?

apothegm•22h ago
Ah, getting AI to do that part of the work… hasn’t worked for me. The only thing that it’s been helpful for in that regard is as a rubber duck, which isn’t much. But honestly, the built-in refactoring tools in an IDE are more consistent.

How’s your test coverage? Good E2E tests that treat the codebase like a black box will help a lot, however you approach the actual refactoring. That might conceivably also be something the AI could help you with.