vba 错误 自动化错误_经典的自动化错误

vba 错误 自动化错误

Much of our world today relies increasingly on automated solutions. The results often enrich our lives by enabling workers to spend less time on manual tasks and more time for creativity, innovation, and enjoyment.

今天,我们世界上的许多人越来越依赖自动化解决方案。 通过使工作人员减少在手动任务上的时间,而将更多的时间用于创造力,创新和娱乐上,结果通常可以丰富我们的生活。

Particularly relevant is the current push towards development of contact-tracing apps and other solutions that could help all of us take steps to protect our health, and that of our loved ones, while benefitting from as full and rich a life as possible. Tempted by the rewards offered by automated solutions, all of us, perhaps especially software developers and technology entrepreneurs, are susceptible to some of these common traps.

特别重要的是,当前正在努力开发接触式跟踪应用程序和其他解决方案,这些解决方案可以帮助我们所有人保护自己和亲人的健康,同时尽可能地享受充实和丰富的生活。 受到自动化解决方案提供的奖励的诱惑,我们所有人,尤其是软件开发人员和技术企业家,都容易受到其中一些常见陷阱的影响。

Automation for its own sake

自动化本身

When do we do it?

我们什么时候做?

This can happen when we become frustrated with a manual process that is part of our everyday lives. Perhaps a friend, colleague, or favourite online influencer has been boasting about their automation successes. We know that, when used appropriately, automation can assist humans with well understood but laborious tasks, freeing us up to tackle more complex problems. It’s understandably tempting for any individual or business adopting a tool or approach with a good reputation to assume it will bring great benefits and jump right into using it, regardless of whether it truly applies to our use case.

当我们对日常生活中的手动过程感到沮丧时,就会发生这种情况。 也许朋友,同事或最喜欢的在线影响者一直吹嘘他们的自动化成功。 我们知道,如果使用得当,自动化可以帮助人们完成众所周知但费力的任务,使我们有更多的精力去解决更复杂的问题。 可以理解的是,任何个人或企业都采用具有良好声誉的工具或方法,认为它会带来巨大的好处并立即使用它,而不论它是否真正适用于我们的用例。

Why shouldn’t we do it?

我们为什么不应该这样做呢?

When we don’t have a clearly defined problem, or we can’t really explain why the tool or process we want to use will help us solve our problem or meet our goals more efficiently, the most likely outcome is that we end up with two problems; the still sub-optimal status quo, and the added complexity of the new “solution” that didn’t actually help. Instead of accepting that automation didn’t have the miraculous results we’d hoped for, many of us are tempted to “double down” and continue to try to make the new shiny thing work as well as we want it to (see the next section on “silver bullet” syndrome).

当我们没有明确定义的问题,或者我们无法真正解释为什么我们要使用的工具或流程可以帮助我们解决问题或更有效地实现目标时,最有可能的结果就是我们最终两个问题; 仍然不理想的现状,以及新的“解决方案”的复杂性实际上并没有帮助。 我们中的许多人不但没有接受自动化并没有取得我们希望的奇迹般的结果,反而很想“加倍努力”,并继续尝试使新的闪亮事物按我们希望的那样工作(请参阅下一篇) “银弹”综合症部分)。

What are the consequences?

有什么后果?

For several years, Elon Musk’s approach to manufacturing the iconic and expensive Tesla car was a high-profile example of automation for its own sake. Musk’s dream of a futuristic, fully automated process was proven to have more style than substance when it repeatedly led to production below 50% of targets. Despite significant improvements, financial analysts have remained sceptical about Tesla’s ability to align production numbers with their valuation. Musk’s tendency to automate for its own sake also failed spectacularly in 2018 when his apparently altruistic but arguably over-engineered attempt to rescue a cave-trapped group of children and their coach was politely rebuffed in favour of a manual rescue operation led by experienced divers. While it’s not the worst suggestion Musk made during the emergency, one could argue that his impulse to over-automate appears to have caused more problems in his business than it has solved.

