-
Notifications
You must be signed in to change notification settings - Fork 4
/
careful.tex
47 lines (43 loc) · 2.17 KB
/
careful.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
\section{Discussion}
\frame{\tableofcontents[currentsection, currentsubsection]}
\begin{frame}{Common criticism}
%Common criticism% of programming by patterns:
\only<+->{
\begin{quote}
\enquote{Repetitive use of the same patterns and lots of boilerplate indicates lack or abstraction or lacking features of your programming language.}
\end{quote}
}
\begin{itemize}[<+->]
\item \hhl{Example}: If functions are first-level objects \srem{(can be passed around like normal datatypes)}, I do not \srem{(always)} need to define a strategy class hierarchy. \\
However, this could still be considered the same \enquote{pattern} \srem{(only with a simpler implementation)}
\item The \enquote{Patterns} give you \hhl{vocabulary} to describe your problem in an abstract way, even if the implementation details very a lot between languages
\item Lots of pattern boilerplate should make you think about your design and language choices
\item Be aware that the implementation of \srem{(or even the need for)} certain patterns can be very dependent on your language features
\end{itemize}
\end{frame}
\begin{frame}{Common criticism}
\only<+->{
\begin{quote}
\enquote{Design patterns are used \hhl{excessively} and introduce \hhl{unneeded complexity}.}
\end{quote}
}
%
\begin{itemize}[<+->]
%
\item
Remember the zen of python: simple is better than complex; but complex is better than complicated
%
\item
Do not introduce complexity \srem{(use the design pattern)} if you do not fully understand why you need it.
\item
Some people highlight the KISS \srem{(\underline keep \underline it \underline simple, \underline stupid)} and YAGNI \srem{(\underline you \underline aren't \underline gonna \underline need \underline it)} principle
\end{itemize}
\end{frame}
\begin{frame}{Common criticism}
\begin{quote}
\enquote{The common design patterns are often the direct results of thinking about good software design; focusing on patterns replaces actual thought with \hhl{cut-and-paste programming}.}
\end{quote}
\begin{itemize}
\item<2-> Take discussion of patterns as a \hhl{mental practice} of thinking about good design; \stress{avoid} simple cut-and-paste
\end{itemize}
\end{frame}