skysight-inc/HackerNews huggingface dataset:
We need to write code that is optimized for communication and clarity. We have a number of tools we can use to craft communicative code.

1. Variable and function names. These should be descriptive and never deceptive. For example, I've seen metric tons of code like this `const json = makeSomeApiCall(params)` where the contents of `json` is a the decoded response data and not a JSON string. This code is deceptive and obfuscatory. But if you write `const decodedFooResponse = makeSomeApiCall(params);` then you are accurately describing what the value is. This is particularly import in untyped/loosely typed languages where the value of the variable could be anything.

2. Code structure and layout. When writing prose, we achieve clarity through structure. Code is no different. Keep related things together. Avoid run-ons. In other words, write code that has smallish functions, with smallish interfaces, it's easier to reason about how the code will behave. Avoid unnecessary mutation of values--repeated mutation of the same value is particularly pernicious. Use white space to create visual separations of distinct ideas. Use abstraction and encapsulation to keep code focused. Avoid deeply nested conditionals, flattening the tree whenever possible. And a million other strategies that can all help.

3. Tests. Tests can be documentation, but they certainly aren't always. They also aren't convenient documentation--what they offer isn't going to show up in your editor when you inspect a method. Unit tests are a nice way of recording verifiable expectations for behavior. But if the test code is complicated or poorly organized, all it does is compound the misery of working on a messy codebase.

4. Comments are distinct from documentation here. Comments are little side notes like "this implementation is a bit of a hack. It is brittle because .... but we decided to keep it because X. See someURL for contemporaneous discussion." They tell us why a thing is the way it is or about some sort of risk or unexpected detail.

4. Documentation is absolutely a part of making code understandable. These docs are primarily going to be used in an IDE/editor when viewing function signature data. Ideally you can write JavaDoc/TSDoc/POD or similar inline docs. Examples are worth their weight in gold.

We should be using all our tools to write communicative code. We don't need every technique for every line or block, but over the scope of a package or project, we should judiciously employ them all. Every line added comes with a concomitant maintenance cost--we must ensure that every line we add is worth that cost.
NYC to Offer Free Broadband to 300k Public Housing Residents
Why do you assume it's me who's looking at it wrong? Your own PR is "no big accomplishment" by your own standard, despite having worked hard to get it. Does that seem sensible to you? Would you not have taken offense if I had been the one to dismiss it with a hand-wave? You're not even being consistent here.

A lot of people will run a 5K recreationally, but that's much less true of a 10K. Just completing the distance puts them in a pretty high percentile relative to the general population. I know a lot of dedicated runners, people who have been running three to six times a week for years, who nonetheless have never run a 10K in under 45:00 and never will. Many of them have never even submitted an official time. They're not unfit. They're not obese. They're not doing it for fun, either. They're dedicated and often quite competitive; they're just not fast, and many of them couldn't be even with the utmost dedication.

That's why age-grading exists, and it's based on more science than you seem to know. Even elites lose alveolar density and joint flexibility as they age. That's why all of the world records are held by young people, who also dominate all of the top events. Believe it or not, being over 40 is a thing. It's a significant percentage of the population right there, never mind the younger folks who also range from the disabled through the genuinely lazy to those who are actually super-fit but specialize in other activities or just aren't hyper-competitive enough to devote their time to HIIT and other speed-specific training methods.

> the person that is half percentile from the top result would still be an amateur with poor result

That is simply not true, and it's strong evidence that it's you who lack perspective. Being within half a percentile of the top is an excellent result practically by definition. "Hanging with the elites" is a ridiculous cutoff. Even the person in the middle of the pack for any of those races I cited is a "well conditioned athlete" by any sane set of definitions. In any room of a hundred random people, they'd stand a good chance of being the fittest one there. Moving goalposts to exclude them seems a bit disingenous.
I just ran a 5km today with a 6:02 pace. I was just about to collapse and I've been running for about 2 years now. I can't even imagine doing a full 24 hours just walking let alone 4:30 per km.
The Bloomberg/Reuters model seems to work well: charge hedge funds $xx thousand per person per year for super-fast up-to-date news, and use that to fund reporting for a $10-50/month subscription service that also has a limited free tier (a few articles/month with ads).
> after all, you can never protect against someone making an entirely new device that just happens to look like an iPhone.

