SlideShare a Scribd company logo
1 of 36
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
No One Likes Getting Up at
3AM to Fix Bugs
~ Or ~
How to be a Better Developer
Rob Grzywinski
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
About Me -- Rob Grzywinski
◉ Writing software professionally >20y
◉ Chief Technology Officer
◉ Advisor to Silicon Valley and other Companies
Big Data & Analytics
Artificial Intelligence
Data-Centric Apps
◉ Multiple successful startup acquisitions
Latest: Aggregate Knowledge (AdTech) for >$100M (USD)
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
No rule is Black and White …
… Including this one
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Lesson #1
The worst happens when you’re the least ready for it!
1
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Am I going to understand this:
◉ At 3AM ?
◉ With a Hangover ??
◉ After eating bad McDonald’s fries ???
(Cuz that’s when you’re going to need it!)
Mantra
(Copyright WarnerBros)
Friends don’t let friends Code Drunk!
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Code spends the majority of its lifetime
in maintenance. Write code so that it
can be maintained!
!
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
3AM is for Sleeping!
How can you write software so that you never get the
3AM call to fix it?
But if you are woken up, will you have everything you
will need to fix it?
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
◉Naming (to name it you have to understand it)
◉Formatting (pick a style and follow it)
◉Documentation (sufficient useful supporting docs)
Things to Think About
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Lesson #2
You’re not even half as smart as you think you are!
2
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
If you’re making something up ...
… you’re probably doing it wrong!
Look for standard answers to problems
◉ Easier to Debug
◉ Likely handles cases you haven’t thought of
◉ Provides on-line references, support, etc
Don’t Make It Up!
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Oh! The Horror!
WITH
interval_window AS (
SELECT reading_date
, DATETIME_DIFF(LEAD(reading_date) OVER (ORDER BY reading_date), reading_date, SECOND) AS next_interval
, DATETIME_DIFF(reading_date, LAG(reading_date) OVER (ORDER BY reading_date), SECOND) AS prev_interval
FROM latest_meter_data
)
, meter_data_with_boundaries AS (
SELECT reading_date
, CASE
WHEN (next_interval = 900) AND (prev_interval > 900 OR prev_interval IS NULL) THEN 'START'
WHEN (next_interval > 900 OR next_interval IS NULL) AND (prev_interval = 900) THEN 'END'
WHEN (next_interval IS NULL OR next_interval > 900) AND (prev_interval > 900 OR prev_interval IS NULL) THEN 'START-END'
ELSE NULL
END as boundary
FROM interval_window
)
, meter_data_boundaries AS (
SELECT reading_date, boundary
FROM meter_data_with_boundaries
WHERE boundary IS NOT NULL
)
, almost_islands AS (
SELECT reading_date
, boundary
, LEAD(reading_date) OVER(ORDER BY reading_date) AS next_date
, LEAD(boundary) OVER(ORDER BY reading_date)
FROM meter_data_boundaries
)
, islands AS (
SELECT reading_date as start_date
, CASE
WHEN boundary = 'START-END' THEN reading_date
ELSE next_date
END as end_date
FROM almost_islands
WHERE boundary LIKE 'START%'
)
(40+ lines and doesn’t work)
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Standard Answer
WITH
sequence_offsets AS (
SELECT reading_datetime
, (RANK() OVER(ORDER BY reading_datetime) *
duration) AS offset_seconds
FROM sensor_interval_data
)
, islands AS (
SELECT MIN(reading_datetime) AS start_date
, MAX(reading_datetime) AS end_date
FROM sequence_offsets
GROUP BY DATETIME_SUB(reading_date,
INTERVAL offset_seconds SECOND)
)
(10 lines and covers corner cases)
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Gotchas
◉ Dates4 (use a library!)
◉ Timezones4 (you’re going to screw it up! Trust me)
◉ Off-by-One (write it out to make sure you have it & test!)
◉ Wildcards (always have backups :) )
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Testing
“I don’t write buggy software so why should I test?!?”
3
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
“Testing cannot show the absence
of defects, it can only show that
software defects are present”
- Robert Pressman
“
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Positive Testing
isValidUser(String username):Boolean
Valid users: “Bob” and “Alice”
Test: “Bob” ➞ true
Test: “Alice” ➞ true
Works!
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Not-so-Positive Testing
isValidUser(String username):Boolean
Valid users: “Bob” and “Alice”
Test: “Joe” ➞ true
Test: “Lucy” ➞ true
Works! Maybe Not!?!
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Negative Testing
isValidUser(String username):Boolean {
return true;
}
Whoops!
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Confirmation Bias
The tendency to search for, interpret, favor, and recall
information in a way that confirms one's preexisting
beliefs or hypotheses2
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Code Coverage
◉ Does 90% code coverage by tests mean that you
miss 10% of the defects?
◉ Does 100% code coverage mean that you
miss 0% of the defects?
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
100% Code Coverage
isValidUser(String username):Boolean {
return true;
}
Test: “Bob” ➞ true
Test: “Alice” ➞ true
200% Code Coverage != 0 defects!
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Testing
Think of testing like trying to lose weight:
◉ You don't try to lose weight by weighing yourself
more often
◉ What you eat before you step onto the scale
determines how much you will weigh
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Testing
You don't improve software quality by increasing the
amount of testing
To improve your software, don't test more:
Develop Better!1
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Instead of writing tests
Assert things you know!
assert3:
● state a fact or belief confidently and forcefully
● cause others to recognize (one's authority or a right) by confident and forceful behavior
Assert not Test!
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
What Should I Focus On?
“How do I accelerate my career?”
3
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
“Practice does not make perfect.
Only perfect practice makes perfect.”
- Vince Lombardi
“
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Which Technology Should I Try?
Doesn’t matter but here are some options:
◉D3 (do something hard!)
◉SQL (really learn it -- CTEs, Window Functions, etc.)
◉RegEx (really, really learn it)
?
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
What Should I Do?
Pick anything and:
◉Take it apart
◉Learn how it works (remember 3AM?)
◉Fix a bug and submit PR
?
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Absolute Musts!
◉IDE (learn it without the mouse)
◉Debugger (print statements are for babies :) )
◉Cloud Anything (spin up, do something, tear down)
◉Async / Threading (race conditions, debugging, etc.)
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Open Source
“What should I be worried about?”
4
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
There’s a zillion libraries to do anything:
◉What is the license? (no GPL!)
◉When was the last release?
◉Do bugs get fixed? (How often? By whom?)
◉Community? (StackOverflow, etc)
Which Library?!??
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Anything Else?
Always explicitly manage your dependencies
(Know when the world moves underneath you)
?
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Any questions ?
You can find me at:
◉ rob@limalimacharlie.com
Thanks!
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Appendixn
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
1. http://cc2e.com/ (Code Complete by Steve McConnell)
2. https://en.wikipedia.org/wiki/Confirmation_bias
3. https://www.google.com/search?q=define%3A+assert
4. http://revelry.co/time-zone-bugs/
References
Copyright © 2017, Lima Lima Charlie, LLC. All rights
reserved.
Attribution
1.http://www.slidescarnival.com/

