Software engineering is the application of engineering principles to the development of software in a systematic, disciplined manner. It involves collecting best practices like techniques, methodologies and guidelines from past projects. A software product is developed using well-defined scientific principles and methods. Early software development was ad-hoc, but modern practices emphasize prevention over correction of errors through techniques like life cycle models, testing, and project planning.