日常电脑小工具编程

Coding has been a hot topic over the last few years. A lot of people want to start programming and become a developer. So how can you develop a coding habit?

在过去的几年中,编码一直是一个热门话题。 很多人都想开始编程并成为开发人员。 那么如何养成编码习惯呢?

A few days ago, I started to read The Power Of Habit by Charles Duhigg. This book made me think a lot about why some people struggle with programming daily. I think it's because of the habit process. Most people don't know how habits work and need concrete examples.

几天前,我开始阅读Charles Duhigg的《习惯的力量》 。 这本书让我思考了为什么有些人每天都在为编程而苦恼。 我认为是因为习惯过程。 大多数人不知道习惯如何工作,需要具体的例子。

In this article, I'm going to explain what a habit is and give you some advice to help you create a daily programming habit.

在本文中,我将解释什么是习惯,并为您提供一些建议,以帮助您养成每天编程的习惯。

有什么习惯? (What is a habit?)

Before starting, it's essential to define what a habit is and how you form one.

在开始之前,必须定义一种习惯以及如何养成一种习惯。

If we check the definition of the word "habit" on Google, we find this:

如果我们在Google上检查“ habit”一词的定义,就会发现:

"Habits are routines of behavior that are repeated regularly and tend to occur subconsciously" ― Wikipedia

“习惯是经常重复的行为习惯,容易下意识地发生。” ― 维基百科

"a behavior pattern acquired by frequent repetition or physiologic exposure that shows itself in regularity or increased facility of performance" ― Meriam-Webster Dictionary

“通过频繁的重复或生理暴露获得的行为模式,显示其规律性或增加的表现能力” ― Meriam-Webster词典

"a recurrent, often unconscious pattern of behavior that is acquired through frequent repetition" ― The Free Dictionary

“通过频繁的重复获得的经常性的,经常无意识的行为模式” ― 免费词典

"something that you do often or regularly, often without thinking about it" ― MacMillan Dictionary

“您经常或有规律地经常做的事情而没有考虑它” ― MacMillan词典

As you can see, a habit is an automatic process in your life. Take brushing your teeth, for example.

如您所见,习惯是生活中的自动过程。 以刷牙为例。

It's interesting to define the components of a habit to understand how it works.

定义习惯的组成部分以了解其工作原理很有趣。

Each habit includes three components: a cue, a routine, and a reward.

每个习惯包括三个组成部分:提示,例行程序和奖励。

提示是什么? (What is the cue?)

The cue is an event in your life that triggers a habit. Every time you do something automatically, it was started by a cue.

提示是您生活中触发习惯的事件。 每次您自动执行某项操作时,都会由提示开始。

Most of the time, a cue is defined by time, an emotional state, a location, or an action.

在大多数情况下,提示是由时间,情感状态,位置或动作定义的。

For example, if I'm working and suddenly smell coffee from my colleague's direction, my habit "Taking a coffee break" is triggered.

例如,如果我在工作时突然从同事的方向闻到咖啡味,则会触发我的“喝咖啡休息时间”习惯。

例行什么? (What is the routine?)

The routine is what you are doing while the habit process is running. You can define whatever you want it to be in this part. As I said previously, it can be, "I'm going to take a coffee break."

该例程是您在习惯进程运行时正在执行的操作。 您可以定义此部分中的任何内容。 正如我之前所说,可能是“我要去喝咖啡休息时间”。

奖励是什么? (What is the reward?)

The reward is the final element of the process. In other words, what this routine has done for you. For the coffee break example, the reward is "Thanks to the caffeine, I feel less tired, and I am more dynamic."

奖励是流程的最后一个要素。 换句话说,此例程为您做了什么。 对于喝咖啡休息时间的例子,奖励是“感谢咖啡因,我不那么累了,我更有活力。”

The more positive and pleasant the reward is for yourself, the more your brain will save the habit.

奖励给自己越积极和愉悦,您的大脑就越会节省习惯。

