Please Don’t Do That! Common Programming Mistakes Tammy Lonsberry Sr. Programmer/Analyst Sungate Solutions, Inc.

Slides:



Advertisements
Similar presentations
AEPs from TNHG at ACT! Visions 2005 ACT!2005 Enhancement Products from The New Hampton Group.
Advertisements

Fox Scientific, Inc. ONLINE ORDERING 101. Welcome to our website On our main page you can find current promotions, the vendors we offer, technical references.
Lesson 10: Starting Windows Applications start an application program move between open application programs start an application using the Run command.
Data Transfer Data Import Data Export Database Backup and Restore Uninstalling and re-installing LIMS.
Lecture 4 Basic Scripting. Administrative  Files on the website will be posted in pdf for compatibility  Website is now mirrored at:
Programming Tips for .NetUI
Practice Insight Instructional Webinar Series Eligibility Manager
 Copyright I/O International, 2013 Visit us at: A Feature Within from Sales Rep User Friendly Maintenance – with Zip Code.
System Design System Design - Mr. Ahmad Al-Ghoul System Analysis and Design.
QAD Integrated Customization Toolkit (ICT)
PayDox applications All features can be used independently.
Lesson 46: Using Information From the Web copy and paste information from a Web site print a Web page download information from a Web site customize Web.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Integrate your people maximize your knowledge Tel SalesBase Customer.
All New CCH AnswersNow Library for AAIMEA members! Your 24/7 access to everyday HR & Benefit issues including state employment laws! This site includes.
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
McGraw-Hill/Irwin Introduction to QuickBooks Pro, 2004 © 2005 The McGraw-Hill Companies, Inc., All Rights Reserved. Chapter 8 Payroll Setup.
Advanced File Processing
ACT! 2008 (10.0) Product Tour for ACT! 2007 (9.0) Users.
Classroom User Training June 29, 2005 Presented by:
WorkPlace Pro Utilities.
® IBM Software Group © 2009 IBM Corporation Rational Publishing Engine RQM Multi Level Report Tutorial David Rennie, IBM Rational Services A/NZ
1 Chapter 11 Implementation. 2 System implementation issues Acquisition techniques Site implementation tools Content management and updating System changeover.
Developing Workflows with SharePoint Designer David Coe Application Development Consultant Microsoft Corporation.
DEV-2: Making OpenEdge ® Architect Work For You David Lund Product Readiness.
How KeePass password safe can save you time and energy
SALESFORCE.COM SALESFORCE.COM
E-Commerce: Introduction to Web Development 1 Dr. Lawrence West, Management Dept., University of Central Florida Topics What is a Web.
COPYRIGHT © 2011 ALCATEL-LUCENT. ALL RIGHTS RESERVED. 1.
Linux+ Guide to Linux Certification, Second Edition
Running a Report.  List Bibliography Report  Found under: All Titles Purpose : Creates customized bibliographies by catalog, call number, or item characteristics.
Writing macros and programs for Voyager cataloging Kathryn Lybarger ELUNA 2013 May 3, #ELUNA2013.
EDI or DIE Stuart Richler President G.T.R. Data Inc.
Training Guide for Inzalo SOP Users. This guide has been prepared to demonstrate the use of the Inzalo Intranet based SOP applications. The scope of this.
SE: CHAPTER 7 Writing The Program
DB2 Universal Database Confidential | July 2012 | India Software Lab Click to add text © 2012 IBM Corporation An End to End Windows Automation Framework.
Elliott Attributes Edward M. Kwang President. Notes vs. Attributes Notes –Free Form Text –Conversation With Customers –Reminder for Follow Up Attribute.
FIX Eye FIX Eye Getting started: The guide EPAM Systems B2BITS.
Rev.04/2015© 2015 PLEASE NOTE: The Application Review Module (ARM) is a system that is designed as a shared service and is maintained by the Grants Centers.
6 th Annual Focus Users’ Conference 6 th Annual Focus Users’ Conference Import Testing Data Presented by: Adrian Ruiz Presented by: Adrian Ruiz.
Chapter Five Advanced File Processing. 2 Lesson A Selecting, Manipulating, and Formatting Information.
Overview of the Automated Build & Deployment Process Johnita Beasley Tuesday, April 29, 2008.
What’s New in QAD’s.NET UI? Browse Updates, Guide Me, and more! Stacy Elwood, BravePoint MWUG September 2010.
1 MSTE Visual SourceSafe For more information, see:
Integrate, check and share documents Module 3.3. Integrate, check and share documents Module 3.3.
Collaborative Planning Training. Agenda  Collaboration Overview  Setting up Collaborative Planning  User Setups  Collaborative Planning and Forecasting.
Windows XP Lab 2 Organizing Your Work Competencies.
A2: Making OpenEdge ® Architect Work For You Susan Houniet Senior Solution Consultant.
Thank you for looking into Policy Manager Two for your Head Start program Teresa K. Wickstrom Senior Associate Center for Community Futures
Millennium/Agresso Interface Yvonne Desmond, Gillian Donagher, Dublin Institute of Technology
TOPSpro Special Topics I: Database Managemen t. Agenda for Module I: Database Management  TOPSpro Backup/Restore Wizard  TOPS-TOPS Import/Export Wizard.
Xxx Presentation, No 1 Copyright © TAC AB Engineering Classic Networks1.
Software Overview How to… Review Video and Data  Review the Journal Review the Journal  Simple Search Simple Search  Advanced Search Advanced Search.
Fox Scientific, Inc. ONLINE ORDERING 101. Welcome to our website On our main page you can find current promotions, the vendors we offer, technical references.
Web Content And Customer Relationship Management Solution. Transforming web sites into a customer-focused, revenue generating channel with less stress.
For Rapid Application Development Developed By
Best Practices for Dynamics NAV Administration and Security
QAD Browses.
Your Dashboard to Success
Chapter 2: System Structures
System Navigation and Test Launch
HC Hyper-V Module GUI Portal VPS Templates Web Console
“All Lawson, All the Time!”
Course: Module: Lesson # & Name Instructional Material 1 of 32 Lesson Delivery Mode: Lesson Duration: Document Name: 1. Professional Diploma in ERP Systems.
Manual Water Ski Directory
David Cleverly – Development Lead
Tutorial Introduction to help.ebsco.com.
Professional Services Tools Library (PSTL)
Presentation transcript:

