Skip to content
Snippets Groups Projects
Commit eedf7d74 authored by Lennart Klebl's avatar Lennart Klebl
Browse files

Rob Pike in beispieldok

parent 30134feb
Branches
No related tags found
No related merge requests found
......@@ -70,26 +70,28 @@ können als einen Grenzwert der Zetafunktion, $\riemann$.
\end{center}
\end{table}
\section*{Epilog}
Dieser Teil soll \textcolor{red}{nicht} im Inhaltsverzeichnis auftauchen, und
erhält damit auch keine Nummer.\\
Außerdem:
\begin{itemize}
\item Strukturierte Dokumente sind einfach mit \LaTeX.
\item Makros machen einem das Leben leicht.
\item Formeln -- und auch der ganze Rest -- sehen toll aus.
\item Referenzen auf alles mögliche, also (Unter)$^n$abschnitte,
Gleichungen, Abbildungen, Tabellen, \dots{} sind automatisch richtig.
\item Eigentlich ist das alles gar nicht so schwierig.
\end{itemize}
\vfill
% Der Befehl vfill fügt einen vertikalen Abstand ein, der den übrigen Platz
% ausfüllt
\section*{Epilog -- Ein paar Programmiertipps von Rob Pike}
Most programs are too complicated - that is, more complex than they need to be
to solve their problems efficiently. Why? Mostly it's because of bad design,
but I will skip that issue here because it's a big one. But programs are often
complicated at the microscopic level, and that is something I can address here.
\begin{enumerate}
\item You can't tell where a program is going to spend its
time. Bottlenecks occur in surprising places, so don't try to second
guess and put in a speed hack until you've proven that's where the
bottleneck is.
\item Measure. Don't tune for speed until you've measured, and even then don't
unless one part of the code overwhelms the rest.
\item Fancy algorithms are slow when $n$ is small, and $n$ is usually small.
Fancy algorithms have big constants. Until you know that $n$ is frequently
going to be big, don't get fancy. (Even if $n$ does get big, use Rule 2
first.) For example, binary trees are always faster than splay trees for
workaday problems.
\item Fancy algorithms are buggier than simple ones, and they're much harder to
implement. Use simple algorithms as well as simple data structures.
\end{enumerate}
\begin{center}
\includegraphics[width=0.5\textwidth]{ctanlion.eps}
\end{center}
\vfill
% die beiden Abstände werden gleichmäßig verteilt. Das Bild erscheint also in
% der Mitte.
\end{document}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment