当前位置:网站首页>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 .
边栏推荐
- Use MySQL events to regularly perform post seven world line tasks
- 线性DP AcWing 895. 最长上升子序列
- arcgis js 4.x 地图中加入图片
- Redis sentinel mechanism and configuration
- 基于STM32的OLED 屏幕驱动
- Use sqoop to export ads layer data to MySQL
- Docker compose configuration mysql, redis, mongodb
- drools中then部分的写法
- [ybtoj advanced training guidance] judgment overflow [error]
- 传感器 ADXL335BCPZ-RL7 3轴 加速度计 符合 RoHS/WEEE
猜你喜欢

应用LNK306GN-TL 转换器、非隔离电源

arcgis js 4. Add pictures to x map

Record the range of data that MySQL update will lock

寻找二叉树中任意两个数的公共祖先

浏览器存储方案

染色法判定二分图 AcWing 860. 染色法判定二分图

Go学习笔记—多线程
![[ybtoj advanced training guidance] judgment overflow [error]](/img/be/bbe357ac2f2a8839afc5af47db88d0.jpg)
[ybtoj advanced training guidance] judgment overflow [error]

Rust search server, rust quick service finding tutorial

spfa AcWing 852. spfa判断负环
随机推荐
哈希表 AcWing 841. 字符串哈希
Lekao: 22 year first-class fire engineer "technical practice" knowledge points
[I'm a mound pytorch tutorial] learning notes
Anxiety of a 211 programmer: working for 3 years with a monthly salary of less than 30000, worried about being replaced by fresh students
Lekao.com: experience sharing of junior economists and previous candidates in customs clearance
Drools dynamically add, modify, and delete rules
Drools executes string rules or executes a rule file
中国交通标志检测数据集
深拷贝 事件总线
Simple use of drools decision table
[FFH] little bear driver calling process (take calling LED light driver as an example)
Performance tuning project case
This "little routine" is set on the dough cake of instant noodles. No wonder programmers are always hungry
Redis avalanche, penetration, breakdown
Does C language srand need to reseed? Should srand be placed in the loop? Pseudo random function Rand
LeetCode—<动态规划专项>剑指 Offer 19、49、60
spfa AcWing 851. spfa求最短路
arcgis js 4. Add pictures to x map
趣味 面试题
Why do programmers have the idea that code can run without moving? Is it poisonous? Or what?