Hacker Newsnew | past | comments | ask | show | jobs | submit | dinfinity's commentslogin

Keychron keyboards are absolutely amazing. And very affordable for what they are.

The code is what it does. The comments should contain what it's supposed to do.

Even if you give them equal roles, self-documenting code versus commented code is like having data on one disk versus having data in a RAID array.

Remember: Redundancy is a feature. Mismatches are information. Consider this:

// Calculate the sum of one and one

sum = 1 + 2;

You don't have to know anything else to see that something is wrong here. It could be that the comment is outdated, which has no direct effects and is easily solved. It could be that this is a bug in the code. In any case it is information and a great starting point for looking into a possible problem (with a simple git blame). Again, without needing any context, knowledge of the project or external documentation.

My take on developers arguing for self-documenting code is that they are undisciplined or do not use their tools well. The arguments against copious inline comments are "but people don't update them" and "I can see less of the code".


> Redundancy is a feature. Mismatches are information. Consider this:

Respectfully, if someone wrote code like this, I wouldn't want to work with them. I mean next step is "I copy paste code instead of writing functions, and in the comment above I mention all the other copies, so that it's easy to check that they are all doing the same thing redundantly".

> The arguments against copious inline comments are "but people don't update them" and "I can see less of the code".

Well no, that's not my argument. I have been navigating code for 20 years and in good codebases, comments are rare and describe something "surprising". Good code is hardly surprising.

My problem with "literate programming" (which means "add a lot of comments in the implementation details") is that I find it hard to trust developers who genuinely cannot understand unsurprising code without comments. I am fine with a junior needing more time to learn, but after a few years if a developer cannot do it, it concerns me.


You did not engage with my main arguments. You should still do so.

1. Redundancy: "The code is what it does. The comments should contain what it's supposed to do. [...] You don't have to know anything else to see that something is wrong here." and specifically the concrete trivial (but effective) example.

2. "My take on developers arguing for self-documenting code is that they are undisciplined or do not use their tools well. The arguments against copious inline comments are "but people don't update them" and "I can see less of the code"."

> Respectfully, if someone wrote code like this, I wouldn't want to work with them. I mean next step is "I copy paste code [...]

This is an nonsensical slippery slope fallacy. In no way does that behavior follow from placing many comments in code. It also says nothing about the clearly demonstrated value of redundancy.

> I have been navigating code for 20 years and in good codebases, comments are rare and describe something "surprising".

Your definition of good here is circular. No argument on why they are good codebases. Did you measure how easy they were to maintain? How easy it was to onboard new developers? How many bugs it contained? Note also that correlation != causation: it might very well be that the good codebases you encountered were solo-projects by highly capable motivated developers and the comment-rich ones were complicated multi-developer projects with lots of developer churn.

> My problem with "literate programming" [...] is that I find it hard to trust developers who genuinely cannot understand unsurprising code without comments.

This is gatekeeping code by making it less understandable and essentially an admission that code with comments is easier to understand. I see the logic of this, but it is solving a problem in the wrong place. Developer competence should not be ascertained by intentionally making the code worse.


You talk as if you had scientific proof that literate programming is objectively better, and I was the weirdo contradicting it without bringing any scientific proof.

Fact is, you don't have any proof at all, you just have your intuition and experience. And I have mine.

> It also says nothing about the clearly demonstrated value of redundancy.

Clearly demonstrated, as in your example of "Calculate the sum of one and one"? I wouldn't call that a clear demonstration.

> This is gatekeeping code by making it less understandable

I don't feel like I am making it less understandable. My opinion is that a professional worker should have the required level of competence (otherwise they are not a professional in that field). In software engineering, we feed code to a compiler, and we trust that the compiler makes sure that the machine executes the code we write. The role of the software engineer is to understand that code.

Literate programming essentially says "I am incapable of writing code that is understandable, ever, so I always need to explain it in a natural language". Or "I am incapable of reading code, so I need it explained in a natural language". My experience is that good code is readable by competent software engineers without explaining everything. But not only that: code is more readable when it is more concise and not littered with comments.

> and essentially an admission that code with comments is easier to understand.

I disagree again. Code with comment is easier to understand for the people who cannot understand it without the comments. Now the question is, again: are those people competent to handle code professionally? Because if they don't understand the code without comments, many times they will just have to trust the comments. If they used the comments to actually understand the code, pretty quickly they would be competent enough to not require the comments. Which means that at the point where they need it, they are not yet professionals, but rather apprentices.


"Nearly odorless"?

I call bullshit.


Honestly just a fairly mild earthy smell. Nothing terrible. When I was a kid my dad could render the bathroom unapproachable for 15 minutes. But he drank whiskey and smoked.

