SlideShare a Scribd company logo
1 of 55
FileMaker Developer Conference 2010

Session COR010
Small Things | Loosely Joined

Lessons Learned to Improve Quality,
Reuse Code, and Program Efficiently)

                Dr. Don Levan
           Vanguard Custom Software
Who am I?

•   President, Vanguard Custom Software
•   FileMaker 7, 8, 9, 10 Certified Developer
•   Licensed Clinical Psychologist
•   Former Photojournalist
•   Founder of the “Craft of FileMaker” Seminar Series




                                                    2
Please See the handout (on the CD):

vanguardcs.net/devcon
You will find:
Summary of the
problem
Key points
References
Information about the
“Craft of FileMaker”
Seminar Series
A Story about Craft.
Programming is hard.
Small Things | Loosely Joined
Small Things | Loosely Joined


Fail Loudly
Small Things | Loosely Joined


Fail Loudly


Fold Knowledge into Data
Case Study: Tekserve’s Payment Routines
(With Technical Debt)
Small Things | Loosely Joined
Small Things:


Are compact, transparent, and do one thing well.
Small Things:


Are compact, transparent, and do one thing well.
Small Things:


Are compact, transparent, and do one thing well.
DECREASING TRANSPARENCY: BY NESTING IFS
INCREASING TRANSPARENCY: BY REFACTORING
DECREASING TRANSPARENCY: BY EXITING LATE
INCREASING TRANSPARENCY: BY REFACTORING
INCREASING TRANSPARENCY: BY NAMING WELL


Field Names:

   Lowercase and underscore.

   No punctuation other than underscore. No Periods.
   No spaces.

   Boolean: Use a form of the verb “to be” or “to have”,
   such as “is_customer” or “has_children”.

   Example: first_name

Tekserve FileMaker & MySQL Conventions (2009)
INCREASING TRANSPARENCY: BY NAMING WELL


Variable Names:

   Use a name that clearly communicates intent.

   Follow the convention for field names.

   Example: $report_type




Tekserve FileMaker & MySQL Conventions (2009)
INCREASING TRANSPARENCY: BY NAMING WELL


Script Names:

   Name scripts to describe their purpose.

   Use active voice.

   Add a parenthesis to indicate any parameters.

   Example: Process payment ( entry; type; action)



Tekserve FileMaker & MySQL Conventions (2009)
SMALL THINGS: DO ONE THING WELL


The Unix Pipe: $ program_1 | program_2 | program_3
SMALL THINGS: DO ONE THING WELL


The Unix Pipe: $ history | grep “ssh -p”
Loosely Joined programs:



“Keep it dry, shy,
and tell the other
guy.”
Andy Hunt and Dave Thomas, IEEE Software 2000
LOOSELY JOINED PROGRAMS:


Do not repeat themselves (Dry).
Keep their variables as local as possible (Shy).
Break complex scripts into disconnected layers.
Pass in the data (Tell the other guy).
Expect the output of any script to be used by another.
LOOSELY JOINED PROGRAMS: UNIX PIPES


All Unix programs have multiple streams of information:

   Standard Input

   Standard Output

   Standard Error

The pipe connects the Standard Output of one program
to the Standard input of another.
LOOSELY JOINED PROGRAMS: FILEMAKER PIPES


  Unix                     FileMaker

  Standard Input           Get (ScriptParameter)

  Standard Output          Get (ScriptResult)

  Standard Error           Get (ScriptResult)
LOOSELY JOINED PROGRAMS: FILEMAKER PIPES


      Main Script ( param_1; param_2)

              Set up variables

                                          Sub-Script ( param_1 )
      Perform Script (pass parameters)
                                           Return error & output

      Set Variables to error and output
                                          Sub-Script ( param_1 )
      Perform Script (pass parameters)
                                           Return error & output

      Set Variables to error and output

                 Exit Script
           (Return error & output)
Small Things | Loosely Joined


Case Study: Tekserve’s Payment Routines
(Re-factored)
Small Things | Loosely Joined
Small Things | Loosely Joined


Fail Loudly
Fail Loudly, and as soon as possible.
or,
“Dead scripts tell no
lies.”

The Pragmatic Programmer, From Journeyman to Master
Suppressing Errors
Capturing Errors
Dealing with Errors
Returning Errors
Logging Errors
Logging Errors
Logging Errors
Logging Errors
Small Things | Loosely Joined


Fail Loudly
Small Things | Loosely Joined


Fail Loudly