The specific threat being protected against (leaving aside the increased safety of iPhone users by making the stolen parts market untenable) is your phone, that you recognize and use as your phone and which contains your confidential material and credentials, having internal components swapped out while unattended.
Now it's time for the next step: build another CPU inside that one.
i thought this was going to be about queries as dataflow. its both a useful model and an interesting augmentation (materialize.io)
Marketing only works until you get your hands on the product. People love Apple products. No subterfuge required, nor cringeworthy marketing like this: https://9to5mac.com/2022/09/09/samsung-apples-new-iphone-14-...
"Until relatively recently, psychologists assumed that children did not start to care about their reputation and peers' perceptions until around age nine."

I mean, these psychologist did grow up and spend time as a child, right?
> gold buggery

This could be an interesting thread in itself.
Stable Diffusion Text-Prompt-Based Inpainting – Replace Hair, Fashion
Yet another example of trying to solve psychological/emotional issues through cultural changes. The root problem is low self-esteem; it's internal, not external; it takes deep inner work, not a change in social norms and teacher behavior. It affects some kids deeply, and some not at all. It's not "caused" by the culture or the environment, but by parenting.

Psychology is stuck in a weird place. Most cultural knowledge of "self-esteem" comes from self-help crap, when it should be coming from psychologists. What if we lived in a world where everyone knows how to recognize low self-esteem, how to interact with insecure people effectively, and how to help them build their self-esteem durably, as opposed to these proto-team-building-exercises they're proposing here? The traditional thinking is that you fix emotional issues through therapy sessions; but if we changed the culture to become more emotions-aware, people would know how to help each other and themselves far better. The fact that so many pop-psychology books sell so much, is proof that there's a deep need for this.

Some studies say 70-80% of people have some degree of low self-esteem. Depending on the study, 50-70% of the whole population have an attachment disorder, and literally lack the ability to form healthy emotional bonds. You don't fix that through culture. "Instructors could create activities in which each student becomes an 'expert' on a different topic"? Come on man. They have to let go of the old DSM-5 model of "10-15 of the population is crazy, everyone else is perfectly fine". Psychologists have a far bigger role to play in society than they currently do.

Fixing psychological and emotional problems through cultural change just doesn't solve anything. Fix the root cause. You would literally fix both the low self-esteem that inhibits people from asking questions, and the bullying that results from being seen as "dumb".
> monopolies are destroying society

I had a double take when I read that, in this context.

Are you saying that a monopoly on design software products is destroying society? It seems a little dramatic, no?
Thing is, it's so simple and straightforward, you don't have to google anything. Reading the sources and poking things with a debugger has been enough for me so far.
You know, I actually think this piece is about the author's pending death and their relationship with it.

The first sentence of the piece starts:

```
I'm going to lay out a series of fascinating facts and let you decide whether the world is likely to end within, say, 100 years.
```
And then goes on to talk about nuclear weapons and Poseidons and climate change and all the terrible things that have a decent chance of happening. As an aside if you're looking at doomsday weapons I'd go for the dual vector foil from the Three Body Problem series.

Anyway, one thing is pretty much assured in the next hundred years: You will die. I will die.

And thinking about it that way helps reason about the rest of the piece. Why are we living, how can we get involved and make a difference? The author argues we should become better at politics, less tribal, and find the poetry in nature. I agree. I agree with it all.

I've been reading the biography on Steve Jobs lately and the certainty of death, he said, was his greatest tool for help in getting on living. And that's what we need to do everyday, get on with the busy task of living.
As of right now, it's available for "adoption": https://www.unicode.org/consortium/adopt-a-character.html
Tell me you have ADHD without _telling_ me you have ADHD ;)

Sometimes I'm not sure what's worse, the not remembering, or the people claiming that you having forgotten means you didn't care enough, or that you're not trying hard enough. grrrr
Yeah, I know :) I just want to know if it affects them, because I hope it does :)
Of course I'm not using it myself. But the other half of that problem is that this will inevitably be another way that cloudflare breaks my experience as a user and I can't opt out of that.
What's all this talk about peers? I just don't want to seem incompetent to my manager and get fired.
They're paid based on supply and demand through their employers. Meaning the organization favours paying someone in a management position a higher salary, rather than the rank and file. The same industry pays certain actors or musicians outsized fees.

This is not a question of ethics or fairness, it is supply and demand. You can only pay X people Y amount when starting with K dollars.

I am not trying to be pedantic here but simple rules at large scale produce complex results that may sometimes seem counter intuitive or unfair. Evolution is simple rules applied at scale and it produces results that don't seem quite right but are obviously effective because they survive.
My Open Source project hit $100k/year
Surprisingly many characters in Unicode are only recorded a few times if not once before the assignment. Chinese characters for example have a lot of them, because it was relatively frequent to make a new character for newborns before the modernity and some of them have survived through literatures but otherwise seen no uses (e.g. 𡸫 U+21E2B only appears once in the Records of the Three Kingdoms 三國志). But they have still received code points because they are considered essential for digitaization of historical works, and multiocular O is no different.
And it was just a YouTube bug that killed EdgeHTML

