惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyberwarzone
Cyberwarzone
Recorded Future
Recorded Future
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
SecWiki News
SecWiki News
V
V2EX
S
Secure Thoughts
GbyAI
GbyAI
F
Full Disclosure
云风的 BLOG
云风的 BLOG
Security Archives - TechRepublic
Security Archives - TechRepublic
Cloudbric
Cloudbric
美团技术团队
H
Hacker News: Front Page
Latest news
Latest news
Y
Y Combinator Blog
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog RSS Feed
雷峰网
雷峰网
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Apple Machine Learning Research
Apple Machine Learning Research
Engineering at Meta
Engineering at Meta
AI
AI
The Hacker News
The Hacker News
Recent Announcements
Recent Announcements
S
Security @ Cisco Blogs
Blog — PlanetScale
Blog — PlanetScale
The Last Watchdog
The Last Watchdog
T
The Blog of Author Tim Ferriss
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园_首页
J
Java Code Geeks
Attack and Defense Labs
Attack and Defense Labs
V
Vulnerabilities – Threatpost
A
About on SuperTechFans
P
Palo Alto Networks Blog
P
Privacy International News Feed
V2EX - 技术
V2EX - 技术
C
Cisco Blogs
I
Intezer
T
Troy Hunt's Blog
NISL@THU
NISL@THU
WordPress大学
WordPress大学
N
News and Events Feed by Topic
腾讯CDC

Impressive Webs

Transforming Healthcare with VR: Virtual Surgery and Patient Simulation YouTube's Time-Based UX Problem for Live Sports CSS Rules vs. CSS Rulesets - Impressive Webs Filestack: A File Uploader and Powerful APIs for App Content Delivery How to Disable JavaScript in Almost Any Browser - Impressive Webs A Review of ipwhois.io for Reliable Geolocation Data Detecting Specific Text Input with HTML and CSS The Most Interesting Developer Tools for 2021 - Impressive Webs Fading in a Page on Load with CSS & JavaScript
Don't Let ChatGPT Write Your Code
https://www.facebook.com/ImpressiveWebs/ · 2023-12-20 · via Impressive Webs

ChatGPT

We can all agree it’s ridiculous to suggest that we should ignore a modern tool that makes it exponentially easier to finish our work.

But as I’ve learned in 20+ years of writing code, there’s always going to be a drawback to using any tool that “makes life easier”. In this case, AI-based tools that use ChatGPT or some other AI-based foundation are similar to the frameworks we’ve been using for years.

There are developers who can build incredible websites with React, Angular, Vue, or Svelte. But many of those same developers couldn’t do basic DOM manipulation or build a simple Ajax-based website (or better yet, a Fetch API-based website) with pure JavaScript.

Now ChatGPT is everywhere, in almost any tool we use, ready to do all the work for us.

I can’t see this as being a good thing in the long run. I think two things can be true at once:

  • It’s productive to use AI-based tools to complete our work
  • It makes us dumber to use AI-based tools to complete our work

So here are my suggestions (meant for front-end developers, but the same concept applies elsewhere):

Every once in a while, when you’re not in a time constraint, write code using a blank slate. Don’t use a framework and don’t ask ChatGPT questions. Just write HTML, CSS, and JavaScript from scratch. If you don’t know how to do something, look it up online like you did back way back in 2021.

If you’re pretty sure of what feature to use (like Flexbox) but aren’t sure about how exactly to use it, look it up on MDN or another similar resource. Or find a nice tutorial that walks through all the features. I’ve done simple but interactive ones for CSS Grid and for Flexbox that you might enjoy.

When you write a piece of code, do your best to understand what every line — and even every character — is doing. If you change the code slightly, like changing a CSS value, ask yourself, Why does it break? Why does it not break? Endeavour to understand it. Don’t just move on because “it works”.

The same applies to JavaScript. MDN’s resource is, again, invaluable. So is Stack Overflow. I’ve been writing JavaScript tips in my newsletter since 2013. Every one of those tips can be found in the newsletter archives or (if you prefer) in an e-book bundle that discusses more than 300 different JavaScript and DOM features, most of which are lesser-known.

All this being said, it is true that ChatGPT itself can be used as a search engine or question/answer engine. But there’s something lacking when we go that route. The answers it gives are often too good and turn us into brainless robots who copy and paste the answers without much thought. And I’ve already had problems when using ChatGPT myself when it comes to debugging, maintaining, and updating code. It almost feels like you save time in the beginning, but lose a lot of that time later.

Ultimately, we’re all going to do what helps us finish our jobs, makes us more money, and pleases our bosses and clients. But let’s not forget about raw coding. That’s the kind of work that I believe makes us better web developers and will help us be capable in a job interview.