As services become more and more complex, log analysis has become
increasingly imperative when trying to diagnose bugs. Services now
generate megabytes or even gigabytes of log files on an average
day, and it’s more often than not impossible to look through data manually
from each file, or even open them in certain text editors (*ahem*
Notepad). So how do we work with these files?
In any non-trivial application, functions quickly become weighed down with
supporting functionality like logging,
tracing, and metrics
gathering. These blocks of code tend to echo throughout codebases with low
variance and are referred to as cross-cutting concerns.
Aspect-Oriented Programming
(AOP) helps achieve the
separation of concerns
by pulling these blocks into modules called aspects.
Using printf
for debugging is simple enough for small projects, but what if
we want more information?
Quick tip: You can also get UINT_MAX
in C by doing (unsigned) -1
.
Over the past couple days, I’ve been banging my head against the wall, trying to
understand the logic programming language
Prolog (or more specifically,
SWI-Prolog) for our CS162 Programming Languages
class.