Thursday, October 13, 2016

TaskTimer, Reducing Your Exposure To The Internet

Introduction
Internet is a great tool, but it often distracts us. This can be said of computer clutter in general--all the icons and files in close proximity make it too easy for us to dart off into an unexpected adventure. TaskTimer is a tool to limit our exposure to the distractions by tempering our access to the internet and by periodically reminding us to focus on a chosen task. It appears as a tray icon and is completely configured in one step by setting a desired nag message, the approximate frequency with which you'd like to see the nag message, and, finally, the target internet adapter (e.g. Wi-Fi) you'd like for the program to turn on and off, based on your needs.

Turning on TaskTimer will block all access to your immediate network, including your internet connection. Then, until you close the application, you will only be able to access the internet for the limited amount of time that you request for your internet goal. Likewise, there is additional functionality to encourage staying focused on non-internet goals as well. Exiting TaskTimer will re-enable your internet access.

Background
It is well known that webpages and advertisements are designed to maximize our exposure to marketing material. Users may not even notice how much time they engage with content they never planned to consume. The result is hours upon hours of wasted time every day--hours that could have been spent productively enhancing one's skill set or one's social connections. The first step in making changes for the better is to understand and accept this potential challenge.

Currently, there is no stand-alone solution to the problem of internet overindulgence. There are multiple websites that offer to keep track of your time online--even services that store a log of tasks you worked on--but these are still services, interested in keeping you online and not offline. TaskTimer takes the alternative approach that only freeware could take in that it asks for no contribution at all from the user. It respects the users decision about being offline, and enforces the user's intended goal of being online for only a limited amount of time, after which the internet gets shut off, prompting a re-examination of whether it's worth it for the user to continue browsing.

Using the code
Written in C# .NET Framework 4.0, the code for TaskTimer is attached as a Visual Studio project. Although currently fully-functional, it's highly likely that one may desire some additional feature(s), in which case they should feel free to change / enhance TaskTimer.

The core functionality uses System.Timers.Timer to monitor for changes every 15 seconds. Upon launching the application, ApplicationContext.cs stores the user's current internet configuration (IP address, etc.) into container class InternetDetails.cs. The user interface, Form.cs, displays the list of internet adapters in your computer that could be controlled by the program. The user is encouraged to store their settings before closing the initial popup window, although it is possible to close the UI and the program by selecting "Close Program" from the icon created in the task-bar. Pressing the "Save and Turn Off Internet" button will, indeed, turn off internet access.



By Reference

Action Method in Mvc

In this section, you will learn about the action method of controller class. All the public methods of a Controller class are called Act...