From eeda679e35ed025ba6c38f6b6f09a138f72b7240 Mon Sep 17 00:00:00 2001 From: Isabelle Viktoria Maciohsek Date: Fri, 19 Aug 2022 10:49:14 +0300 Subject: [PATCH 1/5] Update javascript-boolean-trap.md --- blog_posts/javascript-boolean-trap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog_posts/javascript-boolean-trap.md b/blog_posts/javascript-boolean-trap.md index 0caa21931..da160fdbc 100644 --- a/blog_posts/javascript-boolean-trap.md +++ b/blog_posts/javascript-boolean-trap.md @@ -6,7 +6,7 @@ tags: javascript,function,type,boolean expertise: advanced author: chalarangelo cover: blog_images/lighthouse.jpg -excerpt: Boolean traps can cause readabiltiy and maintainability issues in your code. Learn what they are, how to spot and fix them in this article. +excerpt: Boolean traps can cause readability and maintainability issues in your code. Learn what they are, how to spot and fix them in this article. firstSeen: 2021-07-11T05:00:00-04:00 --- From c2b686b560d9cc6dce32d3f13136e1e3b3b41ae8 Mon Sep 17 00:00:00 2001 From: Isabelle Viktoria Maciohsek Date: Fri, 19 Aug 2022 10:54:26 +0300 Subject: [PATCH 2/5] Update javascript-classical-vs-prototypal-inheritance.md --- blog_posts/javascript-classical-vs-prototypal-inheritance.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog_posts/javascript-classical-vs-prototypal-inheritance.md b/blog_posts/javascript-classical-vs-prototypal-inheritance.md index 27430cd16..f1f7e9968 100644 --- a/blog_posts/javascript-classical-vs-prototypal-inheritance.md +++ b/blog_posts/javascript-classical-vs-prototypal-inheritance.md @@ -6,7 +6,7 @@ tags: javascript,object,class expertise: intermediate author: chalarangelo cover: blog_images/last-light.jpg -excerpt: Understading the difference between these two object-oriented programming paradigms is key to taking your skills to the next level. +excerpt: Understanding the difference between these two object-oriented programming paradigms is key to taking your skills to the next level. firstSeen: 2021-11-21T05:00:00-04:00 --- From c2454f0d438dcd402775eeaa0a7bac01bf6b5c5e Mon Sep 17 00:00:00 2001 From: Isabelle Viktoria Maciohsek Date: Fri, 19 Aug 2022 10:56:03 +0300 Subject: [PATCH 3/5] Update javascript-enum.md --- blog_posts/javascript-enum.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog_posts/javascript-enum.md b/blog_posts/javascript-enum.md index 2aefec4da..8a79ae2da 100644 --- a/blog_posts/javascript-enum.md +++ b/blog_posts/javascript-enum.md @@ -6,7 +6,7 @@ tags: javascript,object,class,symbol,generator expertise: intermediate author: chalarangelo cover: blog_images/book-chair.jpg -excerpt: Enums are part of TypeScript, but what about defininf enums in plain old JavaScript? Here are a few way you can do that. +excerpt: Enums are part of TypeScript, but what about defining enums in plain old JavaScript? Here are a few way you can do that. firstSeen: 2021-05-24T12:00:00+03:00 lastUpdated: 2021-06-12T19:30:41+03:00 --- From 579f3638452b090a61c7cb5f28fbe5a0f66d4fc3 Mon Sep 17 00:00:00 2001 From: Isabelle Viktoria Maciohsek Date: Fri, 19 Aug 2022 11:02:30 +0300 Subject: [PATCH 4/5] Update js-data-structures-binary-search-tree.md --- blog_posts/js-data-structures-binary-search-tree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog_posts/js-data-structures-binary-search-tree.md b/blog_posts/js-data-structures-binary-search-tree.md index 932bb9ad3..addcc32c5 100644 --- a/blog_posts/js-data-structures-binary-search-tree.md +++ b/blog_posts/js-data-structures-binary-search-tree.md @@ -12,7 +12,7 @@ firstSeen: 2021-08-31T05:00:00-04:00 ### Definition -A binary search tree is a data structure consisting of a set of orderd linked nodes that represent a hierarchical tree structure. Each node is linked to others via parent-children relationship. Any given node can have at most two children (left and right). The first node in the binary search tree is the root, whereas nodes without any children are the leaves. The binary search tree is organized in such a way that for any given node, all nodes in its left subtree have a key less than itself and all nodes in its right subtree have a key greater than itself. +A binary search tree is a data structure consisting of a set of ordered linked nodes that represent a hierarchical tree structure. Each node is linked to others via parent-children relationship. Any given node can have at most two children (left and right). The first node in the binary search tree is the root, whereas nodes without any children are the leaves. The binary search tree is organized in such a way that for any given node, all nodes in its left subtree have a key less than itself and all nodes in its right subtree have a key greater than itself. ![JavaScript Binary Search Tree visualization](./blog_images/ds-binary-search-tree.png) From ec18cb398b619926169a6e67a38ef4ba400431cd Mon Sep 17 00:00:00 2001 From: Isabelle Viktoria Maciohsek Date: Fri, 19 Aug 2022 11:03:23 +0300 Subject: [PATCH 5/5] Update react-redux-readable-reducers.md --- blog_posts/react-redux-readable-reducers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog_posts/react-redux-readable-reducers.md b/blog_posts/react-redux-readable-reducers.md index 29a45ae98..12d12f900 100644 --- a/blog_posts/react-redux-readable-reducers.md +++ b/blog_posts/react-redux-readable-reducers.md @@ -64,7 +64,7 @@ const reducer = (state = initialState, action) => { While the code in the example is not that complicated right now, complexity can increase very fast as more action types need to be handled by our application. This is due to the fact that each `action.type`'s logic is nested inside the `reducer` function, thus adding more code and complexity with each new action. -Another issue we can identify is that each `action` has a different structure, which increases congitive load for future maintainers, as they have to remember what keys their `action` needs to have. There's also the added issue of running into a case where `action.type` might be needed to pass actual data to the state (i.e. `state.type` could exist). +Another issue we can identify is that each `action` has a different structure, which increases cognitive load for future maintainers, as they have to remember what keys their `action` needs to have. There's also the added issue of running into a case where `action.type` might be needed to pass actual data to the state (i.e. `state.type` could exist). Finally, our `action.type` values are hardcoded inside the `reducer` function, making it hard to remember and sync across other files and components. This might seem like the least of our problems, but it's probably the easiest one to fix, so let's start there.