SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 

Kürzlich hochgeladen (20)

Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 

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