Fold Knowledge into Data
Fold Knowledge into Data
so program logic can be stupid and robust.
FOLD KNOWLEDGE INTO DATA


Differentiate between data and program logic.

Separate the data out into script parameters, custom
functions, and table records.

Use SetFieldByname, Evaluate, and other functions to
simplify script logic.
Fold Knowledge into Data
Case Study: Creating child portal records.
Fold Knowledge into Data
Case Study: Creating flexible reports
Fold Knowledge into Data
Case Study: Synchronizing FileMaker and MySQL
Small Things | Loosely Joined


Fail Loudly


Fold Knowledge into Data
Small Things | Loosely Joined


Fail Loudly


Fold Knowledge into Data
Small Things | Loosely Joined


Fail Loudly


Fold Knowledge into Data
“The only way to write complex software that won’t
 fall on its face is to hold its global complexity down –
build it out of simple parts connected by well-defined
interfaces, so that most problems are local and you
can have some hope of upgrading a part without
breaking the whole.”




The art of Unix Programming (p. 14)
FileMaker Developer Conference 2010


               Web Update Page
 www.filemaker.com/devcon/speaker_updates

    (This is also listed in your conference binder)

           This session WILL / WILL NOT
                   have updates.
Thank You!
Please remember to fill out your
evaluation at: www.filemaker.com/
        devcon/evaluations

More Related Content

Viewers also liked

ბიბლიოთეკა
ბიბლიოთეკაბიბლიოთეკა
ბიბლიოთეკაKhatuna Nozadze
 
TSDigs 2011 Metrics & Learnings
TSDigs 2011 Metrics & LearningsTSDigs 2011 Metrics & Learnings
TSDigs 2011 Metrics & LearningsKristy Graves
 
Family Relationships
Family RelationshipsFamily Relationships
Family Relationshipsgabialejandra
 
Ts digs fb_presentation
Ts digs fb_presentationTs digs fb_presentation
Ts digs fb_presentationKristy Graves
 
Small Things | Loosely Joined
Small Things | Loosely JoinedSmall Things | Loosely Joined
Small Things | Loosely JoinedDon Levan
 
Eqskursia tbilisis dzveli ubnebi
Eqskursia tbilisis dzveli ubnebiEqskursia tbilisis dzveli ubnebi
Eqskursia tbilisis dzveli ubnebiKhatuna Nozadze
 
Social Media 101 - Tools, Tricks, DIY & make it not suck
Social Media 101 - Tools, Tricks, DIY & make it not suckSocial Media 101 - Tools, Tricks, DIY & make it not suck
Social Media 101 - Tools, Tricks, DIY & make it not suckKristy Graves
 
Sagakvetilo gegma (xatuna nozadze)
Sagakvetilo gegma (xatuna nozadze)Sagakvetilo gegma (xatuna nozadze)
Sagakvetilo gegma (xatuna nozadze)Khatuna Nozadze
 
Twittermetimbers wraee10
Twittermetimbers wraee10Twittermetimbers wraee10
Twittermetimbers wraee10Kristy Graves
 
Puerto De Ilo
Puerto De IloPuerto De Ilo
Puerto De Ilocaleb
 
პროექტის შეფასების რუბრიკა
პროექტის შეფასების რუბრიკაპროექტის შეფასების რუბრიკა
პროექტის შეფასების რუბრიკაKhatuna Nozadze
 

Viewers also liked (17)

Konferencia me 5 klasi
Konferencia me 5 klasiKonferencia me 5 klasi
Konferencia me 5 klasi
 
ბიბლიოთეკა
ბიბლიოთეკაბიბლიოთეკა
ბიბლიოთეკა
 
TSDigs 2011 Metrics & Learnings
TSDigs 2011 Metrics & LearningsTSDigs 2011 Metrics & Learnings
TSDigs 2011 Metrics & Learnings
 
Family Relationships
Family RelationshipsFamily Relationships
Family Relationships
 
Welcome page
Welcome pageWelcome page
Welcome page
 
Ts digs fb_presentation
Ts digs fb_presentationTs digs fb_presentation
Ts digs fb_presentation
 
Small Things | Loosely Joined
Small Things | Loosely JoinedSmall Things | Loosely Joined
Small Things | Loosely Joined
 
Eqskursia tbilisis dzveli ubnebi
Eqskursia tbilisis dzveli ubnebiEqskursia tbilisis dzveli ubnebi
Eqskursia tbilisis dzveli ubnebi
 
