博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
web开发的一些工具技巧_有用的技巧可帮助您建立Web开发人员的良好习惯
阅读量:2522 次
发布时间:2019-05-11

本文共 10241 字,大约阅读时间需要 34 分钟。

web开发的一些工具技巧

by Antoine Lechenault

通过安托万·莱切诺特(Antoine Lechenault)

有用的技巧可帮助您建立Web开发人员的良好习惯 (Useful tips to help you create good habits as a web developer)

This article is aimed at junior developers, but may interest anyone as a bank of useful tips on how to grow some good habits.

本文针对的是初级开发人员,但可能有人对如何养成一些良好习惯感兴趣,因为他们提供了一系列有用的技巧。

I’m constantly trying to challenge myself and get out of my comfort zone. Here is the summary of the best daily tips I came up with.

我一直在努力挑战自己,走出舒适区。 这是我想到的最佳每日提示的摘要。

I try to perfect my working habits as I’m growing, so feel free to suggest some tips not specified in this article to help me too!

随着我的成长,我会尽力完善自己的工作习惯,因此,随时建议本文中未提及的一些技巧对我也有帮助!

Alright, first tip.

好吧,第一个提示。

1.做技术观察。 很多。 (1. Do technology watch. A LOT.)

“Technology watch” is the activity of keeping abreast of innovations in a given sector.

“技术观察”是指跟上特定部门的创新活动。

There’s not a lot more to say, but in my opinion, it’s the easiest way to learn just by reading. Even if you don’t understand the whole subject or learn how to do the magic thing the article talks about, you know that it exists. And that’s what really matters.

没有太多要说的,但是我认为,这是通过阅读学习的最简单方法。 即使您不了解整个主题,也不了​​解如何做本文所谈论的不可思议的事情,您也知道它存在。 这才是真正重要的。

A lot of services and tools are now available online to help you do this. You should use them because they’ll be your first source of information and new ideas on a daily, weekly or monthly basis.

现在,在线提供了许多服务和工具来帮助您完成此任务。 您应该使用它们,因为它们将成为您每天,每周或每月的第一信息来源和新想法。

Tools like can help you save a lot of time by monitoring all your technology watch in one place. Plus, I would recommend tracking new contents and read all your feeds for example on Monday and Thursday, not every day.

像这样的工具可以通过在一个地方监视所有技术手表来帮助您节省很多时间。 另外,我建议您跟踪新内容并例如在星期一和星期四而不是每天阅读所有提要。

Some of the website/forum I read every week :

我每周都会阅读一些网站/论坛:

But when you’re using content monitoring tools, try to stay focused on a subject related to the skills you want to work on.

但是,当您使用内容监视工具时,请尝试专注于与您要研究的技能有关的主题。

It’s easy to get lost and jump from one subject to another. Ok, the last article on the new Crypto ICO is SUPER INTERESTING, but do you work in cryptocurrency? Stay focused.

很容易迷失方向,从一个主题跳到另一个主题。 好的,关于新加密ICO的最后一篇文章是SUPER INTERESTING,但是您使用加密货币吗? 保持专注。

2.看看很棒的网站。 并打开它们的包装! (2. Look at awesome websites. And unpack them!)

You can easily find awesome websites, resources, or code experimentations here:

您可以在这里轻松找到很棒的网站,资源或代码实验:

But the point isn’t to look at them and say: “I’ll never be able to do this!”

但是重点并不是要看着他们说:“我永远做不到!”

Ask yourself: how you would do the magic, and try to understand what they used to build it. New technology, new JavaScript library, unknown CSS property? We live in a world where every day new things come up and we are not able to learn as fast as the technologies grow themselves.

问问自己:您将如何做魔术,并尝试了解他们用来制造魔术的内容。 新技术,新JavaScript库,未知CSS属性? 我们生活在一个每天都有新事物出现的世界中,我们无法像技术自身发展一样快地学习。

But I would suggest that you not only try to understand the process but also try to reproduce it, and explain it. Generally, if you can teach to someone, you have mastered the subject.

但是我建议您不仅要尝试理解该过程,而且还要尝试重现并解释它。 通常,如果您可以教别人,那么您已经掌握了该主题。

Over the past year, I spent a lot of time changing my process. Unpacking the websites and understanding how skilled people built them. All these steps helped me to combine different techniques and find smart ways to construct my websites.

在过去的一年中,我花了很多时间来更改自己的流程。 打开网站的包装,并了解熟练的人员如何构建它们。 所有这些步骤帮助我结合了不同的技术,并找到了构建网站的明智方法。

That directly leads me to the next point.

这直接将我引向下一点。

