Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: What a designer can ship with GPT in 8 days (testflight.apple.com)
12 points by raffichill on April 25, 2023 | hide | past | favorite | 9 comments
After getting impatient with a "SwiftUI for Designers" course I decided to fuck around and find out.

Just hours after asking my 1st question: "Are you familiar with SwiftUI?" the core functionality of this app (an exercise utility) was up and working.

I've spent the past week tweaking the UI with small animations and features. It's a humble tool (local storage only) but I am nonetheless floored with how GPT has allowed me to completely skip the "learning syntax" part of development and ship something that I actually use.

Not only did it lower the syntax bar virtually to 0... I've learned just as much or more syntax from reading and debugging GPT outputs than I would by taking a course.

For fairness: I'm a design cofounder and self-taught React Native front-ender with 2 years of total experience in software (0 Swift). I am not a data structures person.

After working with ChatGPT to get the file structure and skeleton components set up over the span of ~3 days, I decided to scrap our previous data structure and propose a new one after realizing our first was too brittle to build certain components that I wanted.

Below is the prompt which resulted in the current data structure and functionality of the app, which is live on TestFlight for anyones use:

////////// PROMPT //////////

You are a full-stack iOS developer using SwiftUI. Together we are going to write the code for a two-tab exercise app which stores data locally using AppStorage and UserDefaults.

The app takes individual exerciseEntries which have a name and a count, and sorts these into groups called exerciseGroups.

ExerciseGroups are defined as any set of exerciseEntries which have the same name and occur with no more than 30 minutes between consecutive exerciseEntries.

On the first tab of our app, users input each exerciseEntry. On the second tab, they view their historical data. The first tab of the app is already complete, and we now only need to write the logic which occurs when a new exerciseEntry is submitted.

When a user submits an exerciseEntry, three arrays stored in AppStorage should simultaneously update with the correct data:

Exercises[], which contains an array of all exerciseEntries the user has submitted ExerciseGroups[], which contains an array of all exerciseGroups Days[], which contains an array of days

The data model is defined in a separate Swift File called ExerciseDataModel.swift:

public var exerciseTypes = ["Push Ups", "Pull Ups", "Chin Ups", "Squats", "Calf Raises"]

// ExerciseEntries struct ExerciseEntry: Identifiable { var id = UUID() var exerciseName: String var count: Int var timestamp: Date }

// ExerciseGroups struct ExerciseGroup: Identifiable { var id = UUID() var groupName: String var entries: [ExerciseEntry] var startTime: Date var duration: TimeInterval }

// ExerciseTotals struct ExerciseTotal: Identifiable { var id = UUID() var exerciseName: String var total: Int var date: Date }

// Days struct Day: Identifiable { var id = UUID() var date: Date var exerciseGroups: [ExerciseGroup] var totalCounts: [ExerciseTotal] }

Based on this information, can you write a function that correctly updates the data in AppStorage after each time a user submits a new exerciseEntry?

I would suggest that this function first updates the Exercises[] array, followed by the ExerciseGroups[] array, and finally the Days[] array based on the logic defined above.

////////// END PROMPT //////////




I find the same thing when a compiler's fast and has good error messages. I can type vaguely what I want, and then the errors teach me the language syntax. (When there are small, clear examples, I can learn a lot from that as well. I really like Python IDLE.)

It sounds like most of the benefit you got from ChatGPT lines up with deficits in your tooling. It's interesting that a language model set to "predict" can make up for that deficit for such a wide variety of languages! (Though it's no good for niche or more-than-slightly technical scenarios, like Vulkan programming; past a certain point, you need the actual tools to exist.)


Interesting way to put it... I certainly do hate Xcode!


This links to a TestFlight help page.


Uh oh. Can't think of what to do other than reposting the correct link (https://testflight.apple.com/join/zbmQE9fU).

I'll be submitting it to App Airport (https://airport.community/) for people to check out too but not sure it will get approved right away. Also - thanks for being curious and trying to take a look!


If you follow the instructions on the page and refresh, it'll let you install the beta version of this person's app.


Seo spam


Change the min iOS to 15 or something


Will give this a shot, thanks for the reminder!


Changed to 15.5 btw!




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: