Hour a Day: AI - Day 17 - Tests Beware!
With tests being in place, it’s time to start tuning up functionality that has been annoying me so far on this journey!
Problems of scale Prompt:
when prompting the user for which day to select, they are currently being displayed from oldest first to newest last. Can you flip that to display the most recent values first?
Hour a Day: AI - Day 16 - New Machine Setup
I wanted to switch things up and get aider set up on my laptop. The setup was pretty painless overall, but it didn’t leave me much time for actual ai experimentation.
I did get to do a little so let’s check it out!
Check our Conventions I wasn’t actually sure the tool understood what conventions it was being fed. I asked it to reword them for me.
Hour a Day: AI - Day 15 - Done with tests
The post is going to look a little different today! Read along and see what we did :)
Start Refactoring Prompt:
ParsePromptResponsePairs in ChatHistoryParser.cs is hard to reason about, can you help make it easier to parse? There’s a lot of nesting that feels like it can be avoided
Hour a Day: AI - Day 14 - I swear I haven't given up yet!
Sorry to anybody who has actually been keeping up. I realized just before getting started for today that CI hadn’t been run automatically the last two days. (I swear I was keeping up! Check out my github!)
In attempting to fix things I did ask claude some k8s command line questions, but they didn’t get the syntax for deleting argo workloads just right, so I gave up and did things manually.
Hour a Day: AI - Day 13 - Sometimes Conventions aren't enough
We’re on the last round of testing, after this we can get into refactoring the code base to have it be more readable!
Get ready to rumble Prompt:
In FilePathUtilityTests.cs setup, don’t automatically create any test files. Only get a temp direcotory for other tests to use
Hour a Day: AI - Day 12 - Testing Successes; Program Failures
The name of the game today is writing more tests! If you’re super diligent you’ll notice that some of the responses may look like they’re missing lines. That is an artifact of the tool parsing these! The unit tests being created mimicked the real input so the parser thought they were real prompts!
Previous Clean Up Prompt:
Hour a Day: AI - Day 11 - Convention Driven Development
We’re back, and now it’s time to focus on the next set of tests! Looking at the next file I realized it was doing file io which would be more difficult to test. So let’s get started by separating concerns!
Extract File i/o Prompt:
Hour a Day: AI - Day 10 - More Tests!
Let’s keep working through some tests!
No context besides the test failure Prompt:
Multiple failures or warnings in test:
Assert.That(selectedPrompts[0].IsSuccess, Is.EqualTo(“Good”)) Expected: “Good” But was: True at LlmHistoryToPost.Tests.Services.UserInteractionServiceTests.<>c__DisplayClass10_0.b__0() in C:\Users\Paul_\projects\blog\llm-history-to-post\tests\Services\UserInteractionServiceTests.cs:line 163 at NUnit.Framework.Assert.Multiple(TestDelegate testDelegate) at LlmHistoryToPost.Tests.Services.UserInteractionServiceTests.ShouldSetVerdictAndCommentWhenCollectingVerdicts() in C:\Users\Paul_\projects\blog\llm-history-to-post\tests\Services\UserInteractionServiceTests.cs:line 160 2) Assert.That(selectedPrompts[1].IsSuccess, Is.EqualTo(“Bad”)) Expected: “Bad” But was: True at LlmHistoryToPost.Tests.Services.UserInteractionServiceTests.<>c__DisplayClass10_0.b__0() in C:\Users\Paul_\projects\blog\llm-history-to-post\tests\Services\UserInteractionServiceTests.cs:line 167 at NUnit.Framework.Assert.Multiple(TestDelegate testDelegate) at LlmHistoryToPost.Tests.Services.UserInteractionServiceTests.ShouldSetVerdictAndCommentWhenCollectingVerdicts() in C:\Users\Paul_\projects\blog\llm-history-to-post\tests\Services\UserInteractionServiceTests.cs:line 160
Hour a Day: AI - Day 9 - Let's work through some tests
Let’s get back to some testing! I had intially planned on writing these tests by hand to better ensure their quality, but after thinking on it more If I tackle the tests one at a time with aider I’ll be able to test out more prompting, and the smaller function size should help me practice PR’ing it’s work.
Moq the Prompt! Prompt:
Hour a Day: AI - Day 8 - Another perspective
I’m running off not much sleep as a bunch of severe weather came through my neighborhood last night. I have an event to go to in a few, and I’m not sure if I’ll be up for a full session when I return. So in the off chance I’m not a co-worker posted an insightful article, that while I may not totally agree with, is an interesting perspective on ai tooling.