Designing Docassemble Interviews for Maintainability

Slides:



Advertisements
Similar presentations
HTML Basics Customizing your site using the basics of HTML.
Advertisements

Revealing the Secrets of Self-Documenting Code Svetlin Nakov Telerik Corporation For C# Developers.
Object Oriented Design An object combines data and operations on that data (object is an instance of class) data: class variables operations: methods Three.
1 Introducing Collaboration to Single User Applications A Survey and Analysis of Recent Work by Brian Cornell For Collaborative Systems Fall 2006.
Online Magazine Bryan Ng. Goal of the Project Product Dynamic Content Easy Administration Development Layered Architecture Object Oriented Adaptive to.
Program Design Divide and Conquer –Divide the program into separate tasks Functional Decomposition Top-Down Design –Divide an overall problem into discrete.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Algorithm Programming Coding Advices Bar-Ilan University תשס " ו by Moshe Fresko.
Automation Repository - QTP Tutorials Made Easy The Zero th Step TEST AUTOMATION AND QTP.
23 Copyright © 2004, Oracle. All rights reserved. Sharing Objects and Code.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
Chapter 4 Code Editor Goals and Objectives Program more efficiently? How can you speed up your development process? Do you want to learn useful shortcuts.
+ Atomic Design By Pattern Lab Delaney Metzger. + Goal of Atomic Design Atomic Design is an idea that can be used to translate the creative side into.
1 Web Based Programming Section 6 James King 12 August 2003.
M1G Introduction to Programming 2 4. Enhancing a class:Room.
Bare bones notes. Suggested organization for main folder. REQUIRED organization for the 115 folder.
The Evils of Copy and Paste Presented by Daniel Daugherty
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
1 Data Structures CSCI 132, Spring 2014 Lecture 3 Programming Principles and Life Read Ch. 1.
CSCI-383 Object-Oriented Programming & Design Lecture 13.
SE: CHAPTER 7 Writing The Program
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Andrew S. Budarevsky Adaptive Application Data Management Overview.
Use CSS to Implement a Reusable Design Selecting a Dreamweaver CSS Starter Layout is the easiest way to create a page with a CSS layout You can access.
January 2005MERLOT Reusable Learning Design Guidelines OVERVIEW FOR MERLOT Copyright 2005 Reusable Learning This work is licensed under a Attribution-NoDerivs-NonCommercial.
I Power Higher Computing Software Development Development Languages and Environments.
Spreadsheet Engineering Builders use blueprints or plans – Without plans structures will fail to be effective Advanced planning in any sort of design can.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
1 5.4 Modular Design Top-Down Design Structured Programming Advantages of Structured Programming.
Java Fundamentals Usman Ependi UBD
Program Style Chapter 22 IB103 Week 12 (part 2). Modularity: the ability to reuse code Encapsulation: hide data access directly but may use methods (the.
+ Publishing Your First Post USING WORDPRESS. + A CMS (content management system) is an application that allows you to publish, edit, modify, organize,
Principles of Programming. Achieving an Object-Oriented Design  Abstraction and Information Hiding  Object-Oriented Design  Functional Decomposition.
L’origine dei mali: le dipendenze tra componenti Stefano Leli 14° Workshop DotNetMarche Venerdì 16 aprile
CS 440 Database Management Systems Stored procedures & OR mapping 1.
Principles of Programming & Software Engineering
PB173 - Tématický vývoj aplikací v C/C++ (jaro 2016)
CSC 222: Object-Oriented Programming
CSC 222: Computer Programming II
Object Oriented Programming
GO! with Microsoft Office 2016
MPCS – Advanced java Programming
Programming Basics Web Programming.
Principles of Programming and Software Engineering
GO! with Microsoft Access 2016
CSC 222: Object-Oriented Programming
Web Engineering.
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING (OOP) & CONCEPTS
Objective % Explain concepts used to create websites.
Quick Start Guide for Visual Studio 2010
Stack ADT & Modularity 2 implementations of the Stack abstract data type: Array Linked List Program design: modularity, abstraction and information hiding.
Quinten Steenhuis, Greater Boston Legal Services
Benefit Management Melissa Wagner.
Logic without Flowcharts:
Making Procedural Methods
Why Object-oriented Programming?
INTERMEDIATE PROGRAMMING LESSON
EMSE 6574 – Programming for Analytics: Python 101 – Python Enviornments Joel Klein.
Unit 6 Assignment 2 Chris Boardley.
Programming Logic and Design Fourth Edition, Comprehensive
Chapter 7 Writing the Programs Shari L. Pfleeger Joann M. Atlee 4th Edition.
INTERMEDIATE PROGRAMMING LESSON
Functions, Return Values, Parameters Getters and Setters
Object-Oriented Programming
WEB DESIGNING THROUGH HTML
Functions, Return Values, Parameters Getters and Setters
Best Practices for Designing Effective Map Services: Case Studies
What Is Good Software(Program)?
Objective Explain concepts used to create websites.
Web Client Side Technologies Raneem Qaddoura
Presentation transcript:

Designing Docassemble Interviews for Maintainability Quinten Steenhuis, Founder, Lemma Legal Consulting @QSteenhuis

Why care? Write code your future self can follow Speed up development Make your life easier

When does it matter? When your interview is “big enough” You start to get frustrated with navigating around it

“ Premature optimization is the root of all evil ” Donald Knuth

5 Basic Techniques Manage control flow in one place Use good coding style Use the “right” number of interview files Use the right editor Use object-oriented principles

“need” is considered harmful

Interview Flow Control Use one mandatory code block to control program flow Give the code block an ID Use only simple branching logic in the control block

Use one control block One place to look to understand program flow Easily change the order of questions Easily test different questions that don’t depend on earlier questions

Model Interviews https://lemmalegal.com/2019/06/17/designing-docassemble-interviews-for-maintainability-start-to-finish/

2. Code with Style

Using “good” coding style Use the id tag to label questions and code Use the variable name standards Use comments

Tag your blocks Easy to find the question you need Needed for Google Analytics Aid in translation Aid in debugging

“ The nice thing about standards is that you have so many to choose from ” Andrew Tannenbaum

Variable Name Standards https://bit.ly/2IkW7mz (Michelle from Code for Boston) On Slack: #structuring-code

3. Divide and Conquer

Why do you need a separate interview file? Question reuse Translation (old style only) Multiple simultaneous authors Interview file is just “too long”

Use the right number of interview files Start with 1 Separate reusable questions Keep a skeleton interview with control flow Keep related questions/code together, but take advantage of search

4. Get your edit on

Some popular (free) editors VS Code Atom Notepad++ Emacs? ViM?

Using an external editor Plain text means you choose the editor Better search/replace Code completion Split screen view

5. Objectify your life

Why use Classes / OOP? Make your code readable Use advanced Docassemble features Make your code more modular and reusable Simplify your interviews Write idiomatic code

Object oriented classes Create once and use again Build iteratively Hide implementation details

Built-in classes to understand: Individual Address Date DAList

Built-in classes are used in send_email(), send_sms() map_of() Pronouns/age functions Collective/singular tense matching

Start here: https://bit.ly/2wSTTVd Are classes easy? Truthfully, no. But it’s worth learning the basics. Start here: https://bit.ly/2wSTTVd

A common pattern: DAObject and DAList Asset / AssetList Individual / Individual List 3-4 attributes, a collection, and one-two methods that count or act on the attributes (such as sum)

Common Pattern #2: API query Constructor that uses the Docassemble configuration to get an API key A getter for each type of item retrievable by the API A setter Extend over time as you use more of the API

Quinten Steenhuis, Lemma Legal @QSteenhuis Questions? Quinten Steenhuis, Lemma Legal @QSteenhuis