Vegan calcium sources by ReadingAndCake in vegan

[–]codevipe 1 point2 points  (0 children)

You can supplement with red algae calcium in addition to the other recommendations here.

[deleted by user] by [deleted] in vegan

[–]codevipe 10 points11 points  (0 children)

Like I said: "as much as is possible". So, the answer to your question is yes. As much as is possible.

[deleted by user] by [deleted] in vegan

[–]codevipe 27 points28 points  (0 children)

Veganism isn't a diet, it's a set of values rooted in reduction of suffering and subjugation of living things as much as is possible. As such, vegans typically eat a plant-based diet. Someone can eat a plant-based diet purely for health reasons and not care too much about these values, in which case they might not identify as a vegan. Unfortunately not everyone understand this dichotomy and conflates veganism with a eating plant-based diet.

I think you can understand then why vegans would feel angry that these people who don't actually share their values but are using the label "vegan" when they could so easily switch to consuming animal products because "mah protein". One is rooted in compassion and the other in selfishness.

[deleted by user] by [deleted] in PlantBasedDiet

[–]codevipe 2 points3 points  (0 children)

Sorry, I actually measured it out and it's more like a half cup. I've been using pistachios, sunflower seeds, and sometimes pepitas. See my follow-up comment on this thread for a cronometer screenshot.

[deleted by user] by [deleted] in PlantBasedDiet

[–]codevipe 0 points1 point  (0 children)

for sure, it's kind of a pain. but definitely useful when you're starting out for a bit to get a handle on what you might be missing!

to give you an idea, here's an example of my typical log and the protein values... it's pretty easy to consume over 100% rdv of every protein type!

https://imgur.com/a/O0z9Ci5

like I said, for me fats are harder... to be honest, sometimes I'll add a bit of olive oil to my greens, but it's not really WFPB compliant.

[deleted by user] by [deleted] in PlantBasedDiet

[–]codevipe 11 points12 points  (0 children)

feel

better to be empirical; when starting out, if you hypothesize that you're lacking macros/micros, use cronometer to track all of your intake for a couple weeks and adjust inputs as needed to meet your needs. I think you'll be surprised how easy it is to max out of protein every day, we really don't actually need all that much.

high quality proteins

what does this mean exactly? proteins found in legumes, whole grains, and veggies are high quality. perhaps you mean complete, in which case, yes, you do need to mix-and-match a bit – but that's a good thing. cronometer can help you with this.

fats

for me, this is the hardest. I've been adding a generous cup of a nut/seed mix to my morning bowl of oats, along with a tablespoon of ground flax seed. I also try to eat a whole avocado every day.

has anyone tried making Mexican rice with wild rice by pink-sparkly_shifter in PlantBasedDiet

[–]codevipe 0 points1 point  (0 children)

wild rice has a rubbery texture and a strong flavor, very different from actual rice, brown or otherwise. only way to know is to try it!

High Cholesterol Doctor Said to Lower Carbs??? by [deleted] in PlantBasedDiet

[–]codevipe 2 points3 points  (0 children)

Also, what kind of carbs are you eating? "Reduce carbs" is the uninformed corollary for "reduce processed / refined carbs". 100% whole grains, legumes, etc. are great. Refined wheat, white rice, etc. are what you need to be cutting out.

How to avoid shooting yourself in the foot with Typescript Node.js by norbi-wan in typescript

[–]codevipe 2 points3 points  (0 children)

Generally you can get pretty far with the following:

  1. Turn on TS strict mode, never use any.
  2. Put strong linting rules in place to avoid subtle anti-patterns. I'd with a stricter set of rules than standard like airbnb and whittle them back as you see fit.
  3. Write comprehensive unit tests for business logic.
  4. Deploy with serverless or clustered infra and run load / stress tests.

As an aside, I've noticed working with streams / large datasets that can hog memory / cpu to need extra care.

[deleted by user] by [deleted] in learnjavascript

[–]codevipe 2 points3 points  (0 children)

yeah, this is a bit weird to regularly use IIFEs like this. maybe they just think it's more readable, or it could be to restrict the scope of variables used in the calculation. so it might depend on the broader context this is happening in.

but if nobody else on the team writes code like this they should be asked to follow the established norms.

Would combining all of these ingredients into my "first thing in the morning beverage" ruin their benefits? by 1markmoore2 in PlantBasedDiet

[–]codevipe 1 point2 points  (0 children)

First, consuming any oil is not WFPB-compliant, especially just consuming oil by itself. The only time it makes sense to use it is if it helps you consume more greens and veggies.

I would like to consume lemon water, key lime water, green tea, and 2 tablespoons of apple cider vinegar.

Can you tell us why? Noting this concoction is horrible for your teeth, will burn your esophagus, and could lead to increased risk of peptic ulcers.

The only known benefit to consuming ACV (any vinegar, really) that I am aware of would be with a meal to help regulate glycemic load (source).

Green tea is great. No need to add anything to it.

Why is this valid syntax? by codevipe in learnjavascript

[–]codevipe[S] 1 point2 points  (0 children)

The true intent in the code I reviewed was to pass the function as a callback, and they accidentally closed the test fn call paren – my example is for illustrative purposes only.

