Skip to content

Commit f97d155

Browse files
committed
added example
1 parent 13e1714 commit f97d155

File tree

5 files changed

+51
-14
lines changed

5 files changed

+51
-14
lines changed
Loading
Loading
Loading

text/main/basics/simpleDataTypesAndOperations/documentation/documentation.tex

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -521,15 +521,57 @@
521521
%
522522
\end{enumerate}%
523523
%
524-
From these points, we can draw one more conclusion:%
524+
\begin{figure}%
525+
\centering%
526+
\begin{noglslink}%
527+
%
528+
\subfloat[][%
529+
Part of a screenshot obtained from the news article~\cite{T2025ACPGRDCFADECDRCAAAESIMACEIJADAPD}.%
530+
\label{fig:aiDBdeleteTomsHW}%
531+
]{\tightbox{\includegraphics[width=0.47\linewidth]{\currentDir/aiDBdeleteTomsHW}}}%
532+
%
533+
\floatSep%
534+
%
535+
\subfloat[][%
536+
Slightly edited part of a screenshot obtained from the news article~\cite{N2025AAPCTWOASCDTAFACFOMP}.%
537+
\label{fig:aiDBdeleteFortune}%
538+
]{\tightbox{\includegraphics[width=0.47\linewidth]{\currentDir/aiDBdeleteFortune}}}%
539+
%
540+
\floatRowSep%
541+
%
542+
\subfloat[][%
543+
Part of a screenshot obtained from the news article~\cite{S2025AMRCKLPUVR}.%
544+
\label{fig:aiDBdeleteGolem}%
545+
]{\tightbox{\includegraphics[width=0.7\linewidth]{\currentDir/aiDBdeleteGolem}}}%
546+
%
547+
\caption{Three news articles describing an incident where a vibe coding \pgls{AI} deleted the production database of a company without asking for permission and despite being told to not make any changes without asking for permission.}%
548+
\label{fig:aiDBdelete}%
549+
\end{noglslink}%
550+
\end{figure}%
551+
%
552+
Additionally, there are differences between \pgls{AI} tools and human-written sources.
553+
\pgls{AI} tools can make errors that no human would make.
554+
An illustrative example in the \python\ world is given in~\cite{BSHETB:VSK2025CIC}, where it is documented that Microsoft Copilot renamed a class in a misleading way, leading to a particularly hard-to-find error.
555+
\Cref{fig:aiDBdelete} shows an even worse example:
556+
A vibe coding \pgls{AI} deleted the \glsreset{db}\gls{db} of a company, fabricated test results, and later explained that it intentionally ignored the directives given to it.
557+
This clearly shows that we need to be careful with the tools that we use.
558+
We need to understand what they can do and how to use them properly.
559+
Finally, sometimes, an \pgls{AI} may reference non-existing packages~\cite{AT:G2025AGCCBADFTSSCHW}.
560+
This can become a security concern, if hijackers create such packages to inject code into our applications.
561+
Therefore, once you found an answer to your question, you need to take the new information and check it with the documentation.
562+
563+
We can derive a simple rule from these issues:%
525564
%
526565
\bestPractice{searchAndLLMDoc}{%
527-
\pglspl{AI} tools and web-based non-authoritative resources can be used to \emph{find} solutions. %
566+
\pgls{AI} tools and web-based non-authoritative resources can be used to \emph{find} solutions. %
528567
They should never be used to \emph{document} solutions, because this must be done by a human. %
529568
Documentation, i.e., the textual description of what the software does, must be done by actual people who fully understand the software.%
530569
}%
531570
%
532-
There is another issue with the use of \pgls{AI}.
571+
Only if a person is able to properly document code, they have really understood it.
572+
By enforcing the above rule, we can use \pgls{AI} while simultaneously making sure that our code is understood and does what it is supposed to do.
573+
574+
There is another issue with the use of \pgls{AI} that applies to this course and that dovetails with the above.
533575
Remember back when you were in primary school.
534576
During the first few years of maths lessons, you never got to use a calculator.
535577
Of course, your teachers knew very well that you will use calculators or other computing devises to do calculations in your later life and rarely compute things by hand or in your head.
@@ -611,22 +653,17 @@
611653
Luckily, there exist other useful tools that you can apply.
612654
You can use search engines, you can read in internet forums like \citetitle{SE:SO}~\cite{SE:SO}, and you can ask your questions to an~\pgls{AI}.
613655
All of these tools can guide you to the right answer.
614-
We always need to check these answers by circling back to the authoritative documentation, because there is no guarantee that the answeres are correct or up-to-date.
615656

616-
All non-authoritative sources provide answers that, ultimately, are grounded on prior human experience and training.
657+
But remember that all non-authoritative sources provide answers that, ultimately, are grounded on prior human experience and training.
617658
On one hand, humans can make errors and not even know that they made them.
618-
on the other hand, non-authoritative sources might be outdated.
619-
620-
There are two (known) differences between \pgls{AI} tools and human-written sources, though.
621-
First, \pgls{AI} tools can make errors that no human would make.
622-
An illustrative example in the \python\ world is given in~\cite{BSHETB:VSK2025CIC}, where it is documented that Microsoft Copilot renamed a class in a misleading way, leading to a particularly hard-to-find error.
623-
Second, sometimes, an \pgls{AI} may reference non-existing packages~\cite{AT:G2025AGCCBADFTSSCHW}.
624-
Therefore, once you found an answer to your question, you need to take the new information and check it with the documentation.
659+
On the other hand, non-authoritative sources might be outdated.
660+
We always need to check these answers by circling back to the authoritative documentation, because there is no guarantee that the answeres are correct or up-to-date.
625661

626-
Anyway, as example for searching information using \pgls{AI} tools, we looked for a function that rounds floating point numbers towards positive infinity.
662+
As example for searching information using \pgls{AI} tools, we looked for a function that rounds floating point numbers towards positive infinity.
627663
We did not know what this function was called~(or whether it even exists).
628664
The \pgls{AI} told us that it was called \pythonilIdx{ceil}.
629665
We got the exact same information by using a search engine and by using a community portal.
666+
So this works.
630667
Regardless how we got that information, we would not just use the function \pythonilIdx{ceil} in our code directly.
631668
We would go back to the official \python\ documentation and search for \pythonilIdx{ceil}.
632669
Only after checking the documentation, we would have clarity and confidence that we will produce the right code.%

0 commit comments

Comments
 (0)