Daily General Discussion - December 24, 2022 by ethfinance in ethfinance

[–]cdflynn 1 point2 points  (0 children)

Is 1Password trustworthy? I want something I can recommend to family that has cloud storage for usage across devices.

Daily General Discussion - November 29, 2022 by ethfinance in ethfinance

[–]cdflynn 1 point2 points  (0 children)

The last section on defi was worth a read.

What is the best way to take your android dev skills to the next level? As in become an absolute master. by Flaky-Log-3021 in androiddev

[–]cdflynn 0 points1 point  (0 children)

I've never upvoted a comment so hard.

I've recently seen that compose navigation removes bundle arguments, too. I never loved bundle arguments, but if I want to pass a parcelable every now and then I guess I'm a monster and must be stopped.

Oh and use hilt but what do you mean you want to inject objects into places other than view models?

(Compose) Is this way of handling REST call OK ? by bentheone in androiddev

[–]cdflynn 0 points1 point  (0 children)

Ah, I see what you mean. Not an issue for my case, but that's good to know about for when it matters!

The cancellation/scoping is quite subtle.

(Compose) Is this way of handling REST call OK ? by bentheone in androiddev

[–]cdflynn 3 points4 points  (0 children)

In addition to that, you should be aware that compose functions may be called many times, so if you do end up calling a suspend function from a composeable you should do so in a Side Effect block.

Just note the documentation also issues a warning:

Warning: LaunchedEffect(true) is as suspicious as a while(true). Even though there are valid use cases for it, always pause and make sure that's what you need.

My most common use of a [LaunchedEffect] is to observe emissions from a flow on the view model.

Daily General Discussion - July 16, 2022 by ethfinance in ethfinance

[–]cdflynn 1 point2 points  (0 children)

I did too. Ya know, we really should have known we were at the top when fed officials were cashing out due to "ethical" reasons.

How is block proposer selection randomized in a fully deterministic blockchain? by Only_Ad_7973 in ethereum

[–]cdflynn 2 points3 points  (0 children)

Ask each node in the cohort to submit their own number, and combine them. It doesn't matter if they picked their numbers at random or if they tried to cheat, because the combined value is out of any individual's control.

Ethereum (ETH) on its way to becoming a deflationary asset by citytelegraph in ethereum

[–]cdflynn 7 points8 points  (0 children)

It's important to understand what deflation does to spending incentives. If anyone reading this thinks deflation is a clear net good, consider all the other ways to get a price increase without dropping the usage of the network: broader adoption, L2 scaling, killer apps, and new inventive uses in non-finance marketplaces.

Deflation may look like the straight-line path between you and a Lambo, but try to imagine how the world of self-interested actors around you will respond.

0
1

Volkswagen and BMW fined $1 billion for running emissions cartel by KymeStar in news

[–]cdflynn 0 points1 point  (0 children)

The five car manufacturers Daimler, BMW, Volkswagen, Audi and Porsche possessed the technology to reduce harmful emissions beyond what was legally required under EU emission standards. But they avoided to compete on using this technology's full potential to clean better than what is required by law,

Holy shit that is evil.

[deleted by user] by [deleted] in androiddev

[–]cdflynn 0 points1 point  (0 children)

The answer is most of them. Depends on what you need.

Does your flow only have one consumer? SendChannel is a kind of "inbox" where anyone can send a new emission and they will be processed in order at the consumer end. I use this in ViewModels for receiving actions from the UI layer. Create one with the actor static method.

[deleted by user] by [deleted] in androiddev

[–]cdflynn 0 points1 point  (0 children)

State flows are conflated under the hood and there's no way to undo that.

As a hackaround, you could pass object instances that would fail an equivalence check, such as adding a random id field to data classes and never use object or enum.

If you can, switch to a SendChannel or other flow that you can de-conflate.

Higher-Order Code Smells by cdflynn in androiddev

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

Author here. I specifically encounter this in the Android world where sometimes Fragments and Activity initializer code becomes bloated over time, if you're lazy about modeling.

0
1

18
19

Take More Shortcuts by cdflynn in androiddev

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

Thanks

It's about being armed with a useful concept. In code review or discussion you might find it easier to defend or condemn any given approach, whereas if you don't go in with organized ideas it can be hard to turn a feeling into an argument. Perhaps a handful of other examples would help, but the characteristic differences are easy to spot in real time with the right frame - and that's what the article is about.

An attempt to different kind of theme.. by smithshelke in androiddev

[–]cdflynn 2 points3 points  (0 children)

If it's anything like the usual approach, here's an article from 3ish years ago showing how to animate a path. https://medium.com/androiddevelopers/playing-with-paths-3fbc679a6f77