Updated Coding Style slides.
authorSantosh G. Vattam <vattam.santosh@gmail.com>
Tue, 06 Oct 2009 12:44:23 +0530
changeset 27 ecf0f0e885f4
parent 26 c72eae1c5c9d
child 28 f40614533474
Updated Coding Style slides.
day1/Session-3.tex
--- a/day1/Session-3.tex	Tue Oct 06 02:10:07 2009 +0530
+++ b/day1/Session-3.tex	Tue Oct 06 12:44:23 2009 +0530
@@ -374,4 +374,49 @@
   Functions (and others) are first-class objects. Can be passed to and returned from functions.
   \inctime{10}
 \end{frame}
+
+\subsection{Coding Style in Python}
+\begin{frame}{Readability and Consistency}
+    \begin{itemize}
+        \item Readability Counts!-Code is read more often than its written.
+        \item Consistency!
+        \item Know when to be inconsistent.
+      \end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]
+  \frametitle{Code Layout}
+  \begin{itemize}
+        \item Indentation
+        \item Tabs or Spaces??
+        \item Maximum Line Length
+        \item Blank Lines
+        \item Encodings
+   \end{itemize}
+\end{frame}
+
+\begin{frame}{Whitespaces in Expressions}
+  \begin{itemize}
+        \item When to use extraneous whitespaces??
+        \item When to avoid extra whitespaces??
+        \item Use one statement per line
+   \end{itemize}
+\end{frame}
+
+\begin{frame}{Comments}
+  \begin{itemize}
+        \item No comments better than contradicting comments
+        \item Block comments
+        \item Inline comments
+   \end{itemize}
+\end{frame}
+
+\begin{frame}{Docstrings}
+  \begin{itemize}
+        \item When to write docstrings?
+        \item Ending the docstrings
+        \item One liner docstrings
+   \end{itemize}
+\end{frame}
+\inctime{10}
 \end{document}