JavaScript Rocks! Using Variables

Cover page for JavaScript Rocks! Using Variables tutorial.

I’ve just published a new programming tutorial as part of the JavaScript Rocks! series, Using Variables.

This interactive tutorial engages the student as they learn how to create and use variables in computer languages. It is designed for beginning web and programming programs.

Learning Objectives:

  • Give examples of every day objects that are used like variables.
  • Create a variable using the keyword var.
  • Initialize a variable using the assignment “=” operator.
  • List at least three data types recognized by JavaScript.
  • Describe when to use the keyword var as well as when that is redundant.

A case study and code walk through is included giving the students a sense of how variables are used. The case study involves a basic form and a feedback page showing the user’s input.


View the interactive preview here.

It is available now at Teachers Pay Teachers

Mindful in Janesville

This article was published in The Edge – April 2019 – The magazine for holistic living.

by Peter K. Johnson

The announcement read, “Winter Retreat – A New Year with a New Beginning with Life”. In the past, committing three days to meditation my mind would tell me it just didn’t “fit in my schedule”. However, this retreat caught my attention and I thought it might be a great way to start the New Year. I also invited my son to fly in from Tennessee to join me.

I wasn’t sure what to expect. I attend meditation classes most Monday nights and have been practicing meditation off and on for many years but this would be my first retreat experience.

The retreat was held at the Metta Meditation Center, twenty minutes from Mankato, in Janesville, Minnesota. The Center was originally run by Catholic nuns and was purchased in 2017 by Buddhist comunity. It faces west, looking across Lake Elysian, showcasing some amazing sunsets.

Sunset taken at Metta Meditation Center

After picking my son up at the airport, we arrived at the Center on Thursday night. My first surprise was the solar-powered Christmas lights blinking around the round stone entrance sign off of East Elysian Road. I might have missed the turn-off otherwise. Approaching the parking area a huge concrete cross glowed against the night sky. When I asked the residence they mentioned that people from all faiths still use the Center, and they keep the cross as a welcoming symbol.

Leaving our shoes at the door, a Buddhist custom, we quickly registered and hauled our stuff up to our rooms. The Center has several meeting rooms, a kitchen, a large dining area on one end and sleeping rooms on the other. Instead of room numbers, each room has a name. I stayed in Patience and my son stayed in Self-Esteem. The women in the group stayed in the rooms on the ground floor and the men upstairs.

View of Metta Meditation Center from the ice on Lake Elysian

That evening Sathi, one of the teachers who maintain the Center, outlined what we would be doing. The retreat focused on three main activities; sitting meditation, walking meditation, and mindful eating. In between were teachings and guided discussions. Sathi asked us to observe silence as much as possible and emphasized how the retreat was designed to give us a chance to explore and improve ourselves and learn how our mind works.

Afterward, we moved to the large meditation room and began the retreat with a 45-minute breathing meditation. Most of us used the large cushions, while others used the chairs. Then, off to bed at the early hour of 9:30 pm.

I woke hearing the sound of a Tibetan Singing Bowl. A quick glance at my phone told me it was 5:45am! I hadn’t seen that time of day in a long time. A bit groggy, I headed for the meditation room wondering how the day would fare.

First activity: Mindful Yoga. Sathi walked us through several basic exercises that residents use to keep their body fit for long hours of sitting meditation. With each pose we would take in a deep breath, hold it as we struck the pose, and then, let go (often with a strong ‘humpppfff’) as we released our breath. This was immediately followed by taking in another deep breath, holding it as we repeated the stretch. It was a great way to start the day; not too strenuous, just great stretches and lots of lung expansion. After this physical warmup, we began one of several sitting meditations for the day focusing on our breath.

Meditation area at the Metta Meditation Center

Breathing meditation is simple. All you have to do is focus on your breath. Breath in. (Notice the pause.) Breath out (Notice the pause). Sounds easy, right? The problem is our mind is a trickster. It sets up a constant chatter, distracting us with thoughts, emotions, and stories. After only a few breaths I catch my mind talking about something, making me completely lose the attention to my breathing. I wander off into the story my mind is telling, mesmerized. Suddenly, I become aware of my drifting and like a tightrope walker losing balance, a catch myself and start again. Breathe in. (Notice the pause.) Breathe out (Notice the pause). Breathe in. (Notice the pause.) Breathe out (Notice the pause).

