ChatGPTAI 人工智能能让你成为更聪明的程序员吗?

Posted 禅与计算机程序设计艺术

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ChatGPTAI 人工智能能让你成为更聪明的程序员吗?相关的知识,希望对你有一定的参考价值。

目录

🤖 Can AI Make You a Smarter Programmer?🤖 人工智能能让你成为更聪明的程序员吗?

Dev Newbie (2 Part Series)开发新手(2 部分系列)

Exploring the potential of AI tools like ChatGPT in improving programming skills.探索 ChatGPT 等人工智能工具在提高编程技能方面的潜力。

Breaking news:   突发新闻:

Why I stopped using AI for programming 📵为什么我停止使用 AI 进行编程📵

How I discovered the real benefits of using AI for programming ✅我是如何发现使用 AI 进行编程的真正好处的 ✅

How AI can make you a smarter programmer 🤓人工智能如何让你成为更聪明的程序员🤓

Some ways in which AI can make you a work-smart programmer:AI 可以让你成为工作聪明的程序员的一些方法:


🤖 Can AI Make You a Smarter Programmer?
🤖 人工智能能让你成为更聪明的程序员吗?

#ai 艾#beginners 初学者#programming 编程#productivity 生产率

Dev Newbie (2 Part Series)开发新手(2 部分系列)

1🔐 How to Unlock Your Full Potential as a Developer🔐 如何释放你作为开发者的全部潜能2🤖 Can AI Make You a Smarter Programmer?🤖 人工智能能让你成为更聪明的程序员吗?

Exploring the potential of AI tools like ChatGPT in improving programming skills.
探索 ChatGPT 等人工智能工具在提高编程技能方面的潜力。


Breaking news:   突发新闻:

ChatGPT has taken the world by storm!
ChatGPT 风靡全球!

Okay so not so much ‘breaking news’ anymore since everybody is talking about it.
好吧,因为每个人都在谈论它,所以不再有那么多“突发新闻”了。

And not just talking - they’re building like crazy! Since it was made public towards the end of 2022, almost overnight we’ve seen an influx of AI-driven apps designed to make our lives easier.
不只是说话——他们正在疯狂地建造!自从它于 2022 年底公开以来,几乎在一夜之间,我们就看到大量旨在让我们的生活更轻松的人工智能驱动应用程序的涌入。

Most interestingly, are the people who have been using ChatGPT themselves to be more productive. From essay writing, to marketing, making social media posts and creating SEO content - ChatGPT can do it all.
最有趣的是,那些一直在使用 ChatGPT 来提高工作效率的人。从论文写作到市场营销、制作社交媒体帖子和创建 SEO 内容 - ChatGPT 可以做到这一切。

All of this makes ChatGPT the best thing to hit the internet since, well the internet!
所有这一切使 ChatGPT 成为互联网上最好的东西,因为互联网!

One of the most impressive uses of ChatGPT is its ability to churn out and explain code. It’s become a useful tool in every developer's pocket. A lot of devs are now wondering how they ever lived without it. They say their productivity has gone through the roof and they can build things in hours that once took days or even weeks.
ChatGPT 最令人印象深刻的用途之一是它能够生成和解释代码。它已成为每个开发人员口袋里的有用工具。许多开发者现在想知道没有它他们是如何生活的。他们说他们的生产力已经达到了顶峰,他们可以在几小时内完成以前需要几天甚至几周才能完成的工作。

But ChatGPT wasn’t the first AI revolution to hit the world of programming. Back in 2021, GitHub released beta access to their coding AI-assistant application called Copilot. They then released full access a year later in the summer of 2022.
但 ChatGPT 并不是第一次冲击编程世界的人工智能革命。早在 2021 年,GitHub 就发布了对其名为 Copilot 的编码 AI 助手应用程序的测试版访问。一年后的 2022 年夏天,他们发布了完全访问权限。

Copilot can be used as a plugin for your IDE that will write code suggestions for you whilst you’re coding.
Copilot 可以用作您的 IDE 的插件,它会在您编码时为您编写代码建议。

