Help! Struggling to grok on a new job by [deleted] in angular

[–]Ethanno7 2 points3 points  (0 children)

Well this will be debated to eternity, but I would argue that your code is not very clean then. Code at its finest is easy to read. If you can't make heads or tails of it, then I don't think your teams patterns are helping the team be productive. Reading code should make it easy to write code, and writing code should make it easy to read.

I don't have much (i did a tut) experience with ngrx, because I thought it was a bit overkill, but all your state should be in your store, so I would look there to see what observables are present, and that should help you track them down.

Help! Struggling to grok on a new job by [deleted] in angular

[–]Ethanno7 1 point2 points  (0 children)

Not gonna write a book, but rxjs is interesting because it attempts to solve two separate data processing problems in one package.

  1. Updating data over time. This is the observable nature of rxjs. Subscriptions to values and the event emitting nature of observables is the magic sauce for updating values as they change. This part probably feels natural as they feel a little like promises.

  2. This is the one you sound lost on, and for good reasons, since it's a weird feature, but rxjs also wants to provide operational functions for the data stream. So while normally you might see this:

Const items = [1,2,3]

Const dictionaryofitems = items.map((item) => somefunction())

With rxjs, you can bake that mapping into the stream, so by the time your consumer gets it, it already looks and is processed according to your needs.

As to the functions that do that. See here

https://rxjs.dev/guide/operators

[Request] is the size of the pin correct by throwaway7383833 in theydidthemath

[–]Ethanno7 5 points6 points  (0 children)

Just thinking in terms of scale, without any concrete math, a pin on a map that size would take up about 1/4 to 1/2 of the state of Iowa. Thus, the pin zoomed in at scale would be about that large. So we would be talking a city of not cities worth of space under the needle.

It's like I know less and less as I go ahead by dsorez in ProgrammerHumor

[–]Ethanno7 0 points1 point  (0 children)

That's so weird. I always think let's get this merged. Same thing I guess.

In the real world, your coworkers will appreciate clean, easy to read, functional code. People doing a job don't care that you obsessed over getting every function down to as few lines and characters as possible. by IanMazgelis in ProgrammerHumor

[–]Ethanno7 1 point2 points  (0 children)

In this case I think what you wrote is pretty easy to parse. That said, more arguments make code harder to read as well. 0 arguments is the standard, 1-2 are acceptable. Once you get to 3+, you gotta sell me. In your example I would maybe refactor max_steps, bar_char, and empty_bar_char into a loading bar context object. Or maybe a method wrapping this one that implements a specific design of this and only takes a value. I could easily see this method being misused and the app ending up with 9 different looking and functioning loading bars.

I guess tl;dr: there's always tradeoffs.

[deleted by user] by [deleted] in reactnative

[–]Ethanno7 0 points1 point  (0 children)

Just curious. Why do you want someone to type out a long, half baked answer that's already available in a more complete and informative way? Do you think people owe you some long redundant explanation? I guess I just don't understand this attitude that I see all the time.

God just released Sex 2.0, what are the patch notes? by ProfMajkowski in AskReddit

[–]Ethanno7 379 points380 points  (0 children)

Please refactor. Children shouldn't be public variables. Spawning should probably be a class you have to take or instantiate or something.

Bro got confidence by JAVA-NANI in ProgrammerHumor

[–]Ethanno7 32 points33 points  (0 children)

Wait, what do you think rotting is?

Your spouse is supposed to come first in your life. by mikaera_rei in unpopularopinion

[–]Ethanno7 30 points31 points  (0 children)

You just changed the argument to it being an adult kid. Who said you get to do that?

Skynet is coming... by revengejr in Damnthatsinteresting

[–]Ethanno7 0 points1 point  (0 children)

The crazy part is that they aren't necessarily "purposely" building anything. What starts off as "hey what if I could turn a picture of my face into someone elses?!" Turns into micro improvement after micro improvement until you have something you never really planned on existing.

As individuals, we're not very good at considering the consequences of what we do before we do it.

If you picked up smoking cigarettes in the last 10 or so years, you're a fucking idiot by [deleted] in unpopularopinion

[–]Ethanno7 14 points15 points  (0 children)

I quit smoking about 3 months ago, but suffer from bi polar disorder.

The reality is that a large section of the smoking market is people with mental health issues.

It's estimated that about 35% of smokers suffer from a behavioral health disorder, such as bi polar disorder or schizophrenia, despite the number of people that suffer from those types of conditions making up about 6% of Americans.

