当前位置:网站首页>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 .
边栏推荐
- drools动态增加、修改、删除规则
- arcgis js 4. Add pictures to x map
- Redis introduction, scenario and data type
- Is the neural network (pinn) with embedded physical knowledge a pit?
- 线性DP AcWing 896. 最长上升子序列 II
- The differences and relationships among port, targetport, nodeport and containerport in kubenetes
- Deep copy event bus
- bellman-ford AcWing 853. 有边数限制的最短路
- FBX import under ue4/ue5 runtime
- PR 2021 quick start tutorial, learn about the and functions of the timeline panel
猜你喜欢

模数转换器(ADC) ADE7913ARIZ 专为三相电能计量应用而设计

VLAN experiment

线性DP AcWing 899. 编辑距离
![[ybtoj advanced training guidance] cross the river [BFS]](/img/4e/83f14452ea6410768cdd01e725af2e.jpg)
[ybtoj advanced training guidance] cross the river [BFS]

PR 2021 quick start tutorial, learn about the and functions of the timeline panel

There is a hidden danger in CDH: the exchange memory used by the process of this role is XX megabytes. Warning threshold: 200 bytes

JS6day(DOM结点的查找、增加、删除。实例化时间,时间戳,时间戳的案例,重绘和回流)

Simple understanding of ThreadLocal

Distributed machine learning framework and high-dimensional real-time recommendation system
![[FFH] little bear driver calling process (take calling LED light driver as an example)](/img/e7/153ae9f1befc12825d277620049f9d.jpg)
[FFH] little bear driver calling process (take calling LED light driver as an example)
随机推荐
Sparkcontext: error initializing sparkcontext solution
Shutter encapsulated button
Redis sentinel mechanism and configuration
SparkContext: Error initializing SparkContext解决方法
spfa AcWing 851. spfa求最短路
线性DP AcWing 902. 最短编辑距离
Simple understanding of ThreadLocal
堆 AcWing 839. 模拟堆
防抖 节流
kubenetes中port、targetPort、nodePort、containerPort的区别与联系
Docker compose configuration mysql, redis, mongodb
[I'm a mound pytorch tutorial] learning notes
H5 to app
Win10 system OmniPeek wireless packet capturing network card driver failed to install due to digital signature problem solution
Redis transaction mechanism implementation process and principle, and use transaction mechanism to prevent inventory oversold
线性DP AcWing 899. 编辑距离
What is the relationship between NFT and metauniverse? How to view the market? The future market trend of NFT
Use sqoop to export ads layer data to MySQL
计算二叉树的最大路径和
FBX import under ue4/ue5 runtime