SlideShare a Scribd company logo
1 of 47
Download to read offline
Building an alarm clock
                         with node.js
                                 or


                     Hacking vs. Engineering
 Felix Geisendörfer                       29.09.2011 (v1)
Donnerstag, 29. September 2011
Text
                                  Welcome to the Siesta
                                 right-after-lunch Session!
Donnerstag, 29. September 2011
Building an alarm clock
                         with node.js
                                 or


                     Hacking vs. Engineering
 Felix Geisendörfer                       29.09.2011 (v1)
Donnerstag, 29. September 2011
@felixge

                                 Twitter / GitHub / IRC


Donnerstag, 29. September 2011
My Problem

                    • Getting up early in the morning

                    • That means before 12:00 (noon)


Donnerstag, 29. September 2011
This talk

                    • How I solved this problem

                    • Hacking vs. Engineering the solution


Donnerstag, 29. September 2011
Patient History

                    • 23 years

                    • Working from home

                    • Can work any hours

Donnerstag, 29. September 2011
So why get up early?


                    • To get more stuff done ...



Donnerstag, 29. September 2011
Previous attempts



Donnerstag, 29. September 2011
Text

                                 Behavioral Conditioning
Donnerstag, 29. September 2011
Text

                                 Flying alarm clock
Donnerstag, 29. September 2011
Text

             Circadian rhythm app (Sleep Cycle)
Donnerstag, 29. September 2011
Text

                                 Many alarms
Donnerstag, 29. September 2011
Nothing was working



Donnerstag, 29. September 2011
Text



Donnerstag, 29. September 2011
Donnerstag, 29. September 2011
Donnerstag, 29. September 2011
Donnerstag, 29. September 2011
Donnerstag, 29. September 2011
VLC
Donnerstag, 29. September 2011
pmset
Donnerstag, 29. September 2011
The Script


       https://gist.github.com/1a40a207cf6132f77efa




Donnerstag, 29. September 2011
sudo ./alarm.js 7 30


Donnerstag, 29. September 2011
Donnerstag, 29. September 2011
Result

                    • Reliably waking up at any time

                    • Get to choose different music every night


Donnerstag, 29. September 2011
Hacking vs. Engineering



Donnerstag, 29. September 2011
(Software) Engineering


                     “Rigorous application of science”




Donnerstag, 29. September 2011
Hacking


                                 “Playful cleverness”




Donnerstag, 29. September 2011
Hacking vs. Engineering
           this project


Donnerstag, 29. September 2011
Tests?

                                 Engineering: Yes


                                 Hacking: Maybe



Donnerstag, 29. September 2011
Airtunes?
                                    Engineering:

                                 Implement protocol

                                      Hacking:

                            Piggyback on iTunes or VLC
Donnerstag, 29. September 2011
Code
   var file = '/my/music/file.mp3';
   var vlcPath = '/Applications/VLC.app/Contents/MacOS/VLC';
   var vlc = spawn(vlcPath, [
     '-R',
     '--sout=#transcode {acodec = alac channels = 2, samplerate =
   44100}: raop{host=10.0.1.13,volume=255}',
     file
   ]);

   vlc.stdout.setEncoding('utf8');
   vlc.stderr.setEncoding('utf8');
   vlc.stdout.on('data', process.stdout.write);
   vlc.stderr.on('data', process.stderr.write);

   vlc.on('exit', function(code, signal) {
     console.log('vlc exit: %i %s', code, signal);
   });

Donnerstag, 29. September 2011
Wakeup from Sleep?
                                 Engineering:

    pmset schedule wakeorpoweron <datetime>

                                  Hacking:

     pmset schedule wakeorpoweron MTWRFSU
                      <time>
Donnerstag, 29. September 2011
Code
   var powerCmd = sprintf(
      'pmset repeat wakeorpoweron MTWRFSU %02d:%02d:00',
      powerHour,
      powerMinute
   );

   exec(powerCmd, function(err) {
     if (err) throw err;
     process.setuid('felix');
   });




Donnerstag, 29. September 2011
Turn off speakers?
                                      Engineering:

                   Install speakers in unreachable place.


                                      Hacking: ?


Donnerstag, 29. September 2011
Text

                                 Duct Tape
Donnerstag, 29. September 2011
Duct Tape of Concurrent I/O
Donnerstag, 29. September 2011
Engineering Solution for Concurrency
Donnerstag, 29. September 2011
Why am I talking about this?



Donnerstag, 29. September 2011
JS has a very hacker-driven
                                 culture