Exactly. It's not that the producers or distributors (of food, content, etc.) are not malicious/amoral/evil/greedy. It's that the real solution lies in fixing the vulnerabilities in the consumers.

You don't say to a heroin addict that they wouldn't have any problems if those pesky heroin dealers didn't make heroin so damn addictive. You realize that it's gonna take internal change (mental/cultural/social overrides to the biological weaknesses) in that person to reliably fix it (and ensure they don't shift to some other addiction).

I'm not saying "let the producers run free". Intervening there is fine as long as we keep front of mind and mouth that people need to take their responsibility and that we need to do everything to help them to do so.


Doesn't the government try to ban heroin?? You have to live in the real world, not your ideal world, and in the real world people are not perfectly rational agents. They make mistakes. Each and every mistake could have been avoided if the individual just had a stronger will, was a little smarter, a little more prudent, or took a little more time to think, but just because mistakes can be avoided and some people are better at avoiding them than others does not change the fundamental issue: drugs, tobacco, gambling, and TikTok are trying to increase the rate at which mistakes are made. Wouldn't you rather live in a society where they aren't out to get you?

I think there's an argument that can be made, like, "well maybe 10% of the time people consuming alcohol is a mistake, but I just use it recreationally. The government shouldn't prohibit all drinking!" And sure. If it is really the case that people would take the same actions even if they had more time to think things through and were in a good mental state, the government should probably not be intervening for the 10% of the cases that doesn't hold. But you have to draw the line somewhere.


> I'm not saying "let the producers run free". Intervening there is fine as long as we keep front of mind and mouth that people need to take their responsibility and that we need to do everything to help them to do so.


> You: It's that the real solution lies in fixing the vulnerabilities in the consumers.

> Me: Just because mistakes can be avoided and some people are better at avoiding them than others does not change the fundamental issue: drugs, tobacco, gambling, and TikTok are trying to increase the rate at which mistakes are made. Wouldn't you rather live in a society where they aren't out to get you?


> This is where algorithmic, ad-fueled social media leads a republic.

Only if we keep repeating things like this.

People have agency and there are many people who are not led by or actively abusing social media. You don't tell a heroin addict it's not their fault, that the presence and malice of dealers made their fate inevitable.


You’re asking for a hundred million people to personally overcome engineered manipulation rather than addressing the manipulators. What you say is true for the individual but it’s not a solution at scale for our societal issues.

It’s much akin to suggesting that poor people should not blame the system that keeps them poor and instead should focus on their education and getting themselves out of their current situation. Sure it’s accurate for the individual but, it’s not an actual solution to the problem at scale.

Heroin addicts quit aided by the intense and direct efforts and support of the people around them. Whether that’s hospital staff or family. And you often do tell heroin addicts it’s not their fault. You tell them addiction is a disease. That their addiction is not a moral failing.


There's room for a yes-and approach, it's not either-or.

Some people can make the change, and since social media is social, that small vanguard causes others to switch as well.

One can blame the system for keeping them poor, while also doing as much as possible to change their own position within the current system, those are not in opposition to each other! In fact, discouraging people from getting educated because of the system is its own form of oppression.

Highlighting people's own agency to make changes for themselves also highlights how the engineered manipulation of social media is not inevitable. These are complimentary things to do.


> In fact, discouraging people from getting educated because of the system is its own form of oppression.

Who is doing this? Did I suggest that addressing the systemic issues with the cycle of poverty precludes individuals pursuing education? No, I said it doesn’t on its own resolve the issue of poverty as a whole.

> Only if we keep repeating things like this.

I still think the answer to this problem will not hinge on individuals choosing to interact with social media less and more intelligently. The vast majority of us know social media is manipulating and dividing the population. We all know we should use it less. We already have these discussions and have been for years and it shows to have very little actual effect on the overall situation we find ourselves in.

You are right in that it can be a yes-and type situation but my worry is that bringing personal responsibility to the forefront of the conversation mostly serves to diminish the responsibility we face as a society to reign in these monstrous (in both ways) companies that are actively destroying our social fabric in pursuit of profits in the most charitable view, or in pursuit of bringing us into a hellscape of a new world order, re Thiel et al.


We also need to leave platforms with highly manipulated and unclear algorithms. Especially the former Twitter, Facebook, and TikTok.

This is one of the great things about BlueSky, you can make your own feeds. The bad thing about BlueSky is that the default algorithms are pretty bad (except for the simple "following" feed). But choosing your own sets of feeds, each with their own algorithms, is a great way to keep up with highly focused news and also allow discovery of new information, without as much manipulation as you'll get on the past generation of social media.


> It is always the eternal tomorrow with AI.

ChatGPT is only 3 years old. Having LLMs create grand novel things and synthesize knowledge autonomously is still very rare.

I would argue that 2025 has been the year in which the entire world has been starting to make that happen. Many devs now have workflows where small novel things are created by LLMs. Google, OpenAI and the other large AI shops have been working on LLM-based AI researchers that synthesize knowledge this year.

Your phrasing seems overly pessimistic and premature.


That GP's comment is an advertisement for a subscription based closed source application that gets access to your credentials.


To be fair, most vending machine operators do not allow suggestions from customers on what products to stock, let alone extensive ongoing and intentional adversarial psychological manipulation and deception.

If it had just made stocking decisions autonomously and based changes in strategy on what products were bought most, it wouldn't have any of the issues reported.


Did you use AI to help you understand the code and what it was doing (incorrectly)?


> 5x to 10x overprovisioning would turn solar from one of the cheaper into the by far most expensive power generation method out there.

This is trivially false if the cost of solar generation (and battery storage) further drops by 5x to 10x.

Additionally that implies the overprovisioned power is worthless in the summer, which does not have to be the case. It might make certain processes viable due to very low cost of energy during those months. Not trivial as those industries would have to leave the equipment using the power unused during winter months, but the economics could still work for certain cases.

Some of the cases might even specifically be those that store energy for use in winter (although then we're not looking at the 'pure' overprovisioning solution anymore).


> This is trivially false if the cost of solar generation (and battery storage) further drops by 5x to 10x.

That's a huge "if". The cost of PV panels has come down by a factor of 10 in the last 13 years or so, that's true. I doubt another 10x decrease is possible, because at some point you run into material costs.

But the real issue is that price of the panels themselves is already only about 35% of the total installation cost of utility-scale PV. This means that even if the panels were free, it would only reduce the cost by a factor of 1.5.


> But the real issue is that price of the panels themselves is already only about 35% of the total installation cost of utility-scale PV. This means that even if the panels were free, it would only reduce the cost by a factor of 1.5.

1. Do the other costs scale with the number of panels? Because if the sites are 5 times the scale of the current ones I would imagine there are considerable scale based cost efficiencies, both within projects and across projects (through standardization and commoditization).

2. Vertically mounted bifacial PV already greatly smoothes the power production curve throughout the day, improving profitability. Lower cost panels make the downside of requiring more panels in such a setup almost non-existent. Additionally, they reduce maintenance/cleaning costs by being mounted vertically.

3. Battery/energy storage (which further improve profitability) costs are dropping and can drop further.

Also, please address the matter of using the overprovisioned power in summer. Possible projects are underground thermal storage ("Pit Thermal Energy Storage", only works in places where heating is required in winter), desalination, producing ammonia for fertilizer, and producing jet fuel.


> 1. Do the other costs scale with the number of panels?

Mostly yes. Once you're at utility-scale, installation and maintainance should scale 1:1 with number of panels. Inverters and balancing systems should also scale 1:1, although you might be able to save a bit here if you're willing to "waste" power during peak insolation.

But think about it this way: If it was possible to reduce non-panel costs by a factor of 5 simply by building 5x larger solar plants, the operating companies would already be doing this. With non-panel costs around 65%, this would result in 65% * (1 - 1/5) = 52% savings and give them a huge advantage over the competition.

> 2. Vertically mounted bifacial PV […] 3. Battery […] costs are dropping

I agree that intra-day fluctuations will be solved by cheaper panels and cheaper batteries, especially once sodium-ion battery costs fall significantly. But I'm specifically talking about seasonal storage here.

> Also, please address the matter of using the overprovisioned power in summer.

I'm quite pessimistic about that. Chemical plants tend to be extremely capital-intensive and quickly become non-profitable if they're effectively idle during half of the year. Underground thermal storage would require huge infrastructure investments into distribution, since most places don't already have district heating.

Sorry, very busy today so I can't go into all details, but I still wanted to give you an answer.


> That's a huge "if". The cost of PV panels has come down by a factor of 10 in the last 13 years or so, that's true. I doubt another 10x decrease is possible, because at some point you run into material costs.

A factor of 5 is certainly within the realms of physics, given the numbers I've seen floating around. Note that prices are changing rapidly and any old price may not be current: around these parts, they're already so cheap they're worth it as fencing material even if you don't bother to power anything with them.

> But the real issue is that price of the panels themselves is already only about 35% of the total installation cost of utility-scale PV. This means that even if the panels were free, it would only reduce the cost by a factor of 1.5.

This should have changed your opinion, because it shows how the material costs are not the most important factor: we can get up to a 3x cost reduction by improving automation of construction of utility-scale PV plants.

I think I've seen some HN startups with this as their pitch, I've definitely seen some IRL with this pitch.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: