Human Who Codes Newsletter - AI-First Development


Thoughts on AI-First Development

I spent the past month diving into Copilot Edits, testing whether I could go fully AI-first on my personal projects. Instead of jumping in and coding right away when I had an idea, I let Copilot take the first pass by following my instructions. What sets Copilot Edits apart from earlier versions is its ability to make changes across multiple files—not just suggest edits in a single one. Could this actually save me time and effort? Spoiler: yes, and in a big way

I imagined a future where coding was fully AI-driven. Developers wouldn’t be allowed to touch the code directly, and only AI could make changes. Kind of like a world where self-driving cars are the only option because humans are just too error-prone.

I set a rule for myself: Copilot got two tries to implement my idea before I touched the keyboard. Sticking to this rule was harder than I expected. Luckily, since these were personal projects, there was no pressure. If it took longer than expected, that was fine. I focused on writing clear instructions, and when Copilot got things wrong, I explained the errors and asked it to fix them.

In most cases, Copilot, which was using Claude 3.5 Sonnet at the time, exceeded my expectations. For problems where I could provide code examples, Copilot nailed 80-90% of the solution. For more complex tasks without examples, accuracy dropped to around 50-60%. Overall, I spent only about 20% of the time coding compared to doing everything manually.

Here’s what stood out to me after a month of AI-first coding

Code, tests, and docs. When asking Copilot to create code, tests, and documentation, I had mixed results. The code was usually solid, ranging from 50-90% correct, but the tests were hit or miss, with at least one often failing. I could usually fix that by explaining the issue to Copilot. The narrative API documentation Copilot generated was great, especially when I provided examples from existing docs.

Trust and verify. It’s good advice to not fully trust AI right away and verify everything. A few times, I thought Copilot was wrong, but it turned out I had misunderstood the problem or had errors in my own code. Treat Copilot like a first-gen GPS: trust it, but keep your eyes open for potential issues

Review diffs closely. Reviewing diffs with Copilot Edits is like reviewing pull requests, so you need to double-check the changes. I’ve spotted times when Copilot removed lines unrelated to the change I requested. It also sometimes misses imports, makes unnecessary changes, or introduces invalid syntax. Thankfully, Copilot Edits lets you accept or reject individual changes, so you can fine-tune the results instead of accepting everything and having to fix it later.

Formatting isn’t always maintained. I’ve noticed that Copilot sometimes removes whitespace, like the blank lines I add at the start of a function body. These changes aren’t visible in the diffs, so they’re easy to miss. Copilot Edits reads your entire file and rewrites it with the changes, which can lead to lost whitespace.

Downtime is no longer a thing. I realized that with Copilot I could keep coding even when I wasn’t at my computer. I started giving Copilot prompts before I took breaks, like for lunch or a walk. It felt like having an intern working while I was away.

Overall, this month of AI-first development has completely changed how I view coding. I used to think the AI hype was overblown, but this time was different. Now, I see where the industry is heading, and LLMs are finally useful rather than distracting. If you haven’t started using AI in your coding yet, now’s the time to dive in. I anticipate that within two years, most tasks will be 95% correct, and I can only imagine what we’ll be able to achieve.

Key Takeaways

  • By adopting an AI-first approach, I cut my coding time to just 20% of what it would have been. When I provided clear examples, Copilot handled 80-90% of the work accurately.
  • While Copilot was incredibly useful, it sometimes introduced unnecessary changes, formatting issues, or errors. I had to review its output carefully, much like a pull request, to ensure everything was correct.
  • AI is now useful enough to incorporate into your coding routine daily. Whereas two years ago it could be distracting, today it is a valuable time saver.

Understanding JavaScript Promises

I just updated my e-book, Understanding JavaScript Promises, for 2024! It now includes information about Promise.withResolvers() and a whole new chapter on using and creating abortable functions.


Stuff I've Enjoyed this Month