Donnerstag, 29. September 2011
Text

                                 Duct tape of the web
Donnerstag, 29. September 2011
Text

                                 Duct tape of the DOM
Donnerstag, 29. September 2011
• Hacking is lots of fun, go do it!

                    • Hacking can be a good solution!

                    • But be aware that many problems call for
                           an engineering approach.




Donnerstag, 29. September 2011
Where we need more
                                    engineering:

                    • Libraries

                    • Domain logic

                    • Performance

Donnerstag, 29. September 2011
TL;DL

                    • Hack when in doubt

                    • Engineer when clear


Donnerstag, 29. September 2011
Hacking Engineering




Donnerstag, 29. September 2011
Questions?




                                    @felixge
Donnerstag, 29. September 2011

More Related Content

What's hot

Dok holidej 517 frenk larami - izmiren dug (drzeko &amp; emeri)(2 mb)
Dok holidej 517   frenk larami - izmiren dug (drzeko &amp; emeri)(2 mb)Dok holidej 517   frenk larami - izmiren dug (drzeko &amp; emeri)(2 mb)
Dok holidej 517 frenk larami - izmiren dug (drzeko &amp; emeri)(2 mb)zoran radovic
 
Mister NO - beli indijanac
Mister NO - beli indijanacMister NO - beli indijanac
Mister NO - beli indijanacajdeprobaj
 
Dok Holidej 539 - Frenk Larami - Pravda pobedjuje (drzeko & emeri)(2 MB).pdf
Dok Holidej 539 - Frenk Larami - Pravda pobedjuje (drzeko & emeri)(2 MB).pdfDok Holidej 539 - Frenk Larami - Pravda pobedjuje (drzeko & emeri)(2 MB).pdf
Dok Holidej 539 - Frenk Larami - Pravda pobedjuje (drzeko & emeri)(2 MB).pdfzoran radovic
 
Guardate de los idus
Guardate de los idusGuardate de los idus
Guardate de los idusmaisaguevara
 
Product Manager Recommed Letter
Product Manager Recommed LetterProduct Manager Recommed Letter
Product Manager Recommed Letterafa4
 
Lms 723 - kit teler - pruga razdora
Lms   723 - kit teler - pruga razdoraLms   723 - kit teler - pruga razdora
Lms 723 - kit teler - pruga razdoraStripovizijaStripovi
 
ZS - 0386 - Teks Viler - TALASI PEKOSA
ZS - 0386 - Teks Viler - TALASI PEKOSAZS - 0386 - Teks Viler - TALASI PEKOSA
ZS - 0386 - Teks Viler - TALASI PEKOSAStripovizijacom
 
Producción de la imagen y la teoria del color
Producción de la imagen y la teoria del colorProducción de la imagen y la teoria del color
Producción de la imagen y la teoria del colorAlbaAndrea1
 
