I use AI directly for two purposes: coding and searching. I use it via chat interfaces, easily integrating them into my workflow. This way, access is similar to other tools like my notes/repos and the Internet. The outcome is adequate.
Coding
I use AI primarily for four coding-related tasks:
- Code review/linting: I use AI to help validate code and detect potential issues and improvements. This approach is particularly useful when I am not proficient in a specific technology and can add relevant documentation to the prompt.
- Code conversion: I use AI to convert code from one programming language to another (R to Python, for example). This way, I have an additional reference to implement my own version.
- Example generation: I use AI to generate small demos combining different technologies. I take this approach when I can't find good examples online that include all the technologies I'm interested in.
- Error debugging: I use AI to understand the cause and potential solutions for certain errors. I resort to this approach when I can't find useful information online.
The initial prompt contains at least code, an instruction, and a set of conditions/requirements (specific major package versions, for example). Often, I also add additional content as context, such as a documentation page. I don't keep any of the prompts, so the prompt template is different every time.
Searching
I turn to AI when I have something concrete I want to find and only have a vague description in mind. I resort to it only after trying to find what I'm looking for in a search engine.