javaweb解决编码问题

抽象 (Abstract)

Here’s the situation. I need to build a test harness to verify that when my software sends / receives data to some other system (a system outside my control), the data is not only received, but is in fact the data I expected to have been sent.

这是情况。 我需要构建一个测试工具,以验证当我的软件向其他系统(我无法控制的系统)发送/接收数据时,不仅收到了数据,而且实际上是我希望发送的数据。

Pretty standard test harness stuff, right? The testers say they need this for manual and for automation testing suites. Internal customer need. Great.

漂亮的标准测试装备,对吧? 测试人员说,他们需要手动和自动化测试套件。 内部客户需求。 大。

So the developer starts rattling off software tools / languages we will use to build this test harness.

因此,开发人员开始研究将用于构建此测试工具的软件工具/语言。

Wait, what?

等一下

不太快,牛仔 (Not so fast, cowpoke)

How did we get from a high level need to implementation that fast? Where are our requirements? Where are our user stories? Where the heck are even some simple sequence / flow diagrams to describe whussup?

我们如何从高层次的需求快速实现呢? 我们的要求在哪里? 我们的用户故事在哪里? 到底哪里有一些简单的序列/流程图来描述whossup?

Well, the dev imagines he/she has these already in their head, so time to get to the fun stuff, the cutting code stuff, the implementation.

好吧,开发人员认为他/她已经掌握了这些知识,因此有时间去学习有趣的东西,剪切代码的东西和实现。

Sound familiar?

听起来有点熟?

If so, then do everyone on the team a solid and pull the brakes before the conversation carries on down this line any further.

如果是这样,那么在对话继续进行下去之前,请团队中的每个人都站稳脚跟并刹车。

We’ve skipped a step, and it happens way more often than we might be willing to admit.

我们已经跳过了一步,而且发生的频率比我们可能愿意承认的要高。

两次测量,切一次 (Measure Twice, Cut Once)

Before I can build anything, I need to understand as best I can what I’m building in order to get to work. I’m not just talking software. You want to build a birdcage, a deck, patio furniture? Any and all of these things (including software) require you to have a clear picture of the item being built, and from this picture you can set off to build it right the first time.

在构建任何东西之前,我需要尽可能地了解自己正在构建的东西才能开始工作。 我不仅在谈论软件。 您要建造鸟笼,甲板,露台家具吗? 所有这些东西(包括软件)都需要您清楚地了解正在建造的物品,并且可以从这张照片中出发,在第一时间立即进行建造。

Measure twice, cut once is the old adage. That is, before you do any work, make sure you’ve double-checked your measurements before you do anything. The more which you understand what you’re building, the better the chances you will be successful in building it.

测量两次,切一次是古老的格言。 也就是说,在执行任何工作之前,请确保在执行任何操作之前已仔细检查了测量结果。 您对构建的内容了解得越多,成功构建它的机会就越大。

And in most industries this still holds true: I won’t buy a car or a house that wasn’t modeled off a blueprint. I don’t buy a mobile phone which someone just slapped together without specs or detailed instructions on how to manufacture it.

在大多数行业中,这仍然成立:我不会买没有蓝图的汽车或房屋。 我不买没有人打了电话的手机,没有规格或详细说明。

In software, however, we often allow ourselves to be lulled in this regard. Terms such as “Agile” and “MVP” have crept in over time, and when misused / misunderstood, come to stand for “Just start coding and we’ll figure it out when we get to the end”.

但是,在软件方面,我们经常对此感到冷淡。 随着时间的流逝,诸如“敏捷”和“ MVP”之类的术语逐渐流行起来,当被误用/误解时,它们代表“刚开始编码,直到结束时我们才能弄清楚”。

Everyone is guilty in one way or another. Devs do it because that’s the stuff where they have expertise. POs do it because they want to see “productivity”, to see those stories keep moving. People sometimes do this because that’s all they know, that’s how they’ve always done it.

每个人都以一种或另一种方式有罪。 开发人员之所以这样做,是因为他们拥有专业知识。 PO之所以这样做,是因为他们希望看到“生产力”,看到这些故事不断发展。 人们有时这样做是因为他们所知道的就是他们一贯做到的方式。

Trust me when I say: Stop doing this. Stop trying to code your way out of the problem.

当我说:别这样做时,请相信我。 停止尝试编码解决问题的方法。

你该怎么办? (What should you do?)

Now that we’ve decided to build this test harness, and WAY before we pick tech / solutions, let’s just nut out the expected behaviours we need from our test harness.

既然我们已经决定构建此测试工具,并且在选择技术/解决方案之前选择WAY,那么我们就来简单说明一下我们的测试工具所需的预期行为。

An easy way to do this is just get a whiteboard, and draw a simple set of sequence diagrams showing the flow from start to finish.

一个简单的方法就是获得白板,并绘制一组简单的序列图,显示从头到尾的流程。

If you are keen and want to learn something new, try using PlantUML support for sequence diagrams to show the actions of all involved in a simple, easy-to-understand picture.

如果您热衷于学习新知识,请尝试使用PlantUML支持的序列图,以简单,易于理解的方式显示所有参与者的动作。

