Converting Numbers into Roman Numerals with C#: A Classical Coding Exercise

Programming Problems & Solutions : “Conquering Roman Numerals in C#: An Exercise in Classical Coding”. The introduction to this series is here and includes all links to every post in the series. If you’d like to watch the video (see just below this), or the AI code up (it’s at the bottom of the post) they’re available! But if you just want to work through the problem keep reading, I cover most of what is in the video plus a slightly different path down below.

The continuation with CoPilot AI Tooling is at the end of the post.

The Challenge: Translating Numbers into a Language of Antiquity

Today, I’ll dive into a fascinating challenge: converting modern numbers into their ancient Roman numeral counterparts. The task is straightforward but intricate, involving a programming challenge that takes any positive integer from 1 to 3999 and converts it into the corresponding Roman numeral.

To convert regular decimal numbers into Roman numerals, one must follow a set of rules based on the values and combinations of specific Roman numeral characters. Here’s a brief summary of the conversion process:

Continue reading “Converting Numbers into Roman Numerals with C#: A Classical Coding Exercise”

C# Array to Phone Number String Conversion & Testing with NUnit

Programming Problems & Solutions : “How to Format Arrays as Phone Numbers with NUnit Testing”. The introduction to this series is here and includes all links to every post in the series. If you’d like to watch the video (see just below this), or the AI code up (it’s at the bottom of the post) they’re available! But if you just want to work through the problem keep reading, I cover most of what is in the video plus a slightly different path down below.

The AI continuation and lagniappe is at the bottom of this post.

In the world of software development, sometimes a seemingly simple task has lessons to teach such as language features and problem-solving. Today, I’m diving into a fun coding challenge that does exactly that: writing a method in C# that takes an array of 10 integers and returns these numbers formatted as a phone number. This exercise is perfect for understanding array manipulation, string formatting, and how to effectively use testing frameworks like NUnit to verify our solution.

Continue reading “C# Array to Phone Number String Conversion & Testing with NUnit”

Finding the Maximum Sum Path in a Binary Tree

Programming Problems & Solutions: “Finding the Maximum Sum Path in a Binary Tree” is the first in this series. The introduction to this series is here and includes all links to every post in the series. If you’d like to watch the video (see just below this), or the AI code up (it’s at the bottom of the post) they’re available! But if you just want to work through the problem keep reading, I cover most of what is in the video plus a slightly different path down below.

Scroll to the bottom to see the AI work through of the code base.

Doing a little dive into the world of binary trees. If you’re in college, just got out, or having flashbacks to algorithms and data structures classes, this will be familiar territory. It’s been a hot minute since I’ve toiled through these, so figured it’d be fun to dive in again for some more modern purpose. I’m going to – over the course of the next few weeks – work through a number of algorithm and data structures problems, puzzles, katas, or what have you – and then once complete work through them with various AI tools. I’ll measure the results in whatever ways seem to bring good defining characteristics of the system and post the results. So join me, on this journey into algorithms, data structures, and a dose of AI (actually LLMs and ML but…) systems and services.

Continue reading “Finding the Maximum Sum Path in a Binary Tree”

Coding with AI: A Comparative Series

Hello fellow coders, AI nerdists (ok, IYKYK, “machine learning LLMs nerdists), and language enthusiasts! Adron here, ready to dive into an exciting new series that’s all about pushing the boundaries of our programming prowess. If you’ve followed my work, you know I’m often delving into exploring the depths of code (or systems in general), optimizing it, and sharing those insights with all of you. This time, we’re taking things up a notch by blending the art of manual code slinging and then shifting over and giving the power of artificial intelligence (AI) a try. Ok, my nitpick has already struck. This isn’t really AI but is really just the power of LLMs and machine learning, the ole’ Chat GPT and CoPilot and Claude and whatever else, that I’ll be diving into. Let’s go and put em’ to the test.

The Journey

Our journey starts with tackling programming problems the old-fashioned way: rolling up our sleeves and solving them manually. This is where we lay the groundwork, understand the problem’s intricacies, and come up with a solution that, while not perfect, gets the job done. Then, we refactor our code, streamlining and optimizing it to make it more efficient and elegant.

Enter the AI

Once we’ve got a solid foundation, it’s time to bring in the big guns – artificial intelligence. We’ll explore various AI tools, from ChatGPT-4 to Claude and beyond, to see how they tackle the same problems. Each AI brings its unique approach and strengths to the table, and we’ll break down their solutions, comparing them to our manual efforts.

Why This Matters

In today’s fast-paced tech world, understanding how to leverage AI in our coding practices is crucial. This series isn’t just about showcasing cool AI tools; it’s about understanding their capabilities, limitations, and how they can augment our problem-solving skills. By the end of this journey, you’ll have a deeper appreciation for both human ingenuity and AI’s potential.

What to Expect

In each post, you’ll find:

  • The Hand Crafted Solution: A detailed walkthrough of solving the problem by hand.
  • Refactoring: Steps to optimize and clean up the manual solution.
  • AI Solution: A deep dive into how different AI tools approach the problem.
  • Comparative Analysis: A side-by-side comparison of manual and AI-generated solutions, highlighting strengths, weaknesses, and key takeaways.
  • The links to the code repository and respective before and after of each code base commits.
  • A video walk through of the code and process I went through to get to the solution presented in each video & blog post.
  • A ordered list of the posts as I complete them at the bottom of this post. For starters, as this post has gone live the first post of the series is also live now.

So, get those keyboards and processors ready, grab your favorite code editor, overclock your proc, and join me on this ride through the world of coding with AI. Let’s push the boundaries of what’s possible, one problem at a time.

Stay tuned and happy thrashing coding!

The Ordered List of Coding with AI: A Comparative Series Posts

  1. Finding the Maximum Sum Path in a Binary Tree in C#
  2. C# Array to Phone Number String Conversion & Testing with NUnit
  3. Converting Numbers into Roman Numerals with C#: A Classical Coding Exercise
  4. Simplifying Time: Humanizing Duration in Programming in C#
  5. Conquering the Top Words Challenge in C#: A Tale of Regular Expression and LINQ Magic
  6. How to Convert an IPv4 Address to a 32-bit Integer in C#: A Step-by-Step Guide
  7. Converting 2D Arrays to CSV in Go: Problem-Solving and Testing
  8. Calculating IP Address Ranges in Go: Learn IPv4 Range Between Addresses

The Future Did Indeed Just Happen

In his insightful article, titled perfectly “The future just happened: Developer Experience and AI are now inextricably linked.“, James Governor writes about the profound ways in which artificial intelligence (AI) has become intertwined with the developer experience (DX), fundamentally altering the landscape of software development. He highlights how tools like GitHub Copilot, powered by OpenAI’s Codex, have revolutionized coding by providing real-time code suggestions and automating mundane tasks. This advancement has not only boosted productivity but also enhanced the learning curve for new developers, making complex coding tasks more accessible and manageable.

It’s a solid read, so go read it now. Then swing back and continue, as I’ve got a thing or three to tell you about AI and where development is going.

The Future Happened, So What About Tomorrow?

The integration of artificial intelligence (AI) into software development is already transforming the way developers write and manage code. Tools like GitHub Copilot, powered by OpenAI’s Codex, offer real-time code suggestions and automation for repetitive tasks. This has not only increased productivity but also democratized coding, allowing less experienced developers to tackle complex problems more efficiently.

Impact on Developer Roles

AI’s influence has shifted the dynamics between junior, senior, and principal developer roles. Junior developers now have access to sophisticated tools that help them write better code faster, reducing the gap between them and their more experienced counterparts. As AI handles more routine tasks, senior developers can focus on high-level problem-solving, architectural decisions, and mentoring juniors. Principal developers are now more involved in overseeing the integration of AI tools and ensuring they align with the company’s strategic goals.

In many ways however, this can also be seen as an increasing risk for junior developers and a growing – not a reduction in the – gap between them and senior developers. As seniors can make even more effective use of AI tooling based on their experience with pre-existing tools while junior developers don’t always know where to start or refine their query with AI tooling. Dare I say, that prompt engineering can be a real beast.

The Immediate Future

In the next 1-2 years, AI is expected to further revolutionize software development. Predictive coding, where AI anticipates and suggests entire code blocks based on previous patterns, will become more prevalent. This will speed up the development process and reduce errors. Additionally, AI-driven testing and debugging tools will enhance code quality and security by identifying vulnerabilities and performance bottlenecks more efficiently than traditional methods.

All that said, it could also lead to greater errors that are unrecoverable. It could lead to all sorts of problems we’ve yet to see. So buckle up Bucky, things could get bumpy!

Ethical and Practical Considerations

As AI becomes more ingrained in development workflows, ethical and practical considerations will arise. The potential for job displacement, the need for ongoing AI training, and the importance of maintaining a human touch in coding decisions will be critical discussion points. Companies will need to balance the benefits of AI with these challenges, ensuring that developers remain central to the development process.

The future of software development is undeniably intertwined with AI. As these technologies evolve, they will continue to redefine the roles and responsibilities within development teams, driving innovation and efficiency in unprecedented ways. If you’re not using AI tooling for your software development today you’re likely, and irreparably falling behind.

In the coming weeks, I’ll have some very thorough programming reviews around the AI tools on the market right now. So be sure to subscribe and stay tuned! Cheers, and happy thrashing code!