I woke up one morning wishing that I didn’t have to go around my whole room to turn on my computers, (I know it sounds lazy) but Eureka! I decided to push myself and ended up creating an app that enabled me to at least turn off, hibernate, and lock all my computers from a touch of a button – over the internet.
Still discovering the power of C#, like said I woke up one morning asking myself the question of how easy would it be to make my own app that would give me this awesome ability. You could say this was a lazy app but I counter by saying it can increase productivity / save energy.
Anyhow, I educated myself in the realms of discovering Windows Azure and how it can benefit me. So I did some searching and found that I have to use the combination of lambda expression / t-SQL / ado.net, windows azure services and C# to be able to speak to an online database. Online database because I wanted to be able to control my devices when I’m away from home, so for example when I leave the house I could just press a simple button to turn off all my devices, furthermore on the way back home I wanted to be able to turn my devices back on.
So I what I created, I created an app on my mobile phone device using XAML and C# and ado.net, which enables the user to send commands by querying a database online in which my computers/devices that I wanted to control was listening to. I have different values within the database that represent different commands for example hibernating, sleeping, logging and off shutting down. I created a nice simple GUI where the user could visually select a button on the phone that would then change a value within the database, for example, turning the computer state restart to true.
In terms of creating the application, I created a simple algorithm that enabled users to be able to visually / easily set how often the devices listening to the database poll the database. When the initial setup has been made, the device listening will poll, in intervals the database. When for example the user selects, for example, turn off command on the mobile phone app, the mobile phone app will change the variable turning off, to true on the database. The devices/computers listening will read the value and then trigger the event shutdown which in turn will shutdown the computer/device. I learned this within a month of my summer holidays and am delighted with the achievement and how I could solve a real-life problem!
C# is powerful and if you have the motivation/ambition you can achieve awesome things. Another was that I got to see another side of programming being able to communicate over a long distance (the internet) is fascinating and being able to understand and put into practice a solution to a problem help me understand how I can communicate between different devices. Furthermore, I also increased my researching skills and here I showcase that I can work independently with no supervision after all this no one gave me this task but myself.
Need to Add
Need to Add