You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Coillte/Using_AI_For_Coding.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,3 +23,42 @@ Of course, AI isn't perfect. One critical issue is **hallucination**—AI tools
23
23
Tools like Copilot are also helpful for **interpreting error messages** and debugging, especially when they already understand the datasets and code you’re working with. That said, sometimes Copilot may introduce bugs in the first place, so careful validation is essential.
24
24
25
25
In short: take a patient, iterative approach. When used thoughtfully, these tools can dramatically accelerate your workflow and raise the quality of your work.
26
+
27
+
28
+
---
29
+
30
+
### Good Coding Vocabulary and Evolving Practices
31
+
32
+
Improving your general knowledge of R packages is essential, and it extends well beyond just working with documents. In the context of document processing, this includes packages that extend **ggplot2**, such as those for working with maps and chart files—*terra*, *sf*, and others.
33
+
34
+
Additionally, there are R packages dedicated to working with **dates and times**, as well as tools for **image manipulation** and **optical character recognition (OCR)**. One notable example is the *tesseract* package, which enables OCR functionality in R.
35
+
36
+
When it comes to AI tools, I prefer to focus on those likely to be accessible to most people in the near future. Examples include **Gemini** and **Microsoft Copilot**, which are rapidly becoming integrated into everyday workflows.
37
+
38
+
---
39
+
40
+
### Prompt Engineering and AI Use
41
+
42
+
Prompt engineering—especially when working with AI and large language models (LLMs)—requires discipline. You must ask **clear, specific, and structured questions** to get the best results. While these tools can produce a significant amount of text, that in itself creates a new problem: an **overabundance** of content that needs editing and refinement.
43
+
44
+
AI tools are particularly useful for revisiting old R script files. They help with **adding comments, reformatting code, and aligning with updated coding conventions**. One interesting consequence is that context files and collaborative work now encourage teams to align on shared coding styles and standards.
45
+
46
+
---
47
+
48
+
### Coding Styles and Team Collaboration
49
+
50
+
Even within frameworks like the **tidyverse**, people develop distinctive coding idioms. While individual style is fine, collaboration highlights the need for consistency. AI tools help reinforce this by making us more mindful of how we **structure code, document functions, and adhere to team conventions**.
51
+
52
+
In my own case, code reviews weren’t something I practiced historically—if the R script worked, it was considered “good enough.” But as we've moved toward sharing context files and collaborating more deeply, **agreed standards have become increasingly important**.
53
+
54
+
While this shift may feel natural for software engineers—where code review is standard—it’s a new challenge for many data scientists who come from backgrounds like mathematics or statistics, where team-based coding is more ad hoc.
55
+
56
+
---
57
+
58
+
### Personal Style and Visual Communication
59
+
60
+
A small but personal example: I prefer to **color-code my outputs**. It’s part visual clarity, part personal satisfaction. People can often recognize one of my tables immediately just by the attention I put into palette choices and styling. It might trace back to my upbringing—both of my parents were teachers—so I treat presentation and clarity with a certain level of seriousness.
0 commit comments