3.向有更多经验的人学习 (3. Learn from those with more experience)

Usually when you start as a junior in a company, you’ll be directed by a Lead Dev who will have a look at your code, schedule your tasks, and prevent you from dropping the database.

通常,当您从公司大三开始时,您将由Lead Dev指导,Lead Dev将查看您的代码,安排您的任务,并防止您删除数据库。

Don’t be shy to ask to learn more from them. Ask them to show you how to do the cool things they did on the last website they launched, or the nice component they made to make the life easier for everyone on the dev team.

不要害羞地要求向他们学习更多。 要求他们向您展示如何在他们上次发布的网站上做他们做的很酷的事情,或者为使开发团队中的每个人都过得更好而制作的漂亮组件。

But most important: don’t be afraid to ask for things you think are dumb.

但最重要的是:不要害怕询问您认为愚蠢的事情。

Everyone starts with different education, so it is natural to ask questions that may sometimes seem “silly”, but those answers will help you for years to come.

每个人都从不同的教育开始,因此很自然地提出有时看起来“很愚蠢”的问题,但是这些答案将在未来几年为您提供帮助。

Another way to learn from the best is to code review.

最好的学习方法是代码审查。

If your team doesn’t do it on regular basis, be the first to introduce it to your dev team. Don’t hesitate to ask other members of your team to review your code and try to improve it.

如果您的团队不定期执行此操作,请率先将其介绍给您的开发团队。 不要犹豫,请团队中的其他成员检查您的代码并尝试对其进行改进。

Listen to them. Start a debate. Explain why you did it that way and not the way they would have done it. Exchanging, discussing, and learning from each other’s strengths is probably the healthiest way to improve.

听他们说。 开始辩论。 说明您为什么这样做,而不是他们这样做的方式。 彼此交流,讨论和学习可能是最健康的改进方式。

4.永远不要忘记注释您的代码 (4. NEVER, EVER, forget to comment your code)

Ok, I know, you’ve read that sentence a million times since you started coding. On the internet, by your superiors, by your teachers, even maybe by your dog.

好的,我知道,自您开始编码以来,您已经阅读了一百万遍了。 在互联网上,由您的上级,由您的老师,甚至由您的狗。

The point of commenting your own code isn’t to make it only easily understandable by another developer or yourself. It’s also a way to think about your function before writing it. To define a purpose. And only one.

注释自己的代码并不是要让其他开发人员或您自己容易理解。 这也是在编写函数之前考虑其功能的一种方法。 定义目的。 而且只有一个。

Stop yourself from creating a multiSuperTaskFunction().

阻止自己创建multiSuperTaskFunction()。

// I don't know RickmySuperFunctionAddRemoveCreateEarth( $string, $purpose1, $bool) {  $var1 = true;  while($var1) {   addNewHumans++;  } else {   heregoesnothing();
}}

Let’s say, for example, you start to write a function to manage a planet ecosystem. With the habit of commenting your code, you'll automatically sequence your code in multiples functions. And every function has only one task to execute.

举例来说,假设您开始编写管理行星生态系统的功能。 养成注释代码的习惯,您将自动以多个函数对代码进行排序。 而且每个功能只有一个任务要执行。

/** Handler to create the planet system*/Class Planet {
public $name;
/*   * Set the name of the instancied planet   * @var STRING $new_name Contain only a string to name the planet   */   function set_name(string $new_name) {	 $this->name = $new_name;   }	    /*   * Function to access the name of the planet   * return STRING $this->name Contain only a string with the name    * of the planet   */   function get_name() {			return $this->name;		   }
}

This principle of separating all your functions in small ones will help you identify your bugs more quickly. This’ll also allow you to isolate elements and reuse them later (modular components). Finally, it will be much more readable and you won’t need to hide when you show your code.

将所有功能分成较小的功能这一原则将帮助您更快地识别错误。 这也将使您能够隔离元素并稍后再使用(模块化组件)。 最后,它将更具可读性,并且在显示代码时不需要隐藏。

5.改进自己的代码:重构。 (5. Improve your own code: Refactor.)

If you rely on everyone except you, you won’t be able to progress AND gain self-confidence. That’s the reason why it’s important to go back to your dirty code and clean it.

如果您依靠除您以外的所有人,您将无法进步并获得自信。 这就是为什么回到脏代码并对其进行清理很重要的原因。

I think that’s even more important than developing a new feature. So, the next time your project manager asks you what you were doing during those 5 hours of non-billable work, you can answer back: I’m refactoring my code.

我认为这比开发新功能更为重要。 因此,下一次您的项目经理问您在这5个小时的非计费工作期间您在做什么时,您可以回答:我正在重构我的代码。

