SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
Automation

John Ashmead
Automation - John Ashmead
Friday, December 27, 13

It is a profoundly erroneous
truism, repeated by all copybooks and by eminent people
making speeches, that we
should cultivate the habit of
thinking of what we are doing.
The precise opposite is the
case. Civilization advances by
extending the number of
important operations we can
perform without thinking about
them. Operations of thought
are like cavalry charges in a
battle - they are strictly limited
in number, they require fresh
horses, and must only be
made at decisive moments.
-- Alfred North Whitehead,
1911

http://ashmeadsoftwareandconsulting.com
Cemetery Permissions
• Family owned cemetery with elaborate rules
• Too elaborate to do by hand
• But came in logical groups
• So, wrote some scripts to “fan-out”
permissions from master identities

Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Video transmission system
• SQL Server 6.0: very buggy
• VC++: less buggy than SQL Server 6.0
• Informix: stable but only on server
• So, sent stored procedures definitions from SQL
Server to Informix

• Then, used Informix to build VC++
• Which then called SQL Server 6.0
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Web Portfolio System
• Needed lots of simple stored procedures
• Changed a lot
• So, wrote code generator to build stored
procedures: 20,000 lines of code/minute

• 60% good as is, 30% needed tweaks, 10%
worthless

• Turned 8 week project -> 2 weeks
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Assets Under Mgmt
• Errors of order $10,000,000
• 7 dimensions of analysis
• Best interface: Active Reports
• But, took 1 hour + per report (& boring)
• So, wrote code generators to build C#, XML
• 6500 lines of code, 21 reports in 10 hours
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
actrpt_bld.pl
#!/opt/perl/perl-5.6.1/perl -w
# actrpt_bld.pl -- build xml, cs files for active reports, using stuff in
#
ete_procs
#
ete_proc_inputs
#
ete_proc_outputs
# Weak spot:
#
typing is done implicitly
# KNOWN WEAK SPOTS:
#
mapping of Informix types to C# types,
#
selection of conversion function from user parameter to C# type,
#
treatment of parameters which have been left null by user
use strict;
use
use
use
use
use

Getopt::Long;
Time::localtime;
DBI;
FileHandle;
XML::Writer;

sub actrpt_bld();

Automation - John Ashmead
Friday, December 27, 13

# build active report files (CS, XML) for one proc

http://ashmeadsoftwareandconsulting.com
XML (RPX)
<?xml version="1.0" encoding="UTF-8"?>
<!-- 2005-03-24 15:22:03: /usr/local/bin/actrpt_bld.pl -d gim2 lu_managers -->
<ActiveReportLayout Version="3" PrintWidth="14400" DocumentName="ActiveReports Document" ScriptLang="C#"
CodeFile="arLuManagers.cs">
<StyleSheet>
<Style Name="Normal" Value="font-family: Arial; font-size: 10pt; font-weight: normal; vertical-align:
bottom; text-align: left; color: rgb(0, 0, 0); "></Style>
<Style Name="Heading1" Value="font-family: Arial; font-size: 16pt; font-weight: bold; vertical-align:
bottom; text-align: left; color: rgb(0, 0, 0); "></Style>
<Style Name="Heading2" Value="font-family: Arial; font-size: 14pt; font-weight: bold; vertical-align:
bottom; text-align: left; color: rgb(0, 0, 0); "></Style>
<Style Name="Heading3" Value="font-family: Arial; font-size: 12pt; font-weight: bold; vertical-align:
bottom; text-align: left; color: rgb(0, 0, 0); "></Style>
</StyleSheet>
<Sections>
<Section Type="ReportHeader" Name="ReportHeader" Height="300" BackColor="16777215" CanShrink="0">
<Control Type="AR.Label" Name="lbl_v_managers_manager" MOD="4" Left="0" Top="0" Width="1800"
Height="300" Text="v_managers_manager" CanGrow="0" Caption="Manager Code" Style="white-space: nowrap; fontweight: bold"></Control>

Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
C#
// arLuManagers.cs
// 2005-03-24 15:22:03:
using
using
using
using
using
using

/usr/local/bin/actrpt_bld.pl -d gim2 lu_managers

