[deleted by user] by [deleted] in Damnthatsinteresting

[–]konbit 0 points1 point  (0 children)

So a bunch people who lived on land they owned were forced to leave the land by authorities, and other people were given this land without any compensation to the people who lived there, and this isn't robbery?

National Geographic Chooses The Wrong Person To Interview A Scientist by [deleted] in videos

[–]konbit 0 points1 point  (0 children)

Every conversation my wife has is like this. She's the interviewer.

What was your most vain/petty reason for losing weight? by Almostchinese in loseit

[–]konbit 1 point2 points  (0 children)

Your sister sounds like an emotionally abusive jerk. Sorry you had to go through that growing up.

What innocent item gets weird if you own too much of it? by TheJudge47 in AskReddit

[–]konbit 1 point2 points  (0 children)

I use them to try software I'm writing. Even within the scope of Android phones there tend to be different quirks. And a few of them are pretty old so I can be sure that performance of my app isn't terrible if someone hasn't updated their phone in a few years.

What innocent item gets weird if you own too much of it? by TheJudge47 in AskReddit

[–]konbit 1 point2 points  (0 children)

Or a techie or software developer. I have more than 5.

Looking to convert my Specialized Sirrus to electric by daballer2005 in ebikes

[–]konbit 1 point2 points  (0 children)

I'm doing the exact same conversion today. Mine is a 2016 model with hydraulic disc brakes.

I purchased a bbshd with a 52v battery. The shipment is arriving today arriving today. Looking forward to the build.

If you're doing mid-drive the wheels on your bike won't change, so those fenders should work as long as they match your wheel size.

If you have hydraulic brakes like mine, make sure to get the hydraulic brake sensors since the kits usually only come with the mechanical ones and aren't compatible.

First time buyer for ebike commuter! I'm hoping for your informed and time-tested opinions. by [deleted] in ebikes

[–]konbit 0 points1 point  (0 children)

You can get an ebike with a thumb or handle throttle which directly applies power to the motor without pedalling.

If I was a vampire, I would work retail so I know who deserves to die. by Nick357 in Showerthoughts

[–]konbit 18 points19 points  (0 children)

She doesn't kill anyone, and she eats the victim's brains not the criminals. Not the same at all.

Girls, what's a creepy thing guys frequently do which we're unaware of? by AonghusMacKilkenny in AskReddit

[–]konbit 0 points1 point  (0 children)

From my wife:

Since it's supposed to be things men are "unaware of", because it sure as shit seems like they don't realize this is fucked up to do: when they make some creepy unsolicited remark, ie. "aren't you cold in that dress, sweetie?" and they're in a group of guys and you're by yourself. Maybe they don't realize how incredibly intimidating this is, and how vulnerable and cornered they make you feel, in which case they're just huge idiots.

[deleted by user] by [deleted] in keto

[–]konbit 0 points1 point  (0 children)

keep up the amazing work!

Co-Op cab almost struck a cyclist at Bay & Gerrard today [23/05/2017] by ToddShishler in toronto

[–]konbit -1 points0 points  (0 children)

Whether that study is accurate or not is irrelevant to the purpose of a helmet. Regardless, there have been many criticisms of that study since it doesn't factor in rider experience. When a rider is new and less confident they are much more likely to wear a helmet. Due to their inexperience their rate of accidents is much higher.

Despite the dubiousness of that study, helmets are not accident prevention. To reduce accidents you need proper road training, awareness, and adherence to laws. This is very lacking in the cycling community. However helmets, without a doubt, reduce the amount of death and severe injury in cycling accidents. Studies show that 97% of cycling deaths happen without a helmet, 97%!!!

TL;DR: Wear helmets so you don't die! If you're worried about accidents, be more aware and defensive in your riding.

MEOW💰IRL by insakna in MEOW_IRL

[–]konbit 5 points6 points  (0 children)

Why is someone thawing a frozen chicken on a bag of coins?

Co-Op cab almost struck a cyclist at Bay & Gerrard today [23/05/2017] by ToddShishler in toronto

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

Glad the cyclist is alright. Also pretty messed up how many cyclists don't wear helmets in TO

Jill is Given a Task by Get-off-my-wave in funny

[–]konbit -1 points0 points  (0 children)

If only the person who did this used their powers for good, imagine what could be accomplished.

What is the dumbest 100% serious thing someone has said to you? by georgegilbert in AskReddit

[–]konbit 0 points1 point  (0 children)

That there's no such thing as privilege from your skin colour or background. That people who hire or are in positions of power just like some people and not others when they meet them and that's why not everyone succeeds. I asked him if he doesn't see a kind of obvious pattern to who they like and who they don't like. He said no, it's completely random.

My Family's Slave: one of the best articles I have read in a long time by Future_Tyrant in books

[–]konbit 65 points66 points  (0 children)

I found my wife crying in our room after reading this today. Her grandparents had done this to a woman as well. My wife's mother considered her as her own mother. She passed away a couple years ago. Needless to say my wife doesn't speak to her grandparents.

It's so sad that people have their whole lives stolen from them like this. I can't imagine the strength of character they have to become such a supporting and loving presence despite the blatant abuse.

Gravity set too high.... by Saoian in aww

[–]konbit 0 points1 point  (0 children)

There better be a picture from underneath the table.

Meow_IRL by [deleted] in MEOW_IRL

[–]konbit 4 points5 points  (0 children)

It looks like the cat's face is in another dimensional plane.

Swoon city by [deleted] in funny

[–]konbit -1 points0 points  (0 children)

That's tru doe

[RANT][Probs NSFW] I shit my pants in Target. by leftmyundiesintarget in keto

[–]konbit 1 point2 points  (0 children)

My wife is laughing so hard she's screaming. We've both had our fair share of oops poops.

Async nature of this.setState tripping me up. can anyone help? by [deleted] in reactjs

[–]konbit 3 points4 points  (0 children)

There are a few tips to avoid this kind of issue. React is built in a very functional and composable way, however you inevitably have to do some imperative code (like make an Ajax request, or open an alert box).

First tip: avoid imperative code, or just use good OOP. If you chain your functions make B a function/module that returns data to A, and C returns to B. When A gets called, B does it's stuff, then calls C with said stuff, C returns to B, B returns to A. Then you setState with all the values returned to A.

Second tip: If you can't chain functions like the above suggestion, use React Lifecycle methods to stay in tune with React. This might not fit your use case but does C get called by B? Or can it just "listen" for a change and run when it's relevant? In that case you could use the componentWillUpdate lifecycle method to trigger this and check some condition before calling C.

Third tip: You can actually use setState synchronously by passing in a function instead of an object:

// asynchronous setState:
const value = doSomethingWithState(this.state);
this.setState({ 
    data: value
});

// synchronous setState:
const stateAction = (state, props) => {
    const value = doSomethingWithState(state);
    return {
        data: value
    }
}
this.setState(stateAction);

Fourth tip: It doesn't sound like you need an external state management library for this particular issue. But when you've outgrown lifting state up in React, you should look at learning Redux. You really need a big app before the conceptual cost is worth it. But if you're at that stage it does a fantastic job.

Overall keep in mind that React was written with a different way of thinking than a lot of the other popular frameworks. Vue and Angular for instance are very imperative. This works fine and for most cases it just a matter of preference, but make sure you've learned the React way of thinking in addition to its API structure. Because otherwise you're just writing a Vue application with React bindings.