Arkeus Interview Question

Derive and code a Sobel filter from first principles?