Logging for Fun: Things You’d Never Thought to Log
Developers see logging as a necessary evil. With a little creativity, you can make logging your hobby and it can gain you interesting insights about your life.
Join the DZone community and get the full member experience.Join For Free
I work as a consultant in the software industry. This work affords me the opportunity to see and interact with many different teams and thus to observe prevailing trends. Among these teams, the attitude toward logging tends to be one of resigned diligence.
That is, many developers view application logging the way they view flossing their teeth: a necessary, dull maintenance activity that will pay dividends later. Today, however, I’d like to encourage readers to consider a different side of logging. In the right context and with the right intent, the activity can do so much more than simply insulate against audits and facilitate troubleshooting. Logging can, in a sense, offer similar appeal to journaling or generally recording information for posterity.
Logging loosely consists of two components: recording and storing information. As application developers, we find our thoughts occupied by the recording and how that affects our code. We consider the storage and retrieval only inasmuch as it later aids our debugging efforts. But we can expand the storage to include sophisticated aggregation, filtering, and querying techniques. And in these techniques, we can find new ways to understand subjects that interest us.
To be a bit more concrete, I’m going to offer some examples in this post of worlds that you can open through logging. But the examples will require you to view logging not as dumping data to some file, but as recording information in a way that you can mine it for meaning. Obviously not all of us share the same interests. But these examples may give you ideas for your own interests, even if they do not all appeal to you directly.
I’ve written about this before, in detail, but it bears mentioning again here, in this context. Against the backdrop of today’s “Internet of Things” (IoT) hype, all manner of smart home devices are emerging for you to purchase.
At its simplest, this might mean buying a “smart” light, setting up a simple controller, and installing a phone app. But from their, infinite possibilities emerge, including thermostats, door locks, sprinkler systems, and just about anything else you can imagine. Beyond even that, integration points with services such as IFTTT offer staggering integration possibilities.
When we think of home automation, we tend to think in terms of what the home can be made to do. But equally interesting, in my opinion, are the possibilities of what sorts of data we can mine. What time do we generally turn lights on and off? What is the relationship with the time of day and weather? Does the heating unit work harder when many lights are on?
Given all of the integration points and the power of home automation, integrating with a service like LogEntries is a simple way to capture and extend data beyond the borders of whatever apps ship with these systems. Set your system up to record data, and get interesting and, perhaps, money-saving answers.
Your phone travels with you wherever you go, capturing GPS information, checking in with various apps, and quietly performing all other manner of services behind the scenes. Why not take advantage?
This might require the authoring of a custom app of your own, or perhaps you can make this happen with clever use of existing ones. But why not aggregate data about where you go, both geographically and in terms of establishments. Log aggregation and mining could furnish you with an automated journal of sightseeing, fine dining, pub-crawling, or whatever it is that interest you.
Switching gears from the pragmatic and the active, consider what you might do with a relatively sedentary activity. Why not log all of your fantasy sports league’s transactions?
Sure, the league itself might offer something along these lines, but probably not tailored to your particular interest. Can it notify you as soon as a certain player becomes available or unavailable? Can it tell you who trades the most or least? How about monitoring players from your favorite, actual team?
Any given league may be able to do these things, properly tweaked and configured. But if you’re slurping in all the data yourself, you can definitely do them and whatever else you dream up.
This next idea may stretch the definition of “fun” a bit. But, done properly, you can use it to maximize the fun you have. Why not log how you spend your time?
You could easily put together a utility that runs on your devices and logs start and stop times for your use of apps or your time visiting various websites. If you get creative, you can probably figure out how to capture information about things like time spent eating, attending events, or socializing.
This information might yield valuable answers to questions like, “where does all my time go?” Perhaps you come to realize that you spend much more time than you think scanning hacker news. Maybe it puts your Words with Friends habit into stark relief. Whatever you find, logging your time allocation is likely to provide actionable intelligence for tweaking your life to a balance better suited to your desires.
Speaking of improvement, imagine the possibilities for logging what you do related to fitness. I must confess, I would have been skeptical of this one myself some years ago. And then I got a Fitbit.
Now, I find myself bizarrely interested in the number of steps I take each day. But beyond that, I wonder about how much I’ve slept. How many active minutes do I have on weekends or weekdays? The amount of fitness information you can track is really incredible — calories, nutritional information, heart rate, blood pressure, you name it.
The advent of wearable technology has provided us unprecedented access to information about our health. I strongly advocate that we use it. And, while any one of the apps that I mention will furnish you some information, you’ll get a lot more mileage out of it by storing it for yourself.
Sky is the Limit
As I mentioned earlier, I’ve just scratched the surface here. These are a few ideas I had off the top of my head and with relevance to my own life and interest. No doubt you can use the same line of thinking here to generate your own ideas.
Underneath all of these themes lies a common thread. Don’t just rely on the apps that you use and enjoy to furnish you with data. They’ll furnish it on their terms, storing it for however long they want. Instead, take data out of them, store it yourself, and do as you will with it. You’ll gain unprecedented insight into your life and pick up some data science and statistics chops while you’re at it.
Published at DZone with permission of , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.