Step Back and Automate, Automate, Automate
来源:互联网 发布:懒人眼镜 淘宝 编辑:程序博客网 时间:2024/06/06 20:02
Step Back and Automate, Automate, Automate
Cay Horstmann
I WORKED WITH PROGRAMMERS WHO, when asked to produce a count of the lines of code in a module, pasted the files into a word processor and used its “line count” feature. And they did it again next week. And the week after. It was bad.
I worked on a project that had a cumbersome deployment process, involving code signing and moving the result to a server, requiring many mouse clicks. Someone automated it, and the script ran hundreds of times during final test- ing, far more often than anticipated. It was good.
So, why do people do the same task over and over instead of stepping back and taking the time to automate it?
Common misconception #1: Automation is only for testing
Sure, test automation is great, but why stop there? Repetitive tasks abound in any project: version control, compiling, building JAR files, documenta- tion generation, deployment, and reporting. For many of these tasks, the script is mightier than the mouse. Executing tedious tasks becomes faster and more reliable.
Common misconception #2: I have an IDE, so I don’t have to automate
Did you ever have a “But it (checks out/builds/passes tests) on my machine?” argument with your teammates? Modern IDEs have thousands of potential settings, and it is essentially impossible to ensure that all team members have identical configurations. Build automation systems such as Ant or Autotools give you control and repeatability.
156
97 Things Every Programmer Should Know

Common misconception #3: I need to learn exotic tools in order to automate
You can go a long way with a decent shell language (such as bash or Power- Shell) and a build automation system. If you need to interact with websites, use a tool such as iMacros or Selenium.
Common misconception #4: I can’t automate this task because I can’t deal with these file formats
If a part of your process requires Word documents, spreadsheets, or images, it may indeed be challenging to automate it. But is that really nec- essary? Can you use plain text? Comma-separated values? XML? A tool that generates a drawing from a text file? Often, a slight tweak in the pro- cess can yield good results with a dramatic reduction in tediousness.
Common misconception #5: I don’t have the time to figure it out
You don’t have to learn all of bash or Ant to get started. Learn as you go. When you have a task that you think can and should be automated, learn just enough about your tools to do it. And do it early in a project when time is usually easier to find. Once you have been successful, you (and your boss) will see that it makes sense to invest in automation.
- Step Back and Automate, Automate, Automate
- Step Back and Automate, Automate, Automate
- Automate Test
- Automate SharePoint Solution Builds
- Automate Your Coding Standard
- Automate Your Coding Standard
- How to automate Excel using MFC and worksheet functions
- Automate your build process using Java and Ant
- UVa 11777 - Automate the Grades
- Using Visual C++ to Automate Office
- eBay Architecture(9)–Automate Everything
- Using Ant to Automate Building Android Applications
- below script to automate your stats job
- Robotium_Using Ant to Automate Building Android Applications
- CAL - ISPS automate V01 GR (ZRPP106B)
- Using cURL to automate HTTP jobs
- C# vs 2015 to automate ONE
- Using cURL to automate HTTP jobs
- 基于NODEJS的前后端项目分离实践
- JSON风格指南-真经
- 最近对物联网文章读后感
- 关于MyEclipse8.5手动安装ADT步骤及注意事项
- 让cinix工作在高分辨率模式
- Step Back and Automate, Automate, Automate
- LeetCode OJ 之 Invert Binary Tree(反转二叉树)
- MAC显示隐藏文件
- sql where 1=1和 0=1 的作用
- pl/sql_6_例外
- Zookeeper 01 数据模型
- 6.15 网络请求,Get和Post,同步和异步
- 用图形界面处理文件,简单模拟记事本的文件打开与保存
- ROM、RAM、DRAM、SRAM和FLASH的区别到底是什么?