Force.com Unit Testing

Size: px
Start display at page:

Download "Force.com Unit Testing"

Transcription

1 Force.com Unit Testing Alex Berg Software Engineer marketing + technology sundog fax: th st s floor 6 fargo, nd

2 Force.com - The wonderful addition to Salesforce that allows you to customize your Salesforce org to the way your business works. After all, no two businesses are exactly alike. Some are in the non-profit industry, and others are in the medical industry; some are larger than 10,000 employees, and others are smaller than 10. For many of these businesses, it is not realistic to hire a full time, experienced software developer. Therefore, the Salesforce administrator needs to learn about development platforms like Apex to fulfill new requirements. What is often not realized when starting to use Apex, however, is Salesforce s requirement to accompany the code with unit tests. A beginner may find it easy enough to write a test that obtains high code coverage, but code coverage is only one way of measuring unit tests. It is quite difficult to measure the real effectiveness of unit tests and their benefits are usually not felt until much later in time. In this paper, I d like to share with new developers the purpose of software testing, how it can be useful, and go a bit deeper into the theory behind it. The Basics of Software Testing Business Contracts as a Metaphor Let s start with the basics of software testing. It may seem so extraneous, so why does anyone care about tests? Let s use a metaphor to explain it. We can think of a business like a software project, they both provide you with a service. You can use a business for its services without taking the time to write up a contract for them and you would probably be fine. But, suppose you start to depend on the service of this business when you start running your own business. When the time comes that the business fails to deliver the expected service, your own business will suffer as a result. This is not a risk that one is able to take when building a business. Software developers should be even more concerned, as they have many more dependencies, most internal to their software system. The developer creates the risk, and it is the developer s responsibility to minimize them; properly written tests can help you. As Chris Barry (2011) said, Your tests are... able to represent you and to validate that your code is continuing to operate as it should. Your tests will help bear your responsibility of detecting broken code in your org. Debugging a broken feature is quite difficult, and having unit tests in your org will both prevent it from happening as well as help you to narrow down the problem area and quickly fix it. Software Tests Tell You When You re Done A new developer implementing solutions in Apex might want to research other options. If only there was something that could clearly tell you when your code is working following each coding attempt. I can imagine two possible ways to do that: hire an intern to manually run through a script you give him, or you can write an automated script that the system could read and execute. No, please do not hire an intern just to test your programming attempts, just take a bit of time to learn how to write simple software tests. The time invested will easily be worth the effort. If you ever feel unsure about your code, you can quickly run your tests again to ease your mind. Write Tests First to Center Your Mind Tests can be pretty simple to write when you are in the right frame of mind. Coincidentally, once in this state of mind, you ll be looking at the broad overview of the entire system, from which the solution and its complexities become easier to see. It makes you think, Gee, how would I interact with Salesforce objects to create this functionality? This will prevent you from re-writing the solution while designing the solution in your mind. Also, because you are thinking of the whole picture, the design will be more holistic and logical. Well-designed software inherently has fewer bugs. Plus, when you show your code to a hardcore software developer, they will probably be pretty impressed, as you are using their favorite practice, called Test-Driven Development. Tests Prevent Recreating Bugs Bugs aren t fun. They are difficult to find and take time to fix. When you finally fix the bug, you will not want it to appear again in the future. More often than not, a problem with your Force.com code will be caused by unexpected user input. After you find the bug, write a 2

3 test that will feed the unexpected input into your code. Don t spend time fixing the wrong thing, make certain that your hypothesized problem is, in fact, the same problem experienced in reality. Once the test is in place and the problem solved, you can be assured that someone else does not remove your fix and recreate the bug. Common Types of Unit Tests on the Force.com Platform Functional Tests as the Common Entrypoint to Proper Force.com Tests Here s a situation that describes a common entrypoint into writing tests for a new Force.com developer. Not able to use a validation rule or workflow, a non-developer will have to climb a potentially steep learning curve to use Apex. When they finish the code, and the functionality finally works, they discover that they are then forced to return to coding land to attain minimum line coverage of their code before Salesforce will allow them to deploy it. The problem then moves from Apex logic to Apex tests. Unfamiliar with them and not cognizant of the value of unit tests, they are hastily created to quickly attain the required amount of line coverage. When a developer intends to check whether their code has successfully added the desired functionality, what they are really testing is whether their code works within the context of many other features in the Salesforce org. They want to test whether the feature is fully-functional, so this type of test is called a functional test. Functional tests are great for preventing feature regression, a common problem over time, but depending on how layered the Apex solution was, it does not verify the integrity of each layer used. Integration Tests It is probably not something the developer often thinks about, but by using a DML operation in this test, the first domino in a chain of a defined series of DML steps is knocked down, and one of these steps holds our newly written code. Our code may be correct, but the unit test may still fail when any one of these other steps fails, which will cause the entire DML operation to fail. It is because of this dependency that we call this example of a test an integration test. As Roy Osherove (2009) defines it, Integration testing means testing two or more dependent software modules as a group. It informs us not of the correctness of its logic, but of how correctly our code functionally integrates with the rest of the system. Why Functional Tests are Common on the Platform Force.com developers will find themselves writing more functional tests than will developers on other platforms. A Windows application, for example, offers you many tools for building a window-based application, but the entire application will be written from a zero-functionality state. Force.com developers write code for a program that is already fully-functional. Most functional requests are just slight additions to the data model and its presentation. Because additions are usually small, the code solution is usually simple, which means there are just a few layers of code in the solution. At this level of simplicity in Salesforce, the simplest test is that functional and integration tests are one and the same. Because of this, most tests will be functional tests, as they are the most economical for simple development. Inevitable Database Dependencies Functional tests may be the most common type of test to use to cover Force.com code, but this does not mean they are the only type of test to be aware of. The other important type of software test is the unit test. As its name suggests, the scope of a unit test should be just a small unit of functionality. Writing tests for such small pieces of functionality may be challenging for many Force. com developers. Why so challenging? Let s walk through an average task for an Apex developer. As noted earlier, only a few lines of code are normally required to complete a feature request. For example, it is probably pretty common to do something like insert a record when a record in a different object is updated. To implement this simple request, we add some code to a trigger that will loop through each updated record and conditionally insert the new record. It s just a few lines of code, and it may be fine to place them directly on the trigger handler. With code directly on a trigger handler, the only way to cover the logic from a unit test is to use a DML operation to indirectly fire the trigger. This increases the scope of 3