More Related Content

Similar to No one likes getting up at 3 am to fix bugs OR how to be a better developer

Conversation and Memory - ALX401-R - re:Invent 2017
Conversation and Memory - ALX401-R - re:Invent 2017Conversation and Memory - ALX401-R - re:Invent 2017
Conversation and Memory - ALX401-R - re:Invent 2017Amazon Web Services
 
Conversion Models: A Systematic Method of Building Learning to Rank Training ...
Conversion Models: A Systematic Method of Building Learning to Rank Training ...Conversion Models: A Systematic Method of Building Learning to Rank Training ...
Conversion Models: A Systematic Method of Building Learning to Rank Training ...Lucidworks
 
How To Use AWS IoT and Amazon Connect to Drive Proactive Customer Service - B...
How To Use AWS IoT and Amazon Connect to Drive Proactive Customer Service - B...How To Use AWS IoT and Amazon Connect to Drive Proactive Customer Service - B...
How To Use AWS IoT and Amazon Connect to Drive Proactive Customer Service - B...Amazon Web Services
 
Your Six Second Personal Brand Story in 5 Exercises
Your Six Second Personal Brand Story in 5 ExercisesYour Six Second Personal Brand Story in 5 Exercises
Your Six Second Personal Brand Story in 5 ExercisesDave Sutton
 
