当前位置:网站首页>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 .
边栏推荐
- 包管理工具
- JDBC 预防sql注入问题与解决方法[PreparedStatement]
- Multiply LCA (nearest common ancestor)
- This "little routine" is set on the dough cake of instant noodles. No wonder programmers are always hungry
- String palindrome hash template question o (1) judge whether the string is palindrome
- 单指令多数据SIMD的SSE/AVX指令集和API
- Distributed machine learning framework and high-dimensional real-time recommendation system
- Drools dynamically add, modify, and delete rules
- Drools executes the specified rule
- LeetCode—剑指 Offer 37、38
猜你喜欢
堆 AcWing 839. 模拟堆
PR 2021 quick start tutorial, learn about the and functions of the timeline panel
"As a junior college student, I found out how difficult it is to counter attack after graduation."
线性DP AcWing 899. 编辑距离
Enhance network security of kubernetes with cilium
bellman-ford AcWing 853. 有边数限制的最短路
防抖 节流
1380. Lucky numbers in the matrix [two-dimensional array, matrix]
What is the relationship between NFT and metauniverse? How to view the market? The future market trend of NFT
AI中台技术调研
随机推荐
Window10 upgrade encountered a big hole error code: 0xc000000e perfect solution
async/await 异步函数
Sse/avx instruction set and API of SIMD
The differences and relationships among port, targetport, nodeport and containerport in kubenetes
The second composition template of postgraduate entrance examination English / chart composition, English chart composition is enough
drools执行完某个规则后终止别的规则执行
Direct control PTZ PTZ PTZ PTZ camera debugging (c)
Performance tuning project case
Docker compose configuration mysql, redis, mongodb
Redis sentinel mechanism and configuration
应用LNK306GN-TL 转换器、非隔离电源
传感器 ADXL335BCPZ-RL7 3轴 加速度计 符合 RoHS/WEEE
Embedded Software Engineer career planning
arcgis js 4.x 地图中加入图片
模数转换器(ADC) ADE7913ARIZ 专为三相电能计量应用而设计
Fastdateformat why thread safe
Distributed machine learning framework and high-dimensional real-time recommendation system
Less than three months after the programmer was hired, the boss wanted to launch the app within one month. If he was dissatisfied, he was dismissed immediately
Simple use of drools decision table
Writing method of then part in drools