Computer-Based Maths (CBM)
Case Study in the Cloud

Gerli Jõgeva, Wolfram Research

Abstract

CBM has long leveraged the power of Wolfram Notebooks and packages to deliver a beautiful, engaging experience in teaching and learning maths. Our main delivery method involves packaging up a selection of notebooks, code and resource files in an installer that can be run on the user machine for use with pre-installed Mathematica or Wolfram Player. We are now also prototyping a delivery version based in the Wolfram Cloud that requires no installation except for a browser. This talk will give an overview of the methods we used to make all our materials work just as well in the cloud as they do on the desktop.

Computer-Based Maths (CBM)

Principles:

use computer to do the calculating, student to do the thinking

more like real-life maths

Example questions that our modules answer:

How happy are people in my country?

Should I insure my laptop?

Will it rain tomorrow?

How fast could I cycle stage 7 of the An Post Rás?

CBM components

Desktop client

Try it out: computerbasedmath.org/download-module

All driven by Mathematica (or CDF Player), structured as a paclet that includes:

Notebooks (CDFs)

Custom stylesheet

Package files

Image and data resources

(RowDefault)

File layout

Files are organised as an add-on application

FindFile["CBM`"]

({{}, {}, {}, {}, {}, {"AmINormal.m"}, {"AreGirlsBetterAtMaths.m"}, {"CauseOrCorrelation.m"}, {"CBMConfiguration.m"}, {"CollaborationClient.m"}, {"Common.m"}, {".CreationID"}, {"DoIKnowWhatIDontKnow.m"}, {"HowCanIConvinceYou.m"}, {"..."}})

Why?

Easy to locate and load necessary code files

No dynamic content warnings since on trusted path ($BaseDirectory/Applications)

Bonus: creates item in Palettes menu

Server

A stack of various technologies:

Mathematica

CollaborationServer package

DatabaseLink (bundled with Mathematica)

MySQL database

webMathematica

Apache Tomcat

Linux server

Client calls the server using URLExecute on a .jsp file.

Cloud client (preview)

Try it out: wolfr.am/cbmcloudpreview

Going from desktop to cloud

General differences

No single entry

Nothing is pre-installed

No assumptions can be made

Necessary code has to be pulled in live

File location not guaranteed

Can’t use relative paths

Going from desktop to cloud

Specifics

Loading the paclet

Desktop

Get["CBM`"];
Get["CBM`AreGirlsBetterAtMaths`"];

Cloud

File here: init.m

Get["https://www.wolframcloud.com/obj/gerli/CBM/Kernel/init.m"];
Get["https://www.wolframcloud.com/obj/gerli/CBM/AreGirlsBetterAtMaths.m"];

Note: not using CloudObjects

Independent of $CloudBase setting

Code file permissions:

Permissions->{All->{"Read","Execute"}}

Setting up proper permissions

Using product view

User creates a local copy

Code editing and evaluation

AutoCopy

Only copies the notebook file itself, no dependencies

Making all files / content autoloadable

Embedding the stylesheet

Using direct URLs:

Code files

Images and other live resources

Linked notebooks

Note: works also when notebook is downloaded

Things that Just Work™

Slide shows

FrontEndTokens

Used for scrolling between pages

Docked cells

Dialogs

Summary

Computer-Based Maths (CBM)

Example content

Desktop:  computerbasedmath.org/download-module

Cloud: wolfr.am/cbmcloudpreview

Updates

Twitter: @computermath (more content is coming)