“Code refactoring is a controlled technique for improving the design of an existing code base. Its essence is applying a series of small behavior-preserving transformations, each of which “too small to be worth doing”. However, the cumulative effect of each of these transformations is quite significant. By doing them in small steps you reduce the risk of introducing errors.“
“代码重构是一种用于改进现有代码库设计的受控技术。 它的本质是应用一系列小的行为保留转换,每个转换“都太小,不值得做”。 但是,每个转换的累积效果都非常显着。 通过一步一步地进行操作,您可以减少引入错误的风险。”

Martin Fowler,

Martin Fowler,

Long story short, try to review your own code and improve it without impacting the functionality. Faster, cleaner, more readable, modular.

长话短说,请尝试检查自己的代码并在不影响功能的情况下对其进行改进。 更快,更清洁,更易读,模块化。

The way I do it is to isolate a code part I’m not proud of or had to code quickly due to a short deadline, and come back to it one or two weeks later.

我这样做的方法是隔离一个我不感到骄傲的代码部分,或者由于期限短而不得不快速编写代码,然后在一两个星期后重新使用它。

There is always a good reason to explain why you wrote that piece of bad code but you can’t really argue why you didn’t take the time to improve it.

总是有一个很好的理由来解释为什么您编写了那段糟糕的代码,但是您无法真正辩解为什么您不花时间对其进行改进。

An unstable portion of code will never be anything else than .

代码的不稳定部分永远不会成为 。

It can be challenging to recover your code or get involved in a complex function. But it will never be as hard as having to do it under the pressure of a bug triggered live.

恢复您的代码或参与复杂的功能可能会很困难。 但是,这绝对不会像在实时触发的错误的压力下要做一样困难。

Take your time, try to understand your mistakes. It will save you a lot of time, stress and health in the long term.

慢慢来,尝试理解您的错误。 从长远来看,它将为您节省大量时间,压力和健康。

6.犯错误。 (6. Make mistakes.)

Ok, but…?!

好的但是…?!

Since I started coding, I found out that the most valuable way to improve myself was to fail again and again. Trust me, some mistakes are almost impossible to avoid, and that’s totally normal.

自从开始编写代码以来,我发现提高自己的最有价值的方法就是一次又一次地失败。 相信我,几乎不可能避免一些错误,这是完全正常的。

Did you write the same function five times in the same project? I did, a lot of times. But this is not happening anymore, thanks to my experience and the processes I’ve created.Don’t be afraid to make mistakes. You’ll keep making them time and time again, but less and less often. You never stop having to learn new things and adapting to new technology changes, but this is the beauty of our job. Learning new things every single day.

您是否在同一项目中编写了五次相同的函数? 我做了很多次。 但这要归功于我的经验和创建的流程,不要害怕犯错。 您将不断使它们一次又一次,但是越来越少。 您永远不必停止学习新事物并适应新技术的变化,但这就是我们工作的美丽。 每天学习新事物。

Thanks for taking the time to check out my first article on Medium!

感谢您抽出宝贵时间查看我关于Medium的第一篇文章!

If you liked this article, drop a ?, follow me on Medium, and recommend this article to your friends.

如果您喜欢这篇文章,请添加?,在“ Medium”上关注我,然后将这篇文章推荐给您的朋友。

Feel free to connect with me on ! ✌️

随时在上与我联系! ✌️

翻译自:

web开发的一些工具技巧

转载地址:http://ncewd.baihongyu.com/

你可能感兴趣的文章
转:Zend Framework 重定向方法(render, forward, redirect)
查看>>
Linux下查看磁盘与目录的容量——df、du
查看>>
关于日记app的思考
查看>>
使用sencha的cmd创建项目时提示找不到\Sencha\Cmd\repo\.sencha\codegen.json
查看>>
如何快速启动一个Java Web编程框架
查看>>
MSP430单片机存储器结构总结
查看>>
文本框过滤特殊符号
查看>>
教育行业安全无线网络解决方案
查看>>
7个杀手级的开源监测工具
查看>>
软件架构学习小结
查看>>
C语言实现UrlEncode编码/UrlDecode解码
查看>>
返回用户提交的图像工具类
查看>>
树链剖分 BZOJ3589 动态树
查看>>
挑战程序设计竞赛 P131 区间DP
查看>>
【例9.9】最长公共子序列
查看>>
NSFileManager打印目录下的文件的函数
查看>>
Rails--bundle exec rake db:migrate
查看>>
深度优先搜索 之 CODE[VS] 1116 四色问题
查看>>
浏览器渲染过程
查看>>
js遍历Object所有属性
查看>>