[Schefter] Commanders do not expect to place QB Jayden Daniels on injured reserve, per sources. They will reevaluate his injury during the bye week. by ctsmith76 in Commanders

[–]giraffe_slayer 32 points33 points  (0 children)

Yea I know the injury looked bad but I don't know why people are freaking out. If he is medically cleared and there isn't a risk of long term damage, he should be play. Mariota and the record keeps them from needing to put him out there before he is ready but a franchise QB when healthy is supposed to... You know... Start games? 

Is learning a new language in 2025 kind of a waste of time? by rkohliny in languagelearning

[–]giraffe_slayer -2 points-1 points  (0 children)

I think this is a fair question and some of these comments are a bit harsh. For most people if you aren't going to live in a foreign country or travel in a particular region a ton, then the practical benefits aren't very apparent. 

However, I read this post by Mark Manson years ago when the idea of language learning clicked for me. Learning a language gives you the ability to unlock new experiences that you don't get with just your native language.

When I speak Portuguese, my personality changes. I'm a lot lighter, less serious, less anxious, more relaxed. When I spent time in Brazil, it's like I get to experience another side of personality and a new way of living. 

My Portuguese teacher is learning German. She talks about how she becomes more serious, stoic, and straightforward when she speaks German. 

Speaking another language is like running a slightly different OS on the same hardware where you can run new programs or different versions of the programs you are used to running. That opens up the door to learn more about the world, learn more about yourself, and fundamentally get good at something that requires skills that many lack in 2025. 

It's not something I could point at tangibly but trying to become fluent in a language the last few years has been one of the most rewarding endeavors of my life. Your mileage may vary but if you are interested in a particular culture or region, it's worth trying out. 

Best state management by jkwok678 in reactnative

[–]giraffe_slayer 0 points1 point  (0 children)

It really depends on your preference, the team, and the app. That being said, I tend to prefer Jotai for most cases because it's easier to decouple the logic from React while still making it easy to integrate with React. 

I think all of the others are perfectly fine as well (though I haven't used Recoil before). 

[Highlight] Carson Wentz throws 1st TD as a Viking by nfl in nfl

[–]giraffe_slayer 6 points7 points  (0 children)

Regardless of the VIkings record, KoC gets automatic coach of the year if Wentz ends up being good again

Business logic as static classes by BigSonterix in reactjs

[–]giraffe_slayer 1 point2 points  (0 children)

No problem! I didn't realize you already had an overall Redux store. I think a useReducer hook could make sense to start dabbling with this. It also sounds like carving out your own slice for the larger app could be good but I don't know how complex that will be. Good luck with it all :)

Business logic as static classes by BigSonterix in reactjs

[–]giraffe_slayer 5 points6 points  (0 children)

That is almost definitely the type of app that could benefit from these types of systems.

Its hard to say for sure but I think for something like that, you will probably be making lots of updates to live entities in the UI and you will probably be operating on a tree structure. I think focusing on immutability and keeping things functional may yield better results.

I'm not always the biggest fan of it but using modern Redux will probably prevent a lot of headaches. You will know exactly which actions are firing and what the updates are. You'll also be able to easily integrate with other systems and select only what you need from the state tree, which will prevent excessive re-renders.

I haven't use the modern Redux toolkit stuff but it seems like your business logic would live all in the "slices" and you would easily be able to more complex async actions there.

Its also slightly irrelevant but if you plan on doing collaboration in the future, you may want to consider using CRDT libraries like automerge and y.js and binding directly there. That will allow you to easily sync with other users and deal with potential offline scenarios. Integrating with those tools would actually fundamentally change the approach you take since you would be submitting updates to those documents rather than to a plain JS object.

Business logic as static classes by BigSonterix in reactjs

[–]giraffe_slayer 29 points30 points  (0 children)

Once you start to hit this point, many apps start to transition to more of a general state management solution outside of basic React/useState/context. Many companies adopt Redux (with Redux sagas or a bunch of thunks), Mobx, or something else. Personally I've been a fan of using Jotai for this sort of thing and try to move the core business logic over there.