https://news.ycombinator.com/item?id=18697824
This sort of term is made up by c suites for c suites, arguing about semantics is rarely productive and I'm inclined to believe that's the case here.

I also think this battle is lost as GH and others will always yeld to the needs of folks that atually bring money to their business.

"Pure hobbist FOSS" mantainers likely need to start a Wikipedia ish non profit for software hosting or think about something else.
> Until relatively recently, psychologists assumed that children did not start to care about their reputation and peers' perceptions until around age nine.

Did they really? Cause anyone in contact with kids must have seen status seeking/preserving behaviors much sooner. The teachers compensate for it by checking on kids instead of expecting then to ask everything by themselves.

The other thing is, there is right amount of asking questions. Some of it is too much and more independence is needed. Some of it is too little - and kids need to learn to guess the right amounts.
Last time I checked it was not like that - those kits are actually quite easy to use.

The catch is that in order to buy it, you need to give them SN of the device in advance. Meaning you cannot have stock and thus you cannot offer any reasonably fast repair service. And even after that you have to contact their support in order to "pair" the newly installed parts to that device.

Most of the people I know use 3rd party repair shop because they can change battery/screen in 1-2 hours and they will not wipe your data. Apple takes 2 weeks and wipes your phone.
see also this HN post from 2012: https://news.ycombinator.com/item?id=3853148
When I need to recall what I recall, I just hit [MR].
Tell HN: Plex having sign-in problems again
I have been trying to reactivate a Plex TV app via plex.tv/link for an hour now. The URL either goes 404 or gets redirected, I sign in, and then it fails with "too many sign-in attempts", even though I've backed off and paused (5, 10, 15m intervals).

I wonder why they haven't fixed their auth so that we can access our home servers without a central login...
Thanks, and for those looking for an explanation of the position and game it appears to be this move: https://youtu.be/QStXMuzVAyk?t=258
I don't think it's losing well at all. He just had to put that flex in there about his age. How is that losing well?
That's really not applicable to the method I laid out, where the only copy of the key is erased. If the attacker knows the details of the self destruct, the know the key is gone. If they don't know the details of the self destruct, they know the device is dead, same as OP's solution. The point of the crypto is to make it so that the entire bulk memory does not have to be erased/destroyed. Some showmanship to lead uninformed thugs to the conclusion of "it's too late" might be a good thing, but essentially orthogonal to the method used.

For the recovery option I laid out, one possible reply would be "The key to unlock the drive is back in my home country, and I don't have it".

In general that XKCD misses the forest from the trees. Yes, the rare lone individual is never going to stand up to any determined attacker, but getting technology into the hands of many people who widely use it for mostly innocuous things certainly could.
Provenance is fine. People use it, particularly in narrow settings around the literal provenance of software assets. I have been in this space for a while and I have come across zero arguments that "provenance" should be ditched due to dictionary obstacles.
> piece at square (nibble, nibble) moves to square (nibble, nibble)

Chess notation is very compact, you don't even need to say where the starting piece was in most cases because it's implied by the move.

If you have 2 rooks on A1 and H1, and the move says rh4, only one of your rooks can legally make that move. However if the move was rc1, both rooks could make that move so you do need to disambiguate.
I tried to play Elden Ring on PS5. It was fun and I would like to keep playing it but it's just way too hard for me. It seems like it's just hard for the sake of being hard. I guess that's FromSoftware's MO though. In any case, I stopped playing it. Just don't have the time when there are more enjoyable games to play.
if this is a useless comment:

// set i to 1
int i=1;

and this is a useful comment:

// there is a method overload which accepts an array,
// but it's buggy and crashes. workaround: cast to tuple first.
...

then you seem to be assuming people only want to write and read the first kind. Because no matter how well you 'know all the fine details of the programming language', comments can tell you things the code can't.

Even aside from the pointless gatekeeping of "competent programmers" - ok what about people who aren't employed as programmers but still need to read and write code? What about the people who just have to deal with it being an unfamiliar language because nobody who knows the language is available?
The longer this thread continues, the more I think you're right.
I have seen a post about meetup in India a few days ago but sadly, they used whatsapp for coordination so I didn't join. Wonder what happened to that?
Being able to visually see the number would be helpful. I haven't seen any that visually show what is stored in memory until you recall it. It would be pretty neat if pocket calculators had a second line for that feature.
Why are you repeating what the person you replied to said?
Senate rules can be changed by a simple majority, and unlimited debate is just a rule— prior to 1806 there was limited debate. So the democrats could just completely eliminate the filibuster, in any form, and pass what they choose, so long as they have 51 votes, or 50 and the Vice President.

