Calculator Apps Are Hard

Published by

on

I recently finished building a Construction Calculator app as part of my “52 apps in 52 weeks” challenge. The idea came from looking at App Store analytics using a tool called AppRadar.com. I noticed that “Construction Calculator” had high search volume and relatively low competition, which sounded promising. I’d actually tried something similar a couple of years ago, but I found out the hard way that creating a calculator for construction tasks is more complicated than it seems. Math fractions plus UI elements plus all the special functions can be a real juggling act, so I figured this would be a good time to try again with the help of AI.

As I kept adding more features, my codebase got bigger and bigger. Eventually, the AI would start forgetting things or ignoring certain functions, or sometimes it would do funny things like shove the calculator into a side drawer layout on the iPad for no reason. I realized it was because I had thousands of lines in one file, and that’s just too much for the AI to reliably handle all at once. So I asked it to split my code into separate Swift files. That was a good move for organization, but then I had a new problem: any time I needed to make a change or get a new feature from the AI, I had to copy all my code from those separate files back into the chat. It turned into a lot of manual copying and pasting, and it was getting old fast.

That’s when I decided to have AI write me a little script for my terminal. Now, when I run that script, it automatically goes into my app folder, grabs all the Swift files, combines them together in one big chunk, labels each section with the file name, and then throws that entire chunk onto my clipboard. I just pasted the script once, and after that, all I need to do is hit the up arrow in the terminal and press enter. The whole codebase is right there in my clipboard, ready for me to paste into the AI and ask for whatever new thing I need. When I submit a new request, I ask for AI to return the full code file for any code files that need changes. This makes it faster for copying changes back into Xcode instead of inserting little chunks of code all over the place. It was such a huge time saver and headache reducer.

Overall, I’m happy with how the Construction Calculator turned out, and I’m definitely going to use this approach again if I find myself working on a big app that needs a lot of repetitive code-sharing with AI. Now it’s time to move on to the next app in my 52-week challenge.

https://apps.apple.com/us/app/construction-calculator-tool/id6740168084

Jake

Leave a comment