I came from a centralized store background — and honestly I'm falling in love with the decentralized data responsibilities. Between React Query (fetch batching & caching) and Jotai (decentralized state) I love that every component can just take care of itself. No more prop-drilling, everyone just declares their dependencies and takes care of their own.
Handled under the hood by Next 13. To be honest, they probably could have done something to make that a bit more obvious when looking at the code - it probably wouldn't hurt to throw in a simple 'cache' keyword or something.
They say there's a new `cache` function in React and they have patched `fetch` to use it by default (for GET requests).
Does this include a solution to the N+1 queries issue (container element requests a list of items, then item elements each request their details)? I see you can do pre-fetching, perhaps those can be batched.
EDIT: Found an example that uses DataLoader by "caching the cache". The src/api.ts module exports a cached DataLoader for characters, and src/components/CharacterAvatar.tsx imports and calls it during render simply like this:
The problem is the moment you need to do complex combination and computation from multiple async sources, it's game over. It's the repeating of the history of flux -> redux back then all over again. Further more, what happens when you need to share this computation across multiple components?
Yeah, this is the kind of thing that seems elegant and convenient when the requirements are simple, but completely falls apart as soon as any complexity is involved.
This tracks for me as well. Very quickly, you start having to manage 10, 15, 20, or more places where data in a store is being manipulated from outside the store and it quickly becomes unmanageable on anything beyond a toy-sized application. It almost feels like a rite of passage to decentralize like that and then start to pull back when it becomes a nightmare to debug and maintain.
That's the purpose of the in-app request caching layer. Another way to see it is that you do have state in a separate store, it's just that you have one piece of state for each resource that can be requested. So it's not that all the components are requesting the /users resource, it's more that all the components a requesting the value of the /users store, and the /users store fetches the data once and determines whether the data is loading, present, needs to be updated, etc.
> This sort of declaration is what other languages use (notably Java), and implies that access would be done with this.x. Assuming that isn't the case (see above), in JavaScript this would silently create or access a public field, rather than throwing an error. This is a major potential source of bugs or invisibly making public fields which were intended to be private.
This is why I appreciate TypeScript, as it fixes a lot of Javascript’s syntactic goofiness, but of course I can’t use it natively, which takes it off the table for some projects.
Yeah, as an iPhone Signal user, the concept that you'd ever use want to use it for anything other than explicitly encrypted messaging never even occurred to me. I learned about this feature that the Android version had when they announced it would be discontinued. I would even consider the "graceful" fall back to SMS to be potentially an anti-feature/security flaw, as it opens you up to downgrade attacks.
Maybe, but confusing iMessage and SMS doesn’t seem to be a problem for iOS users who use both in the same app. The bigger problem was going to be RCS. 3rd party apps can’t use it, so as SMS conversations moved to RCS the SMS support in the Signal app would become less useful or even confusing.
I agree, and I think there's another aspect too: the fragmentation of Android.
The "true Google" phones (Pixel) with their "true Android OS" are great. But there's so many other manufacturers, and so many other flavors of Android, that it can't help but feel like an ocean of knockoffs.
Imo the knockoffs from Samsung, oneplus, xiaomi etc are better than pixel phones. Latest model 7,has some serious hardware issues (falling volume control buttons, exploding camera lens cover, mediocre battery life) and its considerably less premium looking than the android competition. It has a clean android but that is not without problems e.g occasionally dialed numbers in dialer history appear as private numbers, an issue that existed in pixel 6 and still exists on 7. And finally its ironic that google offers updates for shorter than competition.
FWIW I picked up & put down Anathem a few different times before it "clicked" for me — the made up words made it hard to get into at first. But now it's one of my favorite Stephenson novels.
Hah! I came here to recommend Blindsight. "vampires in space" sounded silly, but it was unexpectedly intelligent and creative — some real mind-opening perspectives on consciousness.
Meanwhile, I've read every Neal Stephenson & William Gibson book multiple times... anyone have suggestions for other authors to read, before I just loop again?
I've never seen anyone else make the comparison but I always felt Umberto Eco books were in a similar niche to Neal Stephenson. With long asides into esoteric details and real history.
While checking to see if anyone else had made this connection, I discovered that Neal used to feature a quote on his website of a reviewer describing him as "like Umberto Eco without the charm".
I found "Blindsight" via this [0] video. I'm planning to read "The Dispossessed" by Ursula K. LeGuin" after that (also from that video). Might be worth checking out for some ideas.
> I sent my SO a long string of text messages about a problem that I was having, including one of them that said "I feel like garbage."
Is it possible you buried the lede? I'm a fellow sender of long strings of text messages. I've found that not everyone appreciates my potentially sprawling/parallel communication style. They don't always have the time or capacity to pick through all my words and respond thoughtfully to each point.
I used to take it personally, until I realized I was just being overwhelming. Now, if one thing in particular matters to me, I focus on communicating that one thing. I leave the rest on the back burner for more casual conversation.
I think that's more or less what happened, I don't blame them. Just demonstrating that understanding yourself and expressing yourself clearly are necessary but not sufficient to be understood and to feel seen.
Well the truth is that you didn’t express yourself effectively. My SO has done something similar, and being on the other side of an emotional text barrage feels like someone is thoughtlessly unloading their issues onto you. Get a therapist and some friends for casual “therapeutic” complaining and save any real issues you have to more appropriate mediums like a call or face to face.
I wouldn't presume to understand your relationship with your SO from a vague story, and I wouldn't presume to make proscriptions to you either. I'd ask for the same grace and courtesy from you.
The point was that, though the article suggests loneliness stems from being unable to describe your feelings simply and concisely, it is more complex than that.
I am trying to imagine what I would say to someone who drops ‘I feel like garbage’ within a long rambling communication with many thoughts expressed.
Now..if it was a singular sentence or text that says ‘I feel like garbage’, then I know the purpose of the communication and enquire what’s going on.
If ‘I feel like garbage’ is preceded by the reasons that explain the conclusion of ‘feeling like garbage’, then it is a conclusion of everything before it.
If it’s in the middle of the communication, then what comes after could be the explanation for ‘feeling like garbage’.
So ..at no point is it the focal subject of the communication.
One effective way is including: What, Who, Why and if they’re an ask, make it clear. Most people can’t read minds.
I am trying to be mindful about my communication and I keep changing how I communicate based on feedback. How my family reacts is diff from how it is at work.. so we need to have different groups..like concentric circles: closest circle, family..friends, colleagues..neighbors etc. it’s always equal give and take. Don’t expect more than you can give. Sometimes, certain relationships aren’t worth it and it’s better to walk away or have no expectations.
I know I said my other comment was my last word, but I've found a more productive way to express this.
This group of commenters in this subthread are laboring under the misunderstanding that I don't understand this criticism; I accepted it in my top reply in this subthread. The statement I think you're interpreting as a rejection of this criticism (https://news.ycombinator.com/item?id=34436762) is an expression of a boundary; I'm saying, you don't have enough context to understand this, you're overextrapolating from a single data point, and I'm not going to enlighten you with additional context - I'm deliberately limiting the amount I share in this thread.
Additionally, this isn't actually what I was arguing; if we accept the axioms presented in the article, a poor presentation of thought doesn't indicate a lack of understanding, a poor expression does. That it is possible to be lonely as a result of a poor presentation is contradictory to the article's conclusion; make of that what you will.
When you continue that line of criticism - without asking questions, without understanding the boundary I expressed, and generally without showing me that you've listened to my previous statements & just repeating the criticism - I take that as transgressing my boundaries, and I draw the inference you are more interested in nitpicking my statements and expressing your criticism than respecting my boundaries.
I'd ask that, if you want to express such direct and personal criticism, you read much, much closer, especially with an eye to when I tell you that I'm not comfortable engaging with that criticism. If you didn't understand that saying, "I would not treat you this way, please do not treat me this way" was an expression of a boundary - now you know to be on the lookout for this common script for expressing boundaries. If you understood that it was a boundary and interpreted that as a challenge, or you don't feel it's legitimate for me to express a boundary in an online space - that is something to think about.
Sorry, if it came across as criticism. I was trying to put myself in your shoes.
Edited to add after reading the comment again: Having said that, by the way you have reacted to my comment..I think it would serve you well to be more introspective of your thought process.
Why are you so sensitive to criticism and if you expect others to toe the lines of the boundaries that aren’t clearly defined, you shouldn’t have shared the details.
Engaging in any kind of interaction where people lend their ears to your words is calling upon their time and attention. If you call upon our time and ask for our attention and then complain about perceived criticism that you are not comfortable with it..then perhaps you should be aware that people can’t read your mind.
It comes across as manipulative where you are instructing the public as to the kind of response you’d like to hear. You have to pay people for that. Those people are called therapists and they charge $250/hour.
I think you need take some time off and ask yourself why you react like this. It isn’t normal and it must be difficult for you to interact with the RoW. It would be in your best interest to not consider everyone as against you.
Also: I didn’t read every comment and your reply to it in the thread. This is not my homework. I only replied to the parent.
ETA: good grief!! I read some more of the thread. Perhaps you need to speak to a woman instead of chatting with other men with the same problem. Someone needs to say this. As a female, I have a dim view of this chit chat amongst what seems to be a mostly a male bubble.
If a man wants to improve their relationship with women, then they need to speak to women. Not speak to other men who are essentially enablers here.
I never said my SO was a woman, I never said my SO and I were having problems, I never asked for advice; I made a counterargument to the argument in the article, sharing a single moment of my life, and talking equally about my SO as much as my friends and family. I asked that you not try to read between the lines and offer me the criticism of that person you imagine me to be - I'm not that person. You chose to double down on that.
> Also: I didn’t read every comment and your reply to it in the thread. This is not my homework. I only replied to the parent.
Do whatever you want. Understand that if you don't have the full context, you might not be received in the way you expect. If you are curious, for your own edification, you may find these comments enlightening:
This is how the thread made me feel: 1. You are an unreliable narrator. (“My SO isn’t a woman”. Somehow I knew you’d make this statement. You are still vague.) 2. You place the burden of understanding elsewhere without taking responsibility for unclear communication. 3. There is a lot of shuffling around framing of your statement. 4. The responsibility of clear communication lies with you. It is not our burden to carry. 5. I do not know you. It’s a big ask to trust your word when everything you have communicated says the opposite. 6. This is a manipulative tactic that is very subtle but not uncommon.
I want to say that I did feel attacked but because I chose not to get triggered by it, I was able to make a few more observations. But I respect your request and will not further this discussion as you will likely construe it as criticism and uncalled for..
There is nothing further to discuss. Thanks for engaging thus far. It gave me something to ponder over.
> The point was that, though the article suggests loneliness stems from being unable to describe your feelings simply and concisely, it is more complex than that.
I think the point we're all trying to make is that a text barrage is _not_ expressing yourself simply and concisely.
I was going to chime in with the same advice. It’s difficult to respond to walls of text. My cousin is notorious for sending these kinds of walls of text and it is impossible to parse correctly and quickly. Text isn’t a great medium for that, in person or a call would be better suited for it.
That is great human progress! Knowing that the way you ‘behave’ might not be the best way and not taking it personally! Meta cognition and enlightenment!
There's a couple reasons I personally don't find front-end unit tests valuable:
1. (In my experience) client code is mostly integration: it's integrating local user interactions and remote data APIs into a stable experience. It's rare that bugs come from an idempotent function with a clear I/O that can be unit tested — it's much more likely that bugs come from something like an unexpected API response or a complex combination of user states.
2. TypeScript. Static typing obviates a good chunk of the low-hanging unit tests. And it addresses your point here:
> But I think the point that gets lost on people is that the value of unit tests isn't chiefly the output of running the test suite. It's that the process of writing good unit tests forces you to write well-structured code.
Strict TypeScript (+ ESLint) also does wonders to encourage well-structured code, such as making it hard to have a mystery object passed around your app, collecting new properties as it goes. That mystery object would need a type definition, and would be easier to deal with as a series of discrete states instead of an amalgamation of mutations. Types encourage clear structures and interfaces for your code.
With all that, I'd rather focus my time on type safety + integration tests.
I'm generally a proponent of "why not both?" when it comes to types and unit tests. At least with our codebase (nextjs, typescript strict mode, eslint), there is still a ton of room for improvement.
This is such an important line of thinking. If it has a positive ROI then do them both. (The greater the availability of capital the more truth this holds)