Keynote: What Transformation Really Means for the Enterprise - AWS Transforma...
Keynote: What Transformation Really Means for the Enterprise - AWS Transforma...Keynote: What Transformation Really Means for the Enterprise - AWS Transforma...
Keynote: What Transformation Really Means for the Enterprise - AWS Transforma...Amazon Web Services
 
Getting Started with AWS AI Managed Services and Sagemaker
Getting Started with AWS AI Managed Services and SagemakerGetting Started with AWS AI Managed Services and Sagemaker
Getting Started with AWS AI Managed Services and SagemakerAmazon Web Services
 
Fuzzy Matching on Apache Spark with Jennifer Shin
Fuzzy Matching on Apache Spark with Jennifer ShinFuzzy Matching on Apache Spark with Jennifer Shin
Fuzzy Matching on Apache Spark with Jennifer ShinDatabricks
 
CityWallet - From Mount Augustus to Los Roques Archipelago
CityWallet - From Mount Augustus to Los Roques ArchipelagoCityWallet - From Mount Augustus to Los Roques Archipelago
CityWallet - From Mount Augustus to Los Roques ArchipelagoHernan Garcia
 
Ai Services on AWS
Ai Services on AWSAi Services on AWS
Ai Services on AWSBoaz Ziniman
 
Kristina McMillan, VP of Research of TOPO at The Sales Development Conference...
Kristina McMillan, VP of Research of TOPO at The Sales Development Conference...Kristina McMillan, VP of Research of TOPO at The Sales Development Conference...
Kristina McMillan, VP of Research of TOPO at The Sales Development Conference...Tenbound
 
Breaking Voice and Language Barriers with AI - Chatbot Summit Tel Aviv
Breaking Voice and Language Barriers with AI - Chatbot Summit Tel AvivBreaking Voice and Language Barriers with AI - Chatbot Summit Tel Aviv
Breaking Voice and Language Barriers with AI - Chatbot Summit Tel AvivBoaz Ziniman
 
Serverless Text Analytics with Amazon Comprehend
Serverless Text Analytics with Amazon ComprehendServerless Text Analytics with Amazon Comprehend
Serverless Text Analytics with Amazon ComprehendDonnie Prakoso
 
What IT Transformation Really Means for the Enterprise
What IT Transformation Really Means for the EnterpriseWhat IT Transformation Really Means for the Enterprise
What IT Transformation Really Means for the EnterpriseTom Laszewski
 
Ai Services on AWS - AWS IL Meetup
Ai Services on AWS - AWS IL MeetupAi Services on AWS - AWS IL Meetup
Ai Services on AWS - AWS IL MeetupBoaz Ziniman
 
Introduction to AI/ML with AWS
Introduction to AI/ML with AWSIntroduction to AI/ML with AWS
Introduction to AI/ML with AWSSuman Debnath
 
Natural Language Processing Plus Natural Language Generation: The Cutting Edg...
Natural Language Processing Plus Natural Language Generation: The Cutting Edg...Natural Language Processing Plus Natural Language Generation: The Cutting Edg...
Natural Language Processing Plus Natural Language Generation: The Cutting Edg...Amazon Web Services
 
NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...
NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...
NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...Amazon Web Services
 
The Future of AI - AllCloud Best of reInvent
The Future of AI - AllCloud Best of reInventThe Future of AI - AllCloud Best of reInvent
The Future of AI - AllCloud Best of reInventBoaz Ziniman
 

Similar to No one likes getting up at 3 am to fix bugs OR how to be a better developer (20)