GitHub describes it as: GitHub 将其描述为:

Your AI pair programmer 您的 AI 结对程序员

What’s important to note is that Copilot’s AI technology is driven by the OpenAI Codex. OpenAI is the mastermind company behind ChatGPT, so one can say that GitHub was on to something way before we knew anything about ChatGPT.
需要注意的重要一点是,Copilot 的人工智能技术是由 OpenAI Codex 驱动的。 OpenAI 是 ChatGPT 背后的主谋公司,因此可以说 GitHub 在我们对 ChatGPT 一无所知之前已经有所作为。

Copilot started the hype in the developer world of using AI for programming, and developers everywhere were raving about it. I was lucky enough to have beta access to try it out for myself (whilst it was free).
Copilot 开始在开发人员世界中大肆宣传使用 AI 进行编程,各地的开发人员都对它赞不绝口。我很幸运能够获得 Beta 版访问权限来亲自试用(虽然它是免费的)。

And just like everyone else, I was very impressed. However, when the trial was over, I decided not to upgrade and take on a subscription, and it had nothing to do with the price.
和其他人一样,我印象非常深刻。但是,当试用结束后,我决定不升级并接受订阅,这与价格无关。

Why I stopped using AI for programming 📵
为什么我停止使用 AI 进行编程📵

Although I was very impressed with copilot and found it very useful in many ways. I made the decision to let it go…for the time being.
尽管我对 copilot 印象深刻,并且发现它在很多方面都非常有用。我决定放手……暂时。

My decision had nothing to do with the fact that I would have to start paying for it. In fact, I thought the subscription price of roughly £10 a month to be quite reasonable for what it offered.
我的决定与我必须开始为此付出代价这一事实无关。事实上,我认为每月大约 10 英镑的订阅价格对于它所提供的服务来说是相当合理的。

My issue was that as an ever-growing dev, I was afraid that if I began to rely too heavily on using Copilot to write code for me, then this would hold me back from learning more important things myself.
我的问题是,作为一个不断成长的开发者,我担心如果我开始过度依赖使用 Copilot 为我编写代码,那么这会阻碍我自己学习更重要的东西。

I wanted to feel the struggle as I always had, learning through trial and error, and becoming a Google-Guru. I felt that the best way to learn was through failure and I didn’t want any shortcuts.
我想像往常一样感受斗争,通过反复试验学习,并成为谷歌大师。我觉得最好的学习方法是通过失败,我不想要任何捷径。

Then in came ChatGPT. 然后进来了 ChatGPT。

How I discovered the real benefits of using AI for programming ✅
我是如何发现使用 AI 进行编程的真正好处的 ✅

So I stopped using Copilot. I uninstalled the plugin and carried on my way as I always had.
所以我停止使用 Copilot。我卸载了插件并像往常一样继续前进。

And a few months later ChatGPT was ‘born’. At first, I didn’t really pay much attention to it. Then suddenly I couldn’t avoid it.
几个月后,ChatGPT 就“诞生”了。起初,我并没有真正注意它。然后突然间我无法避免它。

Everyone was talking about it. My Twitter feed and YouTube algorithm were full of ChatGPT content, and I became massively intrigued, as I’m sure you were too.
每个人都在谈论它。我的 Twitter 提要和 YouTube 算法充满了 ChatGPT 内容,我变得非常感兴趣,我相信你也是。

My first thought and experiments with ChatGPT were mostly for writing. I wanted to see how I could use it to help me write content, both for this blog and on Twitter.
我对 ChatGPT 的最初想法和实验主要是为了写作。我想看看如何使用它来帮助我为这个博客和 Twitter 撰写内容。

I then got massively into AI Art apps such as DALL-E and Midjourney. I even created my Twitter profile avatar and banner using DALL-E, but that’s another story.
然后我大量使用了 AI Art 应用程序,例如 DALL-E 和 Midjourney。我什至使用 DALL-E 创建了我的 Twitter 个人资料头像和横幅,但那是另一回事了。

