两个项目共享一个数据库_为什么我有一个数据科学博客共享代码的7大好处

两个项目共享一个数据库

My blog statsandr.com was launched in December 2019. Although 9 months of writing is a very short period compared to others, I can already say that it’s been an incredible and very enriching adventure!

我的博客statsandr.com于2019年12月启动。尽管与其他人相比,写作9个月非常短,但我已经可以说这是一次令人难以置信且非常丰富的冒险!

With 45 articles published (at the time of writing this article) and topics ranging from descriptive statistics, probability, inferential statistics to R Markdown and data visualization, I have seen many benefits of sharing my code through a technical blog.

发表了45篇文章 (在撰写本文时),主题从描述性统计概率推论统计R Markdown以及数据可视化 ,我看到了通过技术博客共享代码的许多好处。

In this article, I highlight 7 of them (in no particular order) with the hope that it will give ideas and incentives to some of you. In the end of this article, I also mention a couple of modern solutions needed for starting your own blog.

在本文中,我重点介绍了其中的7个(不分先后顺序),希望它能为您中的某些人提供想法和激励。 在本文的最后,我还提到了创建您自己的博客所需的几个现代解决方案。

Note that in these 9 months, I did not make a living from my blog and this is not my goal as I would need to make it a priority.1 However, I have received enough positive feedback from readers, and more importantly, I have learned enough to continue writing.

请注意,在这9个月中,我没有靠博客谋生,这也不是我的目标,因为我需要将其作为优先事项。 1但是,我从读者那里得到了足够的积极反馈,更重要的是,我已经学到了足够的知识以继续写作。

#1通过写作学习 (#1 Learn by writing)

I really enjoy learning new stuff in many different domains. I learn (and I am still learning) a lot by teaching statistics to students from diverse backgrounds as part of my teaching assistant position at university.

我真的很喜欢在许多不同领域学习新知识。 作为大学助教职位的一部分,我通过向来自不同背景的学生讲授统计资料而学到了很多东西(并且我还在学习)。

Before launching this blog, I believed that I understood a statistical concept as soon as I was able to teach it to my students. If I was not able to explain it in a clear and understandable way, it meant that I needed to study it more thoroughly because I actually did not fully understand it.

在启动此博客之前,我相信只要能够将其给我的学生,我就会理解统计概念。 如果我不能以清晰易懂的方式来解释它,那意味着我需要更彻底地研究它,因为我实际上并不完全理解它。

This is often referred as the Feynman technique. This method of learning is based on the fact that in order to fully master a topic you need to be able to explain it back to someone in simple terms.

这通常称为费曼技术。 这种学习方法基于以下事实:为了完全掌握一个主题,您需要能够用简单的术语向某人解释它。

Throughout this blog, I actually realized that in order to learn and fully understand something new, one must:

在整个博客中,我实际上意识到,要学习和完全理解新事物 ,必须:

  • be able to clearly communicate it and teach it in simple terms,

    能够清楚地交流并用简单的术语讲授它,
  • but also be able to write it down in a precise and concise manner

    能以精确而简洁的方式写下来

So although this blog was first launched to share statistical concepts I am most familiar with (hoping that it would be useful to some people), I now also use it to learn by writing. I think that this additional way of learning is actually as powerful as teaching because writing allows me to consolidate my understanding.

因此,尽管此博客最初是为了分享我最熟悉的统计概念(希望它对某些人有用)而创建的,但现在我也将其用于写作学习 。 我认为这种额外的学习方式实际上与教学一样强大,因为写作可以使我巩固自己的理解力

Obviously, I am learning mainly about statistics and its applications in R as they are the main topics of the blog. However, I never thought that I would also learn so much about:

显然,我主要学习有关R的 统计信息及其应用程序,因为它们是Blog的主要主题。 但是,我从没想过我也会学到很多东西:

  • web development and SEO/analytics (which are increasingly important skills nowadays)

    网站开发和SEO /分析(当今越来越重要的技能)
  • project management (as you build something from scratch and wish to develop it)

    项目管理(当您从头开始构建某些东西并希望进行开发时)
  • writing (a skill I still need to improve as a non-native English speaker)2

    写作(作为非英语母语者,我仍需要提高技能) 2

  • communicating results (as any data scientist will tell you, results without proper communication are useless and writing a blog is a great practice)

    交流结果(正如任何数据科学家都会告诉您的那样,没有适当交流的结果就没有用,写博客是一种不错的做法)
  • marketing/public relation/brand management (think about social networking and how to deal with all sorts of questions from readers)

    营销/公共关系/品牌管理(考虑社交网络以及如何处理读者提出的各种问题)
  • etc.

    等等