My Own Feedback
My Own FeedbackMy Own Feedback
My Own Feedback
 
Social Media 101 - Tools, Tricks, DIY & make it not suck
Social Media 101 - Tools, Tricks, DIY & make it not suckSocial Media 101 - Tools, Tricks, DIY & make it not suck
Social Media 101 - Tools, Tricks, DIY & make it not suck
 
Sagakvetilo gegma (xatuna nozadze)
Sagakvetilo gegma (xatuna nozadze)Sagakvetilo gegma (xatuna nozadze)
Sagakvetilo gegma (xatuna nozadze)
 
Welcome page
Welcome pageWelcome page
Welcome page
 
Ppt
PptPpt
Ppt
 
Twittermetimbers wraee10
Twittermetimbers wraee10Twittermetimbers wraee10
Twittermetimbers wraee10
 
Puerto De Ilo
Puerto De IloPuerto De Ilo
Puerto De Ilo
 
Proeqti marabda
Proeqti  marabdaProeqti  marabda
Proeqti marabda
 
პროექტის შეფასების რუბრიკა
პროექტის შეფასების რუბრიკაპროექტის შეფასების რუბრიკა
პროექტის შეფასების რუბრიკა
 

Similar to FileMaker Developer Conference 2010: Small Things | Loosely Joined

Product! - The road to production deployment
Product! - The road to production deploymentProduct! - The road to production deployment
Product! - The road to production deploymentFilippo Zanella
 
Stream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentationStream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentationstreambase
 
PRG 421 version 10 Entire Course
PRG 421 version 10 Entire CoursePRG 421 version 10 Entire Course
PRG 421 version 10 Entire Coursenonstop1
 
Become Jythonic in FDMEE (KSCOPE15)
Become Jythonic in FDMEE (KSCOPE15)Become Jythonic in FDMEE (KSCOPE15)
Become Jythonic in FDMEE (KSCOPE15)Francisco Amores
 
Chapter 5( programming) answer
Chapter 5( programming) answerChapter 5( programming) answer
Chapter 5( programming) answersmkengkilili2011
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmerLeylimYaln
 
Intro to the Salesforce Command Line Interface for Admins
Intro to the Salesforce Command Line Interface for AdminsIntro to the Salesforce Command Line Interface for Admins
Intro to the Salesforce Command Line Interface for AdminsSalesforce Admins
 
Problem Determination Tools
Problem Determination ToolsProblem Determination Tools
Problem Determination ToolsCICS ROADSHOW
 
A Whirlwind Tour of Spatial Joins
A Whirlwind Tour of Spatial JoinsA Whirlwind Tour of Spatial Joins
A Whirlwind Tour of Spatial JoinsSafe Software
 
Developer webinar: Intro to command lines and the salesforce CLI
Developer webinar: Intro to command lines and the salesforce CLIDeveloper webinar: Intro to command lines and the salesforce CLI
Developer webinar: Intro to command lines and the salesforce CLIJackGuo20
 
(Costless) Software Abstractions for Parallel Architectures
(Costless) Software Abstractions for Parallel Architectures(Costless) Software Abstractions for Parallel Architectures
(Costless) Software Abstractions for Parallel ArchitecturesJoel Falcou
 
Taking Your FDM Application to the Next Level with Advanced Scripting
Taking Your FDM Application to the Next Level with Advanced ScriptingTaking Your FDM Application to the Next Level with Advanced Scripting
Taking Your FDM Application to the Next Level with Advanced ScriptingAlithya
 
Internationalizing The New York Times
Internationalizing The New York TimesInternationalizing The New York Times
Internationalizing The New York TimesScott Taylor
 
MWLUG 2014: ATLUG Comes To You
MWLUG 2014: ATLUG Comes To YouMWLUG 2014: ATLUG Comes To You
MWLUG 2014: ATLUG Comes To YouPeter Presnell
 
AWS re:Invent 2016: Building a Platform for Collaborative Scientific Research...
AWS re:Invent 2016: Building a Platform for Collaborative Scientific Research...AWS re:Invent 2016: Building a Platform for Collaborative Scientific Research...
AWS re:Invent 2016: Building a Platform for Collaborative Scientific Research...Amazon Web Services
 
Save time by applying clean code principles
Save time by applying clean code principlesSave time by applying clean code principles
Save time by applying clean code principlesEdorian
 
Software engineering
Software engineeringSoftware engineering
Software engineeringFahe Em
 
Software engineering
Software engineeringSoftware engineering
Software engineeringFahe Em
 

