Giter Site home page Giter Site logo

Comments (4)

XingTree avatar XingTree commented on September 27, 2024

记不住说明代码写的不够好,就该重构了,变量名字改的通俗一点,该封装的方法封装起来,参考:重构

from coding2017.

mzanthem avatar mzanthem commented on September 27, 2024

变量名命名应尽量能表达其真实意义,不要怕名字太长
加上有效的 javadoc 注释,

from coding2017.

haoyoulove avatar haoyoulove commented on September 27, 2024

除了名字需要起的通俗易懂,读别人代码的时候要做做笔记,好记性不如烂笔头。

from coding2017.

511739113 avatar 511739113 commented on September 27, 2024

个人理解,首先规范的编码,良好的命名规范 能帮助我们省去很多精力,其次,有一些小技巧,整个系统里面变量会很多,如果都要记住确实不可能,我们应该记住全局的一些变量,我们只需要记住一些大概,IDE会帮我们自动补全,个人理解需要下点功夫记住的变量
1.常量类
2.工具类
3.bean 开发中需要用到各种bean来进行数据的传递,里面的属性大多和数据库的字段对应
4.各个模块的接口和dao ,这个每个系统都有一些自己的规范,例如常用的 userService userDao 等。
这些都是常用的一些东西,如果在用到的时候能根据IDE提示直接写出来会加快我们的开发效率。
局部变量我们并不需要去关心,在方法内部的是局部变量,而方法就是提供服务的。我们不需要关心这个方法具体实现细节,它内部有可能 使用很多变量来实现一些业务逻辑或者算法之类。我们只需要调用它给我提供服务即可。

from coding2017.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.