Laso nova serija 021 lee martin - covjek zvan tornado (drzeko &amp; folpi &...
Laso nova serija 021   lee martin - covjek zvan tornado (drzeko &amp; folpi &...Laso nova serija 021   lee martin - covjek zvan tornado (drzeko &amp; folpi &...
Laso nova serija 021 lee martin - covjek zvan tornado (drzeko &amp; folpi &...zoran radovic
 
Quran chapter-13-surah-raad-pdf
Quran chapter-13-surah-raad-pdfQuran chapter-13-surah-raad-pdf
Quran chapter-13-surah-raad-pdfQuran Pak
 

What's hot (14)

Dok holidej 517 frenk larami - izmiren dug (drzeko &amp; emeri)(2 mb)
Dok holidej 517   frenk larami - izmiren dug (drzeko &amp; emeri)(2 mb)Dok holidej 517   frenk larami - izmiren dug (drzeko &amp; emeri)(2 mb)
Dok holidej 517 frenk larami - izmiren dug (drzeko &amp; emeri)(2 mb)
 
Mobile application flow chart
Mobile application flow chartMobile application flow chart
Mobile application flow chart
 
Mister NO - beli indijanac
Mister NO - beli indijanacMister NO - beli indijanac
Mister NO - beli indijanac
 
Dok Holidej 539 - Frenk Larami - Pravda pobedjuje (drzeko & emeri)(2 MB).pdf
Dok Holidej 539 - Frenk Larami - Pravda pobedjuje (drzeko & emeri)(2 MB).pdfDok Holidej 539 - Frenk Larami - Pravda pobedjuje (drzeko & emeri)(2 MB).pdf
Dok Holidej 539 - Frenk Larami - Pravda pobedjuje (drzeko & emeri)(2 MB).pdf
 
TTF.SC.03
TTF.SC.03TTF.SC.03
TTF.SC.03
 
Guardate de los idus
Guardate de los idusGuardate de los idus
Guardate de los idus
 
Product Manager Recommed Letter
Product Manager Recommed LetterProduct Manager Recommed Letter
Product Manager Recommed Letter
 
Lms 723 - kit teler - pruga razdora
Lms   723 - kit teler - pruga razdoraLms   723 - kit teler - pruga razdora
Lms 723 - kit teler - pruga razdora
 
ZS - 0386 - Teks Viler - TALASI PEKOSA
ZS - 0386 - Teks Viler - TALASI PEKOSAZS - 0386 - Teks Viler - TALASI PEKOSA
ZS - 0386 - Teks Viler - TALASI PEKOSA
 
Pa In (SD 16) - TW
Pa In (SD 16) - TWPa In (SD 16) - TW
Pa In (SD 16) - TW
 
Producción de la imagen y la teoria del color
Producción de la imagen y la teoria del colorProducción de la imagen y la teoria del color
Producción de la imagen y la teoria del color
 
UET degree
UET degreeUET degree
UET degree
 
Laso nova serija 021 lee martin - covjek zvan tornado (drzeko &amp; folpi &...
Laso nova serija 021   lee martin - covjek zvan tornado (drzeko &amp; folpi &...Laso nova serija 021   lee martin - covjek zvan tornado (drzeko &amp; folpi &...
Laso nova serija 021 lee martin - covjek zvan tornado (drzeko &amp; folpi &...
 
Quran chapter-13-surah-raad-pdf
Quran chapter-13-surah-raad-pdfQuran chapter-13-surah-raad-pdf
Quran chapter-13-surah-raad-pdf
 

Viewers also liked

Node.js - A practical introduction (v2)
Node.js  - A practical introduction (v2)Node.js  - A practical introduction (v2)
Node.js - A practical introduction (v2)Felix Geisendörfer
 
Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture AppDynamics
 
Dynamic Infrastructure
Dynamic InfrastructureDynamic Infrastructure
Dynamic InfrastructureLori MacVittie
 
5 ways to use node.js in the network
5 ways to use node.js in the network5 ways to use node.js in the network
5 ways to use node.js in the networkLori MacVittie
 
Change RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBChange RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBApaichon Punopas
 
Forensic Tools for In-Depth Performance Investigations
Forensic Tools for In-Depth Performance InvestigationsForensic Tools for In-Depth Performance Investigations
Forensic Tools for In-Depth Performance InvestigationsNicholas Jansma
 
Digital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportDigital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportAkash Mhankale
 
Nodejs Explained with Examples
Nodejs Explained with ExamplesNodejs Explained with Examples
Nodejs Explained with ExamplesGabriele Lana
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsVikash Singh
 
HOME AUTOMATION USING ARDUINO
HOME AUTOMATION USING ARDUINOHOME AUTOMATION USING ARDUINO
HOME AUTOMATION USING ARDUINOEklavya Sharma
 
Node Foundation Membership Overview 20160907
Node Foundation Membership Overview 20160907Node Foundation Membership Overview 20160907
Node Foundation Membership Overview 20160907NodejsFoundation
 
The Enterprise Case for Node.js
The Enterprise Case for Node.jsThe Enterprise Case for Node.js
The Enterprise Case for Node.jsNodejsFoundation
 
Home automation using android mobiles
Home automation using android mobilesHome automation using android mobiles
Home automation using android mobilesDurairaja
 

Viewers also liked (18)

Node.js - As a networking tool
Node.js - As a networking toolNode.js - As a networking tool
Node.js - As a networking tool
 
Node.js - A practical introduction (v2)
Node.js  - A practical introduction (v2)Node.js  - A practical introduction (v2)
Node.js - A practical introduction (v2)
 
Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture Anatomy of a Modern Node.js Application Architecture
Anatomy of a Modern Node.js Application Architecture
 
Node.js - Best practices
Node.js  - Best practicesNode.js  - Best practices
Node.js - Best practices
 
Dynamic Infrastructure
Dynamic InfrastructureDynamic Infrastructure
Dynamic Infrastructure
 
5 ways to use node.js in the network
5 ways to use node.js in the network5 ways to use node.js in the network
5 ways to use node.js in the network
 
It jobs road show
It jobs road showIt jobs road show
It jobs road show
 
Change RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBChange RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDB
 
Firebase slide
Firebase slideFirebase slide
Firebase slide
 
Forensic Tools for In-Depth Performance Investigations
Forensic Tools for In-Depth Performance InvestigationsForensic Tools for In-Depth Performance Investigations
Forensic Tools for In-Depth Performance Investigations
 
Digital Alarm Clock 446 project report
Digital Alarm Clock 446 project reportDigital Alarm Clock 446 project report
Digital Alarm Clock 446 project report
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Nodejs Explained with Examples
Nodejs Explained with ExamplesNodejs Explained with Examples
Nodejs Explained with Examples
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
HOME AUTOMATION USING ARDUINO
HOME AUTOMATION USING ARDUINOHOME AUTOMATION USING ARDUINO
HOME AUTOMATION USING ARDUINO
 
Node Foundation Membership Overview 20160907
Node Foundation Membership Overview 20160907Node Foundation Membership Overview 20160907
Node Foundation Membership Overview 20160907
 
The Enterprise Case for Node.js
The Enterprise Case for Node.jsThe Enterprise Case for Node.js
The Enterprise Case for Node.js
 
Home automation using android mobiles
Home automation using android mobilesHome automation using android mobiles
Home automation using android mobiles
 

Similar to Building an alarm clock with node.js

Scaling websites with RabbitMQ A(rlvaro Videla)
Scaling websites with RabbitMQ   A(rlvaro Videla)Scaling websites with RabbitMQ   A(rlvaro Videla)
Scaling websites with RabbitMQ A(rlvaro Videla)Ontico
 
Html5 episode 2
Html5 episode 2Html5 episode 2
Html5 episode 2Eric Smith
 
BDD For Zend Framework With PHPSpec
BDD For Zend Framework With PHPSpecBDD For Zend Framework With PHPSpec
BDD For Zend Framework With PHPSpecMarcello Duarte
 
Teletrain liever geen mensen om service te geven
Teletrain liever geen mensen om service te gevenTeletrain liever geen mensen om service te geven
Teletrain liever geen mensen om service te gevenVincent Everts
 
TAG Recruiting Atlanta - 3 Phases of Mobile Recruiting Strategy
TAG Recruiting Atlanta - 3 Phases of Mobile Recruiting StrategyTAG Recruiting Atlanta - 3 Phases of Mobile Recruiting Strategy
TAG Recruiting Atlanta - 3 Phases of Mobile Recruiting StrategyKane Cochran
 
Smartphones: The 21st Century Teacher Toolbox
Smartphones: The 21st Century Teacher ToolboxSmartphones: The 21st Century Teacher Toolbox
Smartphones: The 21st Century Teacher ToolboxKaren Bosch
 
web标准化交流会上海站bobby分享
web标准化交流会上海站bobby分享web标准化交流会上海站bobby分享
web标准化交流会上海站bobby分享裕波 周
 
web标准化交流会bobby分享
web标准化交流会bobby分享web标准化交流会bobby分享
web标准化交流会bobby分享裕波 周
 
How to Install, Use, and Customize Drush
How to Install, Use, and Customize DrushHow to Install, Use, and Customize Drush
How to Install, Use, and Customize DrushAcquia
 
開発者のためのiPhone⇔Androidアプリ移植のポイント
開発者のためのiPhone⇔Androidアプリ移植のポイント開発者のためのiPhone⇔Androidアプリ移植のポイント
開発者のためのiPhone⇔Androidアプリ移植のポイントyoski
 
AmbientTalk, a scripting language for Android devices - Dries Harnie, VUB - d...
AmbientTalk, a scripting language for Android devices - Dries Harnie, VUB - d...AmbientTalk, a scripting language for Android devices - Dries Harnie, VUB - d...
AmbientTalk, a scripting language for Android devices - Dries Harnie, VUB - d...tcs digital world
 

Similar to Building an alarm clock with node.js (20)

Scaling websites with RabbitMQ A(rlvaro Videla)
Scaling websites with RabbitMQ   A(rlvaro Videla)Scaling websites with RabbitMQ   A(rlvaro Videla)
Scaling websites with RabbitMQ A(rlvaro Videla)
 
Html5 episode 2
Html5 episode 2Html5 episode 2
Html5 episode 2
 
AudioSIG28Nov2011
AudioSIG28Nov2011AudioSIG28Nov2011
AudioSIG28Nov2011
 
BDD For Zend Framework With PHPSpec
BDD For Zend Framework With PHPSpecBDD For Zend Framework With PHPSpec
BDD For Zend Framework With PHPSpec
 
Teletrain liever geen mensen om service te geven
Teletrain liever geen mensen om service te gevenTeletrain liever geen mensen om service te geven
Teletrain liever geen mensen om service te geven
 
TAG Recruiting Atlanta - 3 Phases of Mobile Recruiting Strategy
TAG Recruiting Atlanta - 3 Phases of Mobile Recruiting StrategyTAG Recruiting Atlanta - 3 Phases of Mobile Recruiting Strategy
TAG Recruiting Atlanta - 3 Phases of Mobile Recruiting Strategy
 
Distribute the workload, PHPTek, Amsterdam, 2011
Distribute the workload, PHPTek, Amsterdam, 2011Distribute the workload, PHPTek, Amsterdam, 2011
Distribute the workload, PHPTek, Amsterdam, 2011
 
Smartphones: The 21st Century Teacher Toolbox
Smartphones: The 21st Century Teacher ToolboxSmartphones: The 21st Century Teacher Toolbox
Smartphones: The 21st Century Teacher Toolbox
 
Node Stream
Node StreamNode Stream
Node Stream
 
web标准化交流会上海站bobby分享
web标准化交流会上海站bobby分享web标准化交流会上海站bobby分享
web标准化交流会上海站bobby分享
 
web标准化交流会bobby分享
web标准化交流会bobby分享web标准化交流会bobby分享
web标准化交流会bobby分享
 
How to Install, Use, and Customize Drush
How to Install, Use, and Customize DrushHow to Install, Use, and Customize Drush
How to Install, Use, and Customize Drush
 
Titanium setup
Titanium setupTitanium setup
Titanium setup
 
開発者のためのiPhone⇔Androidアプリ移植のポイント
開発者のためのiPhone⇔Androidアプリ移植のポイント開発者のためのiPhone⇔Androidアプリ移植のポイント
開発者のためのiPhone⇔Androidアプリ移植のポイント
 
videocourse
videocoursevideocourse
videocourse
 
Distribute the workload, PHP Barcelona 2011
Distribute the workload, PHP Barcelona 2011Distribute the workload, PHP Barcelona 2011
Distribute the workload, PHP Barcelona 2011
 
clrh56
clrh56clrh56
clrh56
 
Video For Real Estate
Video For Real EstateVideo For Real Estate
Video For Real Estate
 
Future Tense
Future TenseFuture Tense
Future Tense
 
AmbientTalk, a scripting language for Android devices - Dries Harnie, VUB - d...
AmbientTalk, a scripting language for Android devices - Dries Harnie, VUB - d...AmbientTalk, a scripting language for Android devices - Dries Harnie, VUB - d...
AmbientTalk, a scripting language for Android devices - Dries Harnie, VUB - d...
 

More from Felix Geisendörfer

More from Felix Geisendörfer (14)

Nodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredevNodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredev
 
How to Test Asynchronous Code (v2)
How to Test Asynchronous Code (v2)How to Test Asynchronous Code (v2)
How to Test Asynchronous Code (v2)
 
How to Test Asynchronous Code
How to Test Asynchronous CodeHow to Test Asynchronous Code
How to Test Asynchronous Code
 
Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)
 
Nodejs - A quick tour (v5)
Nodejs - A quick tour (v5)Nodejs - A quick tour (v5)
Nodejs - A quick tour (v5)
 
Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?
 
Nodejs - A quick tour (v4)
Nodejs - A quick tour (v4)Nodejs - A quick tour (v4)
Nodejs - A quick tour (v4)
 
Node.js in production
Node.js in productionNode.js in production
Node.js in production
 
Nodejs - A-quick-tour-v3
Nodejs - A-quick-tour-v3Nodejs - A-quick-tour-v3
Nodejs - A-quick-tour-v3
 
Dirty - How simple is your database?
Dirty - How simple is your database?Dirty - How simple is your database?
Dirty - How simple is your database?
 
Node.js - A Quick Tour II
Node.js - A Quick Tour IINode.js - A Quick Tour II
Node.js - A Quick Tour II
 
Node.js - A Quick Tour
Node.js - A Quick TourNode.js - A Quick Tour
Node.js - A Quick Tour
 
With jQuery & CakePHP to World Domination
With jQuery & CakePHP to World DominationWith jQuery & CakePHP to World Domination
With jQuery & CakePHP to World Domination
 
ActiveDOM
ActiveDOMActiveDOM
ActiveDOM
 

Recently uploaded

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Recently uploaded (20)

Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Building an alarm clock with node.js

  • 1. Building an alarm clock with node.js or Hacking vs. Engineering Felix Geisendörfer 29.09.2011 (v1) Donnerstag, 29. September 2011
  • 2. Text Welcome to the Siesta right-after-lunch Session! Donnerstag, 29. September 2011
  • 3. Building an alarm clock with node.js or Hacking vs. Engineering Felix Geisendörfer 29.09.2011 (v1) Donnerstag, 29. September 2011
  • 4. @felixge Twitter / GitHub / IRC Donnerstag, 29. September 2011
  • 5. My Problem • Getting up early in the morning • That means before 12:00 (noon) Donnerstag, 29. September 2011
  • 6. This talk • How I solved this problem • Hacking vs. Engineering the solution Donnerstag, 29. September 2011
  • 7. Patient History • 23 years • Working from home • Can work any hours Donnerstag, 29. September 2011
  • 8. So why get up early? • To get more stuff done ... Donnerstag, 29. September 2011
  • 10. Text Behavioral Conditioning Donnerstag, 29. September 2011
  • 11. Text Flying alarm clock Donnerstag, 29. September 2011
  • 12. Text Circadian rhythm app (Sleep Cycle) Donnerstag, 29. September 2011
  • 13. Text Many alarms Donnerstag, 29. September 2011
  • 14. Nothing was working Donnerstag, 29. September 2011
  • 22. The Script https://gist.github.com/1a40a207cf6132f77efa Donnerstag, 29. September 2011
  • 23. sudo ./alarm.js 7 30 Donnerstag, 29. September 2011
  • 25. Result • Reliably waking up at any time • Get to choose different music every night Donnerstag, 29. September 2011
  • 27. (Software) Engineering “Rigorous application of science” Donnerstag, 29. September 2011
  • 28. Hacking “Playful cleverness” Donnerstag, 29. September 2011
  • 29. Hacking vs. Engineering this project Donnerstag, 29. September 2011
  • 30. Tests? Engineering: Yes Hacking: Maybe Donnerstag, 29. September 2011
  • 31. Airtunes? Engineering: Implement protocol Hacking: Piggyback on iTunes or VLC Donnerstag, 29. September 2011
  • 32. Code var file = '/my/music/file.mp3'; var vlcPath = '/Applications/VLC.app/Contents/MacOS/VLC'; var vlc = spawn(vlcPath, [ '-R', '--sout=#transcode {acodec = alac channels = 2, samplerate = 44100}: raop{host=10.0.1.13,volume=255}', file ]); vlc.stdout.setEncoding('utf8'); vlc.stderr.setEncoding('utf8'); vlc.stdout.on('data', process.stdout.write); vlc.stderr.on('data', process.stderr.write); vlc.on('exit', function(code, signal) { console.log('vlc exit: %i %s', code, signal); }); Donnerstag, 29. September 2011
  • 33. Wakeup from Sleep? Engineering: pmset schedule wakeorpoweron <datetime> Hacking: pmset schedule wakeorpoweron MTWRFSU <time> Donnerstag, 29. September 2011
  • 34. Code var powerCmd = sprintf( 'pmset repeat wakeorpoweron MTWRFSU %02d:%02d:00', powerHour, powerMinute ); exec(powerCmd, function(err) { if (err) throw err; process.setuid('felix'); }); Donnerstag, 29. September 2011
  • 35. Turn off speakers? Engineering: Install speakers in unreachable place. Hacking: ? Donnerstag, 29. September 2011
  • 36. Text Duct Tape Donnerstag, 29. September 2011
  • 37. Duct Tape of Concurrent I/O Donnerstag, 29. September 2011
  • 38. Engineering Solution for Concurrency Donnerstag, 29. September 2011
  • 39. Why am I talking about this? Donnerstag, 29. September 2011
  • 40. JS has a very hacker-driven culture Donnerstag, 29. September 2011
  • 41. Text Duct tape of the web Donnerstag, 29. September 2011
  • 42. Text Duct tape of the DOM Donnerstag, 29. September 2011
  • 43. • Hacking is lots of fun, go do it! • Hacking can be a good solution! • But be aware that many problems call for an engineering approach. Donnerstag, 29. September 2011
  • 44. Where we need more engineering: • Libraries • Domain logic • Performance Donnerstag, 29. September 2011
  • 45. TL;DL • Hack when in doubt • Engineer when clear Donnerstag, 29. September 2011
  • 47. Questions? @felixge Donnerstag, 29. September 2011