Kids, Code, and Computer Science
e v e i l e B t ' n o ! W s u e y Yo E r u o Y “In the Middle" The Surprising History of Virtual Reality
Put Some Color In Your Code
December 2019
$6.00 $6.00 USD
Create a Space Race Game Keep That New Computer Safe
beanz magazine December 2019: Volume 7 Issue 3 Issue 44 (online) & 30 (print) ISSN: 2573-3966 (online) ISSN: 2573-3958 (print) beanz Magazine© is published bi-monthly, six times a year, online at http://beanzmag.com and in print. A print + online magazine subscription includes online access to all articles, with links to let you explore topics in more detail. SUBSCRIBE: visit http://beanzmag. com/subscribe or email us for checks/ invoices. We’re also available through EBSCO, Discount Magazine, WT Cox, Magazine PTP, and many other subscription services. ONLINE MAGAZINE ACCESS: send your email address to hello@beanzmag.com and we’ll set you up. Published by Owl Hill Media, LLC 378 Eastwood Rd, Woodmere, NY 11598 Email: hello@beanzmag.com Phone: (646) 553-3390 POSTMASTER: Send address changes to Owl Hill Media, LLC, 378 Eastwood Rd, Woodmere, NY 11598. Periodicals postage paid at Woodmere, NY and other mailing offices Copyright Owl Hill Media, LLC with all rights reserved except as noted. Images are copyrighted by their creators, as noted with each story both online and in print. Publisher/Editor/Webmaster: Tim Slavin Staff Writers: Amy S. Hansen, Simon Batt, Patricia Foster, Bonnie Roskes, Clarissa Littler, Jennifer Newell, Les Pounder, Paul Seal, Erin Winnick, Tim Slavin Contributors: David Dodge, Jay Silver, Jeremy Kubica, Colleen Graves, Daniel Fenjves, Ali Hagen, Emeline Swanson, Jean-Francois Nguyen, Madeleine Slavin, Tim McGuigan Back Office Magic: Wendy Garrison Copy Editors: Eileen Seiler Art Director: Kelley Lanuto Webmistress: Patricia Foster COVER IMAGE: URIEL SOBERANES, UNSPLASH, AND IVAN SUTHERLAND, AFIPS PUBLICATION
Publisher’s Note Happy holidays! This issue is everything I love about computing and software programming: lots of different things to learn, from the serious to the wacky. And I’m not talking only about the funny speech bubbles you’ll find inside, the talking cows, giraffes, loris, and a rare appearance by Charles Dickens. Did you know, for example, barbed wire was used to create telephone networks in the rural US in the late 1800s? Or what a Slow Loris attack is? Or how to create a rainbow with Python? Or the history of virtual reality? Or how to search online if you have a research paper or want to learn more about a topic? Plus our interview with Taylor Denise Richardson, aka Astronaut Starbright. All of this of this and so much more is inside. One story that might interest readers, especially shy creative types, is about visual storytelling apps. They work great for individuals and in a classroom. The apps organize photos, videos, and text to tell stories. Stories could be one second of your life every day or unstructured where you come up with the photos and a story. But don’t worry, we also have ideas about how to tell stories. December always is a good month to celebrate what we’ve done for the year and look forward to what we might want to accomplish in the new year. Hope you’ve had a good year and thank you for letting us be a part of it!
Tim Slavin Publisher beanz Magazine beanz magazine (as Kids, Code, and Computer Science magazine, our earlier title) is a winner of Parents’ Choice, Tillywig, and Academics’ Choice awards: http://beanzmag.com/awards
Our Mission beanz magazine is a bi-monthly online and print magazine about learning to code, computer science, and how we use technology in our daily lives. The magazine includes hard-to-find information, for example, a list of 40+ programming languages for education, coding schools, summer tech camps, and more. While the magazine is written to help kids ages 8 and older learn about programming and computer science, many readers and subscribers are parents, teachers, and librarians who use the articles to learn alongside their young kids, students, or library patrons. The magazine strives to provide easy to understand how-to information, with a bit of quirky fun. Subscribers support the magazine. There is no advertising to distract readers. The magazine explores these topics: Basics of programming and where to learn more, Problem solving and collaboration, Mathematical foundations of computing and computer science, Computational thinking, Recognizing and selecting computer devices, and the Community, global, and ethical impacts of technology.
December 2019
Cover Story
Programming Python's Rainbow
5 6 8 10 12 16 18
14
Cover Story In the Middle The History of Virtual Reality
Projects Coding Critters Security Cover Story Secure That New Computer! Security "Who Ya Callin' Slow?" SketchUp SketchUp a Bird House Notebook Storytelling Has Come a Long Way Programming Don't Forget the Star! Best Practices Research. The "R" Word
tidbitz
27 Bet You Didn't Egg-spect This! 27 Me-yowsa! 27 Under the Milky Way Tonight
20 21 22 24 26 28
History Right Down the Line Profiles Astronaut StarBright History The Wayback Machine Scratch Cover Story Space Race Concepts Pair Programming Parents and Teachers Teaching the Basics of AI
cool beanz! "I subscribed to Beanz last year and I just renewed. In every issue I can always find a great programming or electronics activity. I share these with my students who finish their work early and are looking for an interesting activity to try." Jim Kasprzak, computer science teacher We want to hear from you! Look here and online for your fellow beanz-ers and all the cool things they do. Send your thoughts about beanz, ideas, art, photos of projects, poems, whatever, to cool@beanzmag.com.
contents
advanced
intermediate
beginner
2
scribe b u s / m ag.co m z n a e b http://
Programming
2
BY PATRICIA FOSTER
Python's Rainbow
Coding might sound all serious and important, but it’s possible to have some fun with it, as well. For example, when code is typed in an editor, it is usually white text on a black background. (Not very exciting.) What if we changed the text to the colors of the rainbow? Let’s try it and see what happens. The Termcolor Library
Open up a browser and navigate to www.repl.it/languages/python3. On the left hand, you’ll see your editor. On the right side is the console, where the results of the code are printed.
Start by importing the “colored” function from Python’s “termcolor” library. This function takes two arguments: the text you want to print, and a string describing the color of the text. from termcolor import colored text = colored("Hello world", "green") print(text) Try it out by pressing the green “run” button at the top of the screen. You may notice a paragraph of white text appearing in the console—that’s just the website tracking its installation of the termcolor library. Nothing to worry about! As long as your green “Hello world” text appears, your code is running fine. The next step in our code is creating a list of all possible colors, in the order they appear in the rainbow. (Termcolor’s palette is pretty limited— nothing fancy like indigo or light fuchsia.) colors = ['red', 'yellow', 'green', 'cyan', 'blue', 'magenta'] NOTE: for Python, you can use either single or double quotes for strings, as long as you open and close with the same one. The result is a bit of a strange rainbow—cyan and magenta, but no purple or yellow. Let’s see how it looks printed out. To efficiently display our
JESSE GARDNER, UNSPLASH
3
colors, we’ll use a structure called a for each loop. Double check that every open bracket has a closing bracket, and that your function arguments are properly nested. for color in colors: print(colored('X', color)) print() The loop goes through each color in the array, one at a time, first to last, and, each time, it runs the “print” statement with the current selected color. Since we have six elements in the array we run the loop six times. If you want to print in a row instead of a column, add a second argument to your print function to specify that you don’t want to start a new line after the colorful ‘X’. Make sure to add the argument to the print function—not the colored function—between the two closing brackets. from termcolor import colored colors = ['red', 'yellow', 'green', 'cyan', 'blue', 'magenta'] for color in colors: print(colored('X', color), end="") print() Making the Rainbow Arc
Now that we’ve got our colors, let’s spread them out into a full rainbow. To make things simple, our rainbow will be drawn sideways. Start by printing out six identical rows of colored Xs using a nested for loop: for n in range(len(colors)): for color in colors: print(colored('X', color), end="") print() The inner loop prints a single row. Since len(colors) — the length of the color array — is 6, the outer loop runs six times, one for each individual row. To make this into an arc, we need each row to start a little further away than the previous one. We can achieve this by adding spaces to the front of each line. Since the number of spaces increases with each row, we can use our “n” variable. On the first row, n = 0, and then on the next run n = 1, all the way to n = 5. Perfect! for n in range(len(colors)): print(" " * n, end="") # print n spaces for color in colors: print(colored('X', color), end="") print()
4
Notice how the line that prints spaces is inside the outer loop, but not the inner one. The inner loop prints all six colors in a row, and we don’t want any pesky spaces getting between our pretty rainbow! What would happen if we put the print statement in the wrong space? Typically, the outside of the rainbow is red, and the inside is purple. To achieve this in our code, we could rewrite the “colors” array to go in the opposite order. Luckily, a simpler solution exists. The “reverse” function creates a flipped array without modifying the original copy. Let’s sneak it into our code: for n in range(len(colors)): print(" " * n, end="") # print n spaces for color in reversed(colors): print(colored('X', color), end="") print() To finish the rainbow, we want it to arc back downwards. Copy-paste the top block of code into your editor. All we need to change in the second block is the way spaces are printed — they should decrease instead of increasing. So instead of 0, 1, 2, 3, 4, 5, we want 5, 4, 3, 2, 1, 0. To achieve this, simply switch “n” for (5-n). As “n” gets bigger, the resulting subtraction gets smaller, and just like that, we have our rainbow! While printing colors is pretty and fun, they have a practical application as well. Console output is often used for debugging. By displaying the value of variables, programmers can see if their code is working the way they want. For programs with long outputs, colors can be used to code different types of errors, making them pop out from the rest of the display. In the meantime, what cool pictures can you create with your newfound color skills? b
Have you met my friend Roy G. Biv?
Have you ever wanted to program your pet? Well, now you can! Coding Critters robots were released by the STEM company, Learning Resources, known for their line of award-winning, screen-free, coding robots. You can now program Ranger the Dog, Scamper the Cat and Rumble the Dinosaur. Coding Critters seem similar to Code & Go Robot Mouse, but the Critters take the programming experience even further. Each of these robots comes with storybook coding challenges that kids can complete. Robots also come with their own accessories that become part of the coding adventures. Each robot comes with toys, homes, landscape and best of all, their own play dates (Zip the Puppy, Sneaker the Kitten and Bumble the Baby Dino). Like all coding projects, before we can jump into programing our Critters, we need a plan. Step 1: Create an algorithm
We can plan our movement by developing an algorithm (stepby-step instructions) first. To
increase our accuracy, it will help to measure how many inches a Coding Critter can move in one step (jot that number down!). If we want Scamper the Cat to reach his friend Sneaker, measure the distance in inches between Scamper and Sneaker and then estimate how many steps Scamper will need to move to reach his target. It can be helpful to create a grid map that is split into inches for your robot to travel on. Once we know how many steps Scamper needs to take, we have our algorithm. Step 2: Develop code
Next we have to translate the algorithms into a language the robots will understand, which is called code. Each Coding Critter comes with a pack of coding cards. The coding cards have symbols on them that show the direction the robot can move (forward, backward, left and right). We can turn the algorithm into code by selecting the coding cards that represent the steps the robot must take to reach its target. For example, if we want Scamper to
move five steps forward and two right turns, we would select five forward and two right turn coding cards and lay them out. It helps to visually see the code on cards, especially when the programs get more complicated. Step 3: Input the program
Last, we have to input our programs, which are the sequence of steps laid out in the coding cards. We input the sequence in the program by pushing the directional buttons on the robot. When the program is inputted, it’s time to run the program by pushing the round GO button. Learn More:
Go online to get free copies of the coding storybooks, coding cards, coding activities and even Certificates of Adoption! Coding Critters Storybooks and Pet Certificates (click on Instructions & Guides): https:// www.learningresources.com/ coding-critters-cat Printable coding cards, coding activities and lesson plans: http://blog.learningresources. com/category/printable-fun/ b
IMAGE FROM LEARNINGRESOURCES.COM
5
Projects
Coding Critters BY BIANCA RIVERA
Security
6
BY SIMON BATT
The holidays are almost here. And, maybe—if you wish really hard—there’ll be a new laptop or computer wrapped up with your name on it. While it’s tempting to jump right in to using it, remember to be patient and set up your computer properly. When get your PC or laptop up and running, the first thing you need to do is check for updates. Your computer may feel new to you, but it may have been sitting on the store shelves for weeks or months. During that time, the company that made your computer has released updates to help protect against new forms of attack. Even though your computer is new, it has been asleep and unable to receive these updates—until you powered it up. When you turn it on and connect it to the internet for the first time, the computer will “catch up” on all the updates it missed and will ask you to download them. Be sure to let your computer do this. This will cover the security problems on your computer so it’s ready to go. But hold on a minute. You are not ready yet. Your operating system needs updates, too. Much like your computer, the operating system can contains flaws that can work against you. So, when you boot up your operating system, it will ask you to do updates. Get this done before you do anything else. Once all the updates are downloaded and installed, it’s time to think about an antivirus. These days, computers come with an antivirus running right-away. Sometimes this is the system’s default antivirus solution, and sometimes this is a trial antivirus that expires after a month or so.
It's a good idea to understand which type of anti-virus program is protecting your computer. If you’re not sure about what’s protecting your computer, or you have a trial antivirus that expires unless you pay monthly, you can download a free antivirus to protect you. Don’t worry; even though they’re free, there are some topquality options to help you out. Programs such as Avast, AVG, and Kaspersky Free are all good choices.
t a h T e r u c o e C S w e N You’re almost there. Once the computer and operating system have been updated, you need to update your drivers. A driver is a special kind of software that tells your computer how to use the hardware plugged into it. These receive updates as the people who produce the hardware learn how to make their products work even better with your PC. Many computer manufacturers have a page that lists all the drivers for your system; if not, you can look up the drivers by searching for the name of your hardware online. Once you’ve done these tasks, you’re free to use your computer as you wish. It may seem like a hassle, but a virus during the holidays is definitely something you want to avoid! b
om
7
! r e t u p
MARCO VERCH, FLICKR
Security
8
“Who Ya Callin'
BY PATRICIA FOSTER
A slow loris is a tiny, fuzzy primate with adorable giant eyes— and venomous saliva! Like its namesake, the Slowloris computer attack is slow and sneaky, with a nasty bite. It’s one of many kinds of denial-of-service (DoS) attacks. What's a Denial Of Service attack?
A traditional DoS attack shuts down a server by spamming it with so much data that the server crashes, or becomes too overwhelmed to respond to legitimate clients. Picture the server as a fast-food restaurant: people line up, order food, and leave. When you visit a website, you’re placing an order. You request data and the server asks you questions in a back and forth conversation until you finish your requests. Like a restaurant, a server has limited capacity. In this case, the precious resource is bandwidth, the amount of data that can be sent per second. Every internet connection, including your own, comes with its own limited bandwidth, which is why it takes longer to download large videos than small text webpages Obviously, it’s easier to overwhelm a small mom & pop shop than a giant chain restaurant. The capacity to do a DoS attack is also limited by bandwidth, the number of fake clients and requests you can make. Back to the Slow Loris
Unlike a DoS attack, the Slowloris uses finesse over brute force. Most websites use the TCP protocol. When they take a client’s
request, they make a dedicated connection and keep it active until the client confirms that they’re done. It’s like a phone call, where you can only talk to one person at a time. To end a TCP connection, the server must receive a particular set of characters, such as two newline characters. Most TCP connections also have a timeout. If they don’t receive any data in a specified time frame they close the connection. Since websites must create a new TCP socket for each client, there’s a limited number of connections they can make. A Slowloris attack never sends those two newline characters. Instead, the TCP connection is kept alive, and just before it times out, a tiny piece of data is sent to prevent it from closing. It’s the network equivalent of poking someone just before they drift off to sleep. And if all the TCP sockets are engaged, any legitimate clients are prevented from connecting. Additionally, a Slowloris attack uses barely any bandwidth, unlike a DoS attack. Going back to the restaurant analogy, instead of sending bunches of fake clients, the Slowloris only sends a handful. But these clients are slow. They take so long deciding on their order, all the customers behind them give up and leave. Why Bother?
You shouldn’t be using a DoS attack on anyone. But it’s important to understand how they work, so we can defend against them. Cybersecurity is all about staying one step ahead of hackers. b
9
Slow?"
“I'll get to you eventually. And when I do, watch out!"
VLADIMIR BUYNEVICH, FLICKR
SketchUp
10
BY BONNIE ROSKES
SketchUp a Bird House In this project we’ll model a basic bird house. (It’s a step closer to modeling a real house!) SketchUp starts with Helen standing on the ground. She isn’t needed here, so press E for the Eraser, and click on Helen to erase. Press R for the Rectangle tool. Click anywhere for the first corner, then move (don’t drag) to where you want the second corner.
Click to complete the rectangle. Then press P for the Push/Pull tool. Click the face of the rectangle, move the mouse up a bit (again, don’t drag), and click again to create the base of the bird house.
To paint the various pieces of this house, open the Materials window by clicking the icon along the right side. You can open the list of material collections with the magnifying glass icon. Choose your material, then with the Shift key pressed, click any face of the box you’ve made so far. This paints all faces at once.
This “protects” objects from other objects, and makes it easier later to make changes. To make the base into a group, start by pressing the Spacebar for the Select tool. Then triple-click (three times fast) on any face of the base. This selects the entire base at once. Then right-click on any selected face and choose Make Group.
A group acts like a single object. Next we’ll create the back wall. Start another rectangle, with its first corner at the lower left top corner of the base. The second corner should be along the top right edge of the base, like this:
Pull this wall up. To add the pitched shape at the top of the wall, a line needs to be added. Press L for the Line tool, and for both endpoints of this line, be sure to click when you see the “Midpoint” popup.
With the Select tool, click this small line to select it. SketchUp modelers use groups (and components) while they’re creating different parts of a model.
Press M for the Move tool. Click
anywhere to start the move, and move straight up so that “On Blue Axis” appears. Click to finish when the roof looks about right. Paint the faces of this wall, then select the entire wall and make it into a group. Once a group is created, it becomes selected. Leave it selected because it needs to be copied.
The front wall will be a copy of the back wall. With the back wall still selected, press M for Move, then press the Ctrl key (PC) or Option key (Mac). This adds a “plus” sign to the cursor, which means a copy will be created. Click anywhere to start the copy, move the mouse in the direction toward the front of the house, and click to finish. Leave some room along the base for birds to gather.
The front wall needs something that the back wall doesn’t have: a hole for birds to go in and out. But changes can’t be made to a group unless the group is open for editing. So right-click on the front wall and
SketchUp is a free program for 3D modeling. Find SketchUp Make at https://www.sketchup.com/download/all.
choose Edit Group.
To create the hole, press C for the Circle tool. It’s always better to use an exact placement, so find the lower midpoint of this wall, and hover your mouse on that point for a few seconds, to “remind” SketchUp of its location.
Move the mouse straight up from that midpoint, and click where you want the center of the hole. To poke the hole through the wall, use Push/Pull. Start by clicking on the circle face itself, and end by clicking any point on the back of the
wall. That’s the only change this wall needs, so right-click in blank space and choose Close Group. Now for one of the side walls. Draw a rectangle between the front and back walls, push it in a bit, paint the wall, and make it a group. Keep the group selected.
Copy the side wall to the other side. Use Move with the Ctrl/Option key again. The first copy point should be a lower inside corner . . .
. . . and the second copy point
should be on the other side, along the base.
The roof is trickier. Starting with a rectangle is hard since the rectangle won’t face the right way. So use the Line tool, and trace around the four corner points. Finish with a loop of points: click the first point where you started the rectangle.
Pull out the roof face, then pull out the front and sides as well. The roof should have an overhang.
This roof face needs to be copied to the other side, but first it needs one fix at the top of the house. In order that there will be no gap down the center of the roof, the edge here needs to be vertical. Start a line at the lower point, and press the Up arrow to lock the line to be vertical.
To finish the line, click anywhere along the top diagonal edge of the roof. One more small line will fill in the triangle here. Then pull back the entire triangle, all the way to the back of the house. This will produce
a few extra edges, which you can leave or erase. The half-roof is finished, so paint and group. Make a copy of the half-roof anywhere in blank space.
With the copied group still selected, press S for the Scale tool. The green drag handles are for resizing. The handle we want is indicated here, in the center of the side.
Click that handle, then move the mouse to the right, to turn the face inside-out. Stop when the scale value is -1 (this appears at the lower right corner of the screen). To get the roof back into place, press M and click one of the corners that will join to another corner.
Click the join point, and the roof is complete.
The only thing left to add is the perch: the small dowel a bird can stand on before entering. Just use a small circle, pull it out, and paint and group. That’s it. The house is done. But if you’re feeling ambitious, you can add an actual bird. Check out the online version of this article to find out how! b
The free, web-based version of SketchUp can be found online at https://app.sketchup.com/app.
11
Notebook
12
Storytelling Has C BY TIM SLAVIN
Visual storytelling apps are a fun way to create. These apps use photos to tell stories, with text added if you choose. Adding video is possible with some. Share your work with others, or keep the results to yourself, like a secret diary. Because these storytelling apps are a way to capture your personal experience, you don't even have to write a story or a script first. The focus instead is on showing how you see the world, and learning to make sense of your experiences. These apps are a great way to learn the art of storytelling. You can also use them if you’re involved in school publications that create and publish stories about your community. Or, you could build a portfolio of creative work if you want to become a journalist or filmmaker. Your family also can use these apps to capture events, for example, visiting relatives or birthday parties. Storytelling apps can help you step back and see the event from a different point of view. Here are five apps to consider— Steller, Pixotale, and 1 Second Every Day are storytelling apps—and Artisto and Pixlr are editing apps. All work with phones and tablets but you’ll need to check whether they work with Android or Apple. Some do both. You may need to sign up with an email address to use these tools. And some can be shared so you can work as a team with a teacher for a class project, or with your friends creating your own story. There are more visual storytelling apps in the online version of this article. Check out the link on the back cover of this issue.
“Oh, how I wish someone would invent a storytelling app. I've got writer's cramp."
Pixotale This visual storytelling app proved to be the easiest to use. The first screen lets you browse published stories. If you want to create your own stories, click the plus icon. From there, it's easy to figure out how to create a story. Stories published with this app display as This online photo editing app a vertical flow, like web pages provides a basic set of tools to instead of books. It’s an crop and edit your photos used Apple-only app but there’s in storytelling apps. There’s also also a website version. a mobile version of their tool. http://pixotale.com https://pixlr.com
Pixlr
https://pixlr.com/mobile
Come a Long Way Stellar Stories in Stellar are experienced like flipping pages in a magazine. Tools to create a layout and add photos and text are easy to learn. To publish, create a collection, then click Publish to upload a story to Stellar's servers. Then you can share your story and embed it into a web page. Works on Apple and Android smartphones and tablets. https://steller.co
Aristo This mobile app editing tool can transform your photos and videos with filters. Android and Apple versions. https://artisto. my.com/
MARCO VERCH, TRENDING TOPICS, FLICKR
er, s writ famou ne of e h t This is Dickens. O ect for es d resp Charl st. Ma lling skills! e b 's y histor de's storyte u this d
If you want to write a story about something that really happened to you, or a make-believe story, try this: begin by summing up the entire story in one sentence. Then, add a bit more detail and sum it up in three sentences, and again in five sentences. Now write the story by expanding each part of your simple story, like adding meat to the bones! Who are the characters? What are the problems they face? What does each person in the story have to gain and/or lose? The possible gain or loss, or the problem a character faces, is often is called a hook and the "will she?" or "won't she?" question gets the listener to listen. Keep it simple! Tell the story from start to finish. This is called your "first draft." It's ok if it's not perfect! It's not supposed to be. When you're done with the first draft, go back and re-read it. Chances are some things will jump out at you that you want to fix. Perhaps you notice that parts of the story need more explanation, and other parts can be shorter or removed. Maybe you want to tell more about a character, or the problem they are facing. Maybe you want to shift the order in which you tell the story. Would it be better to start at a different place, and This app began as a Kickstarter project. then fill in more background details as the story goes on? Just be sure Its creator, Cesar Kuriyama, wanted to to answer any questions that you bring up so your audience won't be record his experiences to help him gain left wondering what happened! insight into his life. It's both a video and All the writing and rewriting helps you memorize the key details photo capture tool with reminders to about your story so you can relax and improvise a little bit if you record your life daily. The result is a movie want. Storytelling is not reciting a set of facts perfectly. Your audience of one second images. This app is useful will determine how you tell your story. What might be the best way to for telling personal stories. engage them? How do you want the audience to feel at the end of the Android and Apple story? https://1second When you use a visual storytelling app, apply some or all of these ideas everyday.com/ about how to tell a good story. For example, what might be a strong image to start with that will engage your audience right away? b
1 Second Every Day
13
14
f o y r o t s i H y e t i h l T a e R l a u t r i V
People have sought to change the reality around them since the start of human history. In the late 19th century, HG Wells' science fiction novels challenged readers to think about how technology might change their perceptions of the world. The concept of an actual virtual reality device can be traced back to Stanley G. Weinbaum. His short story, Pygmalion’s Spectacles, was published in 1935. The spectacles are goggles that, when worn, transport the narrator into a paradise with people, sounds, smells, and touch. Yet the narrator is aware he actually sits in a chair in a hotel room as he wears the goggles. In real life, Virtual reality and augmented reality evolved for practical reasons. In the 1920s, pilots had to learn how to fly with instruments. Early pilots flew mostly by calculating fuel, airspeed, wind resistance, and other factors to determine how far they could fly. There was no way to practice flying without actually getting in the air. But In 1927, Edwin Link of Binghamton, NY built a Link Trainer, a metal frame flight simulator that used instruments connected to pumps and switches to simulate actual instrument flight. Pilots could train without the restrictions of weather and availability of planes and teachers. Link Trainers eventually added movies and were heavily used in World War II. In the 1950s, flight simulators evolved into what we’re familiar with today. Development of personal virtual and augmented reality began in the 1960s with research done by Ivan Sutherland at MIT and the University of Utah. He and his students created the first headmounted displays, and started to solve problems like eye tracking and depth perception. In the 1980s, Jaron Lanier helped popularize the idea of virtual reality. At least one attempt at a virtual reality game failed because technology hadn't caught up with the concept yet. Computers were not powerful enough, a few technical problems had to be solved, and the cost of the technology limited its appeal. Today, AI has evolved to the point where it's available to everyone! Learn more online. Check out the link for this article on the back cover of this issue. b
DAVID KOVALENKO, UNSPLASH
WIKIMEDIA COMMONS
In the Middle: A Deeper Dive Into Everyday Stuff
BY TIM SLAVIN
Stanley G. Weinbaum, author of “Pygmalion's Spectacles"
IVAN SUTHERLAND FOR AFIPS PUBLICATION
Ivan Sutherland and his head-mounted display
15
WIKIP YCO, AFTPS
CR MINE
ViewMasters were popular “virtual reality" toys in your grandparents' day. They were first developed in World War II as a training tool.
EDIA
In the 1950s, Morton Heilig wrote about an Experience Theatre which could include all the senses while watching movies. He built this device in 1962 and called it the Sensorama. ROLAND TURNER, FLICKR.
The Link Trainer flight simulator
CLINT BUDD, FLICKR.
A flight simulator dashboard STEM-T4L-WQLSWHMF6J4, UNSPLASH
JACK PE
ARCE
, FLIC
KR.
Programming
16
BY PATRICIA FOSTER
Don't Forget the Star! The winter holidays are upon us! Let's use Racket to decorate a virtual Christmas tree with multicolored bulbs, ornaments, and gewgaws galore. Setup
Racket is a functional programming language. The code is structured differently than traditionally imperative languages like Python or JavaScript. And Racket has tons of simple, built-in image functions perfect for creating our festive masterpiece. To start, navigate to https://www.wescheme.org/. Click on the “Start Coding” Button to access the editor: Some Basic Shapes
In Racket, every function call is done inside brackets, starting with the function name followed by a list of parameters. Let’s try out some basic shapes: (triangle 500 "solid" "green") (star 50 "solid" "yellow") (circle 25 "solid" "red") See the pattern? The first word is the name of Racket’s built-in function, followed by the size you want, the type of fill, and the color. Play around with these parameters and see what happens. How about making a blue circle, or shapes that have an outline? Hit the run button at the top-left of the screen to see your results in the console. To create our tree, we’re going to layer these shapes on top of each other, using two new functions: empty-scene and place-image. We use the empty-scene function to specify the size of our blank background. The two arguments are the height and width pixel values: (empty-scene 700 700) The place-image function takes four arguments: (1) the image that’s going on top, (2) the x and (3) y coordinates for the center of this image, and (4) the background. In this case, the image we want to use is the result of our triangle function, and the background is the result of the empty-scene function. Since our background is 700 x 700, and we want our tree to be smack in the center, we’ll use the coordinates (350, 350). To write this code, copy the entire triangle function and empty-scene function, brackets and all, and nest them inside the place-image function. Make sure you’re nesting them in the proper order. And watch out for those brackets—double check that every opening bracket has a closing bracket in the right spot. (place-image (triangle 500 "solid" "green") 350 350 (empty-scene 700 700)) Defining Variables
A bit confusing to read, right? We’re placing function calls inside each other. This can make functional programming seem complicated, so let's simplify our syntax by defining some variables. (define tree (triangle 500 "solid" "aquamarine")) The define function binds a literal value (numbers, text, objects) to a symbol
or variable of our choice. So, we can define our triangle as tree and our empty space as bg and use those keywords in the place-image function instead. Let’s also create variables for our other shapes: (define tree (triangle 500 "solid" "aquamarine")) (define top (star 50 "solid" "gold")) (define bulb_red (circle 25 "solid" "red")) (define bg (empty-scene 700 700)) (place-image tree 350 350 bg) Layer by Layer
“Place-image” can only layer images one at a time, which means we’re making a new place-image function call for every new ornament. So the result of the first “place-image” function (where the tree is placed on a background) becomes the “image” parameter of the second “place-image” function: (place-image top 350 110 (place-image tree 350 350 bg)) You can keep nesting function calls just like that—or you can break them up by defining variables in steps. For example: (define step1 (place-image tree 350 350 bg)) (define step2 (place-image top 350 110 step1)) step2 Since the “define” only binds without displaying, to make our tree display we need to print out the end result at the end of our code. Creating New Ornaments
Using this layering method, you can add as many new ornaments as you want. Try other shapes like the rhombus and the radial-star: (define orn1 (rhombus 40 45 "solid" "magenta")) (define orn2 (radial-star 8 8 25 "solid" "yellow")) When placing a new ornament, start at the center of the tree (position 350 350) and then change these x and y variables to see what the ornament looks like in a different place. Increasing “x” moves the ornament right; decreasing goes left. Similarly, increasing “y” moves the ornament down, and decreasing goes back up: (define tree (triangle 500 "solid" "aquamarine")) (define top (star 50 "solid" "gold")) (define bulb_red (circle 25 "solid" "red")) (define bulb_blue (circle 25 "solid" "blue")) (define bg (empty-scene 700 700)) (define orn1 (rhombus 40 45 "solid" "magenta")) (define orn2 (radial-star 8 8 25 "solid" "yellow")) (define step1 (place-image tree 350 350 bg)) (define step2 (place-image top 350 110 step1)) (define step3 (place-image bulb_blue 425 400 step2)) (define step4 (place-image bulb_red 275 500 step3)) (define step5 (place-image bulb_red 325 275 step4)) (define step6 (place-image orn1 250 375 step5)) (define step7 (place-image orn1 480 500 step6)) (define step8 (place-image orn2 350 350 step7)) step8 Don’t forget to call the latest result at the end of your code. If you forget to update the step number, you’ll be stuck displaying an old version of the tree. Have fun, and Happy Holidays! b
17
Best Practices
18
BY TIM SLAVIN
Research. The “R" Word Uh oh. It's time to stop procrastinating and start that research paper. Luckily, there's a ton of information online. Make the search engines work for you, and you will rock your next research project.
bookmark the link and save the content, or email the link to yourself. Read several results to confirm you have the information you need. Be skeptical! Be wary of too many overly positive or negative comments.
Search Engine Basics
Guidelines for Internet Research
Google is a search engine, and there are lots of others, too. All search engines take your search terms as input, then return a page of links. Keep these points in mind: • Learn the difference between paid search results and organic search results. Organic results are generated by the search engine using its own methods. Paid search results are simply advertising. A company pays the search engine to ensure its ad will come up at the top of your list of search results. It could be useful, but be aware it's an advertisement. • Don’t assume the results on the first page of search results are the most relevant. Skim at least 50 results. What appears as search results depends on many factors, such as the content on the site, how many links point to the content (and the reputation of the sites that link), the number of links from Twitter, Facebook, and other social media. • Before you click a on a result, look at the website URL listed for the link, usually at the bottom of the summary for the link. A questionable site usually will have a questionable URL. • Once you click, carefully evaluate what you find. Read comments, if any. Look for an author name, publication date, and contact information. Does the author provide links to validate their content? If the website is useful,
Some guidelines to follow: • Know what you need to find out and how you will use the information. If you don’t know what you need, you won't know when to stop. You might get bogged down with stuff you don't need. Or not find enough for accurate research. • Use good tools. Use at least two or three search engines. Email URLs to yourself. Use online services like Evernote or Pocket to store info. Your web browser can create and manage bookmarks so you can go right back to the same link later. • Choose your sources. An academic or technical topic requires different sources than a search to learn the name of Justin Bieber’s monkey. Forums and community sites might need to have their information validated, while data found on the Nature magazine site is vetted (verified) before publication. Reputable magazines, newspapers, and other journalistic sources often include alternate views and were written using best practice research techniques, so you can trust the information. • Choose a number of different key words and phrases. People think about topics in different ways and use different words. You’ll get more varied results if you vary the way you word your search. • Validate your results. Make sure the information is deemed credible by other authoritative sources.
Advanced Search Techniques
The Google search engine provides ways to refine your search results. These are called Search Operators: extra words or characters you type into the URL window. Some of these work in other search engines too. Use the Google Guide (GoogleGuide.com) to discover these techniques. Remove any space between operators and the initial keyword, for example, site: http:// yoursite.com does not work but site:http://yoursite.com does. Internet Research for Coders
Most software programmers use internet research to solve a problem. For example, you can copy an error code on your computer screen then paste it into a search engine to see if anyone has a solution. Or you can state the problem and type it into a search engine. The better definition you have of your problem, the more likely you are to find the exact answer. For example, to code part of a WordPress template in PHP language, I wondered if PHP had a greater than or not equal to comparison operator. It might look like >!= in code. Because I defined my question well enough, I wound up on the forum page of the website Stack Overflow where my answer was buried in a comment about another answer. A good problem definition + intuition + luck—is what makes a fun treasure hunt. Your answer will not always be worded exactly as you expect, or found in the place you expect. If you're still stuck, the next step is to find the best online forum for the language or topic and post your problem. Stack Overflow has become an excellent start point for most languages and technologies.
Search Operators
19
Results
intitle: allintitle:
Some or all of the search words must appear in the title (intitle:) or all search words must appear in the title of the search result pages (allintitle:).
define:
Returns a quick definition of any word or short phrase.
compare:
Returns a comparison of two or more items, for example, butter and margarine (compare:butter and margarine).
..
Returns a range of data, for example, price ranges ($10.00..$20.00) or date ranges (2000..2012) or other range.
~
Searches for synonyms of the word. For example, ~female will also search for women.
–
The short dash (-) character before a word eliminates all search results with the word. For example, -horses will remove any search results with the word horses.
*
The asterisk (*) character between two key words acts as a wild card to match one or more words. It must be used within quotes. “Francis * Coppola” should return “Francis Ford Coppola”. However, using an asterisk to get variants for a word does not work; bicycl* will not return data on bicycles and bicycling because the * does not appear between double quotes.
OR
The word OR in all capital letters or the pipe (|) character between two words searches for content with one or the other key word provided, but not content with neither one or the other word. For example, blouse OR shirt works the same as blouse|shirt.
cache:
Searches only in Google’s search result cache files. Finds results that may not appear on the web. Search cache:yoursite.com to search any cached results for your site.
link:
Finds all links to a specific web URL. A link to an article on a website (link:http://yoursite.com/ article-url).
site:
Limits results to a site or site section. site:nytimes.com or site:nytimes.com/business. Also limits results to a top level domain. site:edu to search only school sites. Leave out search words and use only site:yourdomain.com and search results will display all indexed pages for the site.
source:
Limits search results to the source you specify. Election results from the New York Times (election source:new york times)
Search the forum site before you post your problem to be sure no one has posted your problem before. State the terms you used to search and found nothing. State your problem, how you got to it, the result you expected, the result you got instead, solutions you tried, and details about your technical environment. Also, when you post a question on a forum (or copy/paste an error message into a search engine), be sure to remove security-related information. Remove file folder paths from error messages. Don't publish
information others can use to hack a computer! In some cases, coders know the canonical reference site for the language they’re coding in and need details about specific functionality. Maybe they need to learn how to parse an array in PHP, so they go to php.net and type array into the search box to find a list of array functions for that language. Finally, a good integrated development environment (IDE) software tool for coding also includes help and auto-complete
for most programming languages. If your question has to do with how to implement a function, it's possible a good software programming tool has the answer. For example, PyCharm will auto-complete your Python code, check it for errors, and other tasks. Look for a similar software editing tool for your language. People learn coding through endless online research of error codes, how do I do x? questions, and browsing search result pages. Even professionals use these tools in their day-to-day jobs. b
History
20
BY JENNIFER NEWELL
Right Down the Line The name Alexander Graham Bell comes up frequently in the history of telecommunications, but fewer people associate Joseph Farwell Gidden with telephone service. This is understandable, as Bell was a scientist and an inventor who patented the telephone In 1876, while Gidden was a teacher and thresher who received a patent for barbed wire in 1874. Barbed wire? Yes, without Gidden’s invention of barbed wire, much of America’s agricultural heartland would likely have been without telephone service for several decades, while residents of more urban areas enjoyed the convenience of the telephone. Barbed wire itself was not intended to serve as a phone line. It was strung as a way to keep cattle in their place and protect crops. It was so effective that five years after its invention, nearly 40,000 tons were produced per year. All in all, enough barbed wire was installed across the old west to circle the earth many times over. A couple of years later, when Bell patented the telephone and
It's for you.
USDA NRCS MONTANA, FLICKR
companies formed to build the infrastructure necessary for the telephone calls to be transmitted over long distances, they focused on the cities. More people lived in cities, and more businesses were located there. Cities were where telecom companies could make the most money. But in the midwest and across the great plains, big businesses were few and far between. Homes were often built miles apart, with large areas of unpopulated land separating neighbors. It required more work to build the infrastructure necessary to get rural America on the grid, and there was less profit to be made for this hard work. However, rural Americans needed telephones too: to communicate with their neighbors, get medical help, and receive news on weather conditions or local emergencies. They also realized that much of their land already had poles and wire running across it thanks to the invention of barbed wire fences several years before. This led to one of the most creative hacks of the late nineteenth
century. Smooth wire from a telephone in a house could be connected to the top row of barbed wire on a fence (most fences had three rows of barbed wire). To keep it from touching the fence posts, they insulated the wire with whatever they had on hand. Rubber inner tubes, corncobs, and glass bottle necks were all common. Usually they did not have the time or resources to provide each home with its own phone line, so collectives or “party lines” were formed. A person could call into the collective, and the phones in all the members' homes would ring. A certain number of rings might signal what home the call was for, or the length of the ring indicated which house should pick up (an early version of the ringtone). And some collectives used a particularly long ring to indicate that all households in the collective should answer for general news or weather conditions. The only thing this hack couldn't solve was the nuisance of other people in your party line collectively eavesdropping on your conversation! b
Tell him I'm not here.
Astronaut StarBright Taylor Denise Richardson, also known as Astronaut StarBright, may only be 16, but she is already dedicated not only towards pursuing a career in STEM, but helping others be exposed to science as well. Growing up, Richardson was inspired by Mae Jemison, the first African-American woman to fly to space. Picking up Jemison’s biography sparked her interest, resulting in Richardson now working to follow in Jemison’s footsteps to become an astronaut herself. She has led a number of initiatives to expose young girls to science in media, starting fundraising drives to bring science inspired movies like Hidden Figures and A Wrinkle in Time to new audiences around the world. The idea came after Taylor was invited by the White House to attend a special private screening of Hidden Figures where she heard from the cast, producer, author and Michelle Obama. This inspired her to raise funds to send 100 girls to see the movie and give them the book as well. She later raised more than $100,000 for her Wrinkle in Time project, earning her the title of GoFundMe’s hero of the month. Richardson has even inspired the creation of a new astronaut doll created by Lottie Doll. Her next project is raising funds to help girls attend the Black Girls Lead conference. We sat down to talk with Richardson to learn more about her journey in science, as well as advocacy.
What motivated your efforts to allow girls in the US and Ghana to see A Wrinkle in Time? The movie was so inspiring to watch, and I knew if more girls of color saw it they would be inspired by seeing that a woman of color had played such a significant role in helping get man into orbit. So, I ran a campaign on GoFundMe. Why do you believe movies like Hidden Figures and A Wrinkle in Time are important? They show the strength and power of women of color. So much of the media only shows them in very comedic or dramatic roles. They are never the hero. Movies like these show that we can be the problem solvers and are the reason why success happens. What advice would you have to students looking to run a similar money raising campaign GoFundMe? Make sure that you are transparent with the donors, provide lots of updates, and do your research to know exactly how you'll use the funds that you raise. What was it like to have a doll created that was inspired by you? It was great to see that such a reputable company was interested in truly showing diversity and thought I was a worthy example for other young people. I've seen that you are a part of the STEAM Squad, a young group with a lot of STEM achievements. How did you meet these other women and what does the group mean to you?
We initially met online. The group is an additional support system that encourages me in my various endeavors. It's nice to have support outside of my immediate family who want to see my reach my goals. What's the most rewarding part of being a public figure for science at a young age? What's the most challenging part? It is nice to be recognized for my efforts because it brings attention to serious issues that impact lots of young people, which hopefully will help others make meaningful changes in diversity, equality, and STEM education. b
Profiles
21
BY ERIN WINICK
History
22
e h k T c a b y a W e n i h c Ma
BY TIM SLAVIN
If you’re interested in a new quirky video game challenge, check out The Wayback Machine. Not Mr. Peabody and Sherman's WABAC Machine from old cartoon days (ask your grandparents). THIS Wayback Machine has an ancient video game archive that's part of a larger collection of online content maintained by the Internet Archive. The archive calls The Wayback Machine a 3-dimensional index of the web. The Wayback Machine has captured and archived websites since the 1990s, as a way to preserve the history of the website part of the internet. You can find at least one version of almost all websites. And it's fairly simple: visit https://archive.org and type in the URL of your favorite website. Once you type a URL into The Wayback Machine, navigate past versions of a website with the timeline calendar at the top of the page. Click the timeline to visit past versions of a website. The Wayback Machine is a digital archive of the world wide web and other internet content, for example, movies, audiobooks, TV news, children's books, and software. In their video game collection there are 2300 MS-DOS games and 3000 games for a dozen different consoles, all playable in your web browser. You don't need original hardware to play vintage games. There are no game controllers required. Instead, you play with the keyboard arrow keys and easy commands like the letters Y for Yes or N for No. What did your TWECHIE, FLICKR favorite website look like in the past? Type or copy/paste the URL into the Wayback Machine and find out! b
Mr. Peabody and Sherman playing with the WABAC (pronounced way-back) machine, circa 1960. From the cartoon series "Peabody's Improbable History", featured on "The Rocky and Bullwinkle Show".
In MY day, video games looked like this!
23
Here we go again!
BLUE MOUN TAINS LIBRA RY, FL ICKR
FONDO ANTIGUO DE BIBLIOTECA, FLICKR, AND ARCHIVE.ORG
Scratch
24
e c a p S e c Ra
BY LES POUNDER
To celebrate the recent anniversary of the first moon landing, let's create a game to test our space knowledge and learn more about Scratch. Scratch 3.0 is an easy way to learn coding. To complete this fun project, you'll need a computer running Windows, macOS or Linux, and an account on the Scratch website. Getting Started
In a web browser go to https:// scratch.mit.edu and click on Start Creating to start a new project. The Scratch interface A has three main columns. From left to right are the blocks used to write code. These are in color-coded categories. Blocks are dragged from here to the center column, where we write the code. In the right column we have the stage, where all of the game/project runs and where we can interact with it. Our sprites (the characters in our game) are stored under here. The first step in the game is to change the background of the stage so that is it more space related. Click on the “Choose Backdrop” button and then select an appropriate background for the game. B We need to delete the cat sprite. To do this click on the Trashcan icon in the sprite box. Then click on the “Choose A Sprite” button and select two sprites. The first is the Rocketship, our avatar in the game. The second is Planet2, which is the goal of the game. C Move the Rocketship sprite to the bottom left of the screen, and the planet to the top right.
In this project we will learn: • How to write a game using Scratch 3. • How to ask questions. • How the answer to a question can affect the game. • How to move and change the size of sprites. • How to play sound.
Coding
The code we'll write first is for the Rocketship sprite, so click on it. Then we go to the Events section and drag the “When Green Flag Clicked” block to the coding area. Then we go to Motion and drag the “go to x: y:“ block and place this under the previous block. The x and y values will be for the current position of the Rocketship. Next we go to Looks and drag “set size to 100%” into the coding area. This will reset the size of the sprite each time the game starts.D Next, from Sensing we now use the “ask ___ and wait” block. This block is used to ask questions. The first question asks the player's name. Then we go to Looks and drag “say hello for 2 seconds” and place this into the code. To say hello to the player by name, we need to use a “join” block from Operators. We change the first word from apple to “Hello “ (with a space at the end). For the second space we go to Sensing and drag the “answer” block. This now triggers the game to start. Using another “Say ___ for 2 seconds block” from Looks, we now ask a question that will be on screen for 5 seconds. Then using another “ask __ and wait” block from Sensing we give the player three options, labelled A,B,C. The player will use those letters to answer the question. E Now that the question has been asked, we need to check that answer so that the player can progress. So we go to Control and use “If .. then .. else”. Now go to Operators and drag “__ = __” into the space inside
the if block. Go back to Sensing and drag the “answer” block into the first blank space. For the second we add the letter for the correct answer. The correct answer is A for this question. F What happens if the answer is correct? First, we need to move the Rocketship sprite nearer to the planet. So, on the stage, move the sprite nearer to the planet. Then go to Motion and drag the now updated “go to x: y:” block into the code. Then go to Looks and drag the “set size” block into the code. Change the value to “66”. This will cause the rocket to shrink as if it is flying away from us. Carrying on the code for a correct answer, we can play a sound to reward the player. Click on the Sounds tab, found in the top left of the screen. Click on the “Choose a sound” button and select a sound. Click on Code, and then click on the Sound code blocks. Drag “play sound ___ until done” and make sure that the drop down option shows the sound that you wish to play. The last piece of code for a correct answer is to use “say ___ for 2 seconds” from Looks to tell the player that they are correct. G But what happens if the player is wrong? Well then a sad trombone sound will play, then the sprite will say that their answer is wrong. The player does not move forward. For the next two questions we follow the exact same process, asking a question, checking the answer and if correct moving the Rocketship nearer to the planet,
25
To play, visit https://scratch. mit.edu/projects/330419915/ and click on “See Inside” to view the code that runs the game. A player is asked three questions. Each correct answer moves their rocketship nearer to a new planet! shrinking the size of the Rocketship so that it looks like it will land. Remember that the code needs to be all linked together in order for it to run after asking each question. The only difference with this code is that after the final question is asked we need to stop the game. To do this we use “stop all” found in the Control blocks. This will stop all the code at the end of the game. H This next section of code is an entirely new sequence. It controls an animation built in to the Rockstship sprite. Using “When Green Flag Clicked” from Events and a “Forever” loop from Control ,we use the “next costume” block from Looks to change the costume of the sprite. This gives the impression of animation. Sprites can have alternate costumes that are used to change the look of a sprite. In order to see the change we need to use a “wait 1 seconds” block from Control and change the 1 to 0.2. I In our final section of code we will add some music to the game. For this, click on the Stage found in the bottom right of the screen. The coding area will clear, but don’t worry your code is not lost. J The code to play music is something that we have already done. We play a sound until done. All we need to do is select the music that we wish to use from the Sounds tab and then drag the appropriate blocks from the coding area. K All done! Click on the Green Flag just above the stage and get ready to blast off to strange new worlds! L b
A
B
D
C
E
F
G
H
I
J
K
L
Concepts
26
BY TIM SLAVIN
Pair Programming
Two heads are better than one! HAHA!
One of the great mysteries of software programming is that coding does not scale. Scalability in general means the ability of something to expand or contract proportionately. When referring to writing code, the lack of scalability means that if a lot of people are working on a coding project it doesn't get done any faster than if just a few people are working on it. So if it takes one person 10 months to code an application, hiring 10 coders to do the project in a month doesn’t work. Nor does hiring 5 coders to complete the project in 2 months. At best, you might hire 3 coders, give them a month or two to design the application, then watch them complete the application in 5-8 months. Making the most of programming time while reducing errors and failures is one of the great challenges in software programming. Pair programming can help. Pair programming has existed in some form since people first began to write software. In its simplest form, two programmers sit down in front of one computer terminal and trade off use of the keyboard and mouse, talking out loud as they work through the software coding process. As you might imagine, this is a great way to train new programmers. It’s also great for school projects. The two coders not only swap the keyboard and coding time, they also swap roles. The keyboard owner, called the driver, is responsible for the actual coding while the other coder, called the navigator, keeps track of larger issues in the application as they work. The driver talks through their coding process with the navigator. The two change roles frequently to keep fresh and ensure both are engaged with the macro and micro problems and solutions as they work. Research also shows pair programming, when the coders work well together, increases productivity and code quality. This seems rather obvious: two heads are better than one, whether it is software programming, policing, flying airplanes, or any number of human activities. Plus the cost of the second coder is offset by the productivity gains and code quality. Extreme Programming is a software development approach based on simplicity, frequent interactions, obsessive testing, multiple small It never releases, and feedback from coders and the end user gets old, of the software. Extreme programming tries to expose George. potential issues early and often so the team can participate in solving problems. Pair programming is a natural technique in extreme programming because it provides lots of interaction, testing, and feedback. A final note. One of the more interesting aspects of pair programming is the general examples of pairs in computing history. For example, Jobs and Woszniak, Gates and Allen, Hewlett and Packard. Computing must lend itself to collaborative work to some large degree to be successful. b WOLFGANG HASSELMANN, UNSPLASH
tidbitz Bet You Didn't Egg-spect This!
Easter eggs are fun surprises hidden inside software that users must find to experience. Lots of technology companies leave at least one easter egg in their software. For example, Tesla cars apparently have an easter egg that opens windows, flashes headlights, and opens doors while playing a holiday carol loudly. The first easter egg appeared in 1976 in an Atari video game called Adventure. The game designer created a surprise, a flashing credits screen with bright colors with his name. Seeing the credits screen, however, required a complex set of steps with a bridge and a maze and a few other things. Easter eggs have evolved into an art form and are fun experiences. b https://phys.org/news/2019-02-bees-brains-basic-math.html
27
Under the Milky Way Tonight It’s possible to detect the radio wave signature of hydrogen in the universe using nothing more than aluminum gutter flashing, an empty paint thinner can, a software-defined radio, and a few other pieces that cost around $150. Radio waves from hydrogen pass through a thin length of metal connected to the radio. Bursts of waves signal the motion of the spiral arms of the Milky Way Galaxy. It’s a neat project that mixes math, coding, engineering, astronomy, and a few other fun skills. There’s also a community, the Open Source Radio Telescope group, to help brainstorm ideas and solve problems. b https://spectrum.ieee.org/ geek-life/hands-on/track-themovement-of-the-milky-waywith-this-diy-radio-telescope
Me-yowsa! You might think a computer is much smarter than a kitten or a cat, but you’d be wrong. Kittens figure out how to walk, listen, run, jump, and probably dozens of other skills. Recreating these skills with computers and robots turns out to be very complicated. Robots that can MANKI KIM, UNSPLASH walk on two feet took decades to figure out and build. Meanwhile, human babies learn to walk in a year or so. b https://theconversation.com/why-your-cat-is-lousy-at-chess-yetway-smarter-than-even-the-most-advanced-ai-125581
DAVID SCHNEIDER, SPECTRUMIEEE.ORG
Parents and Teachers
28
BY TIM McGUIGAN
Teaching the Basics of AI
Teaching the Basics of AI Teaching AI has always been something that has intrigued me, but the technology moves so fast that it has never seemed altogether practical. Once confined to the halls of universities and research laboratories, AI has started creeping into some undergraduate and secondary school curricula in the past few years. This has been interesting to watch, as the math and statistics required have been large barriers. For similar reasons, primary schools have also been slow to adopt AI for the youngest students, although this may be changing. Fueled by new platforms and K-12 standards, some schools have started ambitious middle school and elementary programs in AI. Two schools in my area now include AI in their middle school Computer Science curriculum.
When I heard about these new developments, I have to admit that I was curious, since AI is an exciting branch of Computer Science. However, I was also less than sure about how practical AI would be in a middle school classroom. Recently I found myself in the offices of an AI startup in Pittsburgh called ReadyAI. Devoted to bringing AI education to students as young as elementary-age, ReadyAI markets both an AI programming platform and a curriculum to schools and after-school programs. Utilizing the AI-powered robot, Cozmo, ReadyAI’s AI+Me curriculum teaches students 5 principles of AI that were developed by AI4K12, an academic working group tasked with making the discipline more accessible. In the class I shadowed,
students as young as 5 gave the robot instructions to identify a small plastic cube. Already familiar with the programming environment, students were excited and jumping when their robots moved around obstacles to find the blinking light cube. ReadyAI’s platform uses a programming environment developed at Carnegie Mellon University called Calypso. It has visual and voice recognition software that runs largely in the background to aid the robot. Students manipulate When/ Do tiles in the rule-based programming environment and watch as the robot responds. It seems like a hefty task, but I found that even the 5-7 year old students were fairly capable with the programming style of Calypso. After watching a few lessons, it became clear that the Cozmo
29
At WAICY, a student team presents its project to the judging panel. READYAI.ORG/MEDIUM.COM
robot is well-suited for introducing students to the concepts of AI. The work students were doing was more akin to programming (with a healthy assist from AI), but it was a great way to introduce the concepts. Students received instruction on sensors, pattern recognition, and representation along with problem solving techniques. Moreover, they were having a blast using the robots to complete tasks and tell stories which is a crucial hook for young students. This story-telling factor was also front and center in the students’ competition projects. ReadyAI sponsors WAICY, an AI competition for young students. In these regional competitions, students utilize the robot’s voice and pattern recognition capabilities to create scenarios and solve problems. ReadyAI
sees this competition as a great ambassador for AI, and from what I have seen, the projects students create are full of ingenuity. Another tool for teaching AI to young students is the Scratch cousin Cognimates which was developed at the MIT Media Lab. More suited for middle school students, Cognimates gives teachers more options for creating AI models as Cognimates utilizes both text and visual training. Its Rock, Paper, Scissors lesson is a great way to teach students about how AI trains the computer using examples rather than giving instructions. Cognimates does this by connecting with external open-source classifiers. This allows instructors and students much more latitude in their creations, although the learning curve for some students may be steep. That said, I am excited to
see how this tool matures as more and more students use it to make applications. Overall, I was impressed with the opportunities that already exist for teaching students how to utilize machine learning and AI. I could see quite a few opportunities for this field to grow in the coming years. More and more, it is also becoming clear that AI can be taught to students of all ages. Topics as varied as reinforcement learning and classification engines are within the grasp of younger students if given the right context. Personally, I plan on incorporating a few mini-units on AI into my curriculum next year to test the waters. Although, I have a feeling that by that time, the AI landscape could be drastically different for teachers. b
“The best way to predict the future is to invent it.” —Alan Kay
Thank you for reading this issue of beanz ! Check out the links below to read stories from this issue online with links to learn more. Python's Rainbow http://beanzmag.com/ python-rainbow-colors Coding Critters http://beanzmag.com/ coding-critters Secure That New Computer! http://beanzmag.com/ secure-new-computers
The History of Virtual Reality http://beanzmag.com/ history-vr-ar Don't Forget the Star! http://beanzmag.com/ racket-christmas-tree Research. The “R” Word http://beanzmag.com/ how-to-do-online-research
The Wayback Machine http://beanzmag.com/ wayback-machine Space Race http://beanzmag.com/ scratch3-space-game Pair Programming http://beanzmag.com/ pair-programming
“Who Ya Callin' Slow?” http://beanzmag.com/ slow-loris-dos-attack
Right Down the Line http://beanzmag.com/ barbed-wire-phones
tidbitz http://beanzmag.com/ newswire-tidbitzdecember-2019
SketchUp a Bird House http://beanzmag.com/ sketchup-bird-house
Astronaut StarBright http://beanzmag.com/ taylor-richardson
Teaching the Basics of AI http://beanzmag.com/ ai-for-kids
Storytelling Has Come a Long Way http://beanzmag.com/ visual-storytelling-apps
http://beanzmag.com/subscribe ribe! Subsc