You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
-
21A code sample people find confusing would be quite helpful.whatsisname– whatsisname2020-06-17 05:15:54 +00:00Commented Jun 17, 2020 at 5:15
-
10Also, what sort of code are you writing? Code that is difficult to understand because it's applying a Heisenberg crossover compensation on the subspace plasma relay is going to have a different set of challenges than code that is difficult to understand because it uses esotheric language features or non-idiomatic code for more ordinary situations.whatsisname– whatsisname2020-06-17 05:22:33 +00:00Commented Jun 17, 2020 at 5:22
-
12"Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live."user949300– user9493002020-06-17 05:57:24 +00:00Commented Jun 17, 2020 at 5:57
-
7I have never used TypeScript for anything, but by analogy with many other languages your original code sample is perfectly clear and understandable. On the other hand your "improved" version is, bluntly, an obfuscated incomprehensible mess. If I was your team leader and you did that more than once, you would be looking for other employment. Hiring a replacement is often easier than trying to convert someone who might be a genius, or might be a fool, into a useful team player.alephzero– alephzero2020-06-17 21:13:44 +00:00Commented Jun 17, 2020 at 21:13
-
6Your code is more complicated than the brain-dead original, but not that complicated. I wonder if maybe your colleagues' confusion could be about what you are trying to solve (i.e. they don't feel the pain you are treating) rather than what your code actually does? But at the same time, I also wonder if they may be right - how many brain-dead reducers do you really have, how often do they change in ways your code would help with?Jacob is on Codidact– Jacob is on Codidact2020-06-29 18:14:36 +00:00Commented Jun 29, 2020 at 18:14
|
Show 13 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
-
create code fences with backticks ` or tildes ~
```
like so
``` -
add language identifier to highlight code
```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible)
<https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you