N
N
Nick Fisher2018-12-28 23:45:15
JavaScript
Nick Fisher, 2018-12-28 23:45:15

How to learn to write abstract code?

Good day. I recently got my first job and this is immediately a relatively large project on the react / redux stack where there is a lot of abstract logic (including business) and it’s very hard for me to understand all this, because. before that, in their home projects, everything was completely different. I understand how these functions / components work, I understand why they are the way they are, but could you recommend any materials (videos / books / articles) on this topic, because. I, at the moment, practically cannot write just such code, where there is a lot of reuse, a lot of abstractions, a lot of functional approach. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex, 2018-12-29
@Alex_At_Net

I can advise while writing code to think about testing - how exactly to write a unit test for a specific function. Or how to write a test that emulates some process in which several elements participate. If the application uses UI or DB, then how to test without them? What this will lead to is that you will think of the code as a collection of agents or some functions with low coupling. Those. each of them can be abstracted, replaced, refactored, etc.

A
Artemy, 2018-12-29
@MetaAbstract

Abstract code is obtained by extracting abstractions from the existing code, through parameterization of invariants.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question