https://en.m.wikipedia.org/wiki/Nuclear_option

My preferred solution is to abolish the Senate.
You might be in favor of this and thus, are not being contradictory, but I do just want to point out that this kind of extremely punitive behavior for poor judgement implies a massive expansion of the carceral state if it were to be carried out consistently. If drunk driving gives 5 years, what should armed robbery or unarmed assault, etc, carry?

If this harsh treatment were consistent, it would probably lead to much higher rates of incarceration than we had under the now derided tough-on-crime policies that were in vogue in the latter part of the 21st century.
It's definitely a little misleading, but idea of running the entire JVM with graphics stack included is so insane that I'm willing to call this "minecraft in minecraft"
How to build a Twitter and Instagram bot with no code
Yeah it's clear that was never going to work -- the whole point of dropping the old addons was making big architectural changes that weren't possible with the old APIs. You can't merge the new architectural changes and the old APIs without running into the issues they were trying to avoid by removing the old APIs in the first place.
Tik Tok is a national security threat
$500 USD minimum; basically just enough to prove that you have some initial set of customers and are looking to scale. Essentially our programming/education assumes some amount of initial product-market fit.
That they are even allowed in the first place is startling and puts into question what schools are even for. Clearly those who draft policies where phones are allowed have no interest in your education.
It can also be confusing and hard to use for a lot of people and once it's failed for a user once or twice, they'll likely give up with it. I have even succumbed to copy n paste as the cognitive load is less and safer.

This however is very obvious and I think it's a great idea. If I had iOS I think I would install it.
Maybe it becomes less invasive or a vector for malware, but I sadly don't see it dying any time soon.
Chess turns can take 20+ minutes sometimes depending on the time limit of the game, so that would be quite a delay, and then you would still have a problem with a live audience.
A more transparent logic to store your listen history and generate playlists with suggested tracks that doesn't rely on a cloud service invading your privacy.
> Even Hikaru ... chooses to make silly videos instead of actually having strong stance against this bullying.

I think Hikaru also suspects Hans may be cheating.
Do people use circuit simulators and compile to blocks, or copy/paste units from previous projects? Seems like such a massive undertaking where a single misplaced item ruins everything.
That's pretty much how it works with their games. Punishingly difficult. Often with unfair mechanics that you can only properly counter after having died many times and memorizing arcane sequences.

Its a very polarizing kind of game. But those who like it, love it. Those who dont, dont buy the game.
> It’s like if a new word processor consisted of two faithfully recreated typewriters, with a special button to send the most recently typed word back and forth between them.

There's a lot of diff tools that essentially do exactly this.
I do the same thing. I then replace the comment with a method name that describes exactly what the comment described, e.g. _getLowestFooIdFromBarCollection(). I then implement the code inside this private method.
Making repairs much easier is still a huge win.

We're also constantly moving the goalposts on Apple. The iPhone 11 had no public repair manuals and only special authorized repair centers could purchase genuine parts or perform the "System Configuration" pairing step.

With the iPhone 12, 13, and SE we suddenly we got public repair manuals[0] and public access to genuine parts[1]. The "System Configuration" step still exists, but it's accessible to anyone and requires chating[2] with Apple/SPOT (their self repair subcontractor).

Now the new iPhone 14 has been expensively re-engineered to make self repair easier. But you're saying because the same self-serve "System Configuration" step is required for some components it's all moot? Let's take a win when we get one. It could still be better, but the trend is definitely moving in the right direction.

edit: Also not all repairs require motherboard pairing step, albeit the most common ones do. But you can replace the iPhone SE camera, taptic engine, SIM tray, and speaker without any System Configuration step. See the the SE repair manual [0].

--

[0] https://manuals.info.apple.com/MANUALS/2000/MA2049/en_US/iph...

[1] https://selfservicerepair.com/order

[2] https://selfservicerepair.com/support
it's mostly use it or lose it, I have to relearn a lot of the unimportant things that get tested for jobs
So after however many years since iCloud was offered, I finally broke down and decided to subscribe. It's way more than just a switch that can be accidentally flipped. I had to agree to terms (yes, not a show stopper), and I had to authorize payment. Are people as cavalier with authorizing payments as they are to accepting ToS?