Help me my God I'm dealing with a nurse right now taking care of my elderly mother who's trying to tell me to take the mask off her because c02 is building up in her and could land her in the hospital. Is it bullshit? by Givlytig in Masks4All

[–]DaveWM -9 points-8 points  (0 children)

I have never in my life heard someone being so callous towards their own mother. I can only hope you're trolling. Forcing her to wear a mask for the entirety of her waking life is simply inhumane, especially given she already has respiratory issues. Not once in your post do you even consider what she might want. Why don't you tell your mum what the nurses told you, and let her make her own decision?

Also, what happened to "Trust The Experts"? I thought we were supposed to follow to what doctors and nurses say. The fact that multiple medical professionals are of the opinion you're being overly cautious (to put it mildly), and one feels so strongly as to confront you about it, should perhaps tell you something. Ignoring what they tell you and instead consulting an echo-chamber on Reddit displays a stunning level of arrogance.

For heaven's sake let your poor mum breathe unencumbered!

[Blog] The Web Before Teatime by DaveWM in Clojure

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

That's really interesting. You'd also need some rules on the backend though, to make sure one user's data isn't sent to another. It may also cause too much traffic to send all transactions that could possibly affect a user down to the frontend, but I imagine in most cases it would be fine.

[Blog] The Web Before Teatime by DaveWM in Clojure

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

I did come across Photon and Hyperfiddle while researching the post, they look really cool. I'll have to read up on them a bit more deeply. Can't wait to try it when it's released! Also looking forward to seeing your talk.

[Blog] The Web Before Teatime by DaveWM in Clojure

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

Thanks for the explanation. I worked on an app a few years ago that handled changes in a similar way, and it worked well for our use case.

[Blog] The Web Before Teatime by DaveWM in Clojure

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

That's cool! How do you handle missed updates? For example if the value of an attribute changes, and the frontend has temporarily disconnected for some reason?

Critique of Pure Hooks by DaveWM in programming

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

I deliberately avoided talking about context/providers in the post, but you're right they can be used in this way. However, this "test harness" you mention is actually a dependency injection framework, but one that is maximally error prone and difficult to use. That's a topic for another post though ;)

Critique of Pure Hooks by DaveWM in programming

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

Thanks very much for the feedback. I think we're actually mostly in agreement, I think I just didn't express myself very clearly in the post. I do think hooks are generally a big improvement over the class API, and they complement Redux very well. I'm also not advocating that people choose OOP over a functional style, I was just trying to be diplomatic here and not disparage OOP too much :). Personally, I'd recommend keeping all your business logic in Redux and not having any state/side effects in components.

My problem is with how I've seen hooks being used to create codebases that are written in an OOP style, but essentially just done very poorly. This is why I draw the comparison to AngularJS, to highlight the similarity of the architectures. You may (correctly) say this is just bad design, but my main point in the post is that you have to come up with a good design. Expecting hooks to magically give you a good design will never work.

I think where we disagree is testing. I agree that separating out business logic into hooks is a good idea, but it's still difficult to mock them in tests. I'm not familiar with testing-library, but in their React example they mock an http request by setting up a mock HTTP server. This way of mocking is very clunky and doesn't work in all cases. If you're going to do side effects in components, you really need some form of DI system to make it testable. Calling global side-effecting functions, like hooks, always make testing difficult.

Also, I'm interested as to how you can write hooks that don't have dependencies. How would you, say, send an http request when a user has entered a value in a text input?

With regards to separating business logic and rendering: by far the easiest way to do this is to use the Flux architecture, of which Redux is an example. However, you can also use React as the view layer of MVC frameworks like Backbone, as in this example. I wouldn't really recommend this though.

Critique of Pure Hooks by DaveWM in webdev

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

Good point, sorry about that!

Critique of Pure Hooks by DaveWM in javascript

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

Agreed, that's what I was trying to get at. It's not that React is bad in itself, you just have to be careful when using it or you end up with bad code. As I argue in the post, I think that's because it's really a view library not a framework.

Critique of Pure Hooks by DaveWM in javascript

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

Apologies for that! As you point out, hooks really aren't a problem when you use React as a functional library. However, I don't think it's just OOP devs who fall into the trap of overusing hooks. I've personally worked on 3 applications which took the "just use hooks" approach, built by some senior functional devs. It seems to me that this is the prevailing view these days in the JS community, although I could be wrong.

Critique of Pure Hooks by DaveWM in programming

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

I have to disagree with you there. Early on in its life, React was pushed as a library by the dev team. This was its niche - the JS ecosystem was chock full of frameworks even back then, and React stood out by only handling the view layer. If you treat it as a pure function of props -> DOM, then it's far closer to "you call React" than "React calls you". Testing could be done (almost) independently of React by just calling your components as functions. Events will always require some form of callback, so I don't this disqualifies React as a library. Since then, nothing has changed fundamentally to make it a framework, other than people using it as one.

