114
u/mlebkowski Sep 19 '20
Yes, you’re half way to an expert if you’re past page 3 of the docs
74
Sep 19 '20
That’s why it’s labeled Dunning Kruger effect — the fact that they labeled what you learn in the first hour as expert is very Dunning Kruger of them
76
Sep 19 '20
Sorry to let you know, but you haven't even reached the peak of Mt Stupid yet
5
u/AmatureProgrammer Sep 19 '20
How do you know you reached the peak?
18
5
Sep 20 '20
There is no mt stupid. When people say that this is what they often are referring to but in reality this is what the study actually found.
Yes people disproportionately overestimate thier ability the lower thier actual ability is but there isn't really a peak, basically you will overestimate your ability less and less the more competent you are until you're under estimating it.
29
u/CorstianBoerman Sep 19 '20
Even after writing thousands of lines using frameworks such as Vue and React I still feel like I'm barely starting out. Heck, I haven't even gotten to dive into proper state management yet 😅
4
u/reallydarnconfused Sep 19 '20
After working on multiple react projects both personally and professionally, I still feel like a total noob sometimes.
1
u/peaceful_friend Sep 20 '20
Probably best bets these days are redux toolkit or redux observable depending on if you’re building a crud app or something super interactive.
0
u/CorstianBoerman Sep 20 '20
I'm currently primarily using local state, and I'm already building stuff that's more interactive than anything I have ever built. How can those libraries help me make something even more interactive?
1
u/peaceful_friend Sep 20 '20 edited Sep 20 '20
Local state is fine. I use both for different things. Interactivity isn’t the metric that matters to me as I’m working on a large complicated crud app. For me it’s quality and speed of delivery for large codebases built by large teams. In that case a cohesive data model is the crucial aspect of the architecture.
If you’re building a crud app and need the above, would recommend redux toolkit. Interactivity needing rxjs would be something like a web socket based multi user collaboration app or something to that effect.
-1
u/CorstianBoerman Sep 20 '20
Is it reasonable to separate the data model into two categorizations; a model which describes application state, as well as a model represented through an API?
While we're at it about CRUD, how do people manage to keep on writing almost the same but not exactly the same functionality? After two CRUD features I get bored and try to avoid doing any more as if it's COVID.
0
Sep 19 '20
[deleted]
10
u/JoeCamRoberon Sep 20 '20
Everyone hates on Redux but the haters usually have never heard of Redux Toolkit. React Context is also fine depending on the size of your project.
2
Sep 20 '20
I started to get comfortable with
reduxafter I adopted RTK. I think a lot of people feel the same way.3
u/Trout_Tickler Sep 20 '20 edited Sep 20 '20
You can even mock up your own mini Redux using React Context.
export const Store = createContext(undefined); export const StoreProvider = (props) => { const [ state, dispatch ] = useReducer(reducer, initialState as never); const value = { state, dispatch }; return <Store.Provider value={value}>{props.children}</Store.Provider>; };Then for usage
const { state, dispatch } = useContext(Store);I just needed a simple store in one place of one of our apps, Redux was too complex and normal context got quite messy.
0
u/CorstianBoerman Sep 20 '20
I understand why having immutable state is beneficial, and I use it almost exclusively, however, I haven't really found an application for a global (state?) store yet. I just have no idea how it would possibly help me.
1
Sep 20 '20
Wat?
Do you not have arbitrary data that needs to be shared across arbitrary non hierarchical components and could be updated from an arbitrary number of locations?
Like an “event” might show up on a calendar, in a drawer, in a list, in a modal. I guess I’m confused as to how that situation doesn’t come up in a lot of apps?
1
u/CorstianBoerman Sep 20 '20
Well, thinking about it I have a whole series of components which all accept a data object as prop. Currently I create most features through composition. Have I been doing that wrong, or at least in a more complex way than necessary all along?
1
Sep 20 '20
So are you passing props through components that don’t use them?
That’s not exactly “wrong” but it can result in some awkwardness.
For example, it reduces the reusability your components as prop pass through like that sort of implicitly couples them.
You end up smearing implementation details of a component up into the parent.
Another approach is to use a normalized state shape. ( google normalizer, or read about it in the redux documentation)
Essentially instead of nesting objects, you flatten your state much like you would a relational database. Then your components really only need to pass ids around rather than whole objects. This tremendously simplifies component reuse. It also means you keep your logic near where it is used thus making your whole codebase easier to reason about.
1
u/CorstianBoerman Sep 20 '20
That's pretty insightful. It's a bit more tidied up than you describe it, but I get the gist. Given I'm using Apollo GraphQL including caching it might be more reasonable to add a proxy, check the cache and add fallback logic to retrieve certain objects. I agree things would be more simple if I'd start passing cursors around instead.
1
Sep 20 '20
Redux with proper normalized state and re reselect for memorized selectors is pretty great. I’d recommend it pretty strongly.
0
Sep 19 '20
[deleted]
12
u/myWeedAccountMaaaaan Sep 19 '20
This is why I’ve been loving using contexts. It’s isolated, easy to maintain (so far), and requires a lot less overhead than redux type state managers.
1
u/Nullberri Sep 19 '20
Its great for globally available data that rarely or never changes. Or where the entire tree below the context would all want to change if the context changed. Think themes, flags, etc.
We have a top level is automation context which if true lets our components know to expand everything on render and disable table virtualization.
12
u/sxeli Sep 19 '20
Next task in that curve would be “I pretty much have good idea about things, let me create my own framework/ package”
8
u/jpflathead Sep 19 '20
fwiw: dunning kruger fails to replicate
The Dunning-Kruger effect is (mostly) a statistical artefact: Valid approaches to testing the hypothesis with individual differences data
https://www.sciencedirect.com/science/article/abs/pii/S0160289620300271?via%3Dihub#f0005
Highlights
• Conventional tests of the Dunning-Kruger hypothesis are shown to be confounded.
• The Glejser test is argued to be a valid test of the Dunning-Kruger hypothesis.
• Nonlinear regression is argued to be a valid test of the Dunning-Kruger hypothesis.
• Failed to identify the Dunning-Kruger effect with IQ data and both valid tests.
insert recursion jokes about dunning kruger
1
u/intercaetera Sep 20 '20
Most phenomena in social "sciences" tend to be anectodal. But at least in this case the buzz around it serves to teach people humiliity (at the expense of common lack of humility on behalf of the people writing these blog post), so it's not that bad.
(Also I must be a hypocrite because I wrote a blog post about it as well).
1
u/jpflathead Sep 20 '20
Most phenomena in social "sciences" tend to be anectodal. But at least in this case the buzz around it serves to teach people humiliity (at the expense of common lack of humility on behalf of the people writing these blog post), so it's not that bad.
Hmm, my first observation is that DKE references on social media is mostly sneering and mockery.
My second observation is that DKE references on social media are often by people I suspect wouldn't be happy to find out their own level of ignorance on a subject
But what do I know, ymmv
8
11
u/MustardForBreakfast Sep 20 '20
Wheres the rest of the curve?
- "I'll just add another 20 lines to `App.jsx` just this once. Like last time."
- "Tests? Lol, its just a UI!"
- "How much web could a webpack pack if a webpack could pack web?"
- "Mutable global state will be fine instead of `redux`, I only need it for this one little thing..."
- "Eject! Wait... what is all this stuff?"
- " 'Server Side Rendering'? Are you some kind of idiot?"
- "Why did I ever think `redux-form` was a good idea?!"
- "They're deprecating all my lifecycle methods?!"
- "Whats a 'Time to First Interactive', and why is ours in the toilet?"
- ...
- Then you give up, rewrite everything in Svelte, and the wheel comes round again!
4
4
3
3
3
u/tobias-hoegh Sep 20 '20
Learn React in 10 tweets (with hooks) https://twitter.com/chrisachard/status/1175022111758442497
3
u/AkhilxNair Sep 20 '20
Enter Redux: Back to 0
I've learned React with all the Hooks, Next JS, Gatsby, some Node JS but when it comes to redux I have no idea what's going on, I've tried to understand it like 3 times but back to zero after 2 days.
So anyone has any good tutorial ? or should I just stick to context API?
2
u/dance2die Sep 19 '20
I don't think the graph is scaled correctly ;p
The 100% peak to experience feels much shorter for me while Experience -> Expert is about 100x the length :)
j/k Nice graph there.
2
u/thestareater Sep 19 '20
I understand props and states (I think) and I definitely feel nowhere near close to being proficient. This graph seems misleading as I'm definitely not even close to like halfway or even a third of the way of being an "expert"
2
2
2
2
2
2
2
2
u/evenisto Sep 19 '20
I don't get it, what problems exactly do you guys have with react anyway? It's one of the most straightforward technologies in existence right now, there is literally nothing to it - return shit that basically looks like html from a function, call a function then call the function it gave you and your shit will update. That's it, you know everything you need to build a todo app.
7
u/reallydarnconfused Sep 19 '20
I think on the base level, React is pretty simple to understand. But the thing is if you want to work on it in a professional setting, it can get complicated real quickly. For example, you can go through like ten levels of components, have multiple reducer states through redux/hooks, run into shit like "useImperativeHandle" and maybe have to debug through components that are thousands of lines long and handle way too much logic in one file.
0
u/Nullberri Sep 19 '20
Sounds like you’re not doing good code reviews cause i call that shit out every time.
3
u/reallydarnconfused Sep 19 '20
Sometimes you don't have a choice if you're going back to legacy code.
1
u/evenisto Sep 20 '20
Man I wish legacy in our company was react. All the react we have is my code and it's the nicest thing to work with compared to all the other 5000 loc php script controllers with every antipattern you can think of, and domains where oop is nonexistent or an afterthought.
6
1
u/kevv877 Sep 19 '20
I was just taking a break from a uni homework I have about this exact same topic... And I found this just randomly scrolling.
Coincidence? I dont think so. Reddit listens.
1
1
1
1
u/deprecatednick Sep 20 '20
You forgot about watching endless hours of videos on whether to use Redux or React Context. (As well as watching videos about whether Redux is dead).
1
1
1
u/MrBr7 Sep 20 '20
If you fallback to jQuery today you are missing the point for the last few years.
1
1
u/teophilus Sep 20 '20
It's been a year and I can't figure Redux out
2
u/skaNerd Sep 20 '20
look into rematch js, it's a wrapper library around Redux. it combines the action types, action creators, and reducers into just reducers and async side effects/reducers as effects, and it may help you understand and use Redux through this higher abstracted level, then once you understand how to use rematch and what it's doing, you can piece together how rematch is providing an abstraction over a couple aspects of Redux. just my advice, and even though I tried to learn the Redux library first, I didn't quite understand it strongly before implementing and using rematch instead, and as I started learning rematch everything clicked fairly quickly. I believe the same may apply to you as I struggled a bit with Redux first couple months of learning it as well, my mental model was not strong, and rematch helped simplify that enough to work through my misunderstandings.
1
1
u/rubennaatje Sep 20 '20
Probably correct but the scale is wayyy off. The things being named are all actually in the first curve
0
-1
u/superonom Sep 20 '20
Op's chart shows that he's deeply affected by the Dunning Kruger effect. "I know the difference between props and state, therefore I'm an expert who just need to Google more" lol
1
u/ronaldl911 Sep 20 '20
It's meant to be a joke by the way. ;)
0
u/superonom Sep 20 '20
So your chart about the Dunning Kruger effect is intentionally affected by the Dunning Kruger effect? I'm an expert on Dunning Kruger effect, and I can say that this comment is not affected by the Dunning Kruger effect.
0
484
u/YannieTheYannitor Sep 19 '20
If you think knowing the difference between state and props puts you 70% of the way to expert, I have some bad news for you.