Week 7: Creative Computation
May 17, 2024
Week 7
Welcome, one and all! This week I spent my time participating in an entire week-long coding course through Wolfram U called “Creative Computation.” I think these live sessions are doing wonders for my motivation, and I really hope to push myself to get a proper, satisfying result with their help.
Creative Computation
The class I attended this week, Creative Computation, is actually a new courser that Wolfram U is testing out- so technically I was participating in the experimental phase of the class. The goal of this class was to teach interactive content creation within Mathematica using the built-in software of the notebooks. Some functions that we could use in making a notebook viewer-interactive are Manipulate[]
and Dynamic[_]
.
Day 1
Day 1 of the class had us cover the basics of the Wolfram language, as this was supposed to be a beginner-friendly course. We learned about how to display shapes and alter the styling parameters of them, imported image manipulation like removing backgrounds and color key shifts, and using natural language input (giving an object in plain english that is then decoded into Wolfram language code/graphics automatically).
Day 2
Day 2 of the class we focused solely on string manipulation. Going back to last week’s blog post, this stuff involves really just finding specific patterns in words, and then splicing the whole text to create new text results. I did learn about the "__<>`x__`<>__"
functionality, which, when inserted into a string, tells Mathematica to keep that space open, then check later for anything corresponding to x__
and replace it with that inside the line before executing it as a string. This is a small detail, but something I can definitely see becoming useful in cutting down on code later down the line.
Day 3
On day 3, we spent the class talking about dataset creation and manipulation. Datasets are actually their own way of storing data, structured tables instead of just cobbled together bits of code. I didn’t know the difference between the two up to this point so I had never considered even using datasets for the project. Since the thought process behind datasets is a little different especially when it comes to feeding data into a classifier function, I’m not sure if it’s something I’ll invest too much more time looking into, but I definitely wish I knew about this stuff at the beginning of the project.
Day 4
Today’s class was the penultimate in the course, but it was basically the last one where we learned new content, finally touching on the idea of interactive notebook elements- the aspect of the course that caught my initial interest. I was familiar with the Manipulate[]
function previously, where it contains a changing display according to the rules that you put in (e.g. make a graph of y=1+x/z
from x=-5
to x=5
) and the variable that you want to change (z
in this case, probably as a slider). Here’s this Manipulate[] function in action. Here’s an example notebook with Manipulate[], made a little fancier. Dynamic[_]
is a little different in that all cases of Dynamic[_]
are, well, dynamic across the notebook, and auto-update to each other. This allows for more precise customization control with interactive content, as you’re basically able to format as you like as long as you know how to work with placing graphics and elements inside a notebook.
Conclusions
After taking this week-long course, I can definitely say I learned some nuances within the Wolfram language that will make my life easier going forward. I’m still on the lookout for a way to properly learn the full scope of string parsing and data extraction. This course instead focused more on a later aspect I’m hoping to work with, being the interactivity, so I think I need to take a small step back and focus on what’s most important for the project right now. Either way, it was a fun experience, and I’m glad I signed up for a multi-day class commitment like it!
Next week, I’ll discuss two other classes I’m planning on taking regarding other technical code-related aspects of Mathematica. Until then!
Alex R.
Reader Interactions
Comments
Leave a Reply
You must be logged in to post a comment.
Samantha G. says
Alex — this course sounds so interesting, and I am glad you have found an outside resource that supports your project. It can be nice to add some structure to the senior project days! I’m curious if this Wolfram language is the programming language you have been using throughout your project, and if not, does what you learned through this course still easily translate to your personal research? I would also love to hear about how you end up applying this new knowledge in the remaining weeks of your project. Keep up the great work!