Baby Rudin Theorem 8.15: Approximate periodic continuous function by trigonometric polynomials 
8.15 Theorem If $f$ is continuous (with period $2\pi$) and if $\epsilon>0$, then there  is a trigonometric polynomial $P$ such that
$$\left|P(x)-f(x)\right|<\epsilon$$
for all real $x$.
Proof   If we identify $x$ and $x+2\pi$, we may regard the $2\pi$-periodic functions on $\mathbb{R}^1$ as functions on the unit circle $T$, by means of the mapping $x\rightarrow e^{ix}$. The trignometric polynomials, i.e., the functions of the form
$$Q(x)=\sum^N_{-N} c_ne^{inx}\qquad(x\mbox{ real})$$
form a self-adjoint algebra $\mathscr{A}$, which separates points on $T$, and which vanishes at no point of $T$. Since $T$ is compact, the Stone-Weierstrass theorem tells us that $\mathscr{A}$ is dense in $\mathscr{C(T)}$. This is exactly what the theorem asserts.

I need some help to understanding this proof. I think by "regard $f$ as a function on $T$" means that we define a function $g$ on $T$ by
$$ g(t) = f(x) $$
where $t=e^{ix}$. Since the mapping $x\rightarrow e^{ix}$ is 1-1 on $[0,2\pi)$ and $f$ is $2\pi$-periodic, $g$ is well-defined. I think by "algebra of trigonometric polynomials", he mean algebra of polynomials with complex coefficient, i.e., functions of the form
$$P(t)=c_0+c_1 t+\cdots+c_n t^n\qquad(t\in T)\mbox{.}$$
By the Stone-Weierstrass Theorem, there exists a sequence of polynomials $\{P_n\}$ on $T$ such that $P_n\rightarrow g$ uniformly. Hence
$$\left| P_n(t)-f(x)\right|<\epsilon$$
if $t\in T$, $t=e^{ix}$ for all large $n$. And $P_n(e^{ix})$ is the trignometric polynomial we want. Am I correct?
 A: Proof If we identify $x$ and $x+2π$, we may regard the $2π$-periodic functions on $R^1$ as functions on the unit circle $T$, by means of the mapping $x↦e^{ix}$. [Thus, if $f(x)=g(e^{ix})$, by (53), i.e., by $e^z=e^{z+2πi}$, we get $f(x+2π)=g(e^i{x+2π} )=g(e^{ix} )=f(x)$. Note that although $f$, which is $2π$-periodic on $R^1$, may or may not be continuous on $R^1$, g is continuous on $T$.] The trigonometric polynomials, i.e., the functions of the form (60) [i.e., $f(x)=∑_{-N}^N c_n e^{inx}    (x \text{ real} )$], form a self-adjoint algebra $ \mathscr{A}$ [i.e., for every $f∈ \mathscr{A}$ its complex conjugate $\bar{f} $ must also belong to $\mathscr{A}$; $\bar{f}$ is defined by $ \bar{f} (x)= \bar{f(x)}$. Indeed,$$ f(x)=∑_{-N}^N  c_n e^{inx}⇒\bar{ f(x)}=∑_{-N}^N \bar{ c_n e^{inx}}=∑_{-N}^N \bar{c_n }e^{-inx} =∑_{-N}^N \bar{c_n }e^{inx},$$ thus $f∈\mathscr{A}⇒\bar{f}∈\mathscr{A}$], which separates points on $T$, and which vanishes at no point of $T$. Since $T$ is compact, Theorem 7.33 tells us that $\mathscr{A}$ is dense in $C(T)$. [Thus, there exists a sequence of polynomials which can converge to $g$, hence to f.] This is exactly what the theorem asserts.
