SlideShare uma empresa Scribd logo
1 de 47
Baixar para ler 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

Mais conteúdo relacionado

Mais procurados

Αξέχαστα γενέθλια
Αξέχαστα γενέθλιαΑξέχαστα γενέθλια
Αξέχαστα γενέθλιαstamatiademogianni
 
Δ τάξη - 2η ενότητα - Ρώτα το νερό..... τι τρέχει
Δ τάξη - 2η ενότητα  -  Ρώτα το νερό..... τι τρέχει   Δ τάξη - 2η ενότητα  -  Ρώτα το νερό..... τι τρέχει
Δ τάξη - 2η ενότητα - Ρώτα το νερό..... τι τρέχει Βρεττός Κολύρης
 
ασκητικη
ασκητικηασκητικη
ασκητικηakarapap
 
Ποιοι είναι οι συγγραφείς;
Ποιοι είναι οι συγγραφείς;Ποιοι είναι οι συγγραφείς;
Ποιοι είναι οι συγγραφείς;Dimitra Mylonaki
 
Eeek, Every day living for specials needs children. Αυτονομη διαβίωση για τα ...
Eeek, Every day living for specials needs children. Αυτονομη διαβίωση για τα ...Eeek, Every day living for specials needs children. Αυτονομη διαβίωση για τα ...
Eeek, Every day living for specials needs children. Αυτονομη διαβίωση για τα ...Eva Krokidi
 
Οδυσσέας Ελύτης, Η ζωή και το έργο, Εργασία μαθητή
Οδυσσέας Ελύτης, Η ζωή και το έργο, Εργασία μαθητήΟδυσσέας Ελύτης, Η ζωή και το έργο, Εργασία μαθητή
Οδυσσέας Ελύτης, Η ζωή και το έργο, Εργασία μαθητήΣΟΦΙΑ ΦΕΛΛΑΧΙΔΟΥ
 
Λεύκωμα Βαρβακείου Πειραματικού Γυμνασίου 2015 16 & 2016-17
Λεύκωμα Βαρβακείου Πειραματικού Γυμνασίου 2015 16 & 2016-17Λεύκωμα Βαρβακείου Πειραματικού Γυμνασίου 2015 16 & 2016-17
Λεύκωμα Βαρβακείου Πειραματικού Γυμνασίου 2015 16 & 2016-17VarvakeioGymnasio
 
Παραδοσιακά χριστουγεννιάτικα ποντιακά γλυκά
Παραδοσιακά χριστουγεννιάτικα ποντιακά γλυκάΠαραδοσιακά χριστουγεννιάτικα ποντιακά γλυκά
Παραδοσιακά χριστουγεννιάτικα ποντιακά γλυκάFotini Razakou
 
ΠΑΙΧΝΙΔΙΑ ΤΟΥ ΚΟΣΜΟΥ
ΠΑΙΧΝΙΔΙΑ ΤΟΥ ΚΟΣΜΟΥΠΑΙΧΝΙΔΙΑ ΤΟΥ ΚΟΣΜΟΥ
ΠΑΙΧΝΙΔΙΑ ΤΟΥ ΚΟΣΜΟΥvakokkini
 
η κυρα γραμματικη τεταρτη ταξη
η κυρα γραμματικη τεταρτη ταξηη κυρα γραμματικη τεταρτη ταξη
η κυρα γραμματικη τεταρτη ταξηlelefe55
 
Course 102: Lecture 28: Virtual FileSystems
Course 102: Lecture 28: Virtual FileSystems Course 102: Lecture 28: Virtual FileSystems
Course 102: Lecture 28: Virtual FileSystems Ahmed El-Arabawy
 
Poorvakarma virechana
Poorvakarma virechanaPoorvakarma virechana
Poorvakarma virechanaAkshay Shetty
 

Mais procurados (17)

Αξέχαστα γενέθλια
Αξέχαστα γενέθλιαΑξέχαστα γενέθλια
Αξέχαστα γενέθλια
 
