frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Comments in Code. Yay or Nay?

3•reconnecting•1h ago
Do we still need to maintain comments in general-purpose scripting language? Is good code code that doesn't need comments? What are the most useful comments in code that you've seen?

Comments

danielfalbo•1h ago
https://www.antirez.com/news/124
reconnecting•1h ago
Thanks! This is about C and low-level, but what about general-purpose scripting languages? Python/PHP?
Bender•1h ago

    # If you see this comment after 2008 something went wrong.  rewrite this "temporary script".
I give people an excuse to get rid of my temporary things.
reconnecting•1h ago
May I ask if you still have this comment in production?
Bender•1h ago
I retied some time ago but I would bet a few cups of coffee that hundreds of my temporary scripts, work-around eye-sores and such are still in development, performance, staging and production.
reconnecting•1h ago
OK, do you left them only with this comment or there was more about function or how software is operating?
Bender•1h ago
That was just an example. There are a plethora of variations in comments, only some alluding to the script being a last minute work around. Some are about dependencies so people have some troubleshooting clues to save them time in a 3am outage. Some give history and context to specific values or settings so people do not just blindly say "oh, cargo cult" and back them out. It would take all day to list all the types of comments. Most comments are JIRA issue numbers or confluence pages but those were not optional.
eschneider•1h ago
Comments are a gift to future you. When you pick up the code again after 6 months/years/however-long-in-the-future and it looks like something you've never seen before, the comments you left should be notes you need to build context around what's in the code and (sometimes more importantly) what's NOT in the code.
reconnecting•1h ago
This is one side, and this is something that I had in mind. However, I found that there is another popular opinion (1): that in reality, commented code is harmless. The problem is that it's messy and makes it difficult to read, etc.

1. https://softwareengineering.stackexchange.com/a/377187

JohnFen•7m ago
That's not talking about informative comments, it's talking about commenting out code itself. That's an entirely different thing.
JohnFen•9m ago
Comments are essential. The code may tell you the "what", but you need the comments to tell you the "why".

NASA astronaut estranged wife pleads guilty to alleged crime committed in space

https://www.foxnews.com/us/nasa-astronauts-estranged-wife-pleads-guilty-falsely-alleging-first-cr...
1•iamtech•36s ago•0 comments

Strands Agents SOPs

https://pypi.org/project/strands-agents-sops/
1•bbgnyc•1m ago•0 comments

Watch Wikipedia article come to life by veteran editor on iPhone [video]

https://www.youtube.com/shorts/MIUNa0hKElg
1•fcpguru•1m ago•0 comments

Show HN: Case Study on Software Requirements Specification

1•ZoePsomi•1m ago•0 comments

Got a full Windows XP desktop working inside Termux on Android

https://old.reddit.com/r/termux/comments/1p1yb9m/got_a_full_windows_xp_desktop_working_inside/
2•sipofwater•3m ago•2 comments

Nuremberg trial records made available online after painstaking 25-year project

https://www.theguardian.com/world/2025/nov/20/digitised-official-records-of-nuremberg-trials-made...
1•wslh•3m ago•0 comments

NTSB Preliminary Ups Flight 2976 Crash During Takeoff

https://www.ntsb.gov:443/investigations/Pages/DCA26MA024.aspx
1•kens•6m ago•0 comments

Agentic systems redraw the Pareto frontier on ARC-AGI

https://poetiq.ai/posts/arcagi_announcement/
1•gkapur•6m ago•0 comments

Show HN: GitPulse – AI-powered tool to discover open source projects

https://git-pulsee.vercel.app
1•Indri-Fazliji•6m ago•0 comments

US Departments of Labor, Education announce new education partnerships

https://www.dol.gov/newsroom/releases/osec/osec20251118
1•pavel_lishin•8m ago•0 comments

Ask HN: How do you prioritize dependency updates?

1•nrig•10m ago•0 comments

How were large Unix installations managed in the 80s/90s?

https://retrocomputing.stackexchange.com/questions/32279/how-were-large-unix-installs-managed-in-...
2•SeenNotHeard•10m ago•1 comments

Robots with Day Jobs: Why Teleoperated Humanoids May Be What Labor Markets Need

https://www.cnet.com/home/smart-home/robots-with-day-jobs-why-teleoperated-humanoids-might-be-exa...
1•connorjewiss•11m ago•0 comments

Nearly half of US kids want in-game currency this Christmas

https://www.gamesindustry.biz/nearly-half-of-us-kids-want-in-game-currency-this-christmas
1•haunter•11m ago•0 comments

Microsoft makes Zork I, II, and III open source under MIT License

https://arstechnica.com/gaming/2025/11/microsoft-makes-zork-i-ii-and-iii-open-source-under-mit-li...
1•ndsipa_pomu•14m ago•2 comments

SEO Community Reacts to Adobe's Semrush Acquisition

https://www.searchenginejournal.com/seo-community-reacts-to-adobes-semrush-acquisition/561506/
2•rmason•16m ago•0 comments

Toy solid.js implementation (signal/effect) in less than 100 LOCs

https://github.com/danielfalbo/solid.js/blob/main/solid.js
1•danielfalbo•19m ago•0 comments

The Most Dangerous Halo LAN Party – High Speed Highway Halo (2002) [video]

https://www.youtube.com/watch?v=QNCaE5mxKM4
1•zdw•20m ago•0 comments

Quickinim – simple procurement automation for manufacturers (1-minute setup)

https://quickinim.com/manufacturing
1•Gormanu•20m ago•0 comments

nanochat.karpathy.ai

https://nanochat.karpathy.ai/
1•danielfalbo•21m ago•0 comments

Why don't we see agents around us? Share your thoughts

1•spacemnstr42069•23m ago•0 comments

Lincoln Electric is bringing DC fast charging to sites WITHOUT 3-phase power

https://electrek.co/2025/11/19/lincoln-electric-is-bringing-dc-fast-charging-to-sites-without-3-p...
1•thelastgallon•24m ago•0 comments

Show HN: Roundible – A Space for Anonymous Discussions

https://roundible.com
1•Oxidome•26m ago•0 comments

The Pithiest Critique of Modern Conservatism Keeps Getting Credited to Wrong Man

https://slate.com/business/2022/06/wilhoits-law-conservatives-frank-wilhoit.html
2•riffic•27m ago•1 comments

The Moon Was an Inside Job

https://www.nytimes.com/2025/11/20/science/moon-collision-earth-theia.html
2•donohoe•27m ago•0 comments

Spring Boot 4.0.0 is here

https://spring.io/blog/2025/11/20/spring-boot-4-0-0-available-now/
3•siddharthgoel88•29m ago•0 comments

Two-thirds of AI-generated citations are fabricated or contain errors

https://www.psypost.org/study-finds-nearly-two-thirds-of-ai-generated-citations-are-fabricated-or...
3•geox•30m ago•0 comments

Parallel Loop Transformer for Efficient Test-Time Computation Scaling

https://arxiv.org/abs/2510.24824
2•PaulHoule•30m ago•0 comments

TikTok owner ByteDance valued at $480B after bidding war

https://www.thetimes.com/business/companies-markets/article/tiktok-owner-bytedance-valued-480bn-b...
1•JumpCrisscross•31m ago•0 comments

The Boring Part of Bell Labs

https://elizabethvannostrand.substack.com/p/the-boring-part-of-bell-labs
2•Hooke•32m ago•0 comments