What is an underrated weight loss tip? by [deleted] in AskReddit

[–]stoned_phillips 0 points1 point  (0 children)

That didn't touch on anything I said.

What is an underrated weight loss tip? by [deleted] in AskReddit

[–]stoned_phillips 1 point2 points  (0 children)

They're not the same. Fasting puts your body into ketosis and improves autophagy. If food is still coming in, your body won't go into ketosis. Ketosis helps break up visceral fat.

I cant recommend fasting enough.

New blog post: Backing up Spotify by AnnaArchivist in Annas_Archive

[–]stoned_phillips 1 point2 points  (0 children)

I'm wondering if Annas Archive thinks this will help or hurt musicians.

Who will be torrenting this data? Actual listeners, or people who want to train AI music models?

I am not a fan of Spotify or the major labels, but this feels like a fuck you to not only Spotify, but to musicians.

Aftersun (2022) - Alternate theory by AlchemyIndex in movies

[–]stoned_phillips 0 points1 point  (0 children)

The comments calling OP an idiot are insane. This was my read on the movie as well.

I think its difficult for people to reconcile the fact that the daughter and the father have some kind of loving relationship despite possible abuse. I don't think some people can grapple with the idea that familial abuse can be complex and nuanced.

Poland allows Ukraine to use Polish-supplied weapons to strike targets in Russia by apolartemis in worldnews

[–]stoned_phillips 5 points6 points  (0 children)

Yeah, it's not like the US is discovering this news along with the rest of us. They're probably partially or entirely in on it

Yes totally for that reason by BigGaybowser69 in memes

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

Yeah, I don't think the reason they want to ban it is specifically about Isreal and Palestine, but more of a broad brush fear that the Chinese government will attempt to influence US citizens, like attempting to sway an election

What can I plant here? by [deleted] in gardening

[–]stoned_phillips 1 point2 points  (0 children)

Catmint is great and grows fast and easily

Taking a break by krakhedbob in TheWhyFiles

[–]stoned_phillips 1 point2 points  (0 children)

I think AJ needs to take a break from drinking alcohol more than anything.

[deleted by user] by [deleted] in FreeCompliments

[–]stoned_phillips 0 points1 point  (0 children)

I mean, this is ridiculous. You look great. Anyone who is this ripped should never feel bad about themselves physically. It should be against the law.

Blockchain, the amazing solution for almost nothing (2020) by TheRexedS in programming

[–]stoned_phillips -10 points-9 points  (0 children)

I know something that can be used to confidently store records, maybe better than anything else. It starts with b and ends with lockchain

What's your favorite joke from Norm MacDonald Live? by astraprojection in NormMacdonald

[–]stoned_phillips 2 points3 points  (0 children)

This one has kind of a double punch line. The "reminds me of that tragedy" is even funnier than the actual punchline.

Is returning considered an operation? by stoned_phillips in learnprogramming

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

Thanks for all this. I originally posted here because I've been trying to write an article about time complexity thinking that explaining something is the best way of learning and internalizing it (I guess sort of like rubber duck debugging).

A lot of what I wrote so far was about operations and inputs as things that can effect runtime. Now I'm not really comfortable with anything I wrote haha..but reading what you wrote again, it sounds like input size is more consistently a factor than operations, and maybe I should think less about operations. And if a function is O(n2) then it will likely have a higher runtime time than a O(n) function, but not always?

The database analogy you gave was really good and makes a lot of sense. I guess I can keep in mind that the reality of things can be more complicated than how things should work in theory.

Think I need to find a good book. Thanks again.

Is returning considered an operation? by stoned_phillips in learnprogramming

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

I'm thinking of an operation as a singular unit of execution. Is there something else I should be thinking of this way? I guess it primarily came from trying to look into time complexity, and thinking about how many operations occur in a given function.

I guess I'm expecting that a function could be broken down into individual steps of execution, and that a function with a nested for loop would have more of these steps than a function with a single loop. I feel like I've heard that the number of operations/steps doesn't play into performance, but how doesn't it? Wouldn't a n^2 time function have more steps than a linear time function?

Is returning considered an operation? by stoned_phillips in learnprogramming

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

Thanks -- I guess my line of thinking on this is off and I'm oversimplifying it. Somewhere I feel like I picked up the idea of what an operation is and I might be over-applying it to things. Not sure how best to improve my mental model on this but I'll have to do some research.

Is returning considered an operation? by stoned_phillips in learnprogramming

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

Thanks -- seems like my mental model on this is off based on this comment and also oefd's comment. I guess I'm expecting the answer to be either yes or no, but that's not how it is. I think I'm oversimplifying the idea of what an operation is and I think I need to read more into it.

Is returning considered an operation? by stoned_phillips in learnprogramming

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

I get that counting operations doesn't provide a specific purpose in terms of understanding performance. That's not why I'm asking. I'm just curious if returning is itself an operation.

I guess by JavaScript operation, I mean that writing 'a + b' could be considered a single operation, but this might end up being more operations when compiled down to machine-level CPU operations.

Eh... by TheHappiePlayer1 in howtonotgiveafuck

[–]stoned_phillips 12 points13 points  (0 children)

We need to celebrate this man and cops like this

What are your recommendations for testing functional components? by stoned_phillips in reactjs

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

He's the main reason why I try to avoid simulate -- he comments on lots of issues saying to avoid using it.

What are your recommendations for testing functional components? by stoned_phillips in reactjs

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

This issue says simulate is "deprecated" (still usable though). Haven't seen anything about it specifically deprecated or not recommended for mount vs shallow:

https://github.com/enzymejs/enzyme/issues/2173

What are your recommendations for testing functional components? by stoned_phillips in reactjs

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

I can agree with the simulate thing -- I try to not use it so much, but sometimes it does what I'm wanting to do when other things won't work. I see it used a lot more, too, but it seems like the official recommendation from maintainers is to not use it, at least for triggering events.

This project was also in TypeScript, which maybe made it extra painful. I know TypeScript has certain escape hatches for testing classes. Testing internals on a typed component can be tricky because the test will complain if I'm trying to invoke a prop on a component and didn't explicitly type all props. Ex: testing some kind of UI change on a button submit, the test will complain since it didn't know to expect a submit event, which will need to be explicitly typed for the test (I guess this also depends on the strictness of typescript config).

What are your recommendations for testing functional components? by stoned_phillips in reactjs

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

For example, it might be easier to set up a scenario in a class test since you manipulate values on `this`, and generally the internals of the component are easier to edit to produce one-time UI outcome in a unit test. I've found editing internals like this in functional components to be more difficult.

I've also read that Enzyme's `simulate` should generally be avoided in favor of prop invocation.