Let $X$ be an $n$-dimensional projective variety with a simple singularity $p \in X$ which can be resolved by a blow-up $\pi\colon \tilde X \to X$ along $p$. The examples that I am considering are when $p$ is a node ($\widehat{\mathscr{O}}_{X,p} \cong \mathbb C[\![x_1,...,x_{n+1}]\!]/\langle x_1^2 + \cdots + x_{n+1}^2\rangle$) or a cusp ($\widehat{\mathscr{O}}_{X,p} \cong \mathbb C[\![x_1,...,x_{n+1}]\!]/\langle x_1^2 + \cdots + x_{n}^2 + x_{n+1}^3\rangle$). In these cases, the exceptional divisor $E$ is either a smooth quadric in $\mathbb{P}^n$ or a cone over a smooth quadric in $\mathbb{P}^{n-1}$. I would like to compute the top self-intersection $E^n$ in $\tilde X$.
For $n = 2$, the resolution is well-understood: when $p$ is a node, $E \cong \mathbb{P}^{1}$ is a $(-2)$-curve; when $p$ is a cusp, $E$ is a union of two $(-2)$-curves intersecting at one point. For both cases we have $E^2 = -2$.
Now I am stuck at $n = 3$. It might be helpful to compute the normal bundle $\mathscr N_{E\mid\tilde X} \cong \mathscr{O}_{\tilde X}(-E)|_E \cong \mathscr{O}_{\mathbb{P}^{3}}(-1)|_E$, as I expect that $E^n = (\deg \mathscr N_{E\mid\tilde X})^{n-1}$ at least when $E$ is smooth. I am not sure if it is the correct way to compute the product; nor do I know if it holds for $E$ singular quadric.
(I guess $E^3 = 4$ for the nodal 3-fold and $E^3 = 2$ for the cuspidal 3-fold.)
The blowup $\tilde{X}$ of $p$ on $X$ is the strict transform of $X$ in the blowup of the ambient smooth variety (say $Y$) of dimension $n + 1$ at $p$ and the exceptional divisor $E_X \subset \tilde{X}$ is the preimage of the exceptional divisor $E_Y \subset \tilde{Y}$, hence $$ \mathcal{N}_{E_X/\tilde{X}} \cong \mathcal{N}_{E_Y/\tilde{Y}}\vert_{E_X}. $$ Therefore, the normal bundle is $\mathcal{O}(-1)$ both in the case of a node and in the case of a cusp. The formula for $E_X^n$ works regardless of the smoothness of $E_X$, so the self-intersection is $$ E_X^n = (-1)^{n-1}\cdot 2 $$ in both cases.