AWSome Day Utrecht - Keynote
AWSome Day Utrecht - KeynoteAWSome Day Utrecht - Keynote
AWSome Day Utrecht - Keynote
 
Conversation and Memory - ALX401-R - re:Invent 2017
Conversation and Memory - ALX401-R - re:Invent 2017Conversation and Memory - ALX401-R - re:Invent 2017
Conversation and Memory - ALX401-R - re:Invent 2017
 
Conversion Models: A Systematic Method of Building Learning to Rank Training ...
Conversion Models: A Systematic Method of Building Learning to Rank Training ...Conversion Models: A Systematic Method of Building Learning to Rank Training ...
Conversion Models: A Systematic Method of Building Learning to Rank Training ...
 
How To Use AWS IoT and Amazon Connect to Drive Proactive Customer Service - B...
How To Use AWS IoT and Amazon Connect to Drive Proactive Customer Service - B...How To Use AWS IoT and Amazon Connect to Drive Proactive Customer Service - B...
How To Use AWS IoT and Amazon Connect to Drive Proactive Customer Service - B...
 
Your Six Second Personal Brand Story in 5 Exercises
Your Six Second Personal Brand Story in 5 ExercisesYour Six Second Personal Brand Story in 5 Exercises
Your Six Second Personal Brand Story in 5 Exercises
 
Keynote: What Transformation Really Means for the Enterprise - AWS Transforma...
Keynote: What Transformation Really Means for the Enterprise - AWS Transforma...Keynote: What Transformation Really Means for the Enterprise - AWS Transforma...
Keynote: What Transformation Really Means for the Enterprise - AWS Transforma...
 
Getting Started with AWS AI Managed Services and Sagemaker
Getting Started with AWS AI Managed Services and SagemakerGetting Started with AWS AI Managed Services and Sagemaker
Getting Started with AWS AI Managed Services and Sagemaker
 
Fuzzy Matching on Apache Spark with Jennifer Shin
Fuzzy Matching on Apache Spark with Jennifer ShinFuzzy Matching on Apache Spark with Jennifer Shin
Fuzzy Matching on Apache Spark with Jennifer Shin
 
CityWallet - From Mount Augustus to Los Roques Archipelago
CityWallet - From Mount Augustus to Los Roques ArchipelagoCityWallet - From Mount Augustus to Los Roques Archipelago
CityWallet - From Mount Augustus to Los Roques Archipelago
 
Ai Services on AWS
Ai Services on AWSAi Services on AWS
Ai Services on AWS
 
Kristina McMillan, VP of Research of TOPO at The Sales Development Conference...
Kristina McMillan, VP of Research of TOPO at The Sales Development Conference...Kristina McMillan, VP of Research of TOPO at The Sales Development Conference...
Kristina McMillan, VP of Research of TOPO at The Sales Development Conference...
 
Breaking Voice and Language Barriers with AI - Chatbot Summit Tel Aviv
Breaking Voice and Language Barriers with AI - Chatbot Summit Tel AvivBreaking Voice and Language Barriers with AI - Chatbot Summit Tel Aviv
Breaking Voice and Language Barriers with AI - Chatbot Summit Tel Aviv
 
AI: State of the Union
AI: State of the UnionAI: State of the Union
AI: State of the Union
 
Serverless Text Analytics with Amazon Comprehend
Serverless Text Analytics with Amazon ComprehendServerless Text Analytics with Amazon Comprehend
Serverless Text Analytics with Amazon Comprehend
 
What IT Transformation Really Means for the Enterprise
What IT Transformation Really Means for the EnterpriseWhat IT Transformation Really Means for the Enterprise
What IT Transformation Really Means for the Enterprise
 
Ai Services on AWS - AWS IL Meetup
Ai Services on AWS - AWS IL MeetupAi Services on AWS - AWS IL Meetup
Ai Services on AWS - AWS IL Meetup
 
Introduction to AI/ML with AWS
Introduction to AI/ML with AWSIntroduction to AI/ML with AWS
Introduction to AI/ML with AWS
 