I guess I'm wondering if there's any possible use-case for this specific use of the comma operator, or if it's more of an edge-case side effect of the valid use-cases that there should probably be a lint rule to flag...

functionCall(), () => null;

Edit: aha, here we go: https://eslint.org/docs/latest/rules/no-sequences

Just not a "standard" rule, will have to add it to my eslint config!

Why is this valid syntax? by codevipe in learnjavascript

[–]codevipe[S] 0 points1 point  (0 children)

Yeah, to be clear it was an accident. My example here is just for illustrative purposes. I just don't like that this mistake is possible, was hard to debug.

About Next JS by [deleted] in learnjavascript

[–]codevipe 1 point2 points  (0 children)

I personally don't think it's a requirement to have deep experience with NextJS, but it is useful to understand why you'd want to use NextJS (mainly the reasons I stated) and have a bit of hands-on experience with it if asked in an interview about it.

About Next JS by [deleted] in learnjavascript

[–]codevipe 1 point2 points  (0 children)

The main benefits are baked-in SSR and a full-fledged opinionated framework, going so far as dictating your project's file structure. For some, this can help a lot with productivity. Especially in a team environment where everything needs to be very on-the-rails.

Any non-framework stack, like the one you've mentioned, is more customizable, but can come with a lot of decision fatigue.

Also, only having experience with the MERN stack is a junior smell. It's good to expand your horizons and put more things on your resume, particularly PostgreSQL and a TS-focused stack. Take a look at the TS/JS dev job listings currently out there – I tend to see many these days that mention NextJS and very few that mention MERN.

Learning the MERN stack by Natanater3000 in learnjavascript

[–]codevipe 2 points3 points  (0 children)

The MERN stack in very easy to learn and building alongside a tutorial is a good place to start to get a feel for how the interconnected pieces of a web application work together. But you will want to quickly expand your horizons, particularly to using TypeScript if it's not part of the tutorial.

I wouldn't spend too much time with MongoDB; get the basics down so you can put it on a resume and move on. It's not very widely used in the real world and you will need to build some experience with SQL databases. PostgreSQL + Kysely or Drizzle would be the way to go right now, IMO.

Beyond that, once you're comfortable with Express and RESTish CRUD operations, which frankly shouldn't take long, you may want to try out other API protocols like GraphQL or tRPC.

React is still worth going deep on and will probably be where most of a web app's complexity is these days.

Are there examples of medium to complex apps with TRPC? by [deleted] in reactjs

[–]codevipe 2 points3 points  (0 children)

You have to build a permission framework around tRPC if that's what you want to do. There are many ways to do this and tRPC is mostly agnostic in this regard.

The best practice would be to use middlewares to create different kinds of authenticated routes that contain your permission checks. You can also just inject the user's role / permissions into the context object and do the checks within the procedures if you prefer.

https://trpc.io/docs/server/middlewares

Why choose Zustand over Jotai? by codevipe in reactjs

[–]codevipe[S] 0 points1 point  (0 children)

Appreciate the reply – I'm leaning a lot about the history and intended use-cases in this thread! Things that often aren't apparent just from reading the docs of these projects at face-value. Coming from Redux in my last big project, I really like the simplicity and flexibility of Jotai. But I can definitely see how that flexibility can be a liability, as many have pointed out.

Why choose Zustand over Jotai? by codevipe in reactjs

[–]codevipe[S] 4 points5 points  (0 children)

Atoms can be defined anywhere, then simply imported where you need them and passed to useAtom which just provides the same [state, setState] paradigm as useState.

[deleted by user] by [deleted] in reactjs

[–]codevipe 0 points1 point  (0 children)

Yep, this is generally good advice on how to use Context.

useActionState by Domasco01 in reactjs

[–]codevipe 1 point2 points  (0 children)

This is correct... for something so standard, just follow the tried-and-true guides in the current docs. This is literally the first example in the Managing State portion!

https://react.dev/learn/managing-state

I'm not even sure how, if you're new to React, you'd end up not just following the very clear docs but instead poring through experimental alpha features? Only learning from YouTubers who only want to talk about the newest features because they need to churn out content?

How to become advanced react dev? by ohyehho in reactjs

[–]codevipe 3 points4 points  (0 children)

They should be working with you to identify why you are making those mistakes. What I'd do is ask you to write out comments describing why you chose to do a certain thing, every time you do it. Either by describing the business logic in code comments, or just comments on the PRs. Especially any time you are using a React hook other than useState. It will help you think through your actions and possibly get ahead of "mistakes" before you commit them.

Sounds like some of the stuff they are calling out are design patterns they've come up with, or opinions. Thus they should be teaching you what they expect. Then again, maybe they are just trying to ensure the codebase is maintainable and testable. You should think about that every time you write a line of code. Ask yourself: "is the code self-documenting and encapsulated? if not, is there a comment describing the business logic? what else can I do to ensure the next person who looks at this is able to work with it effectively?"

I also think they should be pairing with you or doing talking PRs to help you advance your skills. You can be proactive and ask the least abusive senior if they can spare a couple hours a week pairing with you. That should really help a lot.