Drew‘s Tech Blog

Building a Blog in 1 Day with Claude 3 Opus

By Drew Thomas | Published 3/24/2024

As a developer, I‘m always on the lookout for tools and technologies that can streamline my workflow and help me build projects more efficiently. Recently, I decided to try out Claude 3 Opus, an AI-powered development assistant, to create a blog (this entire website) from scratch. In this post, I want to share my experience and insights gained from working with this tool.

The Stone Age

One month. I should be able to build a personal blog pretty quickly.
- College Drew

Three months later, I finally had a site created that I was comfortable to show the world. I spent weeks reading into color theory, a month learning about AWS and cloud infrastructure, and way too long trying to force the footer to the bottom of the page.

Five years later I decided it was time to revive my blog. Like any overly ambitious developer, I decided to just begin from scratch. My personal laptop didn‘t have a license for my favorite IDE and brew hadn‘t been updated in years. Normally, this is the point where dreams die. This time however, I had a new tool: Claude 3 Opus, an AI-powered development assistant.

In ONE day, not only did I have my environment set up, I had a complete TypeScript React blog set up with continuous deployment to the World Wide Web! I felt like I had a secret weapon that allowed me to focus on the really important stuff, like deciding on the perfect shade of blue for my blog‘s theme. Thanks, Claude!

Experience

Wait! The blog is looking good already!?

Claude 3 Opus took my expected development time and shortened it to a project manager‘s dream. The days of me tripling the estimated effort before sharing might be over. I don‘t think I‘ve ever built anything so quickly. The AI assistant took care of generating all the boilerplate code, allowing me to focus on the core functionalities and unique aspects of my blog. It handled the basic setup, file structure, and configuration, saving me hours of manual coding. This was particularly helpful when it came to setting up the project‘s foundation, such as creating components, styling, and integrating essential libraries.

Hmm, that needs cleaned up

While Claude 3 Opus is undeniably powerful, it‘s important to remember that it‘s not perfect. I found it most effective to treat the AI assistant as a highly intelligent intern. It provided valuable suggestions and generated code based on my requirements, but I made sure to review and nitpick its output to ensure the highest quality. I carefully examined the generated code, made necessary modifications, and added my own optimizations. This collaborative approach allowed me to leverage the AI‘s capabilities while maintaining control over the final product.

When generating some CSS, it used px for the font-size. With accessibility in mind, I updated this to rem. There were some instances I spent time refactoring to DRY up the code. One notable example was the color scheme. Opus hardcoded values. I extracted these into a JavaScript object so I could reuse and update them across the entire codebase. When I later mentioned this file‘s existence and structure, Opus started using it in its generated output without me explicitly asking.


    const PrivacyPolicyWrapper = styled.div`
      background-color: ${ColorScheme.secondaryBackground};
      padding: 20px;
      border-radius: 8px;
      margin-bottom: 20px;
    `;
    
    const Title = styled.h2`
      color: ${ColorScheme.darkText};
      font-size: 24px;
      margin-bottom: 10px;
    `;
    
    const Text = styled.p`
      color: ${ColorScheme.darkTextSecondary};
      font-size: 16px;
      line-height: 1.5;
      margin-bottom: 10px;
    `;
    

It‘s not 2023 anymore

One area where I encountered some challenges was in terms of Claude 3 Opus providing outdated advice. As technology evolves rapidly, it‘s crucial to stay up-to-date with the latest trends and best practices. In my case, I noticed that the AI assistant recommended using a sunset version of Google Analytics and an older approach to React Router. While these recommendations were based on common trends that I‘ve participated in myself, they didn‘t align with the most current practices. As a developer, it‘s essential to do your own research and validate the suggestions provided by AI assistants to ensure you‘re using the most appropriate and up-to-date solutions.

Claude Message Limits

In the middle of our session, my coding wizard warned me it was running out of magic. "10 messages remaining until 4 PM." I made the most of them, using Claude to style some key pages. "Can you help me make my header more stylish with styled-components? I want my name (Drew) to be included and for it to have a modern tech blog feel. There should be links to home, about, contact. These links should have a pleasant hover animation."

Since it completed all the tasks I don‘t enjoy, I gave it some well earned rest and focused on something enjoyable. I wrote some quick CDK code and bootstrapped a personal AWS account. This enabled me to set up an AWS CodePipeline to deploy my website to S3 whenever I pushed new changes. A few lines later and I had a cloudfront distribution and Route53 hosted zone. When I was done, Opus was ready for more coding.

For those concerned with these limits, I learned some tips. Start a new chat frequently with just the context you need. It will consume the whole chat history for context which can eat away at usage limits. When asking for responses, you can tell Claude to limit how long the response should be. It‘s possible to ask it multiple questions in the same prompt to get the most bang for your twenty bucks.

Evaluation

Overall, my experience using Claude 3 Opus was a resounding success. It significantly accelerated my development process by handling the boilerplate code and allowing me to concentrate on the unique aspects of my project. However, it‘s crucial to approach AI-assisted development with a critical eye, treating the AI as a smart intern rather than blindly relying on its output. By carefully reviewing and refining the generated code, I was able to create a blog that‘s not embarrassing to share. Not bad for a backend-developer.

As AI continues to advance and integrate into our development workflows, tools like Claude 3 Opus will undoubtedly play a more significant role. While they offer tremendous potential for productivity and efficiency, it‘s important to use them judiciously, staying informed about the latest industry trends and best practices. By combining the power of AI with our own expertise and judgment, we can create remarkable projects while continuously learning and adapting to the ever-evolving landscape of software development.