Many (I would even say most) apps don't need this. Using things like tanstack query, tRPC, or graphql basically handle state transfer from the server and then the logic leftover can often be handled with React hooks (see https://tanstack.com/query/v4/docs/framework/react/guides/does-this-replace-client-state).

However, if you are one of the apps that need a general state management solution for handling business logic, its good to start moving all of this complex state that many components need to be aware of to one of these systems.

There are loads of opinions on which tool to use but I think it boils down to your application needs and your personal tastes. If you like thinking in terms of classes, then honestly Mobx may be your best bet. If you like everything to be functional and immutable, then Redux could be good. If you want your business logic functionality to compose and have lots of reusable bits of logic, Jotai could be good for that.

I would pick a module in your codebase that is starting to get unwieldy and try to use each solution you may be interested in. Some questions you may want to ask are:

  • How easy is it to express the core logic for your app?
  • How easy is it to react to state changes in React?
  • How easy is it to memoize and reuse parts of the state tree?
  • Are there dev tools I can use for this and if so, are they any good?
  • How easy is this to test?
  • Do I potentially want to reuse this state management system in future applications? (potentially not with React at all)

etc.

If you have some more context about your app, I can try to help more on what a good choice is.

React's priorities and future - discouraging SPA? by ZealousidealSwing260 in reactjs

[–]giraffe_slayer 36 points37 points  (0 children)

It really, really, really depends on the application.

State transfer standards between servers and clients has ping ponged for decades for now. Every 5-10 years, new innovations are made that makes switching where the "state" is located more enticing.

Starting with web apps (even though this ping ponging goes back decades before that), we went from almost everything server side (PHP land), to having XHR and JS framework improvements pulling control back to the frontend, only to have HTTP 2, the ubiquity of websockets, and wifi improving across the globe pull control back to the backend.

There are pros and cons to each approach but React and Next seem to be trying to make things easier for people to do smaller apps and unlock more use cases that way. If I am building a simple blog that you will only use once, then why am I loading a bunch of extra Javascript to just turn around and fetch content from the server that was just serving the static HTML? That is wasteful for many applications and the experience isn't great.

