- What part specifically seems to be confusing?
- Sometimes this works, but often the answer is "the whole thing". I have been in meetings with 5 other programmers, where all of the programmers agreed they didn't understand my code, but none of them could give any specifics parts which were confusing.
- Are you familiar with conceptpattern "X"?
- I have tried to learn the names of the coding patterns I tend to use. I will bring up these names, such as "the visitor pattern", and ask them if they are familiar with this pattern. If they are familiar with it I try to show them how my code is an implementation of that pattern. This seems to stop them from immediately asking more questions, but invariably we seem to come back to the same code, and so I am afraid while they fully understand the pattern, the connection between the pattern and my code is not obvious.
- What are some solutions to problem "X"?
- Sometimes I try to get them to actively engage with solving the general problem, hoping that if they explain how they would solve it, I can show them the parallels between their solution and mine. This works, however often times the problem is a bit too complicated to just solve in your head, and so they can't quickly describe how they would solve it.
An example of existing code can be found here: hereoriginal code
I am opposed to this style, as although it is clear, it meant adding a new property requiredrequires changing 4 pieces of code, (spread across 3 different files) to add a variable. The steps to adding a new variables are: update the state definition, addingadd a new action, addingadd to the actions union, and addingadd a reducer handler.
A recreation of my proposed code can be found: herechanged code