Fix a function W (x 1 , . . . , x d ) = d k=1 W k (x k ) where each W k : R → R is a strictly increasing right continuous function with left limits. For a diagonal matrix function A, let ∇A∇ W = d k=1 ∂x k (a k ∂ W k ) be a generalized second-order differential operator. We are interested in studying the homogenization of generalized second-order difference operators, that is, we are interested in the convergence of the solution of the equationwhere the superscript N stands for some sort of discretization. In the continuous case we study the problem in the context of W -Sobolev spaces, whereas in the discrete case the theory is developed here. The main result is a homogenization result. Under minor assumptions regarding weak convergence and ellipticity of these matrices A N , we show that every such sequence admits a homogenization. We provide two examples of matrix functions verifying these assumptions: The first one consists to fix a matrix function A with some minor regularity, and take A N to be a convenient discretization. The second one consists on the case where A N represents a random environment associated to an ergodic group, which we then show that the homogenized matrix A does not depend on the realization ω of the environment. Finally, we apply this result in probability theory. More precisely, we prove a hydrodynamic limit result for some gradient processes.2000 Mathematics Subject Classification. 46E35, 35J15.