Answer Set Programming (ASP) is a logic-based Knowledge Representation and Reasoning (KRR) paradigm easing the fast prototyping of algorithms for complex problems. Indeed, ASP finds a natural application in solving problems characterized by search spaces of exponential size, which is the typical case for combinatorial search and combinatorial optimization. However, while moving the first steps in ASP is easy, being proficient with the most advanced linguistic constructs and scaling over realistic size instances is not necessarily a walk in the park. In this course we will show how to use ASP at several levels, from the basic use of ASP systems for computing answer sets of an ASP program, to more sophisticated use cases in which ASP itself is just one (even if of crucial importance) wheel in broader and more complex gears. We will give space to ASP internals, secure coding and explainability concerns (XAI).