When I first started meditating, I would be good for 2-3 breaths before I got distracted. Now, after much practice, I have a much better attention span (maybe… 10-15 breaths?). This directly translates into my daily life, keeping me much more focused and less distracted no matter what I am doing.

Sixty minutes later, with the soft ringing of the singing bowl, I open my eyes (mindfully), stretch my legs, and carefully stand. It is time for breakfast! We serve ourselves and sit at the table in silence waiting patiently as each person dishes up their plate.

Normally our teachers chants an ancient prayer in Pali (the language that Buddha used for his teachings) before they eat.

However, for the retreat, we read an English translation of this prayer as a group, and then dove head first into our first meal. Well, dove isn’t really the right word. it was more of easing into the first meal, and being greeted by vibrant flavors. Following Sathi’s breakfast introduction, we ate our meal mindfully, in silence, focusing on each bite. As my mother will tell you, I am a very fast eater. I had to teach myself to eat one bite at a time, not taking another bite until I had completely finished the first. I found it helped to set my fork down in between bites and close my eyes while chewing. Breakfast was vegan and absolutely delicious, probably more so because I was eating mindfully.

This is an amazing exercise, especially when eating with a dozen other people. We weren’t focused on each other, or conversation; only our food, one bite at a time. If people ate this mindfully when I cooked a meal I can only imagine how much better my meals would taste.

Walking path at Metta Meditation Center
Footsteps in snow walking into the sunset at Lake Elysian

After breakfast, we learned about walking meditation. The key is to walk slowly, focusing on each step. This can be done inside or out and is a great calming exercise. My feet wanted to race ahead until I noticed the other, more experienced participants, walking in slow motion. I reminded ‘myself’ (my mind) that I didn’t have anywhere to go, to just to focus on the walking.

Maple leaves in winter

Walking mindfully really makes me aware of my surroundings. When I drive 70 mph on a freeway, I hardly notice the countryside flashing past. This is great when I need to get somewhere fast. But, I’ve found that if I later cover some of those miles on a bicycle I notice a lot more details. Hiking that same route I notice even more. And, when I do walking meditation, even though I do not cover much distance, I not only discover details of my surroundings but have time to observe my mind and can patiently work to calm its endless chatter.

When I was ready, I mindfully walked toward the meditation room and sat down on the soft cushions for yet another quiet, peaceful breathing meditation session. Oh wait, I forgot to mention the roofers. A few months earlier a tornado had torn through the Center, bringing down 100-year-old trees. One of those trees collapsed the roof over one of the meeting rooms. With the warmer temperatures, the contractor was anxious to finish the roofing and they were making quite a bit of noise. But, I reasoned, this was a great opportunity to practice my focus despite real-life distractions. As I began my meditation the hammering began to have sort of a rhythm. Nice. That is until they dropped another bundle of shingles, seemingly right over the top of my head. My whole body would jump in alarm. “Okay,” I’d tell my mind, “let’s start again”. That was the longest but most interesting meditation of the entire retreat! It’s like the workmen knew when my mind began to wander, dropping a block of shingles at just the right instant giving me focus.

After a delicious vegan lunch with lots of variety and options, Sathi led a discussion on mindful eating, asking for our personal observations and adding commentary based on Buddha’s teachings.

That afternoon, with the sun streaming into the windows, Gina Gafford led us through an attention-getting yoga session. As we stretched and did our downward-dogs the sun began setting. By the end of the session, the room was dim and quiet in the twilight. With the group paying attention in silence, it was magical.

For the last meditation of the day, we did a Metta Meditation. Instead of a breathing meditation as we had been doing, Sathi guided us with the following intentions “May all living beings be well, be happy, be skillful, and peaceful.” Metta in Pali means loving-kindness, friendliness, goodwill, and active interest in others. This is where the Metta Meditation Center gets its name.

What did I gain from these three days? A lot. The first full day was tough. During the hour of free time, I called my wife who asked me if I had any “aha” moments. “No nothing,” I responded, “I don’t know what I’m doing here.” But, by Sunday, when it was time to leave, things had come together, and I wasn’t really ready to leave.

This was not a religious retreat. Although Sathi referred to Buddha’s teachings, the lessons were life lessons and fit well with most religions that I am familiar with. These lessons gave me a new way to think about things such as developing my own self-confidence, having compassion for others, and understanding how my mind works to gain greater attention and focus. Oh yes, and on mindful eating.

The retreat really helped calm the racing chatter in my mind. I find I focus better on whatever I am doing. I am more observant before I speak, and I feel calmer and more relaxed. After returning home I took my dog out for our customary walk. Instead of just walking the dog I now make a point to walk mindfully. It is a whole new and delightful experience for both me and my dog.

In the past, my meditation sittings never went longer than 25 minutes. I’ve now shown myself that I can sit, focusing on my breath, for much longer. I’ve also started practicing meditation each morning which is really a great way to start the day.

Right now as I write this I’m in a busy waiting room with the background music playing over the top of a loud daytime TV show. Before attending the retreat, these things would have distracted me beyond irritation. But, since attending the retreat, I can now observe these things and just let them go, focusing on my writing. This is very cool.

How did my son do? As I took him to the airport we made up for our few days of near silence, reflecting on our weekend together and how this experience translates into our own day to day routines. Since his return home I notice that his approach to himself, his family, and his business has shifted slightly. I see him using the tools we learned approaching problems and issues with a clear mind, not getting caught up in the emotions of the moment. We are both very glad that we took advantage of this opportunity together.

Parson Problems for Interactive Assessment

Example of a Parson Problem

In his blog, Mark Guzdial highlights Parson’s Problems offer the same learning gains as writing or fixing code. Mark highlights how useful Parson’s Problems can be for interactive learning modules.

Not Just Computer Science

The article emphasizes how useful Parson Problems can be for computer science. Many other fields use this same type of learning instruction. For example, a healthcare module might use this technique to ensure students learn specific steps for procedures like taking a person’s blood pressure or drawing blood.

Increasing the Challenge with Distractors

To increase the challenge to students, add distractors. Instead of one-to-one answers, add extra items not critical to the process.

Try a Parson Problem Yourself!

Here is a sample Parson Puzzle. Students can check their learning after finishing the tutorial on using CSS Flexbox.  The tutorial shows the code with examples. This puzzle summarizes the content midway through the tutorial. Notice the distractors.

You may not be familiar with Flexbox coding, so here is a screenshot of the correct order 😉

Flexbox answer to Parson ProblemFor more details, read the original study, Parson’s Programming Puzzles: A Fun and Effective Learning Tool for First Programming Courses by Dale Parsons and Patricia Haden.

This sample Parson Puzzle was created using Articulate Storyline 360.

Articulate Storyline 360 – Highlights

I use Articulate Storyline 360 with Amanda Bell, another instructional designer. This is the newest version of Articulate. The software is now more cloud-based and it is very well designed.

I thought it would be helpful to others to see a list of the features that Amanda and I really appreciate and use on a regular basis.

 


 

Articulate Storyline Tools

  • Allows fast development with a very professional look and feel.
  • Everything is responsive automatically, works on all devices
  • Three development tools for different levels of development:
    • Basic: Studio 360 Converts Powerpoint to a stand-alone tutorial
    • Intermediate: Rise – Quick module development
    • Advanced: Storyline 360 – a detailed development environment for very interactive and branching tutorials. Interactive slides created in 360 can easily be included inside of a Rise module.

The interface between all these tools is very consistent and fluid.

 

Other Development Tools

  • Peek – Records screencasts similar to Camtasia and Storyline 360 has this feature built-in.
  • Publishing a course involves the click of a single button and finished modules run on any device.
  • Content Library
    • Contains 1,000’s of public domain images, with instant search and automatic accreditation to the copyright owners
    • Hundreds of characters, each having 20+ different poses and expressions – a click away. A wide diversity of people and occupations are represented. This collection is continually growing.
    • Images, illustrations, and icon are immediately available for all types of training situations
    • Templates for quizzes, click and drag, scenarios, and whole presentations. For everything. These are very professional looking and designed to be customized with any content.
    • Modern Fonts – Nine built into Rise and Articulate 360 with the ability to add custom fonts making font choice unlimited.
  • Articulate Review allows detailed collaboration between developers and stakeholders with version control.
  • Text-to-Speech is built in – Blocks of onscreen text can be immediately converted to voice and can be used to match various character avatars. This is a vast improvement over separately recording individual voice-overs and maintaining all those sound files. The speech is life-like.
  • Video Enhancement with Q/A Options Any video included in a module can automatically include questions throughout, making them much more interactive.
  • Interactive Tutorials from Screencasts A screencast demonstration can be automatically converted into a step-by-step simulation with the click of a button.

 