Please Don’t Do That! Common Programming Mistakes Tammy Lonsberry Sr. Programmer/Analyst Sungate Solutions, Inc.

About me  Tailoring and customizing Progress code for QAD users since 1995  Most versions (Mfg/Pro 7.3 – QAD EA 2013 SE)  All User Interfaces (CHUI, GUI, Desktop,.NetUI)  Progress and Oracle db’s  Active PEG member  Long time consultant with exposure to many different environments, processes, protocols … and many lessons learned, too often the hard way

Agenda  Environment Setup  Programming Tips  Code Installation  Support and Maintenance  Summary  Questions

Environment Setup

Environment Setup Basics  The basics include a minimum of 3 databases and 3 code environments  Databases:  Production  User Testing  Development  Code Environments:  Production  Test  Development

Directory Layout  Do: Keep custom code separate from QAD  Do: Keep 3 rd -party code separate from QAD  Do: Keep “layers” of directories for the separate code environments  Prod = top layer  Test = middle layer  Dev = lowest layer  Provide an easy way to peel away the customizations and 3 rd -party apps  Can run standard QAD with simple Propath change  Can run any code environment against any database  Better ability to isolate root cause of code issues

Propath Tips  Keep Propath consistent across all environments, UI’s, users .NetUI Propath should match non-.NetUI Propath  All end-users should use the same Propath  No source  Prod users = only Prod.r’s  Test users = Test then Prod  All developers should use the same Propath  Includes all source  Same directories in the same order  Eliminate guesswork; use, to get correct version of code Watch for stale copies in your start-up directory; in Test

Propath Examples  Production (no source) PROPATH=.  Startup directory /apps/qad/mods  Prod Mods (in-house custom code) /apps/qad/trm  Trade Management (TrM) /apps/qad  QAD /apps/qad/bbi  Test PROPATH=. /apps/qad/test  Test Mods /apps/qad/mods  Prod Mods /apps/qad/trm /apps/qad /apps/qad/bbi

Propath Examples  Development (full source) PROPATH=.  Startup directory /apps/qad/test  Test compiled.r’s /apps/qad/test/src  Test source code /apps/qad/mods  Prod compiled.r’s /apps/qad/mods/src  Prod source code /apps/qad/trm  TrM compiled.r’s /apps/qad/trm/src  TrM source /apps/qad/trm/xrc  TrM encrypted source /apps/qad  QAD compiled.r’s /apps/qad/src  QAD source /apps/qad/xrc  QAD encrypted source /apps/qad/bbi  QAD (misc. include files)

Programming Tips

 Goal: Make code easier to read, understand  Leads to faster investigation, troubleshooting, problem resolution Faster response time = happy users & management  Do: Add code comments  Messages  Place message text within comment to assist with code readability /*ITEM NUMBER DOES NOT EXIST*/ {pxmsg.i &MSGNUM=16 &ERRORLEVEL=3}  Use brief code comments to explain why  The “what” is obvious; the “why” is not Explain business reasons; these change over time Explain why this logic/algorithm/method was used

Programming Tips  Don’t: Abbreviate field or variable names  Prohibits ease & effectiveness of text searches  Ex: Never use code_fld for code_fldname  Do: Recycle & Reuse  Recognize reusable code segments  Eliminate redundant code No minimum number of lines; 2 lines repeated is too many Gets out of sync too easily Makes code unnecessarily lengthy, harder to read, harder to maintain  Use internal procedures, include.i files, external programs

Programming Tips  Do: Use QAD variables to gain bonus features  Example: Use part/part1, site/site1  Freebies include:  Field Labels (and their multi-language translations)  Field Lookup browses  Field Help