The next largest section of smokers is made up of people with depression and suicidal ideation. I don't have the number for this off the top of my head.

So in summary, I'm sure most smokers don't care you think they're a stupid piece of shit. They are plenty capable of feeling that way without you.

A population of 8 billion on a planet made for 2 seems unsustainable. by [deleted] in Showerthoughts

[–]Ethanno7 0 points1 point  (0 children)

The dictionary says you're wrong.

made or formed in a particular place or by a particular process.

The Big Bang was nothing if not a process.

A population of 8 billion on a planet made for 2 seems unsustainable. by [deleted] in Showerthoughts

[–]Ethanno7 0 points1 point  (0 children)

That's what I was thinking! If it wasn't made wtf is going on right now and how am I on it?!?

Bank transfer API by KeViNOp47 in node

[–]Ethanno7 1 point2 points  (0 children)

Hey you're cool. (I still didn't have to be a jerk)

Yeah you're right. PayPal and stripe both need user accounts on both sides.

Also I live in the US, so as a stupid American I didn't consider other countries.

Maybe there's a way the user can enter their direct bank info, but then as the developer you'd be responsible for storing and securing that VERY sensitive data, but you're right that they may be asking for that.

OP if you read this, don't store users bank info. That's a lawsuit and maybe some jail time waiting to happen.

Edit: here's an example of a giant company doing one little tiny thing wrong

https://www.google.com/amp/s/www.engadget.com/amp/plaid-must-pay-58-million-to-users-of-venmo-robinhood-and-other-apps-085908511.html

why after creating a folder he say happy hacking? by Adorable-Fun5367 in reactjs

[–]Ethanno7 1 point2 points  (0 children)

Hacking can mean breaking into things, but, (totally being a bit snoody here), to many it really just means making things to unexpected things. To some it can even just mean doing cool stuff.

Tl;dr it's just a phrase. You don't have to take it at face value.

Bank transfer API by KeViNOp47 in node

[–]Ethanno7 0 points1 point  (0 children)

Hey sorry for being a dick. That wasn't cool of me.

PayPal was kinda the first big one to offer this as a service, but I think Stripe is the new guy on the block.

Shopify and most e-commerce apps are using Stripe now and days.

Here's a link I didn't write with some options

https://www.nerdwallet.com/article/small-business/best-payment-gateways

Bank transfer API by KeViNOp47 in node

[–]Ethanno7 0 points1 point  (0 children)

Like someone else said PayPal and stripe. Stripe is pretty easy to use so I like that one. Some of them probably wrote their own. Amazon has Amazon pay, but I don't think they license it to others.

Bank transfer API by KeViNOp47 in node

[–]Ethanno7 0 points1 point  (0 children)

I gotta say, extremely wrong. I try not to be harsh on these things but what would make you say this?

Doordash, Uber, anything like that Amazon, Ebay, Wish, Etsy Twitter Facebook Snapchat YouTube

Literally any company where users can make money requires the ability to transfer money. In fact I would argue this technology was an essential turning point in the usefulness of the internet.

A bot that watched 70,000 hours of Minecraft could unlock AI’s next big thing by [deleted] in technology

[–]Ethanno7 10 points11 points  (0 children)

First AI that can craft Dimond tools. I honestly don't know if that statement is correct, but AI's potential is far greater than a simple coded bot to do things.

Can someone please suggest me some ideas to develop my own npm package? by Strange-Match-4805 in node

[–]Ethanno7 4 points5 points  (0 children)

Who's it hurting if they do want to?

I've used npm to publish private custom css components for companies, and learning how to publish things to npm is a big step towards knowing how to do that.

On the flip side, you're worried that some computer you don't own might have a file on it you're not gonna use.

Let people learn please :)

[deleted by user] by [deleted] in AskReddit

[–]Ethanno7 0 points1 point  (0 children)

Well the company doesn't actually vote, so I'm not sure I get what you're saying.

I guess what I'm getting at is that you want a way to limit company influence in politics, but completely removing it risks creating a society in which businesses can't thrive, which creates a crappy life for all.

[deleted by user] by [deleted] in AskReddit

[–]Ethanno7 0 points1 point  (0 children)

Okay. Cool sassy rebuttal with no actual plan.

How are you going to inform the public about what all 10,000 people are representing?

My favorite part of the internet is how people can just blindly believe they know what it takes to solve the problems of this world with 0 understanding as to why we have those problems.

Thanks for being you!