📝 The reality of long-term software maintenance by Ashley Gullen
This post perfectly describes the dilemma of maintaining software over many years. After 11 years of maintaining ESLint, I've seen these patterns repeatedly and I'm a lot more picky about which submissions get merged. It's a perspective that non-maintainers don't understand but really need to.

📖 Deep Utopia: Life and Meaning in a Solved World by Nick Bostrom
What will life be like for humans when a combination of AI and robots does all the work for us? That's the question that this book explores in great detail. Will people still work? If so, why? Is it possible that the price of consumables will nosedive so money is no longer a concern? A fascinating (if dense) journey into our future.

📝 Considerations for making a treeview component accessible by Eric Bailey
Making a treeview component for web applications is challenging, and making it accessible is even more challenging. This post walks through all of the accessibility features in GitHub's treeview component and serves as a good tutorial on all of the different considerations.

🎬 Deno is finally ready by Deno
It's hard to believe but Deno is now six years old. In this promotional video, the team explains how Deno has evolved and why now is a good time to start working with Deno.

📝 Only one <details> open at a time</details> by Osvaldas Valutis
Who doesn't love an accordion component? Did you know there is one built in to HTML using the <details> element? It turns out that using the "name" attribute allows you to specify a group of <details> components where only one is open at a time.</details></details>

💻 Orate - The AI tookit for speech by Hayden Bleasel
A new JavaScript library that enables text-to-speech and speech-to-text using any number of pluggable AI services. The advantage is that you can use the same API and then swap out AI providers at any point.


What I'm Working On

🏠 Real Estate: This past month was spent going over my real estate business finances with my bookkeeper, and I was somewhat surprised to see that none of my properties ended up losing money in 2024. That doesn't necessarily mean they made money, because any "profit" I make needs to first be distributed into accounts for long-term maintenance (roofs, windows) and short-term repairs (toilets, appliances). This is a long-term play for me, so I'm fine with breaking even while the mortgages are paid down. Ultimately, my goal is to have these paid off in retirement and that's when the money will matter. Follow my Instagram for real estate photos.

💻 Open Source:

  • I continued working on Mentoss, a library for mocking global fetch() calls in browsers and server runtimes. I continued building out support for CORS requests, fixed runtime compatibility issues, and implemented credentials requests. If you're using fetch() anywhere, I invite you to check out Mentoss.
  • I released Social Changelog, a utility that reads a GitHub release and spits out a tweet-sized summary including a link to the release. I'm now using this to generate social media posts when I release new versions of my popular non-ESLint projects.
  • I updated Crosspost, my utility for posting across multiple social networks, to include strategies for LinkedIn and Discord. I use Social Changelog to generate release post text and then Crosspost to actually post them online.

💻 ESLint: The two things I've been spending time on are:

Human Who Codes Newsletter

A once-per-month newsletter discussing topics important to senior-level software engineers, with a particular focus on frontend technology and leadership.

Read more from Human Who Codes Newsletter

Thoughts on People Skills roles that require more interaction with our colleagues and customers. It’s at that point where a software engineering role shifts from primarily code-based to primarily people-based, and all of a sudden, it’s a different job. Previously, transitioning to a people-focused role took over five years and typically involved several promotions. However, with the advent of AI in software engineering, this timeline is shortening significantly. Companies once hired mediocre...

Thoughts on Debuggability In the early days of web browsers, there were no developer tools. From Netscape to Internet Explorer, and the first version of Firefox, if something wasn’t aligning properly or your JavaScript wasn’t behaving as expected, there was little you could do. The browser provided no additional information. Everything changed with the arrival of Firebug, the first real developer tool for web applications. As a Firefox plugin, it exposed the inner workings of a web browser to...

Thoughts on Chrome That ruling stated that Google had an illegal monopoly on search and excluded competition by paying other browsers to feature Google search as their default search engine. Subsequently, the U.S. Department of Justice requested that a judge force Google to sell off its own browser, Chrome, as well as stop all exclusive search deals (among other concessions). This represents the most significant legal loss for a tech company in the United States since Microsoft was ordered to...