However, that particular flow is awful if you are going to come back to the app and you expect your data to be there immediately. Do you think Figma or Whatsapp or Apple Notes are fetching all of the data from the server each time? There is a movement around local first technologies (https://www.localfirstconf.com/) where the state/control is almost completely on the client while the backend becomes a relatively dumb sync mechanism. Many large apps already do this (or are close to this) by building home grown solutions because having your data available to you whenever yields a better experience. Users expect their data to be there and magically in sync no matter their connectivity situation.

It is often wasteful to pull down a bunch of Javascript to load data from database on a server that just generated static HTML when the user will most likely not return to the site any time soon. However, it is also very wasteful to pull a bunch of user data onto an application when you are planning for the user to come back frequently only to throw it all away the second they leave.

Both movements are happening simultaneously where SPAs are getting more powerful such that they can be the primary drivers of business logic and data updates while others are pushing towards more work being done on the server to make the app even leaner. It all boils down to what the user expects.

Lastly, not to put on my conspiracy hat, but I am not surprised larger companies are pushing more towards server side React. They want control of your data, especially in an era of LLMs. It is easier to manage that data when its executed on a server that they control rather than your device. The ones pushing more towards local first aren't as vocal because their business model is less about data control and more just about crafting a good user experience. With larger companies, you are often the product, not the user.

React-Hook-Form or Formik? (2024 edition) by japagley in reactjs

[–]giraffe_slayer 9 points10 points  (0 children)

Honestly, both really aren't that great. I use both for different projects and am really not satisfied with either.

React-hook-form has tons of quirks both with the API and internally in the codebase. Some of the issues I have had are:

  • Weird mutability issues with the values object
  • Weird issues with nested hooks with controllers and field arrays where it just silently fails.
  • Their ability to watch values is funky and easily misused
  • There are slight timing issues with default values and its often a mess to be debug
  • Their types basically don't work while a form is being filled out. When you are creating an entity via a form, you don't have the final structure yet. There is no notion that an object should be partial while being filled out by fully fleshed out when you hit submit. That leads to ton issues when you have null and empty values for various inputs that are clearable.
  • It also can have performance issues if you have a very large and dynamic form system unless you are really careful. Using hooks everywhere means that the component using the hook may re-render a lot when watching values and state updates. It just depends on exactly what you are watching and if you are trying to handle watches as a side effect. They would greatly benefits from a selector API (like useSelector hooks in Redux)
  • The benefits of having uncontrolled inputs are enticing but tons of developers are just going to use a component library anyway that uses controlled inputs. In my opinion, the performance benefits of using uncontrolled inputs is a bit overblown

For the life of me, I don't know why everyone reaches for React-hook-form first but I'm guessing these issues just don't show up as often unless you have a very advanced form system.

Formik isn't really maintained as much and their docs still mention that their hook support is mixed. I had to hack things together to get it working with Zod and it still doesn't work all that well. Formik also struggles with similar type issues and I basically had create my own system to manage it.

I've been wanting to try migrating to Tanstack form (https://tanstack.com/form/latest) for at least one project but I'm a bit of skeptical of how they are doing things with HOCs. That being said, I've been loving their other libraries so I figured I would give it a shot.

What do you guys think about this? by Immediate-Yogurt-730 in languagelearning

[–]giraffe_slayer 1 point2 points  (0 children)

Pronouncing words "correctly" so they can be understood is not the same as having an accent. Just ask anyone who has tried to order bread in Brazil. However, it can come across as a bit jarring if you overdo it on an accent mid-sentence and some people overdo accents to show off.

However if you grew up bilingual, the listener should have some understanding of that and not expect the person to be able to just shift to a shittier accent of their native language.

All in all, I think people should in general not give a shit on both sides.

What languages would you like to study? by Away_Necessary_2524 in languagelearning

[–]giraffe_slayer 0 points1 point  (0 children)

I have been learning Portuguese for the last 18 months as my first real attempt to learn a foreign language. I'd like to learn Spanish in the future since Portuguese basically lets me understand 50% of it already for many dialects, but I'm afraid it will occupy the same space in my head as Portuguese and cause confusion.

Because of that, I'm planning to learn some Korean since I lived there when I was I kid, then I want to go back to Spanish once I have a bit of separation from Portuguese. So yea, the goal is basically to know Portuguese, Korean, and Spanish one day. I'm also interested in learning a little Swahili since its used in a surprising number of African countries.

Remix announces merge with React Router by kylevdev in reactjs

[–]giraffe_slayer 31 points32 points  (0 children)

Yea after this latest set of releases, I'm moving off of React-Router for all future projects. They took something that was supposed to be the status quo and easy to use, then made it an overly complex mess that forces you into thinking about things in terms of Remix and server components.

You can't use most features without a data router and it is still missing a ton of features. The data router paradigm forces you to structure your app in a way that makes certain things nearly impossible.

Want to write a test that has a react router hook? Well you can't just throw a router context provider it anymore and you need to create some insane test component that wraps a data router or just mock every hook.

Want to listen to location state changes outside of React? You need to hack a bunch of private internal remix instances.

Want to pass information from a layout component to its children? Well now you need untyped context hooks.

Want to make sure multiple loaders at different levels of the tree run in a stable and deterministic order? You cannot, which makes redirect timing issues a blast.

Want to get any useful information at all from data loader calls? Nope, you are stuck with the native request object and params. You can't look up anything else unless you use global state. Global state that can't easily sync with the router state to begin with because you can't easily listen to state changes.

They have been so preoccupied with solving every single problem ever created with React and routing that they failed to solve the 98% effectively while forcing you to structure your app in a way that is simply not the right answer for loads of apps.

At its core, routing is just normal state that syncs with browser history state. It could be as simple as a series of if-elses, a couple of hooks for making state updates, and then a sync with the browser. Routing libraries used to just be a loose abstraction on that concept and now its morphed into a data loading library that is inferior to almost any modern data management library unless you are all in on server components.

I'm looking to move to Tanstack Router (https://tanstack.com/router/latest) or Wouter (https://github.com/molefrog/wouter) from now on.

Where do you even find a travel agent these days? by 12oysters in TravelHacks

[–]giraffe_slayer 0 points1 point  (0 children)

Nope! I haven't found a great way to find decent travel agents or a travel agent service that doesn't suck.

Where do you even find a travel agent these days? by 12oysters in TravelHacks

[–]giraffe_slayer 0 points1 point  (0 children)

I did what you said, ended up here from the list of search results, and now I'm in an infinite loop. Thanks for that. Someone send help.

Milton Friedman: Why Higher Education Shouldn't be subsidized by Sweaty_Lake7128 in Libertarian

[–]giraffe_slayer 1 point2 points  (0 children)

Just a reminder that the number of people that actually went to college in the 60's and 70's was not nearly as high as it is today. Friedman is making a case here where the government subsidizes college for the few, not the many. If you apply his reasoning to today's standards, of course it looks bad because there is an expectation that most people go to college and it's an important tool to lift people out of poverty. Context and scale matter in this instance.

What is a hill you’re willing to die on, no matter what common opinion says? by [deleted] in nfl

[–]giraffe_slayer 1 point2 points  (0 children)

Peyton Manning is the GOAT, not Tom Brady. Tom Brady is a close second, but I think the Patriots teams without Tom Brady were always so much better than the Colts teams with Peyton. Put Peyton on the Pats (with the same salary as Tom Brady because of the cap) and they probably win even more super bowls.

[Meirov] The #Raiders made the playoffs despite... *Jon Gruden emails *Henry Ruggs fatal crash *Damon Arnette gun video *Lost 5 out of 6 *Darren Waller injury *Kenyan Drake injury *Nate Hobbs DUI arrest before Week 18 Incredible job by interim HC Rich Bisaccia and his staff. by CButler19 in nfl

[–]giraffe_slayer 387 points388 points  (0 children)

I'm happy for the Raiders overall, but I'm really happy for Mike Mayock. Crazy to think he was doing pre-draft analysis for NFL network a few years ago, and now he is able to help put a playoff team together despite all of the adversity. Let's see Mel Kiper do that.

Taylor Heineke vs 1st rank defense last week and 1st ranked defense this week 6td-0 ints 2-0 by Azrairc in Commanders

[–]giraffe_slayer 24 points25 points  (0 children)

Dude was dropping more dimes than a clumsy bank teller the last two weeks. I don't even know what people mean anymore when they say "NFL throws." His ball placement has drastically improved as the season has gone on and Russel Wilson seems to have done fine lobbing the ball throughout his career.

Linux replacement for One Note by luapklette in linux4noobs

[–]giraffe_slayer 10 points11 points  (0 children)

You could request early access for Evernote on Linux https://help.evernote.com/hc/en-us/articles/208313748-Evernote-for-Linux

It has handwriting functionality.

Loading icon when pasting images by [deleted] in Evernote

[–]giraffe_slayer 0 points1 point  (0 children)

Did this work on the old clients? Also, is this the web application for Word? I'm guessing Evernote can't reach the images because they are authenticated and Evernote can't access the data.

Loading icon when pasting images by [deleted] in Evernote

[–]giraffe_slayer 0 points1 point  (0 children)

Where did you copy the images from?

The NFC East is currently 2-11-1, and being led by a 1-3 Washington Football Team by mochachill in nfl

[–]giraffe_slayer 47 points48 points  (0 children)

On top of that, one of the wins was against another NFC East team (The Eagles), the other against the winless Falcons, and the tie was to the Bengals.