At the very minimum, you and your team should agree to and WRITE DOWN what the expected business behaviours are in your code changes. This is the contract, the blueprint of what is required. It is not a technical blueprint, but it IS a blueprint of what is needed for your software to be truly successful and bug-free.

至少,您和您的团队应该同意并写下代码更改中预期的业务行为。 这是合同,是所需的蓝图。 这不是技术上的蓝图,但它是使软件真正成功且无错误所需的蓝图。

Here’s a simple diagram / plantuml blob to show you what I mean.

这是一个简单的图表/ plantuml Blob,向您展示我的意思。

title Tester and the TestStub, Scenario 1:  Send data to our APIactor TesterTester -> TestStub:  Send data to our APITestStub -> OurAPI:  POST /some/url/ DataBlobOurAPI -> TestStub: 200 Tester -> OurAPI: GET /some/url/for/datablobalt if data is foundOurAPI -> Tester:  200 DataBlobnote left :)end noteelse return nothing was foundOurAPI -> Tester: 404note left :(end noteend

As you can see, this is pretty basic, and doesn’t take a lot of effort to create. What it does for the team’s understanding far outweighs the effort, and ensures everyone is clear about what the dev is going to make.

如您所见,这是非常基本的,无需花费很多精力进行创建。 它对于团队的理解所做的工作远胜于努力,并确保每个人都清楚开发人员将要做什么。

我为什么需要这个? (Why do I need this?)

The question which often arises at this point is “Well what do I need this for? I know what’s being built, so why not just build it?”

在这一点上经常出现的问题是“我需要什么呢? 我知道正在建造什么,为什么不仅仅建造它呢?”

Because I will bet dollars to doughnuts you DON’T know what’s being built. You are likely the victim of your own assumptions of what does what in this little exchange, and there is a strong likelihood that you could be assuming things no one else is assuming. The more complex the problem space, the more likely your assumptions are off-base, even by a little bit.

因为我会把钱押在甜甜圈上,所以您不知道要建造什么。 您可能会在这种小小的交换中自己做某事的假设中受害,并且您很有可能会假设别人没有其他假设。 问题空间越复杂,您的假设就越有可能偏离基础,甚至有一点点偏离基础。

Because writing down / diagramming each flow is a talking point for the team, something which helps everyone to be on the very same page as to what is being built, and thus what is going to be tested and delivered to our customer. These kinds of talking points lead to discussion, debate, clarification, all the things which make it ever more clear what is going to happen at a business / logical level.

因为写下/绘制每个流程是团队讨论的重点,所以可以帮助每个人将正在构建的内容,以及要测试并交付给客户的内容放在同一页面上。 这些谈话要点导致讨论,辩论,澄清,所有这些使我们在业务/逻辑层面上将要发生的事情变得更加清晰。

Because it’s all well and good that you ‘know it’ now, but you in a year or more, or a new team member, will have no way of knowing exactly what the test harness is, or what it actually does. Such documentation / diagrams / etc are a good way to keep knowledge debt at bay.

因为您现在就知道它是一件好事,但是您在一年或一年以上的时间里,或者您是新团队成员,将无法确切知道测试工具的含义或实际用途。 这样的文档/图表/等是避免知识欠债的好方法。

Because you will thank me for it when you approach software development this way, after even just one try.

因为当您以这种方式进行软件开发时,即使只尝试一次,您也会感谢我。

到底 (In the End)

Next time you find yourself or someone leaping to implementation too soon, give this exercise a go. See if it helps. You can always go back to coding your way out of the problem if this isn’t for you.

下次您发现自己或某人过快地开始实施时,请尝试一下。 看看是否有帮助。 如果不适合您,那么您总是可以返回编码解决问题的方法。

However, I have a sneaking suspicion that after a couple times doing this, you will see the benefit for all concerned. Coding your way out of the problem is often the cause of — not the solution to — delays and bugs and rework.

但是,我有一个偷偷摸摸的怀疑,即在经过几次此操作之后,您会看到所有相关人员的利益。 找出解决问题的办法通常是造成延迟,错误和返工的原因,而不是解决方案。

Take some time to fully understand what you’re building before you crack on to build it.

在开始构建之前,需要一些时间来完全了解您正在构建的内容。

Hope this helps

希望这可以帮助

翻译自: https://medium.com/it-dead-inside/stop-trying-to-code-your-way-out-of-the-problem-77d442a111ce

javaweb解决编码问题


http://www.taodudu.cc/news/show-5020763.html

相关文章:

  • html参数编码
  • ajax请求返回parseerror的解决方案
  • 脉冲编码调制基本知识概念
  • 数据分析——数据清洗之文字特征编码
  • 宾馆【房屋租赁】管理系统
  • 房屋租赁app
  • 房屋地址信息编码
  • jacobian 矩阵意义_对雅可比矩阵的理解
  • 雅可比矩阵的不同算法及其区别
  • 雅克比矩阵(上)-----雅克比推导
  • python 学生考勤系统
  • 数据大屏得轮询
  • 数据大屏展示框架
  • PywebIO 轻松制作一个数据大屏,代码只需100行
  • pyecharts+flask制作数据大屏-进阶
  • 基于ECharts的数据大屏制作
  • 50 行 Python 代码制作一个数据大屏
  • Apache Superset可视化数据大屏
  • web大屏展示用到的组件_从零开始设计数据大屏—基于Vue
  • 数据可视化设计经验分享:10分钟做出炫酷数据大屏
  • 从0到1开发可视化数据大屏
  • 手把手教你搭建可视化数据大屏
  • 开源数据大屏AJ-Report
  • 爆肝十小时,为你总结出最全的数据大屏适配屏幕方案
  • 数据可视化系列-04数据大屏基础知识
  • 资源:Think Python中英文PDF
  • 怎么翻译图片上的英文?翻译图片的方法分享。
  • Qt国际化翻译(中英切换)步骤:可子界面翻译
  • Qt 界面上控制中英文显示切换
  • 最全的模具中英文对照专业术语

javaweb解决编码问题_停止尝试编码解决问题的方法相关推荐

  1. 编码 面试_在学习编码面试时如何取得进步

    编码 面试 by Sam Gavis-Hughson 萨姆·加维斯·休森(Sam Gavis-Hughson) 在学习编码面试时如何取得进步 (How to make progress while s ...

  2. 华为技术面试编码题_最佳技术编码面试准备书

    华为技术面试编码题 Technical coding interviews are notoriously difficult - almost borderline quiz-like for th ...

  3. 视频编码会议_我在编码事件和会议上进行了16次技术演讲。 这是我学到的。

    视频编码会议 For several years now, I've been watching tons of online conference talks. I'm always impress ...

  4. 2019年税务编码分类_正在学习编码每个人在2019年的工作方式吗?

    2019年税务编码分类 通过使用Google Chrome扩展程序关键字Everywhere ,我发现"学习编码"一词是Google每月的74,000次. 取决于您对大数的容忍度, ...

  5. 软件工程编码阶段_软件工程的编码阶段

    软件工程编码阶段 The coding phase in the software engineering paradigm is usually defined after the designin ...

  6. java对字符串编码转换_处理字符串编码转换java类详解

    该字符串处理类包括将ISO-8859-1编码的字符串转换成GBK编码 .对输入的字符串进行一次编码转换,防止SQL注入和验证URL地址是否存在的方法. 字符串处理类(编码转化.SQL注入.URL) i ...

  7. svg 编码设置_如何手动编码SVG

    svg 编码设置 关于可伸缩矢量图形的一大优点(除了它们可以无限伸缩而不造成质量损失外)是,一旦您了解了基本原理,就可以很容易地手工编写简单的形状,而无需打开图形应用程序. 仅需几行代码,您就可以拥有 ...

  8. javaweb解决编码问题_学习编码? 首先,学会解决问题。

    javaweb解决编码问题 Most of the tutorials you have read or watched before now usually do one thing, spoon- ...

  9. python安全编码问题_浅谈Python中的编码问题

    对于Python的初学者来说,编码问题相当令人头疼.本文就根据我在学习过程中遇到的问题简单谈一下Python中的编码.首先简单介绍一下几种常见的编码. 一.几种常见的字符编码 ASCII码 ASCII ...

最新文章

  1. while保留五位小数c语言,C语言教程(共同学习)
  2. MariaDB/MySQL 报错解决:ERROR 1698 (28000): Access denied for user 'root'@'localhost'
  3. kali学习日记第二篇 -- Nessus
  4. 线程访问临界区的问题 实例,需解决
  5. 初步了解超图两种3D客户端 - iClient3D for_WebGL 和 iClient3D for_Plugin
  6. 满足人工智能日益增长的要求
  7. 使用UDP的简单C/S程序
  8. 计算机一级excel如何选择2个,2017年计算机一级excel操作题(2)
  9. OKhttp使用详解(一)
  10. 使用eclipse导入spring-framework-5.0.x源码
  11. 通过Matlab或python调用ABAQUS
  12. 外语学习的真实方法及误区
  13. php中超链接怎么去下划线的,html如何去掉超链接下划线?html超链接去掉下划线的方法介绍...
  14. 计算机应用基础南丁格尔,关于单元基础训练的习题
  15. 如何解决win10连接手机无反应情况
  16. 最简单直接粗暴的Mothur分析OTU教程
  17. 什么是PING值,PING值的计算方法
  18. flickr slack_Slack&Flickr的创始人如何将巨大的失败变成十亿美元的公司
  19. 这里有一份元宇宙春节旅游攻略
  20. 8家大厂SSP offer的清华学长谈算法岗是否人间地狱(送七本学长手写iPad笔记)

热门文章

  1. 快速查找数组中重复项下标
  2. Flask操作指南,留着练习
  3. 轮播插件——flexslider
  4. 关于Caused by: java.lang.IllegalStateException:问题解决办法!
  5. R 语言实现股票数据的预处理及分析
  6. @使用R语言进行股票分析
  7. android 学习之路线图
  8. 夺命雷公狗TP下关联查询
  9. 如何使用vsprintf, vsnprintf等函数
  10. 中国高铁进军海外主打廉快全 将贯通三条战略线路