多年来,埃隆·马斯克(Elon Musk)制造标志性且昂贵的特斯拉汽车的方法本身就是自动化的备受瞩目的例子。 当马斯克一再导致产量低于目标的50%时,马斯克梦想的一种具有未来主义意义的,完全自动化的过程将具有更多的风格。 尽管取得了重大进步,但金融分析师仍对特斯拉能否将生产数量与估值保持一致持怀疑态度 。 马斯克为自己的利益实现自动化的趋势在2018年也以失败告终,当时他显然是无私的,但可以说是过度设计的尝试来挽救一群被困在洞穴中的儿童 ,他们的教练被礼貌地拒绝了,转而支持由经验丰富的潜水员领导的手动救援行动。 尽管这不是马斯克在紧急情况下提出的最糟糕的建议 ,但有人可以辩称,他过度自动化的冲动似乎给他的业务造成了比解决的问题更多的问题。

How do we avoid it?

我们如何避免呢?

Listen to the words you use when you pitch an automated solution to someone else. Are you clearly outlining a problem or inefficiency that you have, and a potential solution, or are you simply praising the solution’s popularity, proponents, or elegance in general terms?

将自动解决方案推销给其他人时,请听您使用的词语。 您是否清楚地概述了存在的问题或效率低下以及可能的解决方案,还是只是在总体上称赞该解决方案的受欢迎程度,拥护者或优雅?

Don’t say: Python_Rockstar82, clever developer person, use build tool. Me use build tool also, be rock star too.

不要说:聪明的开发人员Python_Rockstar82,使用构建工具。 我也使用构建工具,也是摇滚明星。

Do say: We’re losing a lot of development time due to inconsistencies in our build scripts. Each app has to be updated manually every time we become aware of a security vulnerability or simply find a better approach. I think we could save a lot of time and increase the stability of our applications if we create a command line interface that updates our scripts to the latest template.

请说:由于我们的构建脚本不一致,我们浪费了很多开发时间。 每当我们意识到安全漏洞或只是找到更好的方法时,必须手动更新每个应用程序。 我认为,如果我们创建一个将脚本更新为最新模板的命令行界面,则可以节省大量时间并提高应用程序的稳定性。

Seeing automated solutions as “silver-bullets” that can act alone

将自动化解决方案视为 可以单独行动的 银子弹

When do we do it?

我们什么时候做?

We’re are arguably at highest risk of this syndrome when we’ve learned just enough about an automated tool or approach to become convinced it will improve productivity and / or reduce costs. Unfortunately, at this point, we have no solid evidence that this is the case, but end up rolling it out across the business anyway in the hopes that results will reward our confidence. This often results in expectations far greater than the tool or process can ever provide. Early successes with prototypes and general enthusiasm about a solution can lead us to stop evaluating and improving the process, or even bothering to sufficiently train ourselves and others on how it works. Letting the machine take care of itself frees up humans for more creative and communications-based tasks and exploration of new ideas.

当我们对自动工具或方法了解得足够多,使我们确信该工具或方法将提高生产率和/或降低成本时,我们面临这种综合征的风险最高。 不幸的是,在这一点上,我们没有确凿的证据证明确实如此,但是最终还是将其推广到整个企业,希望结果能回报我们的信心。 这常常导致期望远远超过工具或过程所能提供的期望。 原型的早期成功和对解决方案的普遍热情可能导致我们停止评估和改进过程,甚至不愿对自己和他人进行充分的培训。 让机器自己照顾自己可以使人们腾出更多精力进行更具创意和基于交流的任务,并探索新的思想。

Why shouldn’t we do it?

我们为什么不应该这样做呢?

Any automated solution is only good as its design and training. Demonstrations of prototypes applied to limited use cases are often impressive, but widely rolling out an automated system without a plan for its ongoing evaluation, maintenance, and monitoring can result in the organisation working for the machine, rather than the other way around. If you don’t understand the extent of what your tool does, or why it’s doing it, then the tool doesn’t really know either. At that point, identifying and solving problems can become a colossal task.

任何自动化解决方案都只有其设计和培训才能发挥作用。 应用于有限用例的原型的演示通常令人印象深刻,但是如果在没有计划进行持续评估,维护和监视的情况下广泛部署自动化系统,则会导致组织为机器工作,而不是相反。 如果您不了解工具的功能范围或执行原因,那么该工具也不知道。 到那时,识别和解决问题可能成为一项艰巨的任务。

