Sabbatical Progress Aug. 24th

Today was the first official day of progress on my Fall semester sabbatical. Unofficially, I started in on my plans late in the summer after finishing teaching summer camp and an online course.

My primary goal for the sabbatical is to sharpen the spearpoint on my cobbled-together-over-the-years scripting/coding/programming/automation skills. Until now, I’ve dabbled in HTML, CSS, PHP, MySQL, LSL, Javascript, Python, VBasic (haha), bash scripting, and C#. Today I now have the time and space to unlearn my bad coding habits and hammer in smarter ones. I know that only NASA writes perfect code. But, *any* code is better than the almost completely analog skills I and my peers use for our research.

Today’s goal: the What
Today’s task was to read through W3Schools course content on Javascript from here to here with a close eye for detail and correctness.

The Why
I chose javascript on purpose as a non-heavy lifter language so that I’d learn best practices without focusing on the quirks of any particular language.

The How
Went through start to finish. Worked the simple little interactive exercises. Pleased to find I actually found a few new-to-me things. Mostly the data and time handling, but that’ll be pretty handy on simulation modeling.

Then I skipped ahead and delved into HTML5 multithreading (web workers) and built a simple little dynamic stochastic discrete event simulation model replicating a game scenario running in my browser. It worked beautifully multithreading up to 4 threads, managing their spawning, and running simple monovariate statistics on their results across a thousand model runs. In the Real World, I’ll use a more science-appropriate language like Python and its endless handy extensions like SciPy and NumPy.

Tomorrow I’ll go back and work properly through JS arrays and objects. I can already see they’re going to be incredibly useful when used properly instead of the shoehorning I’ve done so far.


Posted

in

by

Tags: