Take the 2-minute tour ×  Let $\mathcal A$ be an abelian
category and let $0 \xrightarrow{} X \xrightarrow f Y
\xrightarrow g Z \xrightarrow{} 0$ be an exact sequence of chain
complexes in $\mathcal A$. I am using the convention that the
differentials $d$ go up in degree. By the snake lemma there is a
long exact sequence $$ \cdots \longrightarrow H^{n} (X)
\longrightarrow H^{n}(Y) \longrightarrow H^{n}(Z) \xrightarrow{\
\delta \ } H^{n+1} (X) \longrightarrow \cdots $$ on homology.
Now let $f \colon X \longrightarrow Y$ be any morphism of chain
complexes. We define a complex $c(f)$ by $$ c(f)^n = X^{n+1}
\oplus Y^n \quad \quad d_{c(f)}^n=\left( \begin{array}{cc}
-d_X^{n+1} & 0 \\ f^{n+1} & d_Y^n \end{array}\right) $$ and
another complex $X[1]$ by $$ X[1]^n = X^{n+1} \quad \quad
d_{X[1]}^n = - d_X^{n+1}. $$  It is easy to show that $$ 0
\longrightarrow Y \xrightarrow{ p(f) } c(f) \xrightarrow{q(f)}
X[1] \longrightarrow 0 $$ is exact where $p(f)^n = \left(
\begin{array}{c} 0 \\ 1 \end{array} \right)$ and $q(f)^