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 n Part of a list of projects:
Use CloudDeploy to deploy the API function to the Wolfram Cloud:
The deployed API function can be invoked by accessing the cloud object in a web browser and appending ?n=value to its URL:
Generating Project Ideas
To generate project ideas, a list of dos and things are formulated first:
Then all possible dos and things pairs are generated using Tuples:
Using StringJoin on any element from this list yields a new project idea:
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:
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:
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:
Finally, use CloudExport to generate and deploy the resulting animated GIF image: