• 1 Post
  • 32 Comments
Joined 2 years ago
cake
Cake day: June 12th, 2023

help-circle






  • One thought I’ve had about AI and programing is that you’ll run in to a similar problem. Code is a bit special because it’s a language that’s understandable by both humans and computers, and when you’re programing you’re essentially writing for both audiences at once.

    Voice is maybe not as important when writing code (although you still want to keep the coding style consistent) but even so I think that writing code by hand has the advantage of you being able to express your thoughts in a more coherent way than the output of a handful prompts will. The problem isn’t just with however powerful the AI model is, but that prompting is a kind of vague and indirect way of interacting with the system and it necessarily introduces another layer between the author and whoever ends up reading it.












  • This article uses the term “parsing” in a non-standard way - it’s not just about transforming text into structured data, it’s about transforming more general data in to more specific data. For example, you could have a function that “parses” valid dates into valid shipping dates, which returns an error if the input date is in the past for instance and returns a valid_shipping_date type. This type would likely be identical to a normal date, but it would carry extra semantic meaning and would help you to leverage the type checker to make sure that this check actually gets performed.

    Doing this would arguably be a bit overzealous, maybe it makes more sense to just parse strings into valid dates and merely validate that they also make sense as shipping dates. Still, any validation can be transformed into a “parse” by simply adding extra type-level information to the validation.