Similar to FileMaker Developer Conference 2010: Small Things | Loosely Joined (20)

Product! - The road to production deployment
Product! - The road to production deploymentProduct! - The road to production deployment
Product! - The road to production deployment
 
Stream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentationStream SQL eventflow visual programming for real programmers presentation
Stream SQL eventflow visual programming for real programmers presentation
 
PRG 421 version 10 Entire Course
PRG 421 version 10 Entire CoursePRG 421 version 10 Entire Course
PRG 421 version 10 Entire Course
 
Become Jythonic in FDMEE (KSCOPE15)
Become Jythonic in FDMEE (KSCOPE15)Become Jythonic in FDMEE (KSCOPE15)
Become Jythonic in FDMEE (KSCOPE15)
 
Chapter 5( programming) answer
Chapter 5( programming) answerChapter 5( programming) answer
Chapter 5( programming) answer
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmer
 
Intro to the Salesforce Command Line Interface for Admins
Intro to the Salesforce Command Line Interface for AdminsIntro to the Salesforce Command Line Interface for Admins
Intro to the Salesforce Command Line Interface for Admins
 
Problem Determination Tools
Problem Determination ToolsProblem Determination Tools
Problem Determination Tools
 
A Whirlwind Tour of Spatial Joins
A Whirlwind Tour of Spatial JoinsA Whirlwind Tour of Spatial Joins
A Whirlwind Tour of Spatial Joins
 
Developer webinar: Intro to command lines and the salesforce CLI
Developer webinar: Intro to command lines and the salesforce CLIDeveloper webinar: Intro to command lines and the salesforce CLI
Developer webinar: Intro to command lines and the salesforce CLI
 
Presentation
PresentationPresentation
Presentation
 
(Costless) Software Abstractions for Parallel Architectures
(Costless) Software Abstractions for Parallel Architectures(Costless) Software Abstractions for Parallel Architectures
(Costless) Software Abstractions for Parallel Architectures
 
Taking Your FDM Application to the Next Level with Advanced Scripting
Taking Your FDM Application to the Next Level with Advanced ScriptingTaking Your FDM Application to the Next Level with Advanced Scripting
Taking Your FDM Application to the Next Level with Advanced Scripting
 
Internationalizing The New York Times
Internationalizing The New York TimesInternationalizing The New York Times
Internationalizing The New York Times
 
soa
soasoa
soa
 
MWLUG 2014: ATLUG Comes To You
MWLUG 2014: ATLUG Comes To YouMWLUG 2014: ATLUG Comes To You
MWLUG 2014: ATLUG Comes To You
 
AWS re:Invent 2016: Building a Platform for Collaborative Scientific Research...
AWS re:Invent 2016: Building a Platform for Collaborative Scientific Research...AWS re:Invent 2016: Building a Platform for Collaborative Scientific Research...
AWS re:Invent 2016: Building a Platform for Collaborative Scientific Research...
 
Save time by applying clean code principles
Save time by applying clean code principlesSave time by applying clean code principles
Save time by applying clean code principles
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 

FileMaker Developer Conference 2010: Small Things | Loosely Joined

Editor's Notes

  1. Introduction
  2. 13 Magazine Ad - Eddie Adams Work with John Walther. My craft as a photographer Next: Same process as a programmer.
  3. Main Problems: Everything is always changing. Life, business, economy, environment. Software must bend or break. We are limited: Memory 7 +/- 2. One Locus of Attention Systems are inherently interconnected. We are ill equipped to deal with complexity. - Gets big, then it gets buggy.
  4. Started looking - Found Pragmatic Programmer Led to Ruby, Rails, then Unix.
  5. Found that Generations of hackers and scientists had already solved the main problems. How to deal with change? how to deal with our limitations? how to keep systems form being overly coupled or connected? The most relevant of those traditions to FileMaker is Unix.
  6. How do you do it: How do you create systems that achieve the goals of the moment and are able to adapt to new needs and challenges.
  7. We are going to examine each of these points, looking at the philosophies and practices of others.
  8. HIred by Tekserve to Convert their 20 year system to 9 6 Months. Next up, rewrite the payment system. Old and ossified. Unable to change. Holding back the business. SHOW ONLY THE SAMPLE FILE WITH TECHNICAL DEBT
  9. Keep this slide at the end of your presentation. (Don't forget to remove this comment from the slide.)
  10. Keep this slide at the end of your presentation. (Don't forget to remove this comment from the slide.)