Bonus: Free Labels

Bonus: Free Lookups

Programming Tips  Custom copies – Think beyond the code  When creating a copy of a standard QAD program in order to rename it and customize it, also check for:  Lookup browses  Field labels  On screen  On output

Custom Copy Example

Programming Tips: Data  Code development often includes data, too  Examples of developer’s data:  When creating data:  Always add to Dev database first  Avoid:  Collisions with other developers  Mismatches  Out-of-sync scenarios Browses Drill-downs Field lookups Generalized Codes Labels Menu options Messages Program Information

Code Installation

Code Installation Do’s:  Do: Put source programs (.i,.p) in /src directory  Do: Put compiled code (.r) in applicable 2- letter subdirectories  Ex: /us/xx  Do: Keep all related.i’s,.p’s,.r’s in sync  Always installed together, into the same environment, at the same time  Follow this for all code, including:  ECO’s (patches)  Add-on modules  3 rd -party apps

Code Installation Don’ts:  Don’t: Put source programs in a 2-letter subdirectories  Or in any directory except /src  Don’t: Install.r without corresponding source  Don’t: Keep duplicate copies in multiple directories  Development directory should contain only code in active development  When complete, move it to Test  Test directory should contain only code waiting to be tested  When complete and approved, move it to Prod

Code Installation  Do: Devise and follow an installation process  Methods include:  Can use 3 rd party apps  Can develop your own scripts, programs  Can be completely manual  List the steps, then step the list  Self-documenting  Becomes an easy checklist  Assists with code version control  Increases overall environment stability

Code Installation  Do: Use code “check out” process  Ensures that only one person is working on a program at a time  Avoids coding conflicts  Avoids lost work, accidental overwrites  Sample check out method  Use a designated folder (ex: …/src/checkout)  Place a simple text file into this folder  File name = program name (ex: xxabc.p.txt)  Contents include: Developer name or initials Date Reason (ex: ECO #, project ID, case #, etc.)

Code Installation  Do: Keep source code history  Can do immediate roll-backs  Can do diff’s to determine version changes  Sample code history method  Use a designated folder (ex: …/src/history)  Copy current Prod version to this folder  Add a date extension (ex: xxabc.p )

Installation Includes Data, Too  Manage data in the same manner as code  Data and code move through the installation steps together; same place, same time  Dev  Test  Test  Prod  Data can be dumped and loaded  Don’t retype it into each database  Develop simple tailored versions of QAD’s dump/load procedures  Browses  With.NetUI, can use Browse Import/Export  Without.NetUI, dump/load applicable tables

Installation Example 1. Diff it  Compare your modified code to the existing version  Ensure the only changes are yours -- no more, no less  Do this for any environment (Test, Prod, etc.) 2. Keep history (Prod only)  Copy production code; add date extension 3. Install code & data  Includes source (.i,.p) and.r  Move, don’t copy  Load data into target database(s) 4. Remove check out file (Prod only)

Support and Maintenance

 No program is ever 100% final  Always keep in mind future modifications, enhancements, testing & troubleshooting  Don’t:  Develop a report without any selection criteria  Develop data exports, imports or interfaces without any selection criteria  Develop a program that executes fully by simply selecting it from the menu

Support and Maintenance  Do: Add more selection criteria than required  Reports, data exports, imports  Do: Provide a way to do quick & simple testing with a small number of records  Do: Provide a way to run every program and process outside of production  Especially useful for interfaces, data loads, automated jobs, processes requiring scripting or OS commands (such as FTP), etc.  Provide a way to test individual steps of a larger process

Support and Maintenance  Provide intuitive menu titles  Make it clearly obvious what type of program it is Maintenance Report Browse Utility  Provide enhanced descriptions  Add details about a program’s function as informative screen text Especially helpful for utility programs, data exports and imports Ensure text is visible in.NetUI

Support and Maintenance  Always change Company Address after a database refresh  Make it clear to users (and developers) what database they are logged into  Ensure that report titles always indicate the source database  Use 2.12 Company Address Maintenance  Change address for: ~reports ~screens ~taxes

Company Address Maintenance

Company Address: ~reports adctryrp.p Country Code Report Date: 03/13/14 Page: 1 Your Company Name **TEST** Time: 11:20:59 Alt Ctry Name EC NAFTA DEA GATT Group Type Code UAE UAE No No No No UKR Ukraine No No No No URY Uruguay No No No No USA United States of America No No No No US VEN Venezuela No No No No VIR Virgin Islands (U.S.) No No No No VNM Viet Nam No No No No WIN West Indies No No No No ZAF South Africa No No No No End of Report

Company Address: ~screens

.NetUI Shows db:domain

Summary

 Standards, policies and procedures – these are not your enemy!  Following best practices leads to:  Faster response time  Happier end-users  Lower IT support costs  Less stress, less headaches

Questions?

Contact information  For further information or a copy of this presentation: Tammy Lonsberry (847)