Natural Language Processing Plus Natural Language Generation: The Cutting Edg...
Natural Language Processing Plus Natural Language Generation: The Cutting Edg...Natural Language Processing Plus Natural Language Generation: The Cutting Edg...
Natural Language Processing Plus Natural Language Generation: The Cutting Edg...
 
NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...
NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...
NEW LAUNCH! Introducing Amazon Transcribe – Now in Preview - MCL215 - re:Inve...
 
The Future of AI - AllCloud Best of reInvent
The Future of AI - AllCloud Best of reInventThe Future of AI - AllCloud Best of reInvent
The Future of AI - AllCloud Best of reInvent
 

More from Intersog

The power of 1 on 1
The power of 1 on 1 The power of 1 on 1
The power of 1 on 1 Intersog
 
FrontEnd: JS + css + html
FrontEnd: JS + css + htmlFrontEnd: JS + css + html
FrontEnd: JS + css + htmlIntersog
 
Clients mean all_for_us
Clients mean all_for_usClients mean all_for_us
Clients mean all_for_usIntersog
 
Intersog Hack_n_Tell. Docker. First steps.
Intersog Hack_n_Tell. Docker. First steps.Intersog Hack_n_Tell. Docker. First steps.
Intersog Hack_n_Tell. Docker. First steps.Intersog
 
How to bring greater QA value with a little bit of release management
How to bring greater QA value with a little bit of release managementHow to bring greater QA value with a little bit of release management
How to bring greater QA value with a little bit of release managementIntersog
 
How to Create a Data Infrastructure
How to Create a Data InfrastructureHow to Create a Data Infrastructure
How to Create a Data InfrastructureIntersog
 
Как не завалить клиентское интервью
Как не завалить клиентское интервьюКак не завалить клиентское интервью
Как не завалить клиентское интервьюIntersog
 
Agile business development.
Agile business development. Agile business development.
Agile business development. Intersog
 
Infographic based on "Scrum: the art of doing twice the work in half the time"
Infographic based on "Scrum: the art of doing twice the work in half the time"Infographic based on "Scrum: the art of doing twice the work in half the time"
Infographic based on "Scrum: the art of doing twice the work in half the time"Intersog
 
Java4hipsters
Java4hipsters Java4hipsters
Java4hipsters Intersog
 
Final countdown-in-sales
Final countdown-in-salesFinal countdown-in-sales
Final countdown-in-salesIntersog
 
Как пройти пути от любительских поделок на Arduino до промышленных решений за...
Как пройти пути от любительских поделок на Arduino до промышленных решений за...Как пройти пути от любительских поделок на Arduino до промышленных решений за...
Как пройти пути от любительских поделок на Arduino до промышленных решений за...Intersog
 
Стек протоколов для IoT. Пример использования SNMP
Стек протоколов для IoT. Пример использования SNMPСтек протоколов для IoT. Пример использования SNMP
Стек протоколов для IoT. Пример использования SNMPIntersog
 
DIY IoT: Raspberry PI 2 + Windows 10 for IoT devices + Microsoft Azure
DIY IoT: Raspberry PI 2 + Windows 10 for IoT devices + Microsoft AzureDIY IoT: Raspberry PI 2 + Windows 10 for IoT devices + Microsoft Azure
DIY IoT: Raspberry PI 2 + Windows 10 for IoT devices + Microsoft AzureIntersog
 
Zigbee social network
Zigbee social networkZigbee social network
Zigbee social networkIntersog
 
​Успешные, популярные и интересные IoT проекты в США. Тренды
​Успешные, популярные и интересные IoT проекты в США. Тренды​Успешные, популярные и интересные IoT проекты в США. Тренды
​Успешные, популярные и интересные IoT проекты в США. ТрендыIntersog
 
Small tips для иррационала
Small tips для иррационалаSmall tips для иррационала
Small tips для иррационалаIntersog
 
Healthcare. Правила коммуникации.
Healthcare. Правила коммуникации.Healthcare. Правила коммуникации.
Healthcare. Правила коммуникации.Intersog
 