What are the consequences?

有什么后果?

US IT contractor Ibrahim Diallo was mistakenly terminated, locked out of every system he could access, and even escorted from the building by security because his former manager had failed to renew his contract. Ibrahim reported that it took the company three weeks to figure out that their own software appeared to have triggered these events without any human understanding how or why. It’s hard to say what the exact cost of this mistake was, but, it appears that through over-reliance on their automated systems to manage themselves, this organisation ended up suspending the activities of a skilled professional for the better part of a month, taking other staff away from their duties to rectify the problem, and suffering morale and reputational damage.

美国IT承包商易卜拉欣·迪亚洛(Ibrahim Diallo)错误地终止了工作 ,被他可以访问的每个系统都锁定了,甚至由于安全原因而被护送出大楼,因为他的前任经理未能续签合同。 易卜拉欣报道说,公司花了三周的时间才弄清楚他们自己的软件似乎触发了这些事件,而没有任何人类了解如何或为什么。 很难说出这个错误的确切代价是什么,但是,看来,由于过度依赖他们的自动化系统来管理自己,这个组织最终暂停了熟练技术人员的活动,为期一个月的大部分时间,其他员工则无法纠正问题,并士气和声誉受到损害。

How do we avoid it?

我们如何避免呢?

Be cautious in any new implementation, ideally rolling it out to a small group first. Monitor its effectiveness against pre-defined metrics, such as time spent debugging, number of manual tasks that require developer time, or bug reports that reference regressions or inconsistencies between systems. Always have a defined fallback plan in the event you don’t like what the numbers are telling you.

在任何新实施中都要谨慎,最好先将其推广到一个小组。 根据预定义的指标(例如花费的调试时间,需要开发人员时间的手动任务数量或引用系统之间的回归或不一致的错误报告)来监视其有效性。 如果您不喜欢数字告诉您的内容,请务必制定定义的后备计划。

Don’t say: I read an article that advocated a fully automated pipeline with no manual approval step. I’m sick of having to wait to get code that has passed all of our tests out to users. Let’s immediately remove the manual step for all of our apps and spend the savings we’re bound to make on an office treehouse.

不要说:我读过一篇文章,提倡全自动流水线,无需人工批准。 我讨厌不得不等待获得将所有测试传递给用户的代码。 让我们立即删除所有应用程序的手动步骤,然后将节省下来的钱花在办公室树屋上

Do say: We are going to try a fully automated pipeline for our most mature and well understood application for one month. If all automated tests pass in the staging environment, the pipeline will deploy automatically to production with no human intervention. During this time, we will compare our bug reports and production incident statistics with the previous month, which required a human to approve promotion of a release to production. We will also evaluate the difference in how developers and test engineers use their time to see if this could be a beneficial approach for all of our applications. If it doesn’t go well, switching the manual approval step back on is a thirty second job.

请说:我们将为我们最成熟,最容易理解的应用程序尝试一个全自动管道,为期一个月。 如果所有自动化测试都在过渡环境中通过,则管道将自动部署到生产中,而无需人工干预。 在此期间,我们将把错误报告和生产事件统计信息与上个月进行比较,这需要人工批准将产品发布发布。 我们还将评估开发人员和测试工程师如何利用他们的时间来查看这是否对我们所有应用程序都是有益的方法的差异。 如果操作不顺利,请重新启动手动批准步骤是一项三十秒的工作。

Implementing an automated solution before you have a good manual one

在拥有良好的手动解决方案之前实施自动化解决方案

When do we do it?

我们什么时候做?

Even when automation really does have the potential to change our lives for the better, we cannot reap the benefits without understanding how and why it does so. One of the best ways to understand an automated solution is to know how to solve the problem manually first. Anyone who has ever made a cup of coffee or vacuumed a floor can understand how a machine would go about solving the same problem, and how to recognise when the machine messes up and we need to jump in. But so many facets of our lives are now beautifully tech-enhanced that it seems like a waste of time establishing manual processes before automating them. We’re so used to great solutions from machines, we want to jump straight to that endpoint in every situation.