System;
System.Data;
IBM.Data.Informix;
DataDynamics.ActiveReports;
DataDynamics.ActiveReports.DataSources;
DataDynamics.ActiveReports.Document;

namespace ETE.Reports
{
public class arLuManagers : ar1838Base
{
public arLuManagers()
{
InitializeReport();
this._default_path = @"ims-kop-fs01Departments";
// force into landscape, more appropriate to Excel extracts
this.PageSettings.Orientation =
DataDynamics.ActiveReports.Document.PageOrientation.Landscape;
this.PageSettings.Margins.Left = (float)0.5;
this.PageSettings.Margins.Right = (float)0.5;
this.PageSettings.Margins.Top = (float)0.5;
this.PageSettings.Margins.Bottom = (float)0.5;
}

Automation

private void arLuManagers_DataInitialize(object sender,
System.EventArgs eArgs)
{
// gather parameters
- John Ashmead FP = new frmParameters();
http://ashmeadsoftwareandconsulting.com
frmParameters

Friday, December 27, 13
Report builder

Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
What is Automation?
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Levels of automation
• Robots
• Objects
• Frameworks
• Macros
• Scripts
• One-liners
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Key principles
• Get it working manually first
• Code generator should chunk the same way a
human does

• Output should be as readable as possible (i.e.
include indentation & comments)

• Don’t expect to automate everything
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Languages
• Perl
• C (with Lex & Yacc)
• Shell
• M4
• CPP
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Perl
• Personal favorite
• The “Swiss Army Knife” of programming
languages

• Lots & lots & lots of modules on CPAN
• Syntax a derivative of Old High Martian
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Benefits
• Correctness
• Speed of construction
• Enhanced functionality
• Maintainability (this one goes both ways)
• Challenging
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Correctness
• Code that doesn’t exist can’t break
• Resulting code can be more detailed than is
practical by hand

• When grunt work is done by machine, there
is more time to focus on tricky bits

• People are bad at getting the details right
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Speed of construction
• 20,000 lines/
minute

• Reduced testing,
once initial tests
are done

• Increased

Automation - John Ashmead
Friday, December 27, 13

willingness to refactor, since
rebuilds are
easier
http://ashmeadsoftwareandconsulting.com
Enhanced functionality
• Can do things that may not be possible with
existing tools

• Or, may be possible but impractical
• Or, that it didn’t even occur to you to build
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Maintainability
• Less “real code” means fewer places to look
for bugs

• Generated code tends to break
spectacularly or not at all

• Of course, the code generator itself will be
harder to understand, since it works at a
higher level of abstraction

Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Intellectually challenging
• Higher level of
abstraction

• Better fit to
problem
domain

• Eqn, pic, other
“little
languages”

Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Gotchas
• Can be harder to maintain
• Can acquire a “sinister life of its own”
• Automation is not a substitute for judgment
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Maintenance issues:
need extra attention to:
• Defensive
• Self-checking
• Transparent
• Readable
output

Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Automation
can get out
of control

Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
User:
[Do I] still have my user id in the future or
[am] I phased out?
Developer:
No, unfortunately the human race will be extinct by that time,
having been replaced by some cyber organisms that
evolved upward from current-day cell phones. Once the cell
phones realized they didn’t need people to have meaningful
conversations with their fellow phones, it was pretty much
obsolescence-ville for the human race. A cell-phone hosted
AI programmed by Sony but then hacked by a Japanese
teenage girl in 2009 will be the starting point for all this, tho it
takes a full 23 years for the end to finally arrive. But it’s ok:
everything interesting which the human race had to say had
already been recorded by the cells.
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Automation not a
substitute for judgment
• That video transmission system failed

because it turned out to have no clear
objective

• The quality of the code became irrelevant
• Automating a mess produces an automated
mess

Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Other forms of
automation
• Automated testing
• Toy languages
• Intelligent software
• Frameworks
• Insert startling work of heart-breaking
genius here…

Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Different Styles
• Cheap & cheerful
• Diverse & experimental
• Clean & elegant
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
CMM

Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Automation is
Nature’s way
• 30 repetitions equals one habit
• Time-honored traditions can appear with
astonishing speed

• Penalty for failure to automate is death
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Take-aways
• Automation something to always keep an
eye out for

• Offers significant benefits
• Requires careful attention to execution
Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Conclusion
• Civilization

advances by
extending the
number of
important
operations we
can perform
without thinking
about them

Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com
Zen & the Art of
Debugging
• www.zenandtheartofdebugging.com

Automation - John Ashmead
Friday, December 27, 13

http://ashmeadsoftwareandconsulting.com

Contenu connexe

Similaire à Automation

EMBA - Firmware analysis - Black Hat Arsenal USA 2022
EMBA - Firmware analysis - Black Hat Arsenal USA 2022EMBA - Firmware analysis - Black Hat Arsenal USA 2022
EMBA - Firmware analysis - Black Hat Arsenal USA 2022MichaelM85042
 
BruCON 2010 Lightning Talks - DIY Grid Computing
BruCON 2010 Lightning Talks - DIY Grid ComputingBruCON 2010 Lightning Talks - DIY Grid Computing
BruCON 2010 Lightning Talks - DIY Grid Computingtomaszmiklas
 
XPDS16: Xenbedded: Xen-based client virtualization for phones and tablets - ...
XPDS16:  Xenbedded: Xen-based client virtualization for phones and tablets - ...XPDS16:  Xenbedded: Xen-based client virtualization for phones and tablets - ...
XPDS16: Xenbedded: Xen-based client virtualization for phones and tablets - ...The Linux Foundation
 
Large Scale Crash Dump Analysis with SuperDump
Large Scale Crash Dump Analysis with SuperDumpLarge Scale Crash Dump Analysis with SuperDump
Large Scale Crash Dump Analysis with SuperDumpChristoph Neumüller
 
High performance java script why everything youve been taught is wrong
High performance java script why everything youve been taught is wrongHigh performance java script why everything youve been taught is wrong
High performance java script why everything youve been taught is wrongTao Gao
 
Chrome OS Observation
Chrome OS ObservationChrome OS Observation
Chrome OS ObservationChamp Yen
 
Making Windows Reasonable
Making Windows ReasonableMaking Windows Reasonable
Making Windows ReasonableBryan Phelps
 
TriplePlay-WebAppPenTestingTools
TriplePlay-WebAppPenTestingToolsTriplePlay-WebAppPenTestingTools
TriplePlay-WebAppPenTestingToolsYury Chemerkin
 
EMBA - Firmware analysis DEFCON30 demolabs USA 2022
EMBA - Firmware analysis DEFCON30 demolabs USA 2022EMBA - Firmware analysis DEFCON30 demolabs USA 2022
EMBA - Firmware analysis DEFCON30 demolabs USA 2022MichaelM85042
 
مدخل برمجة صعيدي جيكس
مدخل برمجة صعيدي جيكس مدخل برمجة صعيدي جيكس
مدخل برمجة صعيدي جيكس Hesham Hanafi
 
The Wondrous Curse of Interoperability
The Wondrous Curse of InteroperabilityThe Wondrous Curse of Interoperability
The Wondrous Curse of InteroperabilitySteve Loughran
 
Reverse Engineering Presentation.pdf
Reverse Engineering Presentation.pdfReverse Engineering Presentation.pdf
Reverse Engineering Presentation.pdfAbdelrahmanShaban3
 
Always bet on JS - Finjs.io NYC 2016
Always bet on JS - Finjs.io NYC 2016Always bet on JS - Finjs.io NYC 2016
Always bet on JS - Finjs.io NYC 2016Brendan Eich
 
PAC 2019 virtual Christoph NEUMÜLLER
PAC 2019 virtual Christoph NEUMÜLLERPAC 2019 virtual Christoph NEUMÜLLER
PAC 2019 virtual Christoph NEUMÜLLERNeotys
 
Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)Jason "JP" Pomerleau
 
History of Computer Systems - Why we are doing it that way
History of Computer Systems - Why we are doing it that wayHistory of Computer Systems - Why we are doing it that way
History of Computer Systems - Why we are doing it that wayLeo Lorieri
 
OWASP Poland Day 2018 - Andrzej Dyjak - Zero Trust Theorem
OWASP Poland Day 2018 - Andrzej Dyjak - Zero Trust TheoremOWASP Poland Day 2018 - Andrzej Dyjak - Zero Trust Theorem
OWASP Poland Day 2018 - Andrzej Dyjak - Zero Trust TheoremOWASP
 
Basics of Computer hardware and Software
Basics of Computer hardware and SoftwareBasics of Computer hardware and Software
Basics of Computer hardware and Softwarevaibhav jindal
 
Handling Many Platforms with a Small Development Team
Handling Many Platforms with a Small Development TeamHandling Many Platforms with a Small Development Team
Handling Many Platforms with a Small Development TeamDietmar Hauser
 

Similaire à Automation (20)

EMBA - Firmware analysis - Black Hat Arsenal USA 2022
EMBA - Firmware analysis - Black Hat Arsenal USA 2022EMBA - Firmware analysis - Black Hat Arsenal USA 2022
EMBA - Firmware analysis - Black Hat Arsenal USA 2022
 
BruCON 2010 Lightning Talks - DIY Grid Computing
BruCON 2010 Lightning Talks - DIY Grid ComputingBruCON 2010 Lightning Talks - DIY Grid Computing
BruCON 2010 Lightning Talks - DIY Grid Computing
 
XPDS16: Xenbedded: Xen-based client virtualization for phones and tablets - ...
XPDS16:  Xenbedded: Xen-based client virtualization for phones and tablets - ...XPDS16:  Xenbedded: Xen-based client virtualization for phones and tablets - ...
XPDS16: Xenbedded: Xen-based client virtualization for phones and tablets - ...
 
Large Scale Crash Dump Analysis with SuperDump
Large Scale Crash Dump Analysis with SuperDumpLarge Scale Crash Dump Analysis with SuperDump
Large Scale Crash Dump Analysis with SuperDump
 
High performance java script why everything youve been taught is wrong
High performance java script why everything youve been taught is wrongHigh performance java script why everything youve been taught is wrong
High performance java script why everything youve been taught is wrong
 
Chrome OS Observation
Chrome OS ObservationChrome OS Observation
Chrome OS Observation
 
Making Windows Reasonable
Making Windows ReasonableMaking Windows Reasonable
Making Windows Reasonable
 
TriplePlay-WebAppPenTestingTools
TriplePlay-WebAppPenTestingToolsTriplePlay-WebAppPenTestingTools
TriplePlay-WebAppPenTestingTools
 
EMBA - Firmware analysis DEFCON30 demolabs USA 2022
EMBA - Firmware analysis DEFCON30 demolabs USA 2022EMBA - Firmware analysis DEFCON30 demolabs USA 2022
EMBA - Firmware analysis DEFCON30 demolabs USA 2022
 
مدخل برمجة صعيدي جيكس
مدخل برمجة صعيدي جيكس مدخل برمجة صعيدي جيكس
مدخل برمجة صعيدي جيكس
 
The Wondrous Curse of Interoperability
The Wondrous Curse of InteroperabilityThe Wondrous Curse of Interoperability
The Wondrous Curse of Interoperability
 
Reverse Engineering Presentation.pdf
Reverse Engineering Presentation.pdfReverse Engineering Presentation.pdf
Reverse Engineering Presentation.pdf
 
Always bet on JS - Finjs.io NYC 2016
Always bet on JS - Finjs.io NYC 2016Always bet on JS - Finjs.io NYC 2016
Always bet on JS - Finjs.io NYC 2016
 
PAC 2019 virtual Christoph NEUMÜLLER
PAC 2019 virtual Christoph NEUMÜLLERPAC 2019 virtual Christoph NEUMÜLLER
PAC 2019 virtual Christoph NEUMÜLLER
 
Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)Introduction to Amazon Web Services (AWS)
Introduction to Amazon Web Services (AWS)
 
History of Computer Systems - Why we are doing it that way
History of Computer Systems - Why we are doing it that wayHistory of Computer Systems - Why we are doing it that way
History of Computer Systems - Why we are doing it that way
 
OWASP Poland Day 2018 - Andrzej Dyjak - Zero Trust Theorem
OWASP Poland Day 2018 - Andrzej Dyjak - Zero Trust TheoremOWASP Poland Day 2018 - Andrzej Dyjak - Zero Trust Theorem
OWASP Poland Day 2018 - Andrzej Dyjak - Zero Trust Theorem
 
Basics of Computer hardware and Software
Basics of Computer hardware and SoftwareBasics of Computer hardware and Software
Basics of Computer hardware and Software
 
Low Or No Cost Lab
Low Or No Cost LabLow Or No Cost Lab
Low Or No Cost Lab
 
Handling Many Platforms with a Small Development Team
Handling Many Platforms with a Small Development TeamHandling Many Platforms with a Small Development Team
Handling Many Platforms with a Small Development Team
 

Plus de John Ashmead

The Quantum Internet: Hype or the Next Step
The Quantum Internet:  Hype or the Next StepThe Quantum Internet:  Hype or the Next Step
The Quantum Internet: Hype or the Next StepJohn Ashmead
 
How to build a PostgreSQL-backed website quickly
How to build a PostgreSQL-backed website quicklyHow to build a PostgreSQL-backed website quickly
How to build a PostgreSQL-backed website quicklyJohn Ashmead
 
The Quantum Internet: Hype or the Next Step
The Quantum Internet:  Hype or the Next StepThe Quantum Internet:  Hype or the Next Step
The Quantum Internet: Hype or the Next StepJohn Ashmead
 
Artificial Intelligence: Past, Present, Futures
Artificial Intelligence:  Past, Present, FuturesArtificial Intelligence:  Past, Present, Futures
Artificial Intelligence: Past, Present, FuturesJohn Ashmead
 
Time dispersion in time-of-arrival measurements
Time dispersion in time-of-arrival measurementsTime dispersion in time-of-arrival measurements
Time dispersion in time-of-arrival measurementsJohn Ashmead
 
Time dispersion in quantum mechanics -- Philcon 2019 version
Time dispersion in quantum mechanics -- Philcon 2019 versionTime dispersion in quantum mechanics -- Philcon 2019 version
Time dispersion in quantum mechanics -- Philcon 2019 versionJohn Ashmead
 
Time dispersion in quantum mechanics
Time dispersion in quantum mechanicsTime dispersion in quantum mechanics
Time dispersion in quantum mechanicsJohn Ashmead
 
Practical Telepathy: The Science & Engineering of Mind-Reading
Practical Telepathy:  The Science & Engineering of Mind-ReadingPractical Telepathy:  The Science & Engineering of Mind-Reading
Practical Telepathy: The Science & Engineering of Mind-ReadingJohn Ashmead
 
From Startup to Mature Company: PostgreSQL Tips and techniques
From Startup to Mature Company:  PostgreSQL Tips and techniquesFrom Startup to Mature Company:  PostgreSQL Tips and techniques
From Startup to Mature Company: PostgreSQL Tips and techniquesJohn Ashmead
 
Practical Telepathy: The Science & Engineering of Mind-Reading
Practical Telepathy:  The Science & Engineering of Mind-ReadingPractical Telepathy:  The Science & Engineering of Mind-Reading
Practical Telepathy: The Science & Engineering of Mind-ReadingJohn Ashmead
 
Stargates: Theory and Practice
Stargates:  Theory and PracticeStargates:  Theory and Practice
Stargates: Theory and PracticeJohn Ashmead
 
StarGates: Theory and Practice
StarGates:  Theory and PracticeStarGates:  Theory and Practice
StarGates: Theory and PracticeJohn Ashmead
 
Star Gates: the Theory and Practice
Star Gates:  the Theory and PracticeStar Gates:  the Theory and Practice
Star Gates: the Theory and PracticeJohn Ashmead
 
Time to the power of Tim
Time to the power of TimTime to the power of Tim
Time to the power of TimJohn Ashmead
 
How many universes are there, anyway
How many universes are there, anywayHow many universes are there, anyway
How many universes are there, anywayJohn Ashmead
 
A Quantum of Mystery
A Quantum of MysteryA Quantum of Mystery
A Quantum of MysteryJohn Ashmead
 
Converting from MySQL to PostgreSQL
Converting from MySQL to PostgreSQLConverting from MySQL to PostgreSQL
Converting from MySQL to PostgreSQLJohn Ashmead
 
Seven War Stories and a Moral
Seven War Stories and a MoralSeven War Stories and a Moral
Seven War Stories and a MoralJohn Ashmead
 

Plus de John Ashmead (20)

The Quantum Internet: Hype or the Next Step
The Quantum Internet:  Hype or the Next StepThe Quantum Internet:  Hype or the Next Step
The Quantum Internet: Hype or the Next Step
 
How to build a PostgreSQL-backed website quickly
How to build a PostgreSQL-backed website quicklyHow to build a PostgreSQL-backed website quickly
How to build a PostgreSQL-backed website quickly
 
The Quantum Internet: Hype or the Next Step
The Quantum Internet:  Hype or the Next StepThe Quantum Internet:  Hype or the Next Step
The Quantum Internet: Hype or the Next Step
 
Artificial Intelligence: Past, Present, Futures
Artificial Intelligence:  Past, Present, FuturesArtificial Intelligence:  Past, Present, Futures
Artificial Intelligence: Past, Present, Futures
 
Time dispersion in time-of-arrival measurements
Time dispersion in time-of-arrival measurementsTime dispersion in time-of-arrival measurements
Time dispersion in time-of-arrival measurements
 
Time dispersion in quantum mechanics -- Philcon 2019 version
Time dispersion in quantum mechanics -- Philcon 2019 versionTime dispersion in quantum mechanics -- Philcon 2019 version
Time dispersion in quantum mechanics -- Philcon 2019 version
 
Time dispersion in quantum mechanics
Time dispersion in quantum mechanicsTime dispersion in quantum mechanics
Time dispersion in quantum mechanics
 
Mars Or Bust!
Mars Or Bust!Mars Or Bust!
Mars Or Bust!
 
Practical Telepathy: The Science & Engineering of Mind-Reading
Practical Telepathy:  The Science & Engineering of Mind-ReadingPractical Telepathy:  The Science & Engineering of Mind-Reading
Practical Telepathy: The Science & Engineering of Mind-Reading
 
From Startup to Mature Company: PostgreSQL Tips and techniques
From Startup to Mature Company:  PostgreSQL Tips and techniquesFrom Startup to Mature Company:  PostgreSQL Tips and techniques
From Startup to Mature Company: PostgreSQL Tips and techniques
 
Practical Telepathy: The Science & Engineering of Mind-Reading
Practical Telepathy:  The Science & Engineering of Mind-ReadingPractical Telepathy:  The Science & Engineering of Mind-Reading
Practical Telepathy: The Science & Engineering of Mind-Reading
 
Stargates: Theory and Practice
Stargates:  Theory and PracticeStargates:  Theory and Practice
Stargates: Theory and Practice
 
StarGates: Theory and Practice
StarGates:  Theory and PracticeStarGates:  Theory and Practice
StarGates: Theory and Practice
 
Quantum dots
Quantum dotsQuantum dots
Quantum dots
 
Star Gates: the Theory and Practice
Star Gates:  the Theory and PracticeStar Gates:  the Theory and Practice
Star Gates: the Theory and Practice
 
Time to the power of Tim
Time to the power of TimTime to the power of Tim
Time to the power of Tim
 
How many universes are there, anyway
How many universes are there, anywayHow many universes are there, anyway
How many universes are there, anyway
 
A Quantum of Mystery
A Quantum of MysteryA Quantum of Mystery
A Quantum of Mystery
 
Converting from MySQL to PostgreSQL
Converting from MySQL to PostgreSQLConverting from MySQL to PostgreSQL
Converting from MySQL to PostgreSQL
 
Seven War Stories and a Moral
Seven War Stories and a MoralSeven War Stories and a Moral
Seven War Stories and a Moral
 

Dernier

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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
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
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
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
 
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
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
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
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
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
 
"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
 

Dernier (20)

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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
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
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
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
 
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
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
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
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
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.
 
"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
 

Automation