The Unicorn Workflow
The Unicorn WorkflowThe Unicorn Workflow
The Unicorn WorkflowIntersog
 
Co-Founder & CEO Igor Fedulov and senior software engineer Igor Rolinskiy abo...
Co-Founder & CEO Igor Fedulov and senior software engineer Igor Rolinskiy abo...Co-Founder & CEO Igor Fedulov and senior software engineer Igor Rolinskiy abo...
Co-Founder & CEO Igor Fedulov and senior software engineer Igor Rolinskiy abo...Intersog
 

More from Intersog (20)

The power of 1 on 1
The power of 1 on 1 The power of 1 on 1
The power of 1 on 1
 
FrontEnd: JS + css + html
FrontEnd: JS + css + htmlFrontEnd: JS + css + html
FrontEnd: JS + css + html
 
Clients mean all_for_us
Clients mean all_for_usClients mean all_for_us
Clients mean all_for_us
 
Intersog Hack_n_Tell. Docker. First steps.
Intersog Hack_n_Tell. Docker. First steps.Intersog Hack_n_Tell. Docker. First steps.
Intersog Hack_n_Tell. Docker. First steps.
 
How to bring greater QA value with a little bit of release management
How to bring greater QA value with a little bit of release managementHow to bring greater QA value with a little bit of release management
How to bring greater QA value with a little bit of release management
 
How to Create a Data Infrastructure
How to Create a Data InfrastructureHow to Create a Data Infrastructure
How to Create a Data Infrastructure
 
Как не завалить клиентское интервью
Как не завалить клиентское интервьюКак не завалить клиентское интервью
Как не завалить клиентское интервью
 
Agile business development.
Agile business development. Agile business development.
Agile business development.
 
Infographic based on "Scrum: the art of doing twice the work in half the time"
Infographic based on "Scrum: the art of doing twice the work in half the time"Infographic based on "Scrum: the art of doing twice the work in half the time"
Infographic based on "Scrum: the art of doing twice the work in half the time"
 
Java4hipsters
Java4hipsters Java4hipsters
Java4hipsters
 
Final countdown-in-sales
Final countdown-in-salesFinal countdown-in-sales
Final countdown-in-sales
 
Как пройти пути от любительских поделок на Arduino до промышленных решений за...
Как пройти пути от любительских поделок на Arduino до промышленных решений за...Как пройти пути от любительских поделок на Arduino до промышленных решений за...
Как пройти пути от любительских поделок на Arduino до промышленных решений за...
 
Стек протоколов для IoT. Пример использования SNMP
Стек протоколов для IoT. Пример использования SNMPСтек протоколов для IoT. Пример использования SNMP
Стек протоколов для IoT. Пример использования SNMP
 
DIY IoT: Raspberry PI 2 + Windows 10 for IoT devices + Microsoft Azure
DIY IoT: Raspberry PI 2 + Windows 10 for IoT devices + Microsoft AzureDIY IoT: Raspberry PI 2 + Windows 10 for IoT devices + Microsoft Azure
DIY IoT: Raspberry PI 2 + Windows 10 for IoT devices + Microsoft Azure
 
Zigbee social network
Zigbee social networkZigbee social network
Zigbee social network
 
​Успешные, популярные и интересные IoT проекты в США. Тренды
​Успешные, популярные и интересные IoT проекты в США. Тренды​Успешные, популярные и интересные IoT проекты в США. Тренды
​Успешные, популярные и интересные IoT проекты в США. Тренды
 
Small tips для иррационала
Small tips для иррационалаSmall tips для иррационала
Small tips для иррационала
 
Healthcare. Правила коммуникации.
Healthcare. Правила коммуникации.Healthcare. Правила коммуникации.
Healthcare. Правила коммуникации.
 
The Unicorn Workflow
The Unicorn WorkflowThe Unicorn Workflow
The Unicorn Workflow
 
