A distributed system is self-stabilizing if it can reach a legitimate global state regardless of its any initial global state. A self-stabilizing algorithm for the maximum finding problem in distributed systems is proposed. The proposed algorithm runs on systems with a distributed demon. The selfstabilizing maximum finding algorithm can be used as a building block in other self-stabilizing algorithms by compositional method such that these algorithms can be designed and verified more easily. In addition, using the method, the convergence speed of these algorithms can be increased by reducing the interference between variables. We illustrate the application of the basic algorithm by designing a self-stabilizing breadth first search spanning tree construction algorithm.