当前位置:网站首页>Some sudden program ideas (modular processing)
Some sudden program ideas (modular processing)
2022-07-02 12:41:00 【By the Difeng River】
Today I am testing the algorithm program I have written , But it takes a long time for the whole program to run smoothly (10~30 minute ).
I'm thinking about how to test a certain part of the program , That is, the one with problems .
1. Step by step debugging
Single step debugging is really good , It can check the real-time data running to a certain row , But if my program is in Posterior half fault If something goes wrong , Don't I have to wait until the program runs later to debug ? This is obviously inefficient for such a long program ( Don't ask me how I know )
2. Program modularization ( High cohesion and low coupling )
In fact, my algorithm program can be roughly divided into two modules: operation and drawing , But for now , Drawing depends on the result of the operation , Call the result data to run , The coupling of writing is too high , The maintenance cost and readability of the program have become lower . I should Implementation allows each module to complete specific sub functions as independently as possible .
Let the operation module generate a Drawing needs csv file , Then draw by reading this file . Instead of directly calling the result data .
In this way, when the operation module outputs normally , Just test the problematic drawing module .
边栏推荐
- 上传文件时,服务器报错:IOFileUploadException: Processing of multipart/form-data request failed. 设备上没有空间
- Leetcode - Sword finger offer 59 - I, 59 - II
- There is a hidden danger in CDH: the exchange memory used by the process of this role is XX megabytes. Warning threshold: 200 bytes
- 模块化 CommonJS ES Module
- Interview with meituan, a 34 year old programmer, was rejected: only those under the age of 30 who work hard and earn little overtime
- Lekao.com: experience sharing of junior economists and previous candidates in customs clearance
- Does C language srand need to reseed? Should srand be placed in the loop? Pseudo random function Rand
- drools执行指定的规则
- 接口测试面试题目,你都会了吗?
- Adding database driver to sqoop of cdh6
猜你喜欢

深拷貝 事件總線

浏览器node事件循环

浏览器存储方案

Drools dynamically add, modify, and delete rules

Writing method of then part in drools

Lekao.com: experience sharing of junior economists and previous candidates in customs clearance

Discrimination of the interval of dichotomy question brushing record (Luogu question sheet)

Redis sentinel mechanism and configuration

AAAI 2022 | Peking University & Ali Dharma Institute: pruning and compression of pre training language model based on comparative learning

In development, why do you find someone who is paid more than you but doesn't write any code?
随机推荐
Anxiety of a 211 programmer: working for 3 years with a monthly salary of less than 30000, worried about being replaced by fresh students
Performance tuning project case
Find the common ancestor of any two numbers in a binary tree
1380. Lucky numbers in the matrix [two-dimensional array, matrix]
LTC3307AHV 符合EMI标准,降压转换器 QCA7005-AL33 PHY
浏览器node事件循环
Go学习笔记—多线程
Redis introduction, scenario and data type
染色法判定二分图 AcWing 860. 染色法判定二分图
Lekao.com: experience sharing of junior economists and previous candidates in customs clearance
线性DP AcWing 896. 最长上升子序列 II
The differences and relationships among port, targetport, nodeport and containerport in kubenetes
drools执行完某个规则后终止别的规则执行
What data types does redis have and their application scenarios
China traffic sign detection data set
VLAN experiment
kubeadm join时出现错误:[ERROR Port-10250]: Port 10250 is in use [ERROR FileAvailable--etc-kubernetes-pki
PR 2021 quick start tutorial, learn about the and functions of the timeline panel
LeetCode—剑指 Offer 59 - I、59 - II
Mui WebView down refresh pull-up load implementation