4 the test to include all the code that is executed by that DML operation, which is an integration test instead of a unit test. Consider all the areas of Salesforce functionality that are touched when an integration test uses a DML statement. Salesforce developer documentation has an article titled, Triggers and Order of Execution, that informs us of each area. System field validation, all Apex code in before triggers, system validation again, all Apex code in after triggers, assignment rules, auto-response rules, workflow rules, escalation rules, and criteria based sharing, not including the smaller steps. This is a long list. Each of these steps is a potential failure point for your tests! If an integration test is failing, it is very possible that the logic being tested is perfectly valid, and the failure lies in one of these many DML operation steps. Integration tests are important, but they don t paint a complete picture of the failure for us. Five Ways to Test Functionality The Five Goals of Tests To comprehensively test new functionality on the Force. com platform, here is a checklist to review before calling your unit tests complete. Salesforce recommends that you test the following five areas of new functionality: 1. positive path 2. end state 3. negative path 4. governor limits 5. user permissions We ll go over each of these in detail and provide an example. I ll write unit tests for the following piece of code, which performs the common task of updating another record if a field on the record in the trigger is changed. Changing an Integration Test Into a Unit Test In our previous example, firing the DML operation invokes every trigger on the way that contains the logic we want to test. Wouldn t it be nice if we could bypass that other functionality and test just the logic we added? If the test for this small unit of code is successful, then we know to look elsewhere for the problem when it arises! The code sits on the trigger, and the only way to get to it is through a DML operation. So, as it is, we cannot test that unit of logic. Does this mean that Force.com code cannot be unit tested? Absolutely not. It just means that the path of least resistance for a simply coded trigger code does not lend itself conveniently to unit testing. It is quite simple, however, with enough foresight to pull the logic off of the trigger and into a helper class that the trigger calls. Once in its own method, we can write a unit test that directly calls this method. This avoids the chain of dependencies that appears when reaching the code through a DML operation, and now that these dependencies are removed, we can call it a unit test. 4