"This process within our brains is a three-step loop. First, there is a cue, a trigger that tells your brain to go into automatic mode and which habit to use. Then there is the routine, which can be physical or mental or emotional. Finally, there is a reward, which helps your brain figure out if this particular loop is worth remembering for the future. Over time, this loop—cue, routine, reward; cue, routine, reward—becomes more and more automatic. The cue and reward become intertwined until a powerful sense of anticipation and craving emerges. Eventually, whether in a chilly MIT laboratory or your driveway, a habit is born." ― Charles Duhigg, The Power of Habit: Why We Do What We Do in Life and Business

“我们大脑中的这个过程分为三个步骤。首先,是一个提示,一个触发条件,告诉您的大脑进入自动模式,并养成使用习惯,然后是例行程序,可以是身体上的,精神上的或最后,有一个奖励,可以帮助您的大脑弄清楚这个循环是否值得将来记住,随着时间的推移,这个循环(提示,例行,奖励,提示,例行,奖励)会越来越自动化。提示和报酬交织在一起,直到强烈的期待和渴望感出现为止。最终,无论是在寒冷的MIT实验室还是在您的车道上,都养成了习惯。” ―查尔斯·杜希格(Charles Duhigg),习惯的力量:我们为什么要在生活和业务中做我们要做的事情

一点运动 (A little exercise)

Here's something you can do: take one of your daily habits and try to define the cue, the routine, and the reward. Once you do, you're ready to read the next part on how to create your daily programming habit.

您可以执行以下操作:采取一种日常习惯,尝试定义提示,例行程序和奖励。 完成后,您就可以阅读下一部分有关如何养成日常编程习惯的内容。

如何使编程成为日常习惯 (How to make programming a daily habit)

All you have to do to make programming a daily activity is to create a routine.

使编程成为日常活动所需要做的就是创建一个例程。

You are free to define what you want for each part of this exercise, but I will give you a few tips to help you.

您可以自由定义本练习每个部分的内容,但我将为您提供一些提示。

For the cue, you can try to define something based on time:

对于提示,您可以尝试根据时间定义一些内容:

  • Every morning right after I wake up
    每天早晨醒来后
  • When I come back from my job
    当我下班回来时
  • During my lunch break
    我午休时
  • [Insert a time-based cue]
    [插入基于时间的提示]

Routine will be our most straightforward element to define. You can just say, "I want to code for 30 minutes," "I'm going to learn [Insert a skill] for 30 minutes," or many more.

例程将是我们定义的最直接的元素。 您可以说:“我想编码30分钟”,“我要学习30分钟的[插入技能]”或更多。

Finally, one of the most critical parts will be the reward. As I recommended in the first part of my first productivity article, you need to establish goals for yourself. It's going to help you define a reward. Every time you practice your habit, you are closer to your goal.

最后,最关键的部分之一就是奖赏。 正如我在第一篇生产力文章的第一部分中所建议的那样,您需要为自己建立目标。 它可以帮助您定义奖励。 每次练习习惯时,您就更接近目标。

Try to determine a long term goal, and inside of that, a lot of small goals.

尝试确定长期目标,并在其中确定许多小目标。

For example, you can say:

例如,您可以说:

  • I'm getting closer to my goals for the week.
    我正在接近本周的目标。
  • I'm getting a little closer to my final goal.
    我的目标越来越近了。
  • If I code right after waking up, I'll make myself breakfast as a reward.
    如果我醒来后立即编写代码,我将以早餐作为奖励。
  • [Insert a reward]
    [插入奖励]

可以帮助您的挑战 (A challenge that can help you)

One of the best ways to get into a habit is to follow a 100DaysOfX challenge. This challenge is designed to help you create a pattern and commit to it every day by sharing what you did on Twitter, Instagram, or your blog.

养成习惯的最佳方法之一就是跟随100DaysOfX挑战 。 这项挑战旨在通过分享您在Twitter,Instagram或博客上所做的事情来帮助您创建模式并每天致力于实施。

The reason I'm telling you about this challenge is that it became famous on Twitter with the 100DaysOfCode.

我告诉您这个挑战的原因是它在Twitter上以100DaysOfCode闻名 。

I strongly recommend that you read the rules on the site and get started. You'll see, at first, it may seem big and impossible, but you'll find it fun to do.