Maintaining a blog teaches me essential skills that are usually taught in full-time jobs. With a blog, you are responsible of everything from the content to readers’ inquiries, similar to an employee in charge of a project and who has to deal and communicate with end users.

维护博客可以教会我一些通常在全职工作中教授的基本技能。 使用博客,您将负责从内容到读者查询的所有内容,类似于负责项目的员工以及必须与最终用户进行交易和沟通的员工。

Don’t get me wrong, apart from exceptions, I do not think that a blog can completely replace a job in terms of personal development, but it definitely helps to learn a broad range of important skills. Reading books and completing data science online courses are other examples to gain skills in addition to a job, but a blog tends to be more diverse and applied, making it more beneficial (in my opinion).

不要误会我的意思,除了例外,我不认为博客可以在个人发展方面完全取代工作,但绝对有助于学习广泛的重要技能。 阅读书籍和完成数据科学在线课程是在工作之外获得技能的其他示例,但是博客往往更加多样化和广泛应用,从而使其受益匪浅(我认为)。

Another way I am learning is by doing research about the topic I am writing about.

我学习的另一种方式是通过对所写主题的研究

An example of it is my post on outliers detection in R. As part of any descriptive analysis, I am used to check for potential outliers. Since I was familiar with this topic, I decided to write about it. However, I found the post not complete enough so I did some further research. It turned out that there were in fact several statistical tests that I did not know about. I wrote about these tests and I now include these new techniques whenever I check for potential outliers.

一个例子是我在R中的异常值检测文章。 作为任何描述性分析的一部分,我经常检查潜在的异常值。 因为我熟悉这个主题,所以我决定写它。 但是,我发现该帖子不够完整,因此我做了一些进一步的研究。 原来,实际上有一些我不知道的统计测试。 我写了关于这些测试的文章,现在每当我检查潜在异常值时,我都会使用这些新技术。

Last but not least, I often receive emails from readers asking to write about a topic of their choice. It sometimes happens that I never heard about their suggested topic, so I do some research out of curiosity. Even if I still do not write about it because I am not familiar enough with it, at least I am aware that it exists and I know more or less what this is about.

最后但并非最不重要的一点是,我经常收到读者发来的电子邮件,要求写他们选择的主题。 有时候,我从来没有听说过他们建议的主题,所以出于好奇,我做了一些研究。 即使由于对它还不够熟悉,我仍然不写它,至少我知道它存在,而且我或多或少都知道这是什么。

If the sole benefit of learning did not convince you to start your blog, see other benefits I have experienced in the following sections.

如果学习的唯一好处不能说服您启动博客,请参阅以下各节,了解我获得的其他好处。

#2获得反馈 (#2 Get feedback)

Get feedback, suggestions and constructive critics from more experienced users. Remarks greatly help in correcting typos and bugs present in my code, and they also help in improving my R skills.

从经验丰富的用户那里获得反馈 ,建议和建设性的批评意见。 备注极大地帮助纠正了我的代码中存在的错别字和错误,也有助于提高我的R技能。

You will be amazed to see that, although you spent countless hours to check your code, there will always be someone who will spot a typo that you missed. Valuable feedback from people all over the world has, for instance, definitely improved the quality and completeness of my R Shiny applications that I use on a daily basis.

您会惊奇地发现,尽管您花费了无数小时来检查代码,但总会有人发现您错过的错字。 例如,来自世界各地的人们的宝贵反馈意见无疑改善了我每天使用的R Shiny应用程序的质量和完整性。

A blog can therefore be seen as a powerful peer-review method of your understanding of a concept, code or R practices. It is also better to make mistakes when working on a toy example and correct them, than to make mistakes on a real project at your workplace.

因此,博客可以被视为您对概念,代码或R实践的理解的强大的同行评审方法 。 与在工作场所的真实项目中犯错误相比,在制作玩具示例时犯错误并进行更正也要好。

#3个人笔记,以提醒我未来的自我 (#3 Personal notes to remind my future self)

How many times you searched for a piece of code in the folders of your computer, to finally look for the solution on Google because you could not remember for which project you wrote that piece of code? It happened to me every day.

您在计算机文件夹中搜索了一段代码,最终在Google上寻找解决方案,因为您不记得您为哪个项目编写了这段代码? 每天发生在我身上。

With blog posts organized by topics, it now takes me much less time (and less frustration!) to find code snippets that I wrote several months ago. This also allows me to keep my code and R practices up-to-date, as I only have to edit them in one place.