5 Here is the function for which we will write unit tests: trigger ArtistHandleVenueChange on Artist c (after update) { List<Venue c> venuestoupdatelist = new List<Venue c>(); for (Artist c newartist : trigger.newmap.keyset()) { Artist c oldartist = trigger.oldmap.get(newartist.id); if (newartist.venue c!= oldartist.venue c) { if (newartist.is_touring c!= false) { venuestoupdatelist.add(new Venue c( Id = newartist.venue c)); venuestoupdatelist.add(new Venue c( Id = oldartist.venue c)); else { throw new MyCustomException( An Artist must be touring to change Venues! ); Database.update(venuesToUpdateList); 5

6 1) Positive Path As Chris Barry (2011) candidly presents it, The first goal of Apex tests is very simply to make sure that our code does not blow up. To use a metaphor, if I plug an ipod via USB into my computer, I want to make sure the computer does not crash and reboot. This first goal is pretty simple: when given sensible input, it should not throw uncaught exceptions. Any code you write should expect to be supplied with bad data, and it should produce sensible output when it receives it. Here is an example of a unit test that ensures a function can complete without throwing any exceptions. Exceptions can be created and thrown by your code to indicate unexpected failure, or they can be thrown by the Force. com platform. We should test to make sure our code is not causing the system to throw any unexpected exceptions: static testmethod void testvenuechange_shouldthrownoexceptions() { //Create test data Venue c venue1 = new Venue c(name = Test venue, Location = Test Location ); Database.insert(venue1); Venue c venue2 = new Venue c(name = Test venue2, Location = Test Location2 ); Database.insert(venue2); Artist c artist1 = new Artist c(name = Test Artist, Venue c = venue1.id); Database.insert(artist1); //Invoke functionality Test.startTest(); artist1.venue c = venue2.id; String errormessages = ; try { Database.update(artist1); catch (Exception e) { String errormessages = e.getmessage(); Test.stopTest(); //Check results System.assertEquals(, errormessages); 6

7 2) End State The next simple aspect of your code to test is its end state. Our code is not valuable if it doesn t do what it was designed to do. If a piece of code does nothing, then it should be removed from the solution. Here is an example of a unit test that tests a function s end state: static testmethod void testvenuechange_shouldupdatevenue() { //Create test data Venue c venue1 = new Venue c(name = Test venue, Location = Test Location ); Database.insert(venue1); Venue c venue2 = new Venue c(name = Test venue2, Location = Test Location2 ); Database.insert(venue2); Artist c artist1 = new Artist c(name = Test Artist, Venue c = venue1.id); Database.insert(artist1); //Invoke functionality Test.startTest(); artist1.venue c = venue2.id; Database.update(artist1); Test.stopTest(); //Check results Venue c venue2after = [SELECT Was_Updated c FROM Venue c WHERE Id = :venue2.id LIMIT 1]; //We assume there is logic to set Was_Updated c field to true on Venue c trigger. System.assertEquals(true, venue2after.was_updated c); 7

8 3) Negative Path The third on our list tests any negative cases that your code has special handling for. In our example, I set up an arbitrary exception case that protects against an artist changing venues when the artist is not actually on tour. We need to assert that this custom exception case performs as we expect. So in our test, we need to violate it by changing the Is_Touring c field to false while changing the its Venue. Here is an example of a unit test that tests a function s negative path: static testmethod void testvenuechange_andisnottouring_shouldthrowcustomexception() { //Create test data Venue c venue1 = new Venue c(name = Test venue, Location = Test Location ); Database.insert(venue1); Venue c venue2 = new Venue c(name = Test venue2, Location = Test Location2 ); Database.insert(venue2); Artist c artist1 = new Artist c(name = Test Artist, Venue c = venue1.id); Database.insert(artist1); //Invoke functionality Test.startTest(); Boolean caughtexpectedexception = false; artist1.venue c = venue2.id; artist1.is_touring c = false; try { Database.update(artist1); catch (MyCustomException e) { if (e.getmessage().contains( An Artist must be touring to change Venues! )) { caughtexpectedexception = true; Test.stopTest(); //Check results System.assertEquals(true, caughtexpectedexception); 8

9 4) Governor Limits Salesforce uses an architecture called multi-tenancy, the details of which won t be discussed here, but means is that many organizations are sharing the same limited computing resources. To ensure that each organization s custom code does not spiral out of control and negatively affect other organizations, Salesforce imposes governor limits. Because these limits can affect how your code functions and can cause it to fail, Salesforce recommends you to test how close your code is to these governor limits. You want to make sure that your unit of code does not cause too many database queries or DML operations, because if your code violates these limits in production, the functionality will not operate, and it will also probably cause other functionality to fail. This is a pretty important aspect to test, especially when your org has much custom code already in it. These governor limits will be tested when performing a data migration which uses the Data Loader tool to insert many records at a time. If your triggers aren t designed to handle operations on many records at once, data migration may fail. Here is an example of a unit test for a function s governor limits: static testmethod void testvenuechange_updatebulkrecords_shouldnotfail() { //Create test data Venue c venue1 = new Venue c(name = Test venue, Location = Test Location ); Database.insert(venue1); Venue c venue2 = new Venue c(name = Test venue2, Location = Test Location2 ); Database.insert(venue2); List<Artist c> artiststoinsertlist = new List<Artist c>(); for (int i = 0; i < 200; i++) { Artist c artist = new Artist c(name = Test Artist + i, Venue c = venue1.id); artiststoinsertlist.add(artist); Database.insert(artistsToInsertList); //Invoke functionality Test.startTest(); Boolean caughtexception = false; List<Artist c> artiststoupdatelist = new List<Artist c>(); for (Artist c a : artiststoinsertlist) { 9

10 a.venue c = venue2.id; artiststoupdatelist.add(a); try { Database.update(artistsToUpdateList); catch (Exception e) { caughtexception = true; Test.stopTest(); //Check results System.assertEquals(false, caughtexception); List<Artist c> artistlistafter = [SELECT Venue c FROM Artist c WHERE Id IN :artiststoupdatelist]; for (Artist c a: artistlistafter) { System.assertEquals(venue2.Id, a.venue c); 10

11 5) User Restrictions In our example, there is no special code to differentiate behavior depending on the currently running user. Many features want one behavior for a normal user and another behavior for more privileged users. This will change with each feature request, so take notes when the requirements include changing functionality based on the running user. The Salesforce unit testing framework provides facilities for testing this functionality differentiation by simulating a certain user. Here s an example of how to use use it: static testmethod void testvenuechange_updatebulkrecords_shouldnotfail() { //Create test data Venue c venue1 = new Venue c(name = Test venue, Location = Test Location ); Database.insert(venue1); Venue c venue2 = new Venue c(name = Test venue2, Location = Test Location2 ); Database.insert(venue2); Artist c artist1 = new Artist c(name = Test Artist, Venue c = venue1.id); Database.insert(artist1); Profile normalprofile = [SELECT Id FROM Profile WHERE Name = Normal Profile ]; User someuser = new User(Name = Test User, ProfileId = normalprofile.id); Database.insert(someUser); //Invoke functionality Test.startTest(); Boolean caughtexception = false; System.runAs(someUser) { try { artist1.venue c = venue2.id; Database.update(artist1); catch (Exception e) { caughtexception = true; Test.stopTest(); //Check results System.assertEquals(true, caughtexception); 11

12 Conclusion In this paper, we ve discussed the purpose of software testing, its great benefits, and a few things to think about when writing tests on the Force.com platform. You should know the steps to take to produce a comprehensive test suite that will ward off regression errors with future changes. When you next write tests, take the time to follow them, and see what bugs they catch. You can be thankful that you don t have to track them down and fix them later. 12

13 Sources Barry, C. & Henning, J. (2011) Hands-On: Testing in Force.com Code (Apex) for Developers [Conference] San Francisco, CA: Dreamforce 2011 Osherov, R. (2009). The art of unit testing with examples in.net. Greenwich, CT: Manning Publications Co. Force.com Apex Code Developer s Guide (2011) 13

Chapter01.fm Page 1 Monday, August 23, :52 PM. Part I of Change. The Mechanics. of Change

Chapter01.fm Page 1 Monday, August 23, :52 PM. Part I of Change. The Mechanics. of Change Chapter01.fm Page 1 Monday, August 23, 2004 1:52 PM Part I The Mechanics of Change The Mechanics of Change Chapter01.fm Page 2 Monday, August 23, 2004 1:52 PM Chapter01.fm Page 3 Monday, August 23, 2004

More information

1.7 Limit of a Function

1.7 Limit of a Function 1.7 Limit of a Function We will discuss the following in this section: 1. Limit Notation 2. Finding a it numerically 3. Right and Left Hand Limits 4. Infinite Limits Consider the following graph Notation:

More information

Unit Testing as Hypothesis Testing

Unit Testing as Hypothesis Testing Unit Testing as Hypothesis Testing Jonathan Clark September 19, 2012 5 minutes You should test your code. Why? To find bugs. Even for seasoned programmers, bugs are an inevitable reality. Today, we ll

More information

Divisibility Rules and Their Explanations

Divisibility Rules and Their Explanations Divisibility Rules and Their Explanations Increase Your Number Sense These divisibility rules apply to determining the divisibility of a positive integer (1, 2, 3, ) by another positive integer or 0 (although

More information

Supplemental Handout: Exceptions CS 1070, Spring 2012 Thursday, 23 Feb 2012

Supplemental Handout: Exceptions CS 1070, Spring 2012 Thursday, 23 Feb 2012 Supplemental Handout: Exceptions CS 1070, Spring 2012 Thursday, 23 Feb 2012 1 Objective To understand why exceptions are useful and why Visual Basic has them To gain experience with exceptions and exception

More information

How to approach a computational problem

How to approach a computational problem How to approach a computational problem A lot of people find computer programming difficult, especially when they first get started with it. Sometimes the problems are problems specifically related to

More information

Burning CDs in Windows XP

Burning CDs in Windows XP B 770 / 1 Make CD Burning a Breeze with Windows XP's Built-in Tools If your PC is equipped with a rewritable CD drive you ve almost certainly got some specialised software for copying files to CDs. If

More information

1: Introduction to Object (1)

1: Introduction to Object (1) 1: Introduction to Object (1) 김동원 2003.01.20 Overview (1) The progress of abstraction Smalltalk Class & Object Interface The hidden implementation Reusing the implementation Inheritance: Reusing the interface

More information

SPRITES Moving Two At the Same Using Game State

SPRITES Moving Two At the Same Using Game State If you recall our collision detection lesson, you ll likely remember that you couldn t move both sprites at the same time unless you hit a movement key for each at exactly the same time. Why was that?

More information

The SD-WAN security guide

The SD-WAN security guide The SD-WAN security guide How a flexible, software-defined WAN can help protect your network, people and data SD-WAN security: Separating fact from fiction For many companies, the benefits of SD-WAN are

More information

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing

More information

SECURITY AUTOMATION BEST PRACTICES. A Guide to Making Your Security Team Successful with Automation

SECURITY AUTOMATION BEST PRACTICES. A Guide to Making Your Security Team Successful with Automation SECURITY AUTOMATION BEST PRACTICES A Guide to Making Your Security Team Successful with Automation TABLE OF CONTENTS Introduction 3 What Is Security Automation? 3 Security Automation: A Tough Nut to Crack

More information

Extending BPEL with transitions that can loop

Extending BPEL with transitions that can loop Extending BPEL with transitions that can loop ActiveVOS linksaretransitions BPEL Extension AN ACTIVE ENDPOINTS PAPER AUTHOR: DR MICHAEL ROWLEY 2009 Active Endpoints Inc. ActiveVOS is a trademark of Active

More information

Unit Testing as Hypothesis Testing

Unit Testing as Hypothesis Testing Unit Testing as Hypothesis Testing Jonathan Clark September 19, 2012 You should test your code. Why? To find bugs. Even for seasoned programmers, bugs are an inevitable reality. Today, we ll take an unconventional

More information

Text Input and Conditionals

Text Input and Conditionals Text Input and Conditionals Text Input Many programs allow the user to enter information, like a username and password. Python makes taking input from the user seamless with a single line of code: input()

More information

SECURITY AUTOMATION BEST PRACTICES. A Guide on Making Your Security Team Successful with Automation SECURITY AUTOMATION BEST PRACTICES - 1

SECURITY AUTOMATION BEST PRACTICES. A Guide on Making Your Security Team Successful with Automation SECURITY AUTOMATION BEST PRACTICES - 1 SECURITY AUTOMATION BEST PRACTICES A Guide on Making Your Security Team Successful with Automation SECURITY AUTOMATION BEST PRACTICES - 1 Introduction The best security postures are those that are built

More information

Trombone players produce different pitches partly by varying the length of a tube.

Trombone players produce different pitches partly by varying the length of a tube. Trombone players produce different pitches partly by varying the length of a tube. 7 Variables A variable is a connection between a name and a value.* That sounds simple enough, but some complexities arise

More information

6.001 Notes: Section 8.1

6.001 Notes: Section 8.1 6.001 Notes: Section 8.1 Slide 8.1.1 In this lecture we are going to introduce a new data type, specifically to deal with symbols. This may sound a bit odd, but if you step back, you may realize that everything

More information

How to Rescue a Deleted File Using the Free Undelete 360 Program

How to Rescue a Deleted File Using the Free Undelete 360 Program R 095/1 How to Rescue a Deleted File Using the Free Program This article shows you how to: Maximise your chances of recovering the lost file View a list of all your deleted files in the free Restore a

More information

TRAINING & CERTIFICATION. Salesforce.com Certified Force.com Advanced Developer Study Guide

TRAINING & CERTIFICATION. Salesforce.com Certified Force.com Advanced Developer Study Guide Salesforce.com Certified Force.com Advanced Developer Study Guide Contents About the Force.com Certification Program... 1 Section 1. Purpose of this Study Guide... 2 Section 2. Audience Description: Salesforce.com

More information

SharePoint 2010 Site Owner s Manual by Yvonne M. Harryman

SharePoint 2010 Site Owner s Manual by Yvonne M. Harryman SharePoint 2010 Site Owner s Manual by Yvonne M. Harryman Chapter 9 Copyright 2012 Manning Publications Brief contents PART 1 GETTING STARTED WITH SHAREPOINT 1 1 Leveraging the power of SharePoint 3 2

More information

XP: Backup Your Important Files for Safety

XP: Backup Your Important Files for Safety XP: Backup Your Important Files for Safety X 380 / 1 Protect Your Personal Files Against Accidental Loss with XP s Backup Wizard Your computer contains a great many important files, but when it comes to

More information

Introduction to Programming

Introduction to Programming CHAPTER 1 Introduction to Programming Begin at the beginning, and go on till you come to the end: then stop. This method of telling a story is as good today as it was when the King of Hearts prescribed

More information

» How do I Integrate Excel information and objects in Word documents? How Do I... Page 2 of 10 How do I Integrate Excel information and objects in Word documents? Date: July 16th, 2007 Blogger: Scott Lowe

More information

FROM A RELATIONAL TO A MULTI-DIMENSIONAL DATA BASE

FROM A RELATIONAL TO A MULTI-DIMENSIONAL DATA BASE FROM A RELATIONAL TO A MULTI-DIMENSIONAL DATA BASE David C. Hay Essential Strategies, Inc In the buzzword sweepstakes of 1997, the clear winner has to be Data Warehouse. A host of technologies and techniques

More information

Lecture 10: Introduction to Correctness

Lecture 10: Introduction to Correctness Lecture 10: Introduction to Correctness Aims: To look at the different types of errors that programs can contain; To look at how we might detect each of these errors; To look at the difficulty of detecting

More information

MIGRATING FROM PORTALS TO COMMUNITIES

MIGRATING FROM PORTALS TO COMMUNITIES MIGRATING FROM PORTALS TO COMMUNITIES Introduction Have a partner portal or customer portal in your org? You can set up a community as well, to take advantage of the great new features that Salesforce

More information

4 KEY FACTORS FOR DATA QUALITY ON A DATA LAKE (OR: HOW TO AVOID THE DATA SWAMP) JOSH HERRITZ MIOSOFT CORPORATION MIOsoft Corporation.

4 KEY FACTORS FOR DATA QUALITY ON A DATA LAKE (OR: HOW TO AVOID THE DATA SWAMP) JOSH HERRITZ MIOSOFT CORPORATION MIOsoft Corporation. 4 KEY FACTORS FOR DATA QUALITY ON A DATA LAKE (OR: HOW TO AVOID THE DATA SWAMP) JOSH HERRITZ MIOSOFT CORPORATION The trends in digital business promise that the future holds an unprecedented volume, variety,

More information

Java/RealJ Troubleshooting Guide

Java/RealJ Troubleshooting Guide Java/RealJ Troubleshooting Guide by Bob Clark / Sharon Curtis / Simon Jones, September 2000 Some of these tips you will come across during your practical sessions, however we felt it would be helpful to

More information

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages

Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Lecture 18 Thursday, April 3, 2014 1 Error-propagating semantics For the last few weeks, we have been studying type systems.

More information

COPYRIGHTED MATERIAL. Dipping Your Toe into Python. Part I. Chapter 1: Programming Basics and Strings. Chapter 2: Numbers and Operators

COPYRIGHTED MATERIAL. Dipping Your Toe into Python. Part I. Chapter 1: Programming Basics and Strings. Chapter 2: Numbers and Operators Part I Dipping Your Toe into Python Chapter 1: Programming Basics and Strings Chapter 2: Numbers and Operators Chapter 3: Variables Names for Values COPYRIGHTED MATERIAL 1 Programming Basics and Strings

More information

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi.

Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi. Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture 18 Tries Today we are going to be talking about another data

More information

Arduino IDE Friday, 26 October 2018

Arduino IDE Friday, 26 October 2018 Arduino IDE Friday, 26 October 2018 12:38 PM Looking Under The Hood Of The Arduino IDE FIND THE ARDUINO IDE DOWNLOAD First, jump on the internet with your favorite browser, and navigate to www.arduino.cc.

More information

EXAMINING THE CODE. 1. Examining the Design and Code 2. Formal Review: 3. Coding Standards and Guidelines: 4. Generic Code Review Checklist:

EXAMINING THE CODE. 1. Examining the Design and Code 2. Formal Review: 3. Coding Standards and Guidelines: 4. Generic Code Review Checklist: EXAMINING THE CODE CONTENTS I. Static White Box Testing II. 1. Examining the Design and Code 2. Formal Review: 3. Coding Standards and Guidelines: 4. Generic Code Review Checklist: Dynamic White Box Testing

More information

Security Automation Best Practices

Security Automation Best Practices WHITEPAPER Security Automation Best Practices A guide to making your security team successful with automation TABLE OF CONTENTS Introduction 3 What Is Security Automation? 3 Security Automation: A Tough

More information

Basic Service Request Management. BMC Remedyforce Winter 11

Basic Service Request Management. BMC Remedyforce Winter 11 Winter 11 Virginia Leandro 01 March 2012 Table of Contents Service Request Management 3 Preparation 4 Accounts (Vendors and Service Providers) 5 Users/Profiles 6 Business Hours (Service Hours) 7 Default

More information

CIS 45, The Introduction. What is a database? What is data? What is information?

CIS 45, The Introduction. What is a database? What is data? What is information? CIS 45, The Introduction I have traveled the length and breadth of this country and talked with the best people, and I can assure you that data processing is a fad that won t last out the year. The editor

More information

Welcome To Account Manager 2.0

Welcome To Account Manager 2.0 Account Manager 2.0 Manage Unlimited FileMaker Servers, Databases, Privileges, and Users Effortlessly! The ultimate tool for FileMaker Database Administrators. Welcome To Account Manager 2.0 What Is Account

More information

Lecture Notes on Contracts

Lecture Notes on Contracts Lecture Notes on Contracts 15-122: Principles of Imperative Computation Frank Pfenning Lecture 2 August 30, 2012 1 Introduction For an overview the course goals and the mechanics and schedule of the course,

More information

Creating a new form with check boxes, drop-down list boxes, and text box fill-ins. Customizing each of the three form fields.

Creating a new form with check boxes, drop-down list boxes, and text box fill-ins. Customizing each of the three form fields. In This Chapter Creating a new form with check boxes, drop-down list boxes, and text box fill-ins. Customizing each of the three form fields. Adding help text to any field to assist users as they fill

More information

Debugging Your Python Code: For Dummies

Debugging Your Python Code: For Dummies Debugging Your Python Code: For Dummies Tyler J. Metivier University of Connecticut Dept. of Physics May 4, 2018 1 What s the problem? It doesn t matter if you ve written 1 script or programmed a space

More information

A Guide to Condor. Joe Antognini. October 25, Condor is on Our Network What is an Our Network?

A Guide to Condor. Joe Antognini. October 25, Condor is on Our Network What is an Our Network? A Guide to Condor Joe Antognini October 25, 2013 1 Condor is on Our Network What is an Our Network? The computers in the OSU astronomy department are all networked together. In fact, they re networked

More information

Sync to a Secondary Salesforce Organization

Sync to a Secondary Salesforce Organization Sync to a Secondary Salesforce Organization Salesforce, Summer 17 @salesforcedocs Last updated: August 9, 2017 Copyright 2000 2017 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark

More information

Static Methods. Why use methods?

Static Methods. Why use methods? Static Methods A method is just a collection of code. They are also called functions or procedures. It provides a way to break a larger program up into smaller, reusable chunks. This also has the benefit

More information

If you re a Facebook marketer, you re likely always looking for ways to

If you re a Facebook marketer, you re likely always looking for ways to Chapter 1: Custom Apps for Fan Page Timelines In This Chapter Using apps for Facebook marketing Extending the Facebook experience Discovering iframes, Application Pages, and Canvas Pages Finding out what

More information

These are notes for the third lecture; if statements and loops.

These are notes for the third lecture; if statements and loops. These are notes for the third lecture; if statements and loops. 1 Yeah, this is going to be the second slide in a lot of lectures. 2 - Dominant language for desktop application development - Most modern

More information

Shadows in the graphics pipeline

Shadows in the graphics pipeline Shadows in the graphics pipeline Steve Marschner Cornell University CS 569 Spring 2008, 19 February There are a number of visual cues that help let the viewer know about the 3D relationships between objects

More information

ASCII Art. Introduction: Python

ASCII Art. Introduction: Python Python 1 ASCII Art All Code Clubs must be registered. Registered clubs appear on the map at codeclub.org.uk - if your club is not on the map then visit jumpto.cc/18cplpy to find out what to do. Introduction:

More information

A Letting agency s shop window is no longer a place on the high street, it is now online

A Letting agency s shop window is no longer a place on the high street, it is now online A Letting agency s shop window is no longer a place on the high street, it is now online 1 Let s start by breaking down the two ways in which search engines will send you more traffic: 1. Search Engine

More information

Taskbar: Working with Several Windows at Once

Taskbar: Working with Several Windows at Once Taskbar: Working with Several Windows at Once Your Best Friend at the Bottom of the Screen How to Make the Most of Your Taskbar The taskbar is the wide bar that stretches across the bottom of your screen,

More information

CS103 Handout 29 Winter 2018 February 9, 2018 Inductive Proofwriting Checklist

CS103 Handout 29 Winter 2018 February 9, 2018 Inductive Proofwriting Checklist CS103 Handout 29 Winter 2018 February 9, 2018 Inductive Proofwriting Checklist In Handout 28, the Guide to Inductive Proofs, we outlined a number of specifc issues and concepts to be mindful about when

More information

Animations involving numbers

Animations involving numbers 136 Chapter 8 Animations involving numbers 8.1 Model and view The examples of Chapter 6 all compute the next picture in the animation from the previous picture. This turns out to be a rather restrictive

More information

Upgrading Your Geant4 Release

Upgrading Your Geant4 Release Upgrading Your Geant4 Release Joseph Perl, SLAC 1 Contents Major versus Minor releases What to look for in the release notes How to upgrade 2 Major versus Minor Releases Geant4 release numbers are of the

More information

CS 161 Computer Security. Security Throughout the Software Development Process

CS 161 Computer Security. Security Throughout the Software Development Process Popa & Wagner Spring 2016 CS 161 Computer Security 1/25 Security Throughout the Software Development Process Generally speaking, we should think of security is an ongoing process. For best results, it

More information

5 REASONS YOUR BUSINESS NEEDS NETWORK MONITORING

5 REASONS YOUR BUSINESS NEEDS NETWORK MONITORING 5 REASONS YOUR BUSINESS NEEDS NETWORK MONITORING www.intivix.com (415) 543 1033 NETWORK MONITORING WILL ENSURE YOUR NETWORK IS OPERATING AT FULL CAPACITY 5 Reasons Your Business Needs Network Monitoring

More information

7 Tips for Raising The Quality Bar With Visual Studio 2012

7 Tips for Raising The Quality Bar With Visual Studio 2012 Visit: www.intertech.com/blog 7 Tips for Raising The Quality Bar With Visual Studio 2012 Tip 1: Exploratory Testing I have to admit that when I first found out that enhanced exploratory testing was the

More information

Type Checking in COOL (II) Lecture 10

Type Checking in COOL (II) Lecture 10 Type Checking in COOL (II) Lecture 10 1 Lecture Outline Type systems and their expressiveness Type checking with SELF_TYPE in COOL Error recovery in semantic analysis 2 Expressiveness of Static Type Systems

More information

Animator Friendly Rigging Part 1

Animator Friendly Rigging Part 1 Animator Friendly Rigging Part 1 Creating animation rigs which solve problems, are fun to use, and don t cause nervous breakdowns. - http://jasonschleifer.com/ - 1- CONTENTS I. INTRODUCTION... 4 What is

More information

Learn Windows PowerShell in a Month of Lunches

Learn Windows PowerShell in a Month of Lunches Learn Windows PowerShell in a Month of Lunches by Don Jones Chapter 4 Copyright 2011 Manning Publications brief contents 1 Before you begin 1 2 Running commands 9 3 Using the help system 23 4 The pipeline:

More information

Variables and Data Representation

Variables and Data Representation You will recall that a computer program is a set of instructions that tell a computer how to transform a given set of input into a specific output. Any program, procedural, event driven or object oriented

More information

How to Read AWStats. Why it s important to know your stats

How to Read AWStats. Why it s important to know your stats How to Read AWStats Welcome to the world of owning a website. One of the things that both newbie and even old time website owners get overwhelmed by is their analytics and understanding the data. One of

More information

Security. 1 Introduction. Alex S. 1.1 Authentication

Security. 1 Introduction. Alex S. 1.1 Authentication Security Alex S. 1 Introduction Security is one of the most important topics in the IT field. Without some degree of security, we wouldn t have the Internet, e-commerce, ATM machines, emails, etc. A lot

More information

Knowledgebase Article. Queue Member Report. BMC Remedyforce

Knowledgebase Article. Queue Member Report. BMC Remedyforce Knowledgebase Article Queue Member Report John Patrick & Virginia Leandro 28 May 2013 Table of Contents Queue Report 3 Salesforce Apex Data Loader 3 Getting the Data Loader... 3 Getting your Security Token...

More information

Exceptions. What exceptional things might our programs run in to?

Exceptions. What exceptional things might our programs run in to? Exceptions What exceptional things might our programs run in to? Exceptions do occur Whenever we deal with programs, we deal with computers and users. Whenever we deal with computers, we know things don

More information

Amyyon customers can t wait to get their hands on it s new application, developed in Uniface.

Amyyon customers can t wait to get their hands on it s new application, developed in Uniface. customers can t wait to get their hands on it s new application, developed in Uniface. 1 CUSTOMER SECTOR Information Technology COUNTRY Netherlands CHALLENGE Migrate the rich functionality of a client/server

More information

CS 167 Final Exam Solutions

CS 167 Final Exam Solutions CS 167 Final Exam Solutions Spring 2018 Do all questions. 1. [20%] This question concerns a system employing a single (single-core) processor running a Unix-like operating system, in which interrupts are

More information

ORB Education Quality Teaching Resources

ORB Education Quality Teaching Resources JavaScript is one of the programming languages that make things happen in a web page. It is a fantastic way for students to get to grips with some of the basics of programming, whilst opening the door

More information

Objectives for this class meeting. 1. Conduct review of core concepts concerning contracts and pre/post conditions

Objectives for this class meeting. 1. Conduct review of core concepts concerning contracts and pre/post conditions CSE1720 Click to edit Master Week text 01, styles Lecture 02 Second level Third level Fourth level Fifth level Winter 2015! Thursday, Jan 8, 2015 1 Objectives for this class meeting 1. Conduct review of

More information

BMC Remedyforce Troubleshooting Document

BMC Remedyforce Troubleshooting Document Troubleshooting Document BMC Remedyforce Troubleshooting Document September 2015 Table of Contents 1.0 Salesforce Apex Governor Limits Overview 2 2.0 SOQL Queries Limits 3 3.0 Triggers and Order of Execution

More information

Comparative Study of JAVA & APEX. Neha Tyagi (PhD scholar), Dr. (Prof.) Ajay Rana. Amity University, Noida.

Comparative Study of JAVA & APEX. Neha Tyagi (PhD scholar), Dr. (Prof.) Ajay Rana. Amity University, Noida. 98 Comparative Study of JAVA & APEX Neha Tyagi (PhD scholar), Dr. (Prof.) Ajay Rana Amity University, Noida nehacs1988@gmail.com; ajay_rana@amity.edu Abstract C++, java and APEX all are object oriented

More information

Reliable programming

Reliable programming Reliable programming How to write programs that work Think about reliability during design and implementation Test systematically When things break, fix them correctly Make sure everything stays fixed

More information

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet. Mr G s Java Jive #2: Yo! Our First Program With this handout you ll write your first program, which we ll call Yo. Programs, Classes, and Objects, Oh My! People regularly refer to Java as a language that

More information

The compiler is spewing error messages.

The compiler is spewing error messages. Appendix B Debugging There are a few different kinds of errors that can occur in a program, and it is useful to distinguish between them in order to track them down more quickly. Compile-time errors are

More information

print statements, debugger expressions, test scripts. Writing expressions in a debugger only that t a program works now. An application typically

print statements, debugger expressions, test scripts. Writing expressions in a debugger only that t a program works now. An application typically JUnit testing Current practice print statements, debugger expressions, test scripts. Writing expressions in a debugger only that t a program works now. An application typically undergoes many changes over

More information

Case Study: Best Strategy To Rank Your Content On Google

Case Study: Best Strategy To Rank Your Content On Google Case Study: Best Strategy To Rank Your Content On Google SEOPressor Connect Presents: Case Study: Best Strategy To Rank Your Content On Google Copyright 2016 SEOPressor Connect All Rights Reserved 1 There

More information

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below.

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below. Graphing in Excel featuring Excel 2007 1 A spreadsheet can be a powerful tool for analyzing and graphing data, but it works completely differently from the graphing calculator that you re used to. If you

More information

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed. Preface Here are my online notes for my Algebra course that I teach here at Lamar University, although I have to admit that it s been years since I last taught this course. At this point in my career I

More information

the NXT-G programming environment

the NXT-G programming environment 2 the NXT-G programming environment This chapter takes a close look at the NXT-G programming environment and presents a few simple programs. The NXT-G programming environment is fairly complex, with lots

More information

How mobile is changing and what publishers need to do about it

How mobile is changing  and what publishers need to do about it How mobile is changing email and what publishers need to do about it BY ADESTRA The mobile channel has produced a culture of information on-demand. We can now view our emails as and when they come through

More information

THE AUDIENCE FOR THIS BOOK. 2 Ajax Construction Kit

THE AUDIENCE FOR THIS BOOK. 2 Ajax Construction Kit Introduction This whole book idea started as a bet I had with my editor that we couldn t pick two random techie topics and tie them together in a book. Two darts flew through the air and the topics Ajax

More information

Voice. The lost piece of the BYOD puzzle.

Voice. The lost piece of the BYOD puzzle. Voice. The lost piece of the BYOD puzzle. Contents What s wrong with BYOD? 3 The issue of intimacy 4 How voice got left out of the picture 5 Why voice will always be big for business 6 Introducing smartnumbers

More information

Assertions and Exceptions Lecture 11 Fall 2005

Assertions and Exceptions Lecture 11 Fall 2005 Assertions and Exceptions 6.170 Lecture 11 Fall 2005 10.1. Introduction In this lecture, we ll look at Java s exception mechanism. As always, we ll focus more on design issues than the details of the language,

More information

Chatter Answers Implementation Guide

Chatter Answers Implementation Guide Chatter Answers Implementation Guide Salesforce, Spring 16 @salesforcedocs Last updated: April 27, 2016 Copyright 2000 2016 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark

More information

Testing is a very big and important topic when it comes to software development. Testing has a number of aspects that need to be considered.

Testing is a very big and important topic when it comes to software development. Testing has a number of aspects that need to be considered. Testing Testing is a very big and important topic when it comes to software development. Testing has a number of aspects that need to be considered. System stability is the system going to crash or not?

More information

Voice. The lost piece of the BYOD puzzle.

Voice. The lost piece of the BYOD puzzle. Voice. The lost piece of the BYOD puzzle. Contents: What s wrong with BYOD? 3 The issue of intimacy 4 How voice got left out of the picture 5 Why voice will always be big for business 6 Introducing smartnumbers

More information

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology.

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. Guide to and Hi everybody! In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. This guide focuses on two of those symbols: and. These symbols represent concepts

More information

shortcut Tap into learning NOW! Visit for a complete list of Short Cuts. Your Short Cut to Knowledge

shortcut Tap into learning NOW! Visit  for a complete list of Short Cuts. Your Short Cut to Knowledge shortcut Your Short Cut to Knowledge The following is an excerpt from a Short Cut published by one of the Pearson Education imprints. Short Cuts are short, concise, PDF documents designed specifically

More information

It was a dark and stormy night. Seriously. There was a rain storm in Wisconsin, and the line noise dialing into the Unix machines was bad enough to

It was a dark and stormy night. Seriously. There was a rain storm in Wisconsin, and the line noise dialing into the Unix machines was bad enough to 1 2 It was a dark and stormy night. Seriously. There was a rain storm in Wisconsin, and the line noise dialing into the Unix machines was bad enough to keep putting garbage characters into the command

More information

Lecture Notes on Memory Layout

Lecture Notes on Memory Layout Lecture Notes on Memory Layout 15-122: Principles of Imperative Computation Frank Pfenning André Platzer Lecture 11 1 Introduction In order to understand how programs work, we can consider the functions,

More information

Crash Course in Modernization. A whitepaper from mrc

Crash Course in Modernization. A whitepaper from mrc Crash Course in Modernization A whitepaper from mrc Introduction Modernization is a confusing subject for one main reason: It isn t the same across the board. Different vendors sell different forms of

More information

Chatter Answers Implementation Guide

Chatter Answers Implementation Guide Chatter Answers Implementation Guide Salesforce, Summer 18 @salesforcedocs Last updated: July 26, 2018 Copyright 2000 2018 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark

More information

Fractions and their Equivalent Forms

Fractions and their Equivalent Forms Fractions Fractions and their Equivalent Forms Little kids use the concept of a fraction long before we ever formalize their knowledge in school. Watching little kids share a candy bar or a bottle of soda

More information

Securing Unix Filesystems - When Good Permissions Go Bad

Securing Unix Filesystems - When Good Permissions Go Bad Securing Unix Filesystems - When Good Permissions Go Bad Introduction Unix has a very elegant and flexible permission system at the heart of its filesystem security. These permissions allow and/or disallow

More information

Exceptions. Examples of code which shows the syntax and all that

Exceptions. Examples of code which shows the syntax and all that Exceptions Examples of code which shows the syntax and all that When a method might cause a checked exception So the main difference between checked and unchecked exceptions was that the compiler forces

More information

Test Driven Development (TDD)

Test Driven Development (TDD) Test Driven Development (TDD) Test Driven Development Introduction Good programmers write code, great programmers write tests Never, in the field of programming, have so many owed so much to so few - Martin

More information

MITOCW watch?v=9h6muyzjms0

MITOCW watch?v=9h6muyzjms0 MITOCW watch?v=9h6muyzjms0 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

Session Booklet Social Media & Facebook

Session Booklet Social Media & Facebook Session Booklet Social Media & Facebook Social networking refers to the use of online social networks such as Facebook to communicate with other people. A social network can include blogs and other ways

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

Here s how this whole external IRB thing works: A handbook for external IRB submissions

Here s how this whole external IRB thing works: A handbook for external IRB submissions Here s how this whole external IRB thing works: A handbook for external IRB submissions For all communication relating to external IRBs, call 414-219-7744 or email CentralIRB.Office@aurora.org. External

More information

Participants. Results & Recommendations. Summary of Findings from User Study Round 3. Overall. Dashboard

Participants. Results & Recommendations. Summary of Findings from User Study Round 3. Overall. Dashboard Summary of Findings from User Study Round 3 Participants 6 people total 4 Product users Jay Nicole Chris Nic 2 Non Product users Karine (QB ProAdvisor) Ellen (pilot test) Results & Recommendations Overall

More information