Web开发中的6个坏习惯 - jerrylsxu
在 Usersnap,我们在能很好的组织网站开发有超过20(总和)年的经验。我们认为这些过去的经验能让我们很好的分辨出什么是好、坏和丑陋的网站开发。如今我们不想把注意力放在消极的部分,但就这一次,我们将把以往不好的地方做一下总结。
1.将20个关键点用邮件发出去
将20个关键点邮件发给别人,列出所有的bug、功能需求和别人被拒绝的要求,是和商品一样的问题。通常他们会带来指责或者类似“为什么你不解决掉$XY这个问题?我五个周之前不是就提指出了吗?”这样的追问。一旦你的开发经理不把这些对话落实到切实可行的计划,你就可能忘记事情。与其抱怨所有的这些事情你妈妈都没有教过你,不如尝试教给你的客户或者经理如何使用Bug追踪器或者项目管理工具*。那样的话,你不仅将节省无数发送冗长的邮件的时间,接收邮件的人也会更加清楚你最近正在忙于什么工作。
2. 抄送给整个团队
把问题抄送给所有人,意味着: 关于谁能处理这个问题,你没有任何想法。这种做法本身就有问题。如果你这样做了,很可能没有人会回答或者觉得应该对该问题负责。还有:阅读这些邮件浪费了无关人员大量的宝贵时间。尽量找出谁是责任人,然后只给他一个人发邮件。
3. 把测试留给其他人
让某人测试一个功能,而他却不知道该功能最初有什么错误,这是浪费团队成员时间的另一种方式。例如: 有客户抱怨说在IE浏览器中某个按钮不管用。首先接手该问题的一名开发人员解决了这个问题,然后另外一名QA测试它的时候,甚至不知道如何重现该问题。
4. 前后端之间的战争
把你的开发团队分成固定的部分是个坏主意,也是极为不敏捷的(别担心,我们没有使用这个词儿的习惯)。区分‘前端’和‘后端’导致了“Grabenkämpfe” (或者称之为:前后端之间的战争),毫无疑问这是不符合团队精神的。前端开发者会抱怨说“后台变更的太慢了”,而后台开发人员则会抱怨说“这可是今年第五次修改API了”。
5. 发布未经测试的代码
如果仅仅因为这是HiPPO某某(薪水最高的那位)的代码,就发布未经测试的代码,绝对是个糟糕的想法。更为糟糕的是: 这种事发生在周五下班前。当然,除非你是周末加班族,则另当别论了…
6. 过早进行优化
是的,听起来有点儿刺耳。但是在没有任何人看过你的页面之前就开始改进CSS动画效果,对于做事情并没有什么好处。如果你还有后台任务或者报告,当服务没有装载完毕时,让它跑个5到10秒并不是什么问题。应当在所有事情都正常工作之后再开始优化。我们还是非常提倡优化的,请参见我们上一篇文章中的第九条!
美国斯坦福大学的已经退休的计算机科学家和荣誉教授Donald Ervin Knuth,是精选著作集´计算机编程艺术(The Art of Computer Programming)´的作者。在他的‘使用goto语句进行结构化编程‘论文中他写到:
程序员们花费了大量时间来思考、或者担心他们的程序中无关紧要的部分的速度,而这会给代码的调试和维护工作带来很大的负面影响。我们应该忘掉细微部分的效率,对于97%的时间来说:过早优化是万恶之源。然而我们也不应该错过那关键的3%。
简而言之:在你弄清楚你到底要优化什么这个问题之前就开始优化,会带来各种各样的不必要的麻烦和错误。
我们应该,我的意思是,我也不会提倡不做备份就对产品进行更改或者没有清晰的思路和说明就进行开发。但幸运的是,你不会经常遇到这些错误。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

The role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.