我强烈建议您阅读网站上的规则并开始使用。 首先,您会看到它似乎很大且不可能,但是您会发现它很有趣。

Besides, you will most certainly get support on Twitter, which will motivate you.

此外,您肯定会在Twitter上获得支持,这会激励您。

"Are you passionate about self-improvement? Eager to change your habits, have tried to do so many times, but had difficulties changing them? Life always seems to get in the way, there is not enough support, and you feel like you're alone in it? Find yourself thinking, "What's the use of all this self-improvement if I always seem to go back to where I started from?" ― 100DaysOfX

“您对自我完善充满热情吗?渴望改变自己的习惯,尝试过很多次,但是在改变习惯方面遇到了困难?生活似乎总是很碍手碍脚,没有足够的支持,您会觉得自己在独自生活在其中吗?发现自己在想:“如果我总是回到原来的位置,那么这些自我完善的用途是什么?” ― 100DaysOfX

If I recommend this challenge to you, it's because I'm doing it. I'm thrilled with the results, and I'm only starting.

如果我向您推荐此挑战,那是因为我正在这样做。 我对结果感到兴奋,而且我只是开始。

For my part, I'm doing the 100DaysOfReading challenge. I always wanted to start reading but I never took the time to do it. Thanks to this challenge, I'm on day 17, and already finished one and a half books.

就我而言,我正在做100DaysOfReading挑战。 我一直想开始阅读,但是我从来没有花时间去做。 多亏了这一挑战,我才进入第17天,已经完成了一本半书。

My habit loop:

我的习惯循环:

  • Every day before lunch or before sleeping (the cue).
    每天午餐前或睡觉前(提示)。
  • I read 20 pages or more (the routine).
    我读了20页或以上(常规)。
  • I am approaching my long-term goal of reading daily. I am close to my short-term goal of finishing the book. It makes me happy because I have always wanted to read daily (the reward).
    我正在实现我每天阅读的长期目标。 我已接近完成本书的短期目标。 这让我感到高兴,因为我一直想每天阅读(奖励)。
  • I publish a quote from the book I'm reading with some explanations and motivational text on my Twitter (the commitment).

    我在Twitter上发布了我正在阅读的书的引文,其中包含一些解释和激励性文字(承诺)。

Here are some tips that can help you to create your programming habit.

这里有一些技巧可以帮助您养成编程习惯。

计划任务 (Plan your tasks)

To work every day and achieve my monthly goals, I plan all my tasks the evening before. I put on paper what I want to make, and every time I do it, I'll scratch it off my list. I recommend that you do this with your daily programming habit because it's going to motivate you and satisfy you a lot when you finish all your goals.

为了每天工作并实现每月的目标,我计划前一天晚上完成所有任务。 我把我想做的事写在纸上,每次我做时,我都会把它从清单上划掉。 我建议您按照日常的编程习惯进行此操作,因为这会激励您并在您完成所有目标时让您满意。

If you need more structure in your work, define what you are going to do, how, when, and why.

如果您在工作中需要更多结构,请定义要做什么,如何,何时以及为什么。

For example, I'm going to create a landing page for my website (what I'm going to do). I will use Vue.JS to build it (how). I will do it between 8am and 10am (when). It's going to help me better understand Vue.JS and help me to start getting my visitor's email addresses.

例如,我将为我的网站创建一个登陆页面(我将要做)。 我将使用Vue.JS来构建它(如何)。 我将在上午8点至上午10点之间(时间)进行此操作。 这将有助于我更好地了解Vue.JS,并帮助我开始获取访问者的电子邮件地址。

编写您的梦想项目 (Code your dream project)

What could be better than coding daily while working on the project of your dreams? If you need motivation, it's an excellent way to program every day. Don't be afraid to take the initiative. Doing it a little bit every day will motivate you even more and give you results in a short time.

有什么比在梦想的项目中每天进行编码更好的了? 如果您需要动力,这是每天编程的好方法。 不要害怕采取主动。 每天做一点点会激发您更多的动力,并在短时间内为您带来结果。

