B
B
BadCats2020-08-24 21:30:30
IT education
BadCats, 2020-08-24 21:30:30

How to develop the skill of splitting entities into abstractions?

I'll give an example:

  • Let's say we have a kitchen faucet. Personally, I managed to highlight the following characteristics from him:
  • Throughput - liter/hour
  • Mixer type - two-valve / single lever
  • steel grade
  • Dimensions - peak height
  • Manufacturer
  • Claimed service life
  • Price

An example closer to programming:
A program for "cleaning" data in files of various formats - txt, xlsx, accdb
Requirements that I managed to formulate and that the system should have:
  • The whole system should be divided into 4 separate classes-blocks:


  • Class for reading data, regardless of the format:

  1. Directly, reads data into the container at the given separator (for txt)
  2. Allows you to conveniently and flexibly work with the file system - recursively bypassing directories, reading and searching only for files of a given type/-s

  • Class for data preprocessing and normalization:

  1. Delete empty entries.
  2. Bring all lines to the same form.

  • A class for working directly with prepared data, which is fed a list of "jobs" for each element of the container - for example, a list of pointers to methods that will be applied to certain elements.

  • A class for convenient creation of a table by passing one of the class methods to the sql query method as a string.

These are the examples I'm talking about.
How to learn to immediately analyze the task or problem in a similar, engineering way?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Ronald McDonald, 2020-08-24
@BadCats

A familiar state, encountered him at the dawn of a pogromist.
Answer: practice. More practice. Even more practice.
Any training and brain training is a mechanical repetition of certain cases, there is no new technique.

X
xmoonlight, 2020-08-24
@xmoonlight

Program for "cleaning" data in files of different formats - txt, xlsx, accdb

1. Give the definition of the final result - "cleaned" data.
2. What needs to be done in advance in order to be able to implement the current step on the previous one?
Those. analysis is done in the opposite direction: from the specifics (from the ultimate goal of the task) to the set of abstractions (to the formulation / formulation of the original task).

D
Dmtm, 2020-08-25
@Dmtm

>Personally, I managed to identify the following characteristics from him:
a meaningless set of parameters ;
we work with models
; any model is one of the possible representations of a real object,
i.e. the model by definition is limited
and the selected set of model properties depends only on the task
, so the manufacturer and throughput are not needed to account for scrap metal. The
second part of the reasoning is the application architecture, MVC, MVP and all that, keywords - layers and area of ​​responsibility

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question