当前位置:网站首页>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 .
边栏推荐
- MySQL introduction, detailed installation steps and usage | dark horse programmer
- 第81场双周赛
- 个人开发的渗透测试工具Satania
- Personal developed penetration testing tool Satania
- Based on the open source stream batch integrated data synchronization engine Chunjun data restore DDL parsing module actual combat sharing
- Peking University ACM problems 1000:a+b problem
- 【等级测评师】等级测评师怎么报名?多少分及格?
- MySQL:SQL概述及数据库系统介绍 | 黑马程序员
- 《大厂面试》之JVM篇21问与答
- 雷达数据处理技术
猜你喜欢

Deflection lock / light lock / heavy lock lock is healthier. How to complete locking and unlocking

企业保护 API 安全迫在眉睫

报错:Internal error XFS_WANT_CORRUPTED_GOTO at line 1635 of file fs/xfs/libxfs/xfs_alloc.c.

B_QuRT_User_Guide(31)

《大厂面试》之JVM篇21问与答

凤凰架构——架构师的视角
![[1175. prime number arrangement]](/img/f2/d427db03da151786ea1dfb7a76328a.png)
[1175. prime number arrangement]

报错FileSystemException: /datas/nodes/0/indices/gtTXk-hnTgKhAcm-8n60Jw/1/index/.es_temp_file:结构需要清理

为什么vscode用久了电脑速度变慢?

uniapp怎么上传二进制图片
随机推荐
uniapp-富文本编辑器
Comparison between QT and other GUI Libraries
个人开发的渗透测试工具Satania
多态在代码中的体现
MySQL advanced 3
Deflection lock / light lock / heavy lock lock is healthier. How to complete locking and unlocking
《大厂面试》之JVM篇21问与答
Study on lumiprobe modified triphosphate biotin-11-utp
Go learning notes
MySQL:SQL概述及数据库系统介绍 | 黑马程序员
Markdown笔记简明教程
Game 81 biweekly
Huffman tree (I) basic concept and C language implementation
翻转链表II[翻转链表3种方式+dummyHead/头插法/尾插法]
开发技术-使用easyexcel导入文件(简单示例)
A complete collection of vulnerability scanning tools. Mom doesn't have to worry that I won't find any more vulnerabilities
大学生研究生毕业找工作,该选择哪个方向?
报错:Internal error XFS_WANT_CORRUPTED_GOTO at line 1635 of file fs/xfs/libxfs/xfs_alloc.c.
注册设备监理师难考吗,和监理工程师有什么关系?
How can I get the stock account opening discount link? In addition, is it safe to open a mobile account?