Co-Founder & CEO Igor Fedulov and senior software engineer Igor Rolinskiy abo...
Co-Founder & CEO Igor Fedulov and senior software engineer Igor Rolinskiy abo...Co-Founder & CEO Igor Fedulov and senior software engineer Igor Rolinskiy abo...
Co-Founder & CEO Igor Fedulov and senior software engineer Igor Rolinskiy abo...
 

Recently uploaded

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyAnusha Are
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 

Recently uploaded (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 

No one likes getting up at 3 am to fix bugs OR how to be a better developer

  • 1. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. No One Likes Getting Up at 3AM to Fix Bugs ~ Or ~ How to be a Better Developer Rob Grzywinski
  • 2. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. About Me -- Rob Grzywinski ◉ Writing software professionally >20y ◉ Chief Technology Officer ◉ Advisor to Silicon Valley and other Companies Big Data & Analytics Artificial Intelligence Data-Centric Apps ◉ Multiple successful startup acquisitions Latest: Aggregate Knowledge (AdTech) for >$100M (USD)
  • 3. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. No rule is Black and White … … Including this one
  • 4. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Lesson #1 The worst happens when you’re the least ready for it! 1
  • 5. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Am I going to understand this: ◉ At 3AM ? ◉ With a Hangover ?? ◉ After eating bad McDonald’s fries ??? (Cuz that’s when you’re going to need it!) Mantra (Copyright WarnerBros) Friends don’t let friends Code Drunk!
  • 6. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Code spends the majority of its lifetime in maintenance. Write code so that it can be maintained! !
  • 7. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. 3AM is for Sleeping! How can you write software so that you never get the 3AM call to fix it? But if you are woken up, will you have everything you will need to fix it?
  • 8. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. ◉Naming (to name it you have to understand it) ◉Formatting (pick a style and follow it) ◉Documentation (sufficient useful supporting docs) Things to Think About
  • 9. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Lesson #2 You’re not even half as smart as you think you are! 2
  • 10. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. If you’re making something up ... … you’re probably doing it wrong! Look for standard answers to problems ◉ Easier to Debug ◉ Likely handles cases you haven’t thought of ◉ Provides on-line references, support, etc Don’t Make It Up!
  • 11. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Oh! The Horror! WITH interval_window AS ( SELECT reading_date , DATETIME_DIFF(LEAD(reading_date) OVER (ORDER BY reading_date), reading_date, SECOND) AS next_interval , DATETIME_DIFF(reading_date, LAG(reading_date) OVER (ORDER BY reading_date), SECOND) AS prev_interval FROM latest_meter_data ) , meter_data_with_boundaries AS ( SELECT reading_date , CASE WHEN (next_interval = 900) AND (prev_interval > 900 OR prev_interval IS NULL) THEN 'START' WHEN (next_interval > 900 OR next_interval IS NULL) AND (prev_interval = 900) THEN 'END' WHEN (next_interval IS NULL OR next_interval > 900) AND (prev_interval > 900 OR prev_interval IS NULL) THEN 'START-END' ELSE NULL END as boundary FROM interval_window ) , meter_data_boundaries AS ( SELECT reading_date, boundary FROM meter_data_with_boundaries WHERE boundary IS NOT NULL ) , almost_islands AS ( SELECT reading_date , boundary , LEAD(reading_date) OVER(ORDER BY reading_date) AS next_date , LEAD(boundary) OVER(ORDER BY reading_date) FROM meter_data_boundaries ) , islands AS ( SELECT reading_date as start_date , CASE WHEN boundary = 'START-END' THEN reading_date ELSE next_date END as end_date FROM almost_islands WHERE boundary LIKE 'START%' ) (40+ lines and doesn’t work)
  • 12. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Standard Answer WITH sequence_offsets AS ( SELECT reading_datetime , (RANK() OVER(ORDER BY reading_datetime) * duration) AS offset_seconds FROM sensor_interval_data ) , islands AS ( SELECT MIN(reading_datetime) AS start_date , MAX(reading_datetime) AS end_date FROM sequence_offsets GROUP BY DATETIME_SUB(reading_date, INTERVAL offset_seconds SECOND) ) (10 lines and covers corner cases)
  • 13. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Gotchas ◉ Dates4 (use a library!) ◉ Timezones4 (you’re going to screw it up! Trust me) ◉ Off-by-One (write it out to make sure you have it & test!) ◉ Wildcards (always have backups :) )
  • 14. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Testing “I don’t write buggy software so why should I test?!?” 3
  • 15. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. “Testing cannot show the absence of defects, it can only show that software defects are present” - Robert Pressman “
  • 16. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Positive Testing isValidUser(String username):Boolean Valid users: “Bob” and “Alice” Test: “Bob” ➞ true Test: “Alice” ➞ true Works!
  • 17. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Not-so-Positive Testing isValidUser(String username):Boolean Valid users: “Bob” and “Alice” Test: “Joe” ➞ true Test: “Lucy” ➞ true Works! Maybe Not!?!
  • 18. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Negative Testing isValidUser(String username):Boolean { return true; } Whoops!
  • 19. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Confirmation Bias The tendency to search for, interpret, favor, and recall information in a way that confirms one's preexisting beliefs or hypotheses2
  • 20. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Code Coverage ◉ Does 90% code coverage by tests mean that you miss 10% of the defects? ◉ Does 100% code coverage mean that you miss 0% of the defects?
  • 21. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. 100% Code Coverage isValidUser(String username):Boolean { return true; } Test: “Bob” ➞ true Test: “Alice” ➞ true 200% Code Coverage != 0 defects!
  • 22. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Testing Think of testing like trying to lose weight: ◉ You don't try to lose weight by weighing yourself more often ◉ What you eat before you step onto the scale determines how much you will weigh
  • 23. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Testing You don't improve software quality by increasing the amount of testing To improve your software, don't test more: Develop Better!1
  • 24. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Instead of writing tests Assert things you know! assert3: ● state a fact or belief confidently and forcefully ● cause others to recognize (one's authority or a right) by confident and forceful behavior Assert not Test!
  • 25. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. What Should I Focus On? “How do I accelerate my career?” 3
  • 26. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. “Practice does not make perfect. Only perfect practice makes perfect.” - Vince Lombardi “
  • 27. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Which Technology Should I Try? Doesn’t matter but here are some options: ◉D3 (do something hard!) ◉SQL (really learn it -- CTEs, Window Functions, etc.) ◉RegEx (really, really learn it) ?
  • 28. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. What Should I Do? Pick anything and: ◉Take it apart ◉Learn how it works (remember 3AM?) ◉Fix a bug and submit PR ?
  • 29. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Absolute Musts! ◉IDE (learn it without the mouse) ◉Debugger (print statements are for babies :) ) ◉Cloud Anything (spin up, do something, tear down) ◉Async / Threading (race conditions, debugging, etc.)
  • 30. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Open Source “What should I be worried about?” 4
  • 31. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. There’s a zillion libraries to do anything: ◉What is the license? (no GPL!) ◉When was the last release? ◉Do bugs get fixed? (How often? By whom?) ◉Community? (StackOverflow, etc) Which Library?!??
  • 32. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Anything Else? Always explicitly manage your dependencies (Know when the world moves underneath you) ?
  • 33. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Any questions ? You can find me at: ◉ rob@limalimacharlie.com Thanks!
  • 34. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Appendixn
  • 35. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. 1. http://cc2e.com/ (Code Complete by Steve McConnell) 2. https://en.wikipedia.org/wiki/Confirmation_bias 3. https://www.google.com/search?q=define%3A+assert 4. http://revelry.co/time-zone-bugs/ References
  • 36. Copyright © 2017, Lima Lima Charlie, LLC. All rights reserved. Attribution 1.http://www.slidescarnival.com/

Editor's Notes

  1. Not bad so far!
  2. Not bad so far!
  3. Not bad so far!
  4. Not bad so far!
  5. Not bad so far!
  6. Not bad so far!
  7. Not bad so far!
  8. Not bad so far!
  9. Not bad so far!