HOW IT WORKS

Powered by the Wolfram Language and the Wolfram Cloud

Hackathon Project Generator is a showcase of two functions—CloudDeploy and APIFunction—from the 5,000 that are built into the Wolfram Language.

Based on more than 25 years of development, the Wolfram Language is a unique new high-level computer language that builds in as much computational knowledge about algorithms and the world as possible.

APIFunction in the Wolfram Language

The Wolfram Language has built-in capabilities for creating and deploying APIs on the web and elsewhere. Use APIFunction to define the parameters and function to execute for the API, and CloudDeploy to deploy it as an active API on the web.

Here is an API function with one “Integer” parameter, named n, that gives the nHowItWorks_1.png Part of a list of projects:

HowItWorks_2.gif

Use CloudDeploy to deploy the API function to the Wolfram Cloud:

HowItWorks_3.gif

HowItWorks_4.gif

The deployed API function can be invoked by accessing the cloud object in a web browser and appending ?n=value to its URL:

HowItWorks_5.gif

Generating Project Ideas

To generate project ideas, a list of dos and things are formulated first:

HowItWorks_6.gif

HowItWorks_7.gif

Then all possible dos and things pairs are generated using Tuples:

HowItWorks_8.gif

HowItWorks_9.gif

Using StringJoin on any element from this list yields a new project idea:

HowItWorks_10.gif

HowItWorks_11.gif

Deploying to the Web

The Wolfram Language supports highly automated web deployment based on the Wolfram Cloud and Wolfram Private Clouds. The following is all it takes to deploy a formatted APIFunction to the Wolfram Cloud. The result format is set to be an “HTML” using ExportForm, and it is styled as a Column with a Hyperlink pointing to another random idea:

HowItWorks_12.gif

HowItWorks_13.gif

HowItWorks_14.gif

HowItWorks_15.gif   

HowItWorks_16.gif

Working with HTML Templates

The full-production Hackathon Project Generator site uses additional web assets, inserted using the Wolfram Language’s powerful symbolic templating framework that can be used with strings, files, XML-like structures, notebooks, and other constructs. The FileTemplate used by Hackathon Project Generator returns an HTML page with all the elements it contains evaluated by TemplateApply:

HowItWorks_17.gif

HowItWorks_18.gif

HowItWorks_19.gif

HowItWorks_20.gif

HowItWorks_21.gif

HowItWorks_22.gif

Making the Slot Machine Spin Effect

One way to add a spin effect is to convert the ideas to images and Blur them in the vertical dimension:

HowItWorks_23.gif

HowItWorks_24.gif

HowItWorks_25.gif

HowItWorks_26.gif

Finally, use CloudExport to generate and deploy the resulting animated GIF image:

HowItWorks_27.gif

HowItWorks_28.gif