即使自动化确实确实有潜力使我们的生活变得更好,但如果不了解这样做的方式和原因,我们也无法获得收益。 理解自动化解决方案的最好方法之一是先知道如何手动解决问题。 曾经喝过咖啡或用吸尘器吸过地板的任何人都可以理解机器如何解决相同的问题,以及如何识别机器何时混乱,我们需要跳进去。但是,我们生活中的许多方面现在通过精美的技术增强功能,似乎在自动建立手动流程之前浪费时间。 我们已经习惯了使用机器提供出色的解决方案,因此在每种情况下我们都希望直接跳到该端点。

Why shouldn’t we do it?

我们为什么不应该这样做呢?

When automation didn’t work as well at Tesla as Musk hoped, he was able to fall back on established car manufacturing processes that have been in place for a long time. When we automate before establishing how this problem might be solved by humans using older or no technology, we have no fallback plan if the automated solution doesn’t work. At best, a working solution will be delayed, and, at worst, the problems caused by the automated solution will make solving the problem manually harder than it had to be. Using established manual approaches first, and better understanding why they work in your particular context, is also likely to inform a more appropriate, human-assistive automated process. A comparable manual process is also an effective way of explaining to users what an automated solution is trying to achieve.

当特斯拉的自动化工作不如马斯克所希望的那样时,他便能够依靠已存在很长时间的既定汽车制造Craft.io。 当我们在确定人类如何使用较旧的技术或不使用任何技术解决此问题之前实现自动化时,如果自动化解决方案不起作用,我们将没有备用计划。 充其量,一个有效的解决方案将被延迟,而在最坏的情况下,由自动化解决方案引起的问题将使手动解决问题的难度比必须解决的困难。 首先使用已建立的手动方法,并更好地了解它们在您的特定情况下起作用的原因,也可能会为更合适的,人为辅助的自动化过程提供信息。 可比的手动过程也是向用户解释自动化解决方案要实现的有效方法。

What are the consequences?

有什么后果?

Throughout April and May 2020, the UK government spoke confidently about the key role a bespoke contact tracing app would have in their response to the Covid19 pandemic. However, after a disappointing attempt to launch the app to users in a small part of the UK, the government were forced to de-prioritise the app and quickly throw resources into the training and support of human contact tracers to follow up with associates of individuals who had tested positive. Without providing potential users with clear information about the app’s goals, abilities, or expectations, uptake was low, and confusion and misinformation high. A junior health minister was forced to admit “it is probably a mistake to launch an app before you have got the public used to the idea of tracing”.

在整个2020年4月和2020年5月,英国政府充满信心地谈到了定制的联系人跟踪应用程序在应对Covid19大流行中所起的关键作用。 但是,在尝试向英国一小部分用户推出该应用程序后,令人失望的是,政府被迫取消该应用程序的优先级,并Swift将资源投入到人类接触追踪器的培训和支持中,以跟进个人的同事谁测试阳性。 如果没有为潜在用户提供有关应用程序的目标,功能或期望的清晰信息,则普及率很低,混乱和错误信息很高。 初级卫生部长被迫承认“ 在让公众习惯追踪之前,启动应用程序可能是一个错误 ”。

Don’t say: Our developers aren’t taking the time to write helpful commit messages. Let’s implement all of the hooks to enforce a structure, and very long PR templates. That’ll learn ’em, probably.

不要说:我们的开发人员不会花时间来编写有用的提交消息。 让我们实现所有挂钩以强制执行结构,以及非常长的PR模板 。 可能会学到它们。

Do say: Our developers aren’t demonstrating an understanding of how to write helpful commit messages. Let’s provide clear guidance as to what makes a great commit message, lead by example, and get feedback from the developers as we discuss potential ways to improve the quality of our shared git log, including automated solutions.

一定要说:我们的开发人员并没有表现出对如何编写有用的提交消息的理解。 让我们提供清晰的指导 ,以指导示例为例,提供最佳的提交信息,并在讨论提高自动化git日志质量的潜在方法时,从开发人员那里获取反馈。

Conclusion

结论

Technologically enhanced and automated solutions continue to be applied effectively to a wide range of problems and situations, and this is a very good thing. However, allowing automation to be its own justification is a serious business risk. Any new approach, however exciting, must be exposed to a rigorous cost benefit analysis. We all must take an evidence-based approach to evaluating the tools and processes they use over the long term to ensure that the machines work for the humans, and not the other way around!