I plan on writing a separate article about the awesomeness of AI Art apps in the future.
我计划在未来单独写一篇文章,介绍 AI Art 应用程序的出色之处。

Anyways back to ChatGPT. 无论如何回到 ChatGPT。

One day I had to complete a task of writing some documentation for a new application. Now I had never seen or used this application before. In fact, it was new, which was why they needed the documentation to guide others on how to use it.
有一天,我必须完成一项为新应用程序编写文档的任务。现在我以前从未见过或使用过这个应用程序。事实上,它是新的,这就是为什么他们需要文档来指导其他人如何使用它。

I took a look at the code, and whilst some of it I understood, a lot of it I didn’t. This was because it was backend javascript and I’m mostly a frontend dev so I’m not always familiar with backend stuff.
我看了一下代码,虽然其中一些我理解了,但很多我没有理解。这是因为它是后端 JavaScript,而我主要是前端开发人员,所以我并不总是熟悉后端的东西。

My first thought, as it had always been, was to use Google. But after spending some time I knew it would take a long time to gather what I needed. Plus, I still needed to be able to explain properly what each function was doing.
我的第一个想法,一如既往,是使用谷歌。但是花了一些时间后,我知道要收集我需要的东西需要很长时间。另外,我仍然需要能够正确解释每个功能的作用。

It was then that I had the bright idea!
就在那时,我有了一个好主意!

What if I asked ChatGPT? 如果我问 ChatGPT 怎么办?

So I fired it up, dropped in a block of code and asked ChatGPT to explain it to me.
所以我启动了它,放入了一段代码并请 ChatGPT 向我解释。

To my surprise and delight, it explained it perfectly. I was able to understand what the code was doing. I mean, I had a rough idea, but ChatGPT confirmed this with clear and concise explanations that I don’t think I could have come up with on my own.
令我惊讶和高兴的是,它完美地解释了它。我能够理解代码在做什么。我的意思是,我有一个粗略的想法,但 ChatGPT 通过清晰简洁的解释证实了这一点,我认为我自己无法想出。

I was hooked. 我被迷住了。

From then on I used ChatGPT to explain everything I needed and even asked it add in the comments and JSdocs to the code itself and it did!
从那时起,我使用 ChatGPT 来解释我需要的一切,甚至要求它在代码本身中添加注释和 JSdocs,它做到了!

A simple example of this can be seen below:
下面是一个简单的例子:

Now I know this is a very simple example, but one thing to point out here was my use of the words “send back as code”. By writing that, ChatGPT will know to send back the response in a code block that I could then easily copy and edit if needs be.
现在我知道这是一个非常简单的例子,但这里要指出的一件事是我使用了“作为代码发回”这个词。通过编写它,ChatGPT 将知道在代码块中发回响应,然后我可以在需要时轻松复制和编辑该代码块。

ChatGPT had officially saved me hours' worth of time.
ChatGPT 正式为我节省了数小时的时间。

It was then that I decided to embrace AI for programming and I reinstalled Copilot and signed up for a subscription.
就在那时,我决定拥抱 AI 进行编程,我重新安装了 Copilot 并注册了订阅。

Once I did that, I used Copilot to help with writing better suggestions for some of the stuff that I didn’t like or agree with what ChatGPT had given me.
一旦我这样做了,我就使用 Copilot 帮助为一些我不喜欢或不同意 ChatGPT 给我的东西写更好的建议。

Between the two apps, I had increased my productivity tenfold, plus I was learning so much along the way. ChatGPT’s explanations were teaching me about the code in the application I was working on in ways that would not have been as verbose with a Google search.
在这两个应用程序之间,我的工作效率提高了十倍,而且我在这个过程中学到了很多东西。 ChatGPT 的解释以一种不会像谷歌搜索那样冗长的方式向我介绍我正在处理的应用程序中的代码。

Whereas Copilot was coming up with the things I knew I had to write but would have taken a lot longer to figure out.
而 Copilot 正在想出一些我知道我必须写但需要更长的时间才能弄清楚的东西。

