!! javascript_“ JavaScript很简单!” 他们告诉我的 ?

!! javascript

Junior Developer: Ok, now I’ll learn how to program in JavaScript! Where should I start?

初级开发人员:好的,现在我将学习如何使用JavaScript编程! 我应该从哪里开始?

"Senior" Developer: That's very easy, you don't even need to write a lot of code! Just go to npm, install the Zebra and Koala Open Source modules, and you're done!

“高级”开发人员:这很容易,您甚至不需要编写很多代码! 只需转到npm,安装Zebra和Koala 开源模块,即可完成!

Junior Developer: Cool!

初级开发人员:太酷了!

npm: Hi little grasshopper how can I be of assistance?

npm:嗨,小蚱hopper,我该如何帮忙

Junior Developer: Give me the Zebra and Koala modules.

初级开发人员:给我Zebra和Koala模块。

npm: Of course, here they are.

npm:当然了。

Junior Developer: All tied up. Now my work is done!

初级开发人员:捆绑在一起。 现在我的工作完成了!

*One day later*

*一天后*

Junior Developer: Now I need to add this feature. Where should I start?

初级开发人员:现在,我需要添加此功能。 我应该从哪里开始?

“Senior” Developer: That’s very easy, you don’t even need to write a lot of code! Just go to Zebra's Github repository and ask them to implement it!

“高级”开发人员:这很容易,您甚至不需要编写很多代码! 只需转到Zebra的Github存储库,并要求他们实施它即可!

Junior Developer: Hi Zebra, I need to add this new feature, would you help me out?

初级开发人员:嗨,Zebra,我需要添加此新功能,您能帮帮我吗?

Zebra: Of course, create a Pull Request.

斑马:当然,创建拉取请求。

Junior Developer: Here it is.

初级开发人员:在这里。

*2 days later*

* 2天后*

Zebra: Your Pull Request is not good, you need to fix a few things.

斑马:您的拉取请求不好,您需要修复一些问题。

Junior Developer: Here it is.

初级开发人员:在这里。

*2 days later*

* 2天后*

Zebra: Now your Pull Request is good, I have merged.

斑马:现在您的请求请求很好,我已经合并了。

Junior Developer: Thanks. Now my work is done!

初级开发人员:谢谢。 现在我的工作完成了!

*3 hours later*

* 3小时后*

Junior Developer: Now I need to fix this bug. Where should I start?

初级开发人员:现在,我需要修复此错误。 我应该从哪里开始?

“Senior” Developer: That’s very easy, you don’t even need to write a lot of code! Just go to Koala’s Github repository and report it!

“高级”开发人员:这很容易,您甚至不需要编写很多代码! 只需转到Koala的Github存储库并进行报告!

Junior Developer: Hi Koala, there's a bug in your module.

初级开发人员:嗨,考拉,您的模块中有一个错误。

*2 days later*

* 2天后*

Junior Developer: Hi Koala, are you there?

初级开发人员:嗨,考拉,您在吗?

*1 week later*

* 1周后*

Junior Developer: Is anybody maintaining this module?

初级开发人员:有人维护此模块吗?

*1 week later*

* 1周后*

Junior Developer: I'll fork and fix it. Done.

初级开发人员:我会修复它。 做完了

*6 months later*

* 6个月后*

Junior Developer: Now I need to add this other feature. Let's look up which module I need to change first:

初级开发人员:现在,我需要添加其他功能。 让我们看看我首先需要更改哪个模块:

Junior Developer: Err… I guess something went really wrong… JavaScript is so hard and complicated! What should I do now?

初级开发人员: Err ...我想有些地方真的出了问题... JavaScript非常困难和复杂! 我现在应该怎么办?

Real Developer: The problem is not JavaScript.

真正的开发者:问题不是JavaScript。

An external dependency tends to be too generic and therefore has a lot of complexity to account for edge cases you probably don’t have.

外部依赖关系往往过于通用,因此要考虑到您可能没有的极端情况,其复杂性很高。

As a principle, you need to reduce your dependency on an external code as much as you can. Over time dependencies will incur a cost of change if you rely on them for the core purpose of your project.

原则上,您需要尽可能减少对外部代码的依赖。 如果您依赖依赖项来实现项目的核心目的 ,那么随着时间的流逝,依赖项将招致变更成本。

Evaluate their need critically.

严格评估他们的需求。

It’s possible to write your own code for things a generic module can already do for you without having to reinvent the wheel, as long as you design it correctly. That includes (but is not restricted to) no side-effects, low coupling, high cohesion, proper interface, enough affordance, no crap testing tools, code that can be deleted, no "over-engineering", no copy/paste, strict, small and without false positive tests.

只要您正确地设计通用模块,就可以编写自己的代码来执行通用模块已经为您完成的事情,而无需重新发明轮子 这包括(但不限于) 没有副作用低耦合高内聚性适当的界面足够的 承受 能力没有废话测试工具可以删除的代码没有“过度设计”没有复制/粘贴严格 很小没有假阳性试验

If you don't design it correctly, you'll end up in the same mess, or even worse.

如果设计不正确,您将陷入同样的​​困境,甚至更糟。

If you’re a plumber and the pipe leaks, it’s your responsibility to fix it. Not somebody else’s.

如果您是水管工并且管道漏水,则有责任修理它。 没有别人的。

It’s all about applying software principles and techniques. It’s about learning how to program.

这都是关于应用软件原理和技术的 。 这是关于学习编程的知识。

Don't blame the scalpel.

不要怪手术刀。

Junior Developer: Ok, now I’ll learn how to program. Can you help me?

初级开发人员:好的,现在我将学习编程。 你能帮助我吗?

Real Developer: Yes.

真正的开发商:是的。

*7 years later*

* 7年后*

New Junior Developer: Ok, now I’ll learn how to program in this popular language! Where should I start?

新初级开发人员:好的,现在我将学习如何使用这种流行语言进行编程! 我应该从哪里开始?

Former Junior Developer: I can teach you, but that's not easy.

前初级开发人员:我可以教你,但这并不容易。

I've been through this.

我已经经历过了。

Sit down.

坐下。

Let's talk.

说吧

Thanks for reading. If you have some feedback, reach out to me on Twitter, Facebook or Github.

谢谢阅读。 如果您有任何反馈意见,请通过TwitterFacebookGithub与我联系。

Wanna chat in person? You can find me in the Sydney Software Crafters meetup.

想亲自聊天吗? 您可以在Sydney Software Crafters聚会中找到我。

翻译自: https://www.freecodecamp.org/news/ok-now-ill-learn-how-to-program-in-javascript-2c7847414830/

!! javascript

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值