This lecture provides an overview of programming techniques for scientific simulations. The focus is on advances C++ programming techniques and scientific software libraries. Based on an overview over the hardware components of PCs and supercomputer, optimization methods for scientific simulation codes are explained.