查找您要工作的领域 (Find the field you want to work in)

The world of programming is vast – web, software, AI, embedded, and much more.

编程领域非常广阔-Web,软件,AI,嵌入式等等。

One of the significant difficulties is to define what you want to do as a programmer.

重大困难之一是定义您想成为一名程序员的工作。

It's not easy for everyone, but choosing a topic and sticking to it can be a good motivation factor to practice daily.

这对每个人来说都不容易,但是选择一个主题并坚持下去可能是每天练习的一个很好的动力因素。

For example, if you choose web programming, just focus on that. Even though it's still a big topic, you removed software, AI, embedded, and everything else. That's a good start.

例如,如果您选择Web编程,则只需专注于此即可。 即使这仍然是一个大话题,您也删除了软件,AI,嵌入式和其他所有内容。 这是一个好的开始。

To go further, you can choose between the front-end and back-end.

要走得更远,您可以在前端和后端之间进行选择。

I'm telling you all this because often, when you start, you get demotivated fast because there are too many things, and you can't focus on a specific theme.

我之所以告诉您所有这些信息,是因为当您开始时,常常会因为很多事情而很快失去动力,并且您无法专注于特定主题。

良好的环境 (A good environment)

Something that can motivate you in your daily programming habit is a pleasant working environment. I do not recommend working in your bed. You're going get tired easily.

令人愉悦的工作环境可以激发您每天的编程习惯。 我不建议您在床上工作。 你会很容易累。

Try to work at a desk or a table and do whatever you need to feel comfortable in that space. It will make you want to work more efficiently.

尝试在办公桌或桌子上工作,并尽一切所需使该空间舒适。 这将使您想更有效地工作。

进一步阅读 (Further reading)

If you are interested to know more about the habit process, I invite you to read The Power of Habit by Charles Duhigg. This book helped me a lot while writing this article, and a lot of the examples I gave you were inspired by it.

如果您有兴趣进一步了解习惯过程,我请您阅读Charles Duhigg 的《习惯的力量》 。 这本书在撰写本文时对我有很大帮助,而我给您的许多示例都受到了启发。

I've also heard about Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones by James Clear. This book offers a framework to improve your daily habits. The author tries to provide practical guidance on how to make changes.

我还听说过原子习惯:詹姆斯· 克莱尔 (James Clear) 提出的建立良好习惯和打破不良习惯的简便方法 。 本书提供了改善您的日常习惯的框架。 作者尝试提供有关如何进行更改的实用指导。

结论 (Conclusion)

Do you plan to make programming a daily habit? Are you going to commit to 100DaysOfCode?

您打算使编程成为一种日常习惯吗? 您要提交100DaysOfCode吗?

Feel free to share this article if you liked it.

如果喜欢,请随时分享此文章。

Don't miss my content by following me on Twitter and Instagram.

在Twitter和Instagram上关注我,不要错过我的内容。

You can find other articles like this on my website: herewecode.io.

您可以在我的网站上找到其他类似的文章: herewecode.io 。

想要更多? (Want more?)

  • Each week get a motivational quote with some advice, a short tutorial into a few slides, and one developer's picture on Instagram.

    每周都会收到励志名言,并提供一些建议,简短的教程,几张幻灯片以及Instagram上一位开发人员的照片。

  • Sign-up for the newsletter and get the latest articles, courses, tutorials, tips, books, motivation, and other exclusive content.

    注册时事通讯并获取最新文章,课程,教程,技巧,书籍,动机和其他独家内容。

翻译自: https://www.freecodecamp.org/news/how-to-make-programming-a-daily-habit/

日常电脑小工具编程

