CommunityData:Light events: Difference between revisions

From CommunityData
(Created page with "== What's Happening == The light in the lab is slightly broken. You flip the light switch and the light turns on. Or does it? After some time another light might turn on. Sur...")
 
(→‎What's Happening: make code work)
Line 4: Line 4:
Let's find out how long it takes for the second light to turn on. It feels like it is taking longer and longer over time. Let's find out if it really is using simple unix commands.  
Let's find out how long it takes for the second light to turn on. It feels like it is taking longer and longer over time. Let's find out if it really is using simple unix commands.  


 
   alias switchon='echo "switch $(date)" >> lightdata'                                                     
   alias switchon="echo "switch $(date)" > lightdata                                                      
   alias lighton='echo "light $(date)" >> lightdata'                                                       
   alias lighton="echo "light $(date)" > lightdata
                                                     
 


After a few weeks we can merge our lightdata files and find out if the trend that the lights are taking longer to turn over time is real.
After a few weeks we can merge our lightdata files and find out if the trend that the lights are taking longer to turn over time is real.

Revision as of 02:43, 20 June 2017

What's Happening

The light in the lab is slightly broken. You flip the light switch and the light turns on. Or does it? After some time another light might turn on. Surprise!

Let's find out how long it takes for the second light to turn on. It feels like it is taking longer and longer over time. Let's find out if it really is using simple unix commands.

 alias switchon='echo "switch $(date)" >> lightdata'                                                      
 alias lighton='echo "light $(date)" >> lightdata'                                                        
                                                     

After a few weeks we can merge our lightdata files and find out if the trend that the lights are taking longer to turn over time is real.