Δ τάξη - 2η ενότητα - Ρώτα το νερό..... τι τρέχει
Δ τάξη - 2η ενότητα  -  Ρώτα το νερό..... τι τρέχει   Δ τάξη - 2η ενότητα  -  Ρώτα το νερό..... τι τρέχει
Δ τάξη - 2η ενότητα - Ρώτα το νερό..... τι τρέχει
 
CONCEPT OF NASAPANA
CONCEPT OF NASAPANACONCEPT OF NASAPANA
CONCEPT OF NASAPANA
 
ασκητικη
ασκητικηασκητικη
ασκητικη
 
Ποιοι είναι οι συγγραφείς;
Ποιοι είναι οι συγγραφείς;Ποιοι είναι οι συγγραφείς;
Ποιοι είναι οι συγγραφείς;
 
Eeek, Every day living for specials needs children. Αυτονομη διαβίωση για τα ...
Eeek, Every day living for specials needs children. Αυτονομη διαβίωση για τα ...Eeek, Every day living for specials needs children. Αυτονομη διαβίωση για τα ...
Eeek, Every day living for specials needs children. Αυτονομη διαβίωση για τα ...
 
Οδυσσέας Ελύτης, Η ζωή και το έργο, Εργασία μαθητή
Οδυσσέας Ελύτης, Η ζωή και το έργο, Εργασία μαθητήΟδυσσέας Ελύτης, Η ζωή και το έργο, Εργασία μαθητή
Οδυσσέας Ελύτης, Η ζωή και το έργο, Εργασία μαθητή
 
Soola
SoolaSoola
Soola
 
Λεύκωμα Βαρβακείου Πειραματικού Γυμνασίου 2015 16 & 2016-17
Λεύκωμα Βαρβακείου Πειραματικού Γυμνασίου 2015 16 & 2016-17Λεύκωμα Βαρβακείου Πειραματικού Γυμνασίου 2015 16 & 2016-17
Λεύκωμα Βαρβακείου Πειραματικού Γυμνασίου 2015 16 & 2016-17
 
Παραδοσιακά χριστουγεννιάτικα ποντιακά γλυκά
Παραδοσιακά χριστουγεννιάτικα ποντιακά γλυκάΠαραδοσιακά χριστουγεννιάτικα ποντιακά γλυκά
Παραδοσιακά χριστουγεννιάτικα ποντιακά γλυκά
 
Β΄δημοτικού δ΄ τεύχος μαθηματικά
Β΄δημοτικού δ΄ τεύχος μαθηματικάΒ΄δημοτικού δ΄ τεύχος μαθηματικά
Β΄δημοτικού δ΄ τεύχος μαθηματικά
 
Kushtha chikitsa - Charak samhita
Kushtha chikitsa  - Charak samhitaKushtha chikitsa  - Charak samhita
Kushtha chikitsa - Charak samhita
 
ΠΑΙΧΝΙΔΙΑ ΤΟΥ ΚΟΣΜΟΥ
ΠΑΙΧΝΙΔΙΑ ΤΟΥ ΚΟΣΜΟΥΠΑΙΧΝΙΔΙΑ ΤΟΥ ΚΟΣΜΟΥ
ΠΑΙΧΝΙΔΙΑ ΤΟΥ ΚΟΣΜΟΥ
 
Possible correlation of vatarakta
Possible correlation of vataraktaPossible correlation of vatarakta
Possible correlation of vatarakta
 
η κυρα γραμματικη τεταρτη ταξη
η κυρα γραμματικη τεταρτη ταξηη κυρα γραμματικη τεταρτη ταξη
η κυρα γραμματικη τεταρτη ταξη
 
Course 102: Lecture 28: Virtual FileSystems
Course 102: Lecture 28: Virtual FileSystems Course 102: Lecture 28: Virtual FileSystems
Course 102: Lecture 28: Virtual FileSystems
 
Poorvakarma virechana
Poorvakarma virechanaPoorvakarma virechana
Poorvakarma virechana
 

Destaque

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
 

Destaque (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
 

Semelhante a 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
 

Semelhante a 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...
 

Mais de Felix Geisendörfer

Mais de 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
 

Último

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
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"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
 
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
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
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
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Último (20)

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
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"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
 
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
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
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
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.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)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

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