有了按主题组织的博客文章,现在我花了更少的时间(也就更少了沮丧!)来查找几个月前写的代码片段 。 这也使我可以使代码和R实践保持最新 ,因为我只需要在一个地方进行编辑即可。

An example of this is my article about graphics in R with {ggplot2}. I prefer plots with the {ggplot2} package over plots available by default in R base, but I cannot remember all layers and their arguments. Now every time I struggle with a plot using this package, I simply revisit the corresponding article to find the solution. Same goes for many of my articles, every time I have forgotten the code or a nuance around how it works.

这方面的一个示例是我有关使用 {ggplot2} R中图形的文章。 与R base中默认可用的图相比,我更喜欢带有{ggplot2}包的图,但是我不记得所有的图层及其参数。 现在,每次使用该程序包进行绘图时,我都会简单地回顾相应的文章以找到解决方案。 每当我忘记了代码或关于代码工作原理的细微差别时,我的许多文章也是如此。

You could store your code in different files (R Markdown documents or R scripts for example, as I used to do in the past), but blog posts have the advantages that:

您可以将代码存储在不同的文件中(例如, R Markdown文档或R脚本,就像我过去所做的那样),但是博客文章具有以下优点:

  • code snippets are highlighted, and

    代码段突出显示,并且
  • by making it available to the world, you are forced to keep it tidy, complete and up-to-date.

    通过向全世界提供它,您被迫保持其整洁,完整和最新。

#4贡献给开源社区 (#4 Contribute to the open source community)

I have learned so much and I keep learning everyday about R thanks to great resources made available for free by developers and scientists who believe in open source and free materials.

我已经学到了很多东西,并且每天都有关于R的学习,这要归功于那些相信开源和免费资料的开发人员和科学家免费提供的大量资源。

Making all my code and articles freely available through a blog is in some sense, my way of:

从某种意义上说,通过博客免费提供我的所有代码和文章是我的方式:

  • “paying back” people who helped me to learn and thanks to whom I stand where I am now, and

    “回报”那些帮助我学习的人,并感谢我站在现在的位置上,
  • pay in advance the many more from who I will learn in the future.

    提前支付更多的费用,以供将来我学习。

If you also believe in sharing your knowledge or expertise, having a blog is definitely a great way to contribute to the community. Your contribution does not necessarily have to be huge, as long as it adds something, someone will use it. Remember that everyone started as a beginner, and even world experts are beginners in other domains. And you will see that as you keep sharing your knowledge with others, some people will appreciate it because they can learn from it.

如果您也相信分享自己的知识或专业知识,那么拥有博客绝对是一种为社区做出贡献的好方法。 您的贡献不必一定很大,只要它添加了某些东西,就会有人使用它。 请记住,每个人都是从初学者开始的,甚至世界专家都是其他领域的初学者。 您会发现,当您与他人不断分享知识时,有些人会欣赏它,因为他们可以从中学到东西。

As far as I am concerned, if my small contribution is useful for some people in having a better understanding of statistics or in learning R, my goal will be reached.

就我而言,如果我的一小笔贡献对某些人有用,有助于他们更好地了解统计学或学习R,那么我的目标将会实现。

#5保持谦虚,保持好奇心 (#5 Stay humble, stay curious)

Since launching my blog, I discovered plenty of other data science blogs of high quality. The more I see new things about different topics and the more I see people doing incredible stuff, the more I realize that I actually do not know much. This reminds me to stay humble.

自启动博客以来,我发现了许多其他高质量的数据科学博客。 我看到有关不同主题的新事物越多,看到人们所做的不可思议的事情越多,我越意识到我实际上并不了解很多。 这使我想保持谦虚

In addition to that, by sharing my code with scientists from diverse backgrounds and coming from all over the world, it allows me to consider other perspectives and practice open-mindedness, which in turn helps me to stay curious.

除此之外,通过与来自世界各地的不同背景的科学家共享我的代码,它使我可以考虑其他观点并实行开放的态度,这反过来又有助于我保持好奇心

Being humble and curious is, in my opinion, a good starting point to keep learning. I would not want to lose my curiosity, otherwise I may lose my appetite for learning.

我认为谦虚和好奇是继续学习的好起点。 我不想失去好奇心,否则我可能会失去学习兴趣。

For your information, R-bloggers and R Weekly are two great blog aggregators focusing on R, and the Towards Data Science publication on Medium is full of high quality blog posts covering many topics related to data science. Subscribe to these if you are interested in discovering more technical blogs.