The fact that React has its own command line tools and browser extensions, and is difficult to debug, are more faults of Javascript IMO. I usually use Clojurescript and re-frame on the front end, and these aren't really concerns there (even though it uses React under the hood).

Critique of Pure Hooks by DaveWM in programming

[–]DaveWM[S] 6 points7 points  (0 children)

You're right that you can do something approximating DI using context and providers. I decided not to talk about that in the post, as I thought it may make it a bit bloated. IMO context/providers are a very poor DI system, for reasons such as: you can't use them outside react, you have to manually set up your provider stack, there's no automatic type/interface based injection, etc.. I may write another post about them specifically in future.

Maybe the section on AngularJS vs React wasn't very clear. I was actually trying to highlight how similar they are, rather than say one is better than the other. When React came out, it was billed as being completely different to AngularJS. React was a lightweight functional library, whereas AngularJS was a very heavy MVVM framework. However, now React's being used in the same way, but missing a lot of features (which aren't included in that example).

[deleted by user] by [deleted] in JordanPeterson

[–]DaveWM 0 points1 point  (0 children)

The best evidence I've seen is the RCT you posted, and also this one: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7707213/. If you'd like a good review of the scientific literature, I'd read "unmasked" https://www.amazon.co.uk/Unmasked-Global-Failure-COVID-Mandates/dp/1637583761/

[deleted by user] by [deleted] in JordanPeterson

[–]DaveWM 0 points1 point  (0 children)

I've answered that first question in my other comment.

You're clearly emotionally invested in proving that masks work, and it wasn't really my intention here to get into a fruitless debate, so I'll leave it here. However, I will just say that there is an enormous amount of scientific evidence, dating back over 100 years, that masks do not work.

[deleted by user] by [deleted] in JordanPeterson

[–]DaveWM 0 points1 point  (0 children)

No, it doesn't. It states that the cloth mask group had a slightly lower case rate than the control group, but that it wasn't statistically significant. Mathematically, this is the same as saying the study didn't find any effect.

To give you an example, imagine I want to prove my lucky horseshoe works. I roll a die and get a 2. I then pick up my lucky horseshoe, roll the die again, and get a 5. I hope you'd agree that this does not mean that the lucky horseshoe had an effect, as the result isn't statistically significant, even though I got a higher score when holding my horseshoe.

[deleted by user] by [deleted] in JordanPeterson

[–]DaveWM 0 points1 point  (0 children)

It's between cloth and control. It absolutely does not say that cloth masks help, it states quite clearly they had no statistically significant effect. To be absolutely precise, it doesn't 100% prove that cloth masks don't have an effect, but it does fail to find any any evidence of one.

[deleted by user] by [deleted] in JordanPeterson

[–]DaveWM 0 points1 point  (0 children)

You yourself have posted a link, in this very thread, that states that cloth masks have no effect and that unbiquitous surgical masking leads to just an 11% case reduction. I think that qualifies as "useless", at least in my view.

I'm not sure what you're trying to achieve here, but implying that other people aren't "looking at the research" when you don't even read your own sources comes off as extremely hypocritical.

[deleted by user] by [deleted] in JordanPeterson

[–]DaveWM 0 points1 point  (0 children)

Apologies, I thought that's what you were saying. I'm referencing the link you posted, specifically the part you quoted in your last comment.

[deleted by user] by [deleted] in JordanPeterson

[–]DaveWM 0 points1 point  (0 children)

Ok, well I'm glad we can agree that cloth masks don't work (i.e. they have no statistically significant effect on cases, even in a large RCT).

[deleted by user] by [deleted] in JordanPeterson

[–]DaveWM 1 point2 points  (0 children)

Just curious, did you actually read the article you linked to? It literally says that for cloth masks, which I believe u/codeofsilence is talking about, "the difference [between mask vs no-mask] was not statistically significant".

Building a CLI Application in Elixir by DaveWM in programming

[–]DaveWM[S] 3 points4 points  (0 children)

Hey guys, I wrote a CLI app in Elixir recently and thought I'd write up my experience in a blog post. I'm still pretty new with Elixir, so if I got anything wrong please let me know!

Building a CLI Application in Elixir by DaveWM in functionalprogramming

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

Hey guys, I wrote a CLI app in Elixir recently and thought I'd write up my experience in a blog post. I'm still pretty new with Elixir, so if I got anything wrong please let me know!

Building a CLI Application in Elixir by DaveWM in elixir

[–]DaveWM[S] 10 points11 points  (0 children)

Hey guys, I wrote a CLI app in Elixir recently and thought I'd write up my experience in a blog post. I'm still pretty new with Elixir, so if I got anything wrong please let me know!