当前位置:网站首页>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 .
边栏推荐
- 浏览器存储方案
- 考研英语二大作文模板/图表作文,英语图表作文这一篇就够了
- spfa AcWing 851. spfa求最短路
- Leetcode - Sword finger offer 51 Reverse pairs in an array
- Error in kubeadm join: [error port-10250]: port 10250 is in use [error fileavailable--etc kubernetes PKI
- JS10day(api 阶段性完结,正则表达式简介,自定义属性,过滤敏感词案例,注册模块验证案例)
- Introduction to CPU instruction set
- About asp Net MVC project in local vs running response time is too long to access, the solution!
- Docsify deploy IIS
- Bom Dom
猜你喜欢

高性能纠删码编码

arcgis js 4. Add pictures to x map

Go学习笔记—多线程

Anti shake throttle

Rust search server, rust quick service finding tutorial

AI mid stage technology research

Embedded Software Engineer career planning

Redis bloom filter

Win10 system OmniPeek wireless packet capturing network card driver failed to install due to digital signature problem solution

Lekao.com: experience sharing of junior economists and previous candidates in customs clearance
随机推荐
Intel 内部指令 --- AVX和AVX2学习笔记
Multiply LCA (nearest common ancestor)
2.6 using recursion and stack - [tower of Hanoi problem]
模数转换器(ADC) ADE7913ARIZ 专为三相电能计量应用而设计
JS10day(api 阶段性完结,正则表达式简介,自定义属性,过滤敏感词案例,注册模块验证案例)
drools动态增加、修改、删除规则
Interview with meituan, a 34 year old programmer, was rejected: only those under the age of 30 who work hard and earn little overtime
计算二叉树的最大路径和
LeetCode—剑指 Offer 59 - I、59 - II
LeetCode—剑指 Offer 37、38
AI mid stage technology research
Docsify deploy IIS
AI中台技术调研
模块化 CommonJS ES Module
Is the neural network (pinn) with embedded physical knowledge a pit?
LeetCode—<动态规划专项>剑指 Offer 19、49、60
[ybtoj advanced training guide] similar string [string] [simulation]
Intel internal instructions - AVX and avx2 learning notes
FBX import under ue4/ue5 runtime
线性DP AcWing 898. 数字三角形