The Articulate Storyline Community

  • Articulate has a huge community of thousands of active eLearning developers.
  • The ability for course developers (and stakeholders) to work together using the Articulate Review.
  • Very extensive online tutorials and training.
    • These are short and concise (less than 5 minutes).
    • Weekly emails with examples and tutorials from Articulate and other developers.
    • Regular challenges published showing how other developers solve eLearning problems.
    • Articulate Live – Live webinars with eLearning experts. New ones available every few days.

 

Use Articulate Storyline to Increase Student Interaction

  • Easy-to-implement branching with feedback based on student’s decisions
  • Easy-to-implement click-and-drag screens with a wide variety of templates to build on.
  • Interactive objects including buttons, sliders, dials, hotspots, input, and click markers
  • Gamification easy to set up using Articulate templates
  • Scenarios, timelines, process, tabs, and related content can all be built using existing templates.

 

Use Articulate Storyline to Assess Student Learning

  • Multiple templates for self-grading quizzes for fast development
  • Ability to add assessment questions inside of videos
  • Link graded quizzes to an LMS
  • Controlled questions for branching
  • Customize feedback for each student interaction.

The Articulate ecosystem allows the developer to focus on the content, not on the mechanizations.

 


 

If you have access to Storyline 360, check out the automated step-by-step tutorials that you can easily make from screen capture videos. Here is a three-part tutorial showing all the details. https://community.articulate.com/series/107/articles/articulate-storyline-360-tutorial-how-to-create-interactive-simulations

Battleship: Waterfall Design vs. Agile

The classic game of Battleship has been repurposed to demonstrate the effectiveness of agile methods.

Mark Suurmond has created a simulation, available on GitHub, that allows programmers and students to experience the difference between the waterfall design process and the agile process.

When the simulation first displays it is set to 40 iterations.  The player has to guess where on the board the ships are located, but doesn’t find out until the last attempt is finished.

There is some success, but also a lot of wasted effort, much like we often experience when developing a project using the waterfall method.

 On the second trial, the programmer gets feedback after every attempt. This would be like having the client at your side each time you wrote a bit of code. The finished product is much more “on target”, much like we experience when using agile methods.

The third and fourth trial is run, getting feedback every 5 iterations, and then every 10. Running this simulation the programmer can gain an appreciation of constant feedback vs. getting regular feedback after multiple iterations. It isn’t always possible to meet after every programming decision is made.

Here is a guide so you can implement this with your own students or programming team: lab: Battleship Waterfall vs. Agile


Photo courtesy of Wikipedia. US Navy 100530-N-2798F-011 Aviation Ordnanceman Airman Justin Stout and Aviation Electronics Technician Airman Anthony Bertolino spend their break playing the game Battleship aboard the Nimitz-class aircraft carrier USS Harry S.jpg

 

Experience Agile – The Ballpoint Game

It is one thing to read about the agile processes and quite another to experience them.

This face-to-face activity quickly demonstrates how effective the iterative process can be.

The Challenge: As a team, the group must “process” as many balls as possible following specific rules. The group has four opportunities with a ‘SCRUM’ meeting in between each and a fifth “Grand Challenge” at the end.

The Results: The first time I directed this activity the team processed 15 balls during the first iteration and 88 balls in the Grand Challenge. They all experienced problem-solving, flow, and cooperation and had fun at the same time.

Reflection: The activity ends asking the group these questions:

  • How does this relate to agile code development?
  • What does this mean? “Every system has its own velocity.”
  • Flow is being totally focused and losing track of time. Did you experience this during this exercise?
  • How does that relate to other experiences such as programming or gaming?

Here is a PDF presentation you can use to implement this activity: labProcessFlow – The Ballpoint Game

Here is a video showing one team in the first iteration of the game:
You can purchase a bag of 100 plastic balls from Amazon for around $20: https://www.amazon.com/gp/product/B01LX7BAK6/ref=oh_aui_detailpage_o05_s00?ie=UTF8&psc=1