就您的信息而言, R-bloggerR Weekly是专注于R的两个出色的博客聚合器,Medium上的Towards Data Science出版物充斥着涵盖许多与数据科学相关主题的高质量博客文章。 如果您有兴趣发现更多技术博客,请订阅这些。

#6学会减少追求完美主义并优先考虑 (#6 Learn to be less perfectionist and to prioritize)

No matter how much time you spend on your blog, remember that everything cannot always be perfect. As a perfectionist, I cannot deny that I would love everything to run perfectly in all aspects of my life.

无论您在博客上花费多少时间,请记住, 一切都不可能总是完美的 。 作为一个完美主义者,我不能否认我会希望一切都能在我的生活的各个方面完美运行。

At the time of writing my first articles, my tendency for perfectionism was sometimes so prevalent that it was a real weakness: I could spend several minutes thinking whether a comma between two words was needed or not (which would of course make no difference at all). However, at some point, improving something takes so much time and energy that the added value is not as large as the added value you could create by devoting your time in producing something new.

在撰写我的第一篇文章时,我追求完美主义的倾向有时如此普遍,以至于这是一个真正的弱点:我可以花几分钟来思考是否需要在两个词之间使用逗号(这当然没有任何区别) )。 但是,在某些时候, 改进某些东西会花费很多时间和精力,以至于增加的价值不如您通过花费时间生产新的东西所能创造的增加值那么大

This gets even worse as you keep learning every day. As a consequence, an article which seemed to be perfect in the past may no longer be viewed as perfect today, so you want to change or add a small detail in all your previous articles. I am not saying you should not edit a blog post, it is even recommended! Nonetheless, I advise you to edit it only if it really adds a significant value to it. Otherwise, I believe it is best to spend that time and effort in creating something else.

随着您每天不断学习,情况变得更糟。 因此,过去似乎很完美的文章可能在今天不再被认为是完美的,因此您想在以前的所有文章中进行更改或添加一个小细节。 我并不是说您不应该编辑博客文章,甚至建议您这样做! 尽管如此,我建议您仅在确实增加了重大价值的情况下对其进行编辑。 否则,我相信最好花时间和精力来创建其他东西。

With a blog you will thus gradually learn to put your effort and time (which are limited resources and seem to be scarcer with the years) where it is most productive. In other words, you will learn to prioritize.

因此,通过博客,您将逐渐学习将精力和时间(这是有限的资源,并且似乎几年来稀缺)投入到最有效的地方。 换句话说,您将学会确定优先级

#7建立联系和专业关系 (#7 Build connections and professional relationships)

By sharing your practices in a specific field, you sometimes come across people who actually work on the same topic than you or have similar research interests. This was the case, among others, with:

通过分享您在特定领域的实践,您有时会遇到实际上在您之外从事相同主题工作或具有相似研究兴趣的人们。 除其他外,就是这种情况:

These collaborations extended my professional network and allowed me to build connections with new researchers from different universities and from different countries. I would never have known these people without first sharing my analyses on a specific topic.

这些合作扩大了我的专业网络 ,使我能够与来自不同大学和不同国家的新研究人员建立联系。 如果不先分享我对特定主题的分析,我永远不会认识这些人。

I am sure that a blog can lead to numerous collaborations, making the whole journey even more interesting and enriching. And who knows, the next chapter of your professional life may be shaped by one person with whom you have worked in the past.

我确信博客可以带来许多合作,使整个旅程变得更加有趣和充实。 谁知道,您职业生涯的下一章可能由您过去与之共事的人所塑造。

Even if your blog does not lead to any collaboration, it is still a great tool for self-promotion. Doing some research, practicing, and writing about a topic help to become (and to be seen as) an expert in the field. Moreover, your blog will become your portfolio when applying for jobs or projects. Recruiters will definitely appreciate to see what you are capable of.

即使您的博客没有带来任何合作,它仍然是自我推广绝佳工具 。 对主题进行一些研究,练习和写作有助于成为(并且被视为)该领域的专家 。 此外,您的博客将在您申请工作或项目时成为您的投资组合 。 招聘人员一定会很高兴看到您的能力。

Whether your blog is at the origin of some fruitful collaborations or a showcase of your work, it is a valuable asset when applying for your dream job.

无论您的博客是进行一些卓有成效的合作的起点还是作品的展示,它都是申请理想工作时的宝贵资产

如何建立自己的博客? (How to start your own blog?)

I have seen an acceleration in my learning curve, a deeper understanding of statistics and R, and a large improvement in my communication skills since starting my blog. I never realized how useful maintaining a blog could be as a learning technique. This comes with the added benefit of being able to store information and code for myself and for others to also use, which is essential for getting feedback and connecting with other researchers.