AI had indeed made me smarter: it made me work smarter.
人工智能确实让我变得更聪明:它让我工作起来更聪明。

How AI can make you a smarter programmer 🤓
人工智能如何让你成为更聪明的程序员🤓

If you’ve ever heard of the phrase “work smarter, not harder”, then this is exactly what I’m referring to here.
如果您听说过“更聪明地工作,而不是更努力地工作”这句话,那么这正是我在这里所指的。

The best developers will often say that to be a good programmer you just need to be good at finding solutions, and this often involves using Google to the fullest to solve your problems.
最好的开发人员经常会说,要成为一名优秀的程序员,您只需要善于寻找解决方案,这通常涉及充分利用 Google 来解决您的问题。

For me, AI is a game-changer in this respect. Apps like ChatGPT and Copilot make it easier and faster to get to the solutions to your coding problems.
对我来说,人工智能在这方面改变了游戏规则。 ChatGPT 和 Copilot 等应用程序可让您更轻松、更快速地找到编码问题的解决方案。

Some ways in which AI can make you a work-smart programmer:
AI 可以让你成为工作聪明的程序员的一些方法:

  1. Code completion - ChatGPT can assist with code completion by suggesting lines of code based on your inputs and context. This can save time and improve the accuracy of your code.
    代码完成 - ChatGPT 可以根据您的输入和上下文建议代码行,从而协助完成代码。这可以节省时间并提高代码的准确性。
  2. Debugging - ChatGPT can help with debugging by suggesting potential solutions to errors and bugs in your code.
    调试 - ChatGPT 可以针对代码中的错误和错误提出潜在的解决方案,从而帮助调试。
  3. Automating repetitive tasks - AI can help with automating repetitive tasks such as code refactoring, which can save time and improve the overall quality of your code.
    自动化重复性任务——AI 可以帮助自动化重复性任务,例如代码重构,这可以节省时间并提高代码的整体质量。
  4. Advanced programming - AI can also assist with more advanced programming concepts such as natural language processing and machine learning.
    高级编程——人工智能还可以协助更高级的编程概念,如自然语言处理和机器学习。
  5. Research Assistance - AI can also help with the research process by suggesting relevant papers, libraries, and other resources to help you further explore the topic you are working on.
    研究协助——人工智能还可以通过推荐相关论文、图书馆和其他资源来帮助您进一步探索您正在研究的主题,从而帮助您完成研究过程。

So if you’re a new developer, don’t be like me and be afraid of using the technology to your advantage. Don’t think that if you use it then you could be stopping yourself from learning how to code.
因此,如果您是一名新开发人员,请不要像我一样害怕利用这项技术为您带来优势。不要认为如果你使用它,那么你可能会阻止自己学习如何编码。

Instead, use it as a tool to aid your learning. Get ChatGPT to explain the code and concepts you don’t understand. Use Copilot to fill in the gaps, but be careful and make sure you fully understand what it’s spitting back. Heck get ChatGPT to explain Copilot’s stuff if you’re not sure!
相反,将其用作帮助您学习的工具。获取 ChatGPT 来解释您不理解的代码和概念。使用 Copilot 来填补空白,但要小心并确保您完全理解它吐回的内容。如果您不确定,请使用 ChatGPT 来解释 Copilot 的内容!

Work smarter, not harder. 更聪明地工作,而不是更努力地工作。

But most importantly don’t stop learning.
但最重要的是不要停止学习。


From your fellow ever-growing dev,
来自你不断成长的开发伙伴,

Cherlock Code 

 

以上是关于ChatGPTAI 人工智能能让你成为更聪明的程序员吗?的主要内容,如果未能解决你的问题,请参考以下文章

Python不能帮你找到女朋友,却能让你成为有钱的单身狗

5个成功案例,让你的机器学习越“学习”越聪明!

十个能让你成为牛逼前端程序猿的特征

18种聪明的思维方式,让你成为高人!

Python编程不能帮你找到女朋友,却能让你成为有钱的单身狗

自学Python,收藏这13个网站,能让你省下好几万的学费