经过技术增强和自动化的解决方案继续有效地应用于各种问题和情况,这是一件非常好的事情。 但是,让自动化成为自己的理由是严重的业务风险。 任何新方法,无论多么令人兴奋,都必须接受严格的成本效益分析。 我们所有人都必须采取基于证据的方法来评估它们长期使用的工具和过程,以确保机器对人类有效,而不是相反!

翻译自: https://medium.com/dev-genius/classic-automation-mistakes-2bf74ad485ad

vba 错误 自动化错误

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 当VBA自动化出现错误时,可能是以下几个方面引起的: 1.语法错误VBA代码中的语法错误可能会导致自动化出现问题。请仔细检查代码并查找语法错误。 2.对象引用错误VBA自动化需要访问其他应用程序中的对象。如果对象的引用有误,则可能会导致自动化失败。 3.权限问题:VBA自动化需要访问其他应用程序中的对象时,可能会因为权限问题而出现错误。 4.版本兼容性问题:如果VBA代码是用于旧版本的应用程序,而现在运行的应用程序版本不同,那么自动化可能会出现错误。 当VBA自动化出现错误时,可以通过调试代码和查看错误消息来识别问题所在并进行修复。同时,也要确保在使用VBA自动化时遵循最佳实践,如避免硬编码、错误处理和及时释放对象等。 ### 回答2: 在使用VBA自动化过程中,经常会遇到一些错误。以下列举几种常见的错误类型和解决方法: 1. 运行时错误:这种错误通常在代码执行时发生,例如访问了不存在的对象、调用了不支持的方法等。解决方法是检查代码语法和逻辑,确认是否正确引用了对象和方法。 2. 编译错误:这种错误通常在代码编辑时发生,例如忘记了添加某个变量或操作符。解决方法是仔细检查代码,确保语法正确、变量声明正确等。 3. 执行效率问题:如果自动化代码执行效率太低,可能会导致程序长时间卡死或崩溃。解决方法是优化程序代码,减少不必要的操作和循环,避免频繁读写文件等。 4. 与第三方程序或组件的兼容性问题:有时候VBA自动化过程需要与其他程序或组件进行交互,可能会出现兼容性问题。解决方法是确认使用的程序或组件版本正确,更新相应的驱动程序和库文件等。 5. 资源占用过高问题:VBA自动化过程会占用系统资源,如果资源占用过高可能会导致程序卡顿或崩溃。解决方法是尽量避免一次性处理大量数据,减少内存占用和磁盘读写次数等。 总之,使用VBA自动化过程需要仔细检查代码,注意程序逻辑和效率,同时保持程序和外部程序的兼容性,避免过度占用系统资源。这样才能保证程序正常运行,提高自动化效率。 ### 回答3: VBA自动化是指使用VBA语言编写代码来自动化执行某一过程的过程。VBA自动化可以帮助我们提高效率,减少工作负担,然而,当我们进行自动化操作时,可能会遇到各种错误VBA自动化错误可能由以下几个方面导致: 1. 语法错误。这是最常见的VBA自动化错误,常见于代码拼写错误、语句错误、变量名错误等。 2. 运行时错误。常见于程序在运行时出现的错误,例如超出数组边界、除数为零等。 3. 逻辑错误。这种错误不容易被发现,需要仔细分析代码逻辑。 4. 接口错误。常见于应用程序接口调用时的错误。 在遇到VBA自动化错误时,应该首先仔细检查代码,找出错误所在。如果无法找到错误,可以使用调试工具,在程序运行过程中逐步查看变量的取值,找出错误原因。同时,应该学会使用异常处理语句,在程序出错时进行相应的处理,避免程序崩溃。 此外,我们还可以通过以下方法减少自动化错误的发生: 1. 编写规范的代码,注重变量命名、代码格式等。 2. 适当地添加注释,以便其他人能够更容易地理解你的代码。 3. 避免过度使用复杂的自动化操作,尽可能简化代码逻辑。 4. 及时更新程序,避免程序因为版本过旧而出错。 总之,VBA自动化错误的发生在所难免,我们需要不断学习和探索,找出有效的方法来降低错误发生的概率。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值