自从开始撰写博客以来,我已经看到了学习曲线的加速,对统计数据和R的更深入的理解以及沟通技巧的极大提高。 我从来没有意识到维护博客作为一种学习技巧有多么有用。 这具有能够为自己和他人存储信息和代码的附加好处,这对于获得反馈和与其他研究人员联系至关重要。

If these 7 benefits have convinced you, the good news is that nowadays it is cheaper and easier than ever to start your own blog.

如果这7个好处使您信服,那么好消息是,如今创建自己的博客比以往更便宜,更轻松。

For non-technical blogs I recommend Medium or WordPress because it is easy to set up and it does not require code. For technical blogs, there are plenty of static site generators to choose from but I highly recommend using Hugo and the {blogdown} package (I created my blog after reading this book). You can then host it on GitHub and publish it using Netlify.3

对于非技术性博客,我建议使用Medium或WordPress,因为它易于设置并且不需要代码。 对于技术博客 ,有很多静态站点生成器可供选择,但是我强烈建议使用Hugo{blogdown} (我在阅读本书后创建了博客)。 然后,您可以将其托管在GitHub上 ,并使用Netlify进行发布。 3

Thanks for reading. I hope this article answered questions such as “Why do you have a blog?” or “What is the purpose of it?”, and who knows, gave you the motivation to start your own blog. If you are still undecided, I truly recommend doing it, and remember that the hardest part is to start. If you are patient and passionate about a topic, you simply have to start and the rest will follow.

谢谢阅读。 我希望本文能回答诸如“您为什么拥有博客?”之类的问题。 或“它的目的是什么?”,谁知道,这给了您创建自己博客的动力。 如果您仍然不确定,我真的建议您这样做,并记住最困难的部分是开始。 如果您对某个主题有耐心和热情,您只需要开始,剩下的就可以了。

As always, if you have a question or a suggestion related to the topic covered in this article, please add it as a comment so other readers can benefit from the discussion.

与往常一样,如果您对本文涉及的主题有疑问或建议,请将其添加为评论,以便其他读者可以从讨论中受益。

  1. I intentionally avoided to write about financial incentives in this article because I believe that it is not a good motivation to start a blog. First, many people do not make money with their blog and never will. Second, it is true that there are also a lot of people who make money with their blog, but for most of them the money is not worth the time. I see from my personal experience that a blog can sometimes be so time consuming that I would definitely make money more easily somewhere else. Moreover, as you can see, I chose not to put advertising or banner as I think that it deteriorates the reading experience (I find ads and banners extremely annoying when I see them on other blogs). This is of course my opinion it remains a matter of personal choice, and a matter of trade off: worse reading experience and more money versus better reading experience and less money. I also tend to prefer to leave the choice to readers to support my projects than to impose them ads or banners.↩︎

    在本文中,我有意避免写关于财务激励的文章,因为我认为创建博客不是一个好的动机。 首先,许多人不会通过博客赚钱,也永远不会赚钱。 其次,确实有很多人通过其博客赚钱,但对于大多数人来说,赚钱是不值得的。 从我的亲身经历中可以看出,博客有时会非常耗时,我肯定会在其他地方更轻松地赚钱。 而且,正如您所看到的,我选择不放置广告或横幅,因为我认为这样会降低阅读体验(当我在其他博客上看到广告和横幅时,它们会非常烦人)。 我当然认为这仍然是个人选择和权衡问题:较差的阅读体验和更多的钱,而不是更好的阅读体验和更少的钱。 我也倾向于选择留给读者支持我的项目,而不是强加广告或横幅。 ↩︎

  2. Even native English speakers can improve their writing skills with a blog.↩︎

    甚至说英语的人也可以通过博客来提高写作能力。 ↩︎

  3. Note that I am not a programmer nor a computer scientist so I do not have extensive knowledge in creating websites. There must be many more options available but I find these options the most optimal choices given my computer skills and my goals.↩︎

    请注意,我既不是程序员,也不是计算机科学家,所以我在创建网站方面没有丰富的知识。 必须有更多可用的选项,但是鉴于我的计算机技能和目标,我发现这些选项是最佳选择。 ↩︎

相关文章 (Related articles)

Originally published at https://www.statsandr.com on September 2, 2020.

最初于 2020年9月2日 https://www.statsandr.com 发布

翻译自: https://towardsdatascience.com/why-do-i-have-a-data-science-blog-7-benefits-of-sharing-your-code-77f2aee53127

两个项目共享一个数据库

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值