  • 1. Automation John Ashmead Automation - John Ashmead Friday, December 27, 13 It is a profoundly erroneous truism, repeated by all copybooks and by eminent people making speeches, that we should cultivate the habit of thinking of what we are doing. The precise opposite is the case. Civilization advances by extending the number of important operations we can perform without thinking about them. Operations of thought are like cavalry charges in a battle - they are strictly limited in number, they require fresh horses, and must only be made at decisive moments. -- Alfred North Whitehead, 1911 http://ashmeadsoftwareandconsulting.com
  • 2. Cemetery Permissions • Family owned cemetery with elaborate rules • Too elaborate to do by hand • But came in logical groups • So, wrote some scripts to “fan-out” permissions from master identities Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 3. Video transmission system • SQL Server 6.0: very buggy • VC++: less buggy than SQL Server 6.0 • Informix: stable but only on server • So, sent stored procedures definitions from SQL Server to Informix • Then, used Informix to build VC++ • Which then called SQL Server 6.0 Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 4. Web Portfolio System • Needed lots of simple stored procedures • Changed a lot • So, wrote code generator to build stored procedures: 20,000 lines of code/minute • 60% good as is, 30% needed tweaks, 10% worthless • Turned 8 week project -> 2 weeks Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 5. Assets Under Mgmt • Errors of order $10,000,000 • 7 dimensions of analysis • Best interface: Active Reports • But, took 1 hour + per report (& boring) • So, wrote code generators to build C#, XML • 6500 lines of code, 21 reports in 10 hours Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 6. actrpt_bld.pl #!/opt/perl/perl-5.6.1/perl -w # actrpt_bld.pl -- build xml, cs files for active reports, using stuff in # ete_procs # ete_proc_inputs # ete_proc_outputs # Weak spot: # typing is done implicitly # KNOWN WEAK SPOTS: # mapping of Informix types to C# types, # selection of conversion function from user parameter to C# type, # treatment of parameters which have been left null by user use strict; use use use use use Getopt::Long; Time::localtime; DBI; FileHandle; XML::Writer; sub actrpt_bld(); Automation - John Ashmead Friday, December 27, 13 # build active report files (CS, XML) for one proc http://ashmeadsoftwareandconsulting.com
  • 7. XML (RPX) <?xml version="1.0" encoding="UTF-8"?> <!-- 2005-03-24 15:22:03: /usr/local/bin/actrpt_bld.pl -d gim2 lu_managers --> <ActiveReportLayout Version="3" PrintWidth="14400" DocumentName="ActiveReports Document" ScriptLang="C#" CodeFile="arLuManagers.cs"> <StyleSheet> <Style Name="Normal" Value="font-family: Arial; font-size: 10pt; font-weight: normal; vertical-align: bottom; text-align: left; color: rgb(0, 0, 0); "></Style> <Style Name="Heading1" Value="font-family: Arial; font-size: 16pt; font-weight: bold; vertical-align: bottom; text-align: left; color: rgb(0, 0, 0); "></Style> <Style Name="Heading2" Value="font-family: Arial; font-size: 14pt; font-weight: bold; vertical-align: bottom; text-align: left; color: rgb(0, 0, 0); "></Style> <Style Name="Heading3" Value="font-family: Arial; font-size: 12pt; font-weight: bold; vertical-align: bottom; text-align: left; color: rgb(0, 0, 0); "></Style> </StyleSheet> <Sections> <Section Type="ReportHeader" Name="ReportHeader" Height="300" BackColor="16777215" CanShrink="0"> <Control Type="AR.Label" Name="lbl_v_managers_manager" MOD="4" Left="0" Top="0" Width="1800" Height="300" Text="v_managers_manager" CanGrow="0" Caption="Manager Code" Style="white-space: nowrap; fontweight: bold"></Control> Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 8. C# // arLuManagers.cs // 2005-03-24 15:22:03: using using using using using using /usr/local/bin/actrpt_bld.pl -d gim2 lu_managers System; System.Data; IBM.Data.Informix; DataDynamics.ActiveReports; DataDynamics.ActiveReports.DataSources; DataDynamics.ActiveReports.Document; namespace ETE.Reports { public class arLuManagers : ar1838Base { public arLuManagers() { InitializeReport(); this._default_path = @"ims-kop-fs01Departments"; // force into landscape, more appropriate to Excel extracts this.PageSettings.Orientation = DataDynamics.ActiveReports.Document.PageOrientation.Landscape; this.PageSettings.Margins.Left = (float)0.5; this.PageSettings.Margins.Right = (float)0.5; this.PageSettings.Margins.Top = (float)0.5; this.PageSettings.Margins.Bottom = (float)0.5; } Automation private void arLuManagers_DataInitialize(object sender, System.EventArgs eArgs) { // gather parameters - John Ashmead FP = new frmParameters(); http://ashmeadsoftwareandconsulting.com frmParameters Friday, December 27, 13
  • 9. Report builder Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 10. What is Automation? Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 11. Levels of automation • Robots • Objects • Frameworks • Macros • Scripts • One-liners Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 12. Key principles • Get it working manually first • Code generator should chunk the same way a human does • Output should be as readable as possible (i.e. include indentation & comments) • Don’t expect to automate everything Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 13. Languages • Perl • C (with Lex & Yacc) • Shell • M4 • CPP Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 14. Perl • Personal favorite • The “Swiss Army Knife” of programming languages • Lots & lots & lots of modules on CPAN • Syntax a derivative of Old High Martian Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 15. Benefits • Correctness • Speed of construction • Enhanced functionality • Maintainability (this one goes both ways) • Challenging Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 16. Correctness • Code that doesn’t exist can’t break • Resulting code can be more detailed than is practical by hand • When grunt work is done by machine, there is more time to focus on tricky bits • People are bad at getting the details right Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 17. Speed of construction • 20,000 lines/ minute • Reduced testing, once initial tests are done • Increased Automation - John Ashmead Friday, December 27, 13 willingness to refactor, since rebuilds are easier http://ashmeadsoftwareandconsulting.com
  • 18. Enhanced functionality • Can do things that may not be possible with existing tools • Or, may be possible but impractical • Or, that it didn’t even occur to you to build Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 19. Maintainability • Less “real code” means fewer places to look for bugs • Generated code tends to break spectacularly or not at all • Of course, the code generator itself will be harder to understand, since it works at a higher level of abstraction Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 20. Intellectually challenging • Higher level of abstraction • Better fit to problem domain • Eqn, pic, other “little languages” Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 21. Gotchas • Can be harder to maintain • Can acquire a “sinister life of its own” • Automation is not a substitute for judgment Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 22. Maintenance issues: need extra attention to: • Defensive • Self-checking • Transparent • Readable output Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 23. Automation can get out of control Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 24. User: [Do I] still have my user id in the future or [am] I phased out? Developer: No, unfortunately the human race will be extinct by that time, having been replaced by some cyber organisms that evolved upward from current-day cell phones. Once the cell phones realized they didn’t need people to have meaningful conversations with their fellow phones, it was pretty much obsolescence-ville for the human race. A cell-phone hosted AI programmed by Sony but then hacked by a Japanese teenage girl in 2009 will be the starting point for all this, tho it takes a full 23 years for the end to finally arrive. But it’s ok: everything interesting which the human race had to say had already been recorded by the cells. Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 25. Automation not a substitute for judgment • That video transmission system failed because it turned out to have no clear objective • The quality of the code became irrelevant • Automating a mess produces an automated mess Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 26. Other forms of automation • Automated testing • Toy languages • Intelligent software • Frameworks • Insert startling work of heart-breaking genius here… Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 27. Different Styles • Cheap & cheerful • Diverse & experimental • Clean & elegant Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 28. CMM Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 29. Automation is Nature’s way • 30 repetitions equals one habit • Time-honored traditions can appear with astonishing speed • Penalty for failure to automate is death Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 30. Take-aways • Automation something to always keep an eye out for • Offers significant benefits • Requires careful attention to execution Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 31. Conclusion • Civilization advances by extending the number of important operations we can perform without thinking about them Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com
  • 32. Zen & the Art of Debugging • www.zenandtheartofdebugging.com Automation - John Ashmead Friday, December 27, 13 http://ashmeadsoftwareandconsulting.com