5g: Distribution
Description
This section explains how to distribute 5g functions to others.
Learning Objectives
At the end of this section, learners will know:
How to package 5g functions into modules
What a GitHub Gist is.
How to import 5g modules from GitHub Gists
How to get a GitHub account and setup a Gist
How to save and update a 5g module in a GitHub Gist
Prerequisites
Before starting, watch this video to gain an understanding of the various ways end users can import our functions into their workbooks.
Discussion
The whole purpose of 5g is to provide functions for others to use; thus, how we get our functions to those users, some of whom we have never had any contact with, is important.
Packaging 5g Functions
We can distribute just one function at a time or we can improve our efficiency by grouping related functions into a module (aka library) and distributing them as a package. How we group our functions should make sense to the end user. An example of how we might group functions can be found in how Excel groups its functions. Excel groups functions by: Financial, Logical, Text, Date & Time, Lookup & Reference, Math & Trig, etc. BXL has chosen to group its 5g functions as functions that deal with arrays in general (Summing array rows and columns), functions that deal with dates (timelines and scheduling), and functions for financial modeling in general (corkscrews and depreciation).
Once we have decided on which functions are related, we can use Microsoft's free Advanced Formula Environment add-in (AFE) to create a module (see gif at right) and copy/paste our functions into it. We can name the module anything we want but the name we use in AFE will not carry into GitHub.
What is GitHub?
GitHub is Microsoft's free online implementation of the open-source version control system known as Git. Git is intended for large scale, collaborative projects; however, Microsoft set aside a section dedicated to small projects. That section is called Gist. A 5g function module classifies as a small project and Microsoft's Advanced Formula Environment (AFE) is designed to easily import LAMBDA's stored in a Gist into Excel. This makes GitHub Gist the ideal place to store and distribute 5g functions.
How do I get a free GitHub account?
The video below shows the process for creating a GitHub account
For those who do not want to watch videos, the process is:
Go to GitHub.com
Click, "Sign up."
Enter your email address.
Enter a password.
Enter a user name and click, "continue".
Click, "Audio."
Click, "play" and listen to the audio prompt.
Answer the question asked in the audio prompt then click, "done."
GitHub will send a code to your email account.
Enter the code where prompted to.
To get the free account, select, "Just Me" then click, "Continue".
Click, "Continue" again.
Click, "Continue for free."
Name your GitHub repository. This repository will contain all of your Gists.
Select, "Public" then click, "Create a new repository."
Enter, "gist.GitHub.Com" in our browser's address bar.
Where prompted to, enter a description that users can search for to find our module.
Where prompted, enter a file name.
Copy our module from the AFE and paste it into our Gist.
If we want our module searchable by other people, click "Create public gist".
How do I save my 5g module in my new Gist?
After getting our account, GitHub Gist displays an empty file editor. Leave it open and
Switch to your Excel workbook.
Launch the AFE.
Open the module.
Select everything and copy it.
Go to back to the browser and paste what we just copied into our Gist.
Give it a description and a file name.
If we want our module searchable by other people, click "Create public gist".
Summary
GitHub Gist provides the perfect way to store and distribute our functions. We can make our Gists public if we want to give them away, or we can make them private so the only way to find our gist is through a marketplace like Eloquens.com.