日常电脑小工具编程_如何使编程成为日常习惯相关推荐

  1. 便携设备转可移动磁盘_选择合适的便携式移动电话/平板电脑/小工具电池充电器

    便携设备转可移动磁盘 I travel a lot and I've talked about the importance of having power while on the go. I ca ...

  2. 爬虫小工具合集|不会编程也能爬数据

    当前的主流爬虫手段是用Python编程,Python的强大毋庸置疑,但初学者学习Python还是需要一两个月时间的.有没有一些更简单的爬取数据方法呢?答案是有的,DataCastle为你准备了如下小工 ...

  3. python使用pyqt5制作exe电脑小工具

    call_cxtool.py 用来调用界面的开始界面 # -*- coding: utf-8 -*-# Form implementation generated from reading ui fi ...

  4. python小工具开发_使用Python制作一个桌面小工具

    今天,我们制作一个有意思的小工具,利用Python获取历史上的今天发生的事情. [分析] 个人总结了一下,"历史上的今天"有很多调用接口.有很多调用接口都是收费的或者就是免费但限制 ...

  5. 【电脑小工具推荐】久坐提醒

    ▚ 01 引言 ▚ 02 Sedentary-reminder 久坐提醒小工具 GitHub在线网址:https://github.com/wjbgis/Sedentary-reminder 主界面 ...

  6. abb机器人半圆编程_机器人示教编程1——教你快速示教ABB机器人

    一.机器人安全操作守则 由于机器人系统复杂而且危险性大,在练习期间,对机器人进行任何操作都必须注意安全.无论什么时候进入机器人工作范围都可能导致严重的伤害,只有经过培训认证的人员才可以进入该区域. 以 ...

  7. java函数式编程_说说函数式编程的那些事

    今天这篇文章我们主要来聊聊函数式编程的思想. 函数式编程有用吗? 什么是函数式编程? 函数式编程的优点. 总所周知 JavaScript 是一种拥有很多共享状态的动态语言,慢慢的,代码就会积累足够的复 ...

  8. java面向方面编程_面向方面编程的介绍----基本概念

    面向对象的编程中常用的概念是:继承.封装.多态.在面向方面的编程中常使用的概念是:advices/interceptors, introductions, metadata, and pointcut ...

  9. 函数式编程和面向对象式编程_比较函数式编程,命令式编程和面向对象的编程

    函数式编程和面向对象式编程 As Oracle Corporation has introduced some Functional constructs in Java SE 8, now-a-da ...

最新文章

  1. eclipse系列: Cannot change version of project facet Dynamic web的解决方法
  2. Android 中的 Service 全面总结
  3. html键值对与名称值对的区别,使用网络存储存储键值对的数据-HTML5教程
  4. 设计模式18---设计模式之策略模式(Strategy)(行为型)
  5. 2019 DDCTF 部分writeup
  6. SpringCloud微服务(04):Turbine组件,实现微服务集群监控
  7. 再见 XShell 和 ITerm 2,是时候拥抱全平台高颜值终端工具 Hyper 了!
  8. 俞敏洪回应新东方向国家图书馆捐课
  9. rk3399_android7.1的HDMI显示实现固定分辨率
  10. 手机及电脑抓包(tcp,udp,http)
  11. python会实现编译功能吗_为什么会有这么多python?其实python并不是编程语言!
  12. NK-RTU980 USB bulk传输
  13. 视频教程-征服Node.js 7.x视频课程(6):文件系统与Stream视频课程-Node.js
  14. jdbc批量插入、批量删除、批量更新
  15. 一维正态分布的最大似然估计
  16. fastadmin 数据导出,设置excel行高和限制图片大小
  17. oracle按非选列排序,如何选择和排序不在Groupy中的列按SQL语句 – Oracle
  18. python win7正常的文件路径到win10报错_如何更改临时文件路径_win10怎么更改临时文件夹的路径图文步骤...
  19. 学习笔记——JAVA执行javascript
  20. mysql innodb 读加锁_InnoDB 读大量数据时会加读锁么?

热门文章

  1. linux 命令行使用wget下载百度云资源
  2. 190906二级刷题水果与小女孩
  3. javascript-练习-数组数据存li中
  4. linux-查找相关-find-locate-grep
  5. Java异常类复习总结
  6. uniGUI试用笔记(四)
  7. FI常用T-CODE
  8. 《敏捷软件开发-原则、方法与实践》-Robert C. Martin
  9. Linux 下的几个游戏模拟器
  10. 面试官系统精讲Java源码及大厂真题 - 23 队列在源码方面的面试题