Added tl;dr: to section 1; also added note to abstract

This commit is contained in:
Kenneth John Odle 2023-07-31 08:30:22 -04:00
parent aa9b85cb72
commit 7f25ddfaea

View File

@ -85,6 +85,9 @@
\begin{tikzpicture} \draw [white, line width=6] (0,0) -- (0.1,0); \end{tikzpicture} \begin{tikzpicture} \draw [white, line width=6] (0,0) -- (0.1,0); \end{tikzpicture}
} }
% Figure out how to add section symbol
\newcommand\ksec{$\S$}
% Additional options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Additional options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\raggedbottom \raggedbottom
@ -104,11 +107,11 @@
\maketitle \maketitle
\begin{abstract} \begin{abstract}
This document consists of notes on Python, gleaned from various sources. A list of references (often with commentary) follows. This document consists of notes on Python, gleaned from various sources. A list of references (often with commentary) follows. If you are in a hurry, read the \texttt{tl;dr:} at the beginning of each section.
The latest version of this document can be found at \kref{https://git.kjodle.net/kjodle/Notes-on-Python}{https://git.kjodle.net/kjodle/Notes-\\on-Python}. This document was typeset in \LaTeX{}.
This document was typeset in \LaTeX{}. The latest version of this document can be found at \kref{https://git.kjodle.net/kjodle/Notes-on-Python}{https://git.kjodle.net/kjodle/Notes-on-Python}.
\end{abstract} \end{abstract}
\tableofcontents \tableofcontents
@ -117,11 +120,11 @@ This document was typeset in \LaTeX{}.
\section{Preliminaries} \section{Preliminaries}
\kcolb \kcolb
\subsection{What is Python?} \noindent{}\texttt{tl;dr:} Use Python 3 (not 2), read \ksec\ref{comments-in-python}: ``\nameref{comments-in-python}'' and execute your python scripts from the command line as described in \ksec\ref{exec-python}: ``\nameref{exec-python}''.
\subsection{What is Python?}\label{what-is-python}
To quote from the Python Software Foundation:\cite{pythonorg:blurb} To quote from the Python Software Foundation:\cite{pythonorg:blurb}
@ -131,7 +134,7 @@ To quote from the Python Software Foundation:\cite{pythonorg:blurb}
\subsection{Why use Python?} \subsection{Why use Python?}\label{why-use-python}
I won't bore you with details. If you have made enough effort to find this document, you are probably aware of the importance of the Python programming language. If not, however, I'll give a brief summary. I won't bore you with details. If you have made enough effort to find this document, you are probably aware of the importance of the Python programming language. If not, however, I'll give a brief summary.
@ -151,13 +154,13 @@ Many fields depend on Python to process data.
Mueller\cite{mueller-jp:23} has many reasons why a knowledge of Python may be useful in a job search. They were fairly accurate as of their publication (2023),but things change quickly, so a keyword search of your preferred job boards is always in order. Mueller\cite{mueller-jp:23} has many reasons why a knowledge of Python may be useful in a job search. They were fairly accurate as of their publication (2023),but things change quickly, so a keyword search of your preferred job boards is always in order.
\subsection{IDEs and Python} \subsection{IDEs and Python}\label{IDEs}
An integrated development environment (IDE) is an application that enables you to write code, debug code, and often compile it and execute it. On Linux systems, Python typically comes bundled with IDLE, although others are available. \cite{programiz:ides}\cite{realpython:ide} An integrated development environment (IDE) is an application that enables you to write code, debug code, and often compile it and execute it. On Linux systems, Python typically comes bundled with IDLE, although others are available. \cite{programiz:ides}\cite{realpython:ide}
The broader question ``should you use an IDE?'' is not as easy to answer. There are reasons IDEs exist, and if you are working on a large project, they can help to speed up the process. However, when you are first starting with Python, it is probably going to be more enlightening to you to use Python directly from the command line, as you will have a better feel for what Python is doing behind the scenes when you eventually do move over to an IDE. (See the section ``\nameref{exec-python}'' below.) The broader question ``should you use an IDE?'' is not as easy to answer. There are reasons IDEs exist, and if you are working on a large project, they can help to speed up the process. However, when you are first starting with Python, it is probably going to be more enlightening to you to use Python directly from the command line, as you will have a better feel for what Python is doing behind the scenes when you eventually do move over to an IDE. (See the section ``\nameref{exec-python}'' below.)
\subsection{Version 2 versus Version 3} \subsection{Version 2 versus Version 3}\label{2vs3}
The initial version of Python 2 was released in 2000. Python 2.7, which was released in 2010, is the last version of Python 2. Many people continue to use Python 2, but they shouldn't, and neither should you. The initial version of Python 2 was released in 2000. Python 2.7, which was released in 2010, is the last version of Python 2. Many people continue to use Python 2, but they shouldn't, and neither should you.
@ -174,7 +177,7 @@ Python 3 was released in December 2008 and is a drastically different language t
Most importantly, the Python project stopped supporting Python 2 after 31 December 2019, meaning \kpull{\textit{Use Python 3!}}{21mm} that it is not getting bug fixes or security updates. Anything written in Python 2 is not as efficient, and definitely not as secure, as anything written in Python 3. Most importantly, the Python project stopped supporting Python 2 after 31 December 2019, meaning \kpull{\textit{Use Python 3!}}{21mm} that it is not getting bug fixes or security updates. Anything written in Python 2 is not as efficient, and definitely not as secure, as anything written in Python 3.
\subsection{Comments in Python} \subsection{Comments in Python}\label{comments-in-python}
Python supports single line comments by adding a hashtag (\texttt{\#}) to the beginning of each line: Python supports single line comments by adding a hashtag (\texttt{\#}) to the beginning of each line:
@ -198,7 +201,7 @@ be ignored by Python
The main difference between single line comments and multiline comments is that single line comments do not get exported to reports, whereas multiline comments do. Again, this is because Python does not fully support multiline commenting. The main difference between single line comments and multiline comments is that single line comments do not get exported to reports, whereas multiline comments do. Again, this is because Python does not fully support multiline commenting.
\subsubsection{Uses of Comments} \subsubsection{Uses of Comments}\label{uses-of-comments}
Comments are highly useful when writing code and often underutilized or poorly utilized. It has been suggested\cite{denker-j} that Comments are highly useful when writing code and often underutilized or poorly utilized. It has been suggested\cite{denker-j} that