当前位置:网站首页>A small step in code change and a big leap in thinking
A small step in code change and a big leap in thinking
2022-06-30 21:01:00 【Sainan Muzi Xiaomiao】
More important than hard work is the change in the way of thinking , Thinking turns , Life is very different . So is writing code , Looks like a little change , In fact, it reflects the great leap of thinking . Let's first look at the codes at both ends :
Version of a
Private Sub Form_Load()
Print 5+6
End SubVersion 2
Private Sub Form_Load()
Dim a As Integer, b As Integer
a = 5
b = 6
Print a + b
End SubThe output of the code at both ends is 11, But the difference is ?
Intuitively, we can see that two variables are introduced , But in fact, this is the appearance , Look at the essence through the appearance , What is a variable ? In variable mathematics, a quantity whose value can be changed , In computer, it refers to an abstract concept that can store calculation results or represent values . notice “ abstract ” Two words , In fact, our dimension will rise to a higher level , That is, version 2 is not the limited thinking in version 1 , The addition of two fixed numbers becomes the addition of any two numbers , Because given a and b The value of is changeable . Now that we have realized the addition of any two numbers , You can also add any number .
Fixed to variable , It embodies the change from finite to infinite , Thinking and vision determine the pattern , Also decide whether the code you write is creative .
meanwhile , Version 2 also passed a+b The algorithm is encapsulated , The embodiment in this code is additive reuse . Why is it the encapsulation of algorithms , Same as variable , Addition is abstracted upwards , You can abstract out ” Algorithm “, The algorithm is more applicable , Can represent addition , It can also be subtraction 、 Multiplication 、 Division and other operations .
Small code is the embodiment of wisdom , The teacher said that software development requires imagination and creativity , This is a process that needs to be cultivated and improved in the process of learning code . Same code , Different people see different thoughts , Different development and future .
边栏推荐
猜你喜欢

Wechat applet development practice cloud music

uniapp-路由uni-simple-router

在线教育项目用户登录和注册

Markdown笔记简明教程

PHP obtains opcode and C source code

Lumiprobe nucleic acid quantitative qudye dsDNA br detection kit

PHP获取Opcode及C源码

Amazon restricts LGBTQ related search and product sales in the United Arab Emirates

DM8:生成DM AWR报告

MySQL简介、详细安装步骤及使用 | 黑马程序员
随机推荐
oprator-1初识oprator
MFC界面库BCGControlBar v33.0 - 桌面警报窗口、网格控件升级等
Lumiprobe nucleic acid quantitative qudye dsDNA br detection kit
SQL必需掌握的100个重要知识点:创建和操纵表
3Ds Max 精模obj模型导入ArcGIS Pro (二)要点补充
多态在代码中的体现
Basic concepts of tree
Evolution of screen display technology
Game 81 biweekly
报错FileSystemException: /datas/nodes/0/indices/gtTXk-hnTgKhAcm-8n60Jw/1/index/.es_temp_file:结构需要清理
ArcMap|用字段计算器对不同类别的id赋值
开发技术-获取10分钟前的时间
docker安装mysql
翻转链表II[翻转链表3种方式+dummyHead/头插法/尾插法]
树基本概念
元宇宙可能成为互联网发展的新方向
ICML2022 | 序列决策的效用理论
DM8:生成DM AWR报告
Lumiprobe染料 NHS 酯丨BDP FL NHS 酯研究
申请Vector 总线协议彩图壁纸挂画,非常棒哦!