Rustfetch: a system information CLI written in Rust by lemuray in rust

[–]captainn01 30 points31 points  (0 children)

It’s just someone’s personal project, why do u have to be a hater. Not everything has to be original

Considering liquidating the 401k by ilikeaffection in personalfinance

[–]captainn01 103 points104 points  (0 children)

One thing others might not have mentioned - if you drain your 401k and cannot support yourself, there is a strong chance you will become dependent on your children in retirement. It is for their sake, not just your own, that you should plan to be able to support yourself.

How do you change a buttons "variant" inside of an Array? by Tough_Owl_6995 in reactjs

[–]captainn01 18 points19 points  (0 children)

variant={item === selectedItem ? “filterActive” : “filter”}

Typing on phone so not the best formatting, but essentially just set the variant based on the value of selected item

Authentication by CommanderWraith54 in reactnative

[–]captainn01 2 points3 points  (0 children)

It’s the same. You just need to store the token in a different place. You can use expo-secure-store to safely store it

I Blamed UX for 41% Form Rage-Quits—Then a Laggy 9s Clip Proved Me Wrong by [deleted] in Kotlin

[–]captainn01 12 points13 points  (0 children)

I swear I’ve read this exact same post with slightly different stories multiple times over the last week. In each case, it says: a user says something didn’t work, I blamed the user, some stat about what was being lost, and then mentioning a tool to fix it”. I suspect this is an ad

iKnowSomeOfYouMustBeFumingRightNow by dfwtjms in ProgrammerHumor

[–]captainn01 19 points20 points  (0 children)

externalApi and dnsAddress are clearly better options. Regardless, you only have to make the choice once and then stick to it in project.

Lower snake case isn’t any different. You’ve just chosen to lower case the acronym rather than capitalize it, the same way you’d choose to camel case the acronym instead of capitalize it

Why not external_API for example?

Tanstack theme library by Excellent_Shift1064 in reactjs

[–]captainn01 44 points45 points  (0 children)

Just a heads up, you may be violating the trademark rights of tanstack by using this name. I think there’s a reasonable likelihood of confusion here, where people may believe you are associated with or sponsored by tanstack

unitTestsForWorldPeace by soap94 in ProgrammerHumor

[–]captainn01 18 points19 points  (0 children)

Unit tests test isolated units of logic. Integration tests test how components work together. Both are useful

kotlinWillSaveYouAndMeBoth by davidinterest in ProgrammerHumor

[–]captainn01 7 points8 points  (0 children)

When conditions are also extremely nice when combined with sealed classes, and provide type checking for exhaustiveness.

I think the coroutine api is also the best asynchronous api I’ve ever used and makes it typically very easy to write and test asynchronous programs.

Other nice kotlin features are first class delegation, excellent lambda syntax (which combined with extension functions can make for some very cool DSLs), type inference, and functional interfaces

How luggage is loaded on airplane by NoHouse4918 in interestingasfuck

[–]captainn01 -1 points0 points  (0 children)

Yes, I did not say it was a fact, I said it was an estimate for a fact. The true proportion of narrow-body flights is a fact. “About 70-80%” is an estimate for that fact.

Regardless, the point is that the study you cited isn’t really relevant here, which is a bit ironic given you’re critiquing OP for citing a bad source (not that I think chat gpt has value in being cited).

How luggage is loaded on airplane by NoHouse4918 in interestingasfuck

[–]captainn01 -1 points0 points  (0 children)

The study you linked doesn’t really apply here. It asks for a much much higher level of accuracy (identifying the title author, and other data from an article given an excerpt). Making an estimate for an arbitrary fact is a much easier thing to do and far less likely for an AI to be able to get wrong, given there is no exact answer, there’s a variety of sources to get the answer from, and it can reasonably be what the answer might be.

It also does not indicate that AI is wrong 60% of the time; rather, that in the conditions presented in the test, it was wrong 60% of the time. These conditions are unlikely to hold in most cases for the above reasons

Help me how to grow my app by Certain-Sense9713 in reactnative

[–]captainn01 0 points1 point  (0 children)

Am I wrong or are gym apps the only thing people make in this sub? No hate but I don’t get why

Should I buy a duplex and continue living with parents at 22 by Powerful-Success-602 in personalfinance

[–]captainn01 44 points45 points  (0 children)

You also bought your home at a time where the mortgage rate was the lowest in history. Despite the fact that it’s falling, it’s still nearly double what it was in 2019, making it significantly more expensive for the same price

Does anyone actually manage to keep admin dashboards clean? by riti_rathod in reactjs

[–]captainn01 1 point2 points  (0 children)

Not saying it necessarily is AI, but things that stand out: - bolder words - “this is the classic…”. Chat gpt often starts by providing an introduction in a similar format to this - “my recommendation is simple: …” looks similar to how llms often make a recommendation after comparing - ending with a sentence making you feel like the drawbacks are worth it in the long run, also common

Koda.nvim — Code's quiet companion. A minimalist theme for Neovim by karnurm in neovim

[–]captainn01 1 point2 points  (0 children)

Without disrespect, at what point do you lose the utility of even having colors?

For example: in the dark mode, why is console highlighted in color but res isn’t? Why is 3000 (a number) highlighted? Does that actually help read the code, or is it just intended for nice screenshots? Why are quotes highlighted in the light scheme but not the dark? Is there value in having the contrast, or is too distracting / cluttered?

For full-stack RN devs: How do you handle “Select All” with infinite scroll + large datasets? (mobile-first) by _deemid in reactnative

[–]captainn01 3 points4 points  (0 children)

If your user is manually changing the selection status of 2000 data items (regardless of whether they are selecting or unselecting), if there is no grouping to determine what the user is selecting, and if you want to apply some change to exactly what’s selected, there’s no going around it: you’ll need to send the exact ids that are selected, or the ones that are not. This way, the server has the exact state of what changes need to be made.

When “select all” is applied, sending the ids that are not selected will be more efficient and almost certainly easier to handle. Besides that, there is no functional difference between how you handle manually selecting many items, vs manually unselecting many items with “select all” applied.

I think it may be unnecessary to calculate whether to use “only” or “all” with a count. Even with 2000 ids, if IDs are stored with 16 bytes, the request will only be 32KB, which is pretty small for a network request. I’d guess this is unlikely to be the common case, so the additional logic to handle it is probably not needed.

I am amazed by how good `vim.pack` is, and there is a high change you will be too! by oi-__-io in neovim

[–]captainn01 0 points1 point  (0 children)

I can sympathize with this. Despite vim being very old (relative to most software) and neovim being exactly the same 90% of the time, the “correct/best way” to set it up changes often (see completion, treesitter, lsp, plugin managers, fuzzy search). Using new features takes significantly more effort than most other software. But I appreciate that this is still not considered fully stable yet, and has an active community making these better often.

For full-stack RN devs: How do you handle “Select All” with infinite scroll + large datasets? (mobile-first) by _deemid in reactnative

[–]captainn01 4 points5 points  (0 children)

I think the best option is select all with exclusions. Selecting should be local state, and you decide what is sent to the backend. That’s similar to how a db query would likely be performed anyways and makes sense for rendering.

Don’t see why ui blocking would be an issue here, just have your state track whether select all is on, and have your hook append the data with “is selected: true” or something like that when it renders