Kids, Code, and Computer Science Let Your Language Skills Get Rusty Over the Summer
Ah, Summer Reading!
STEAM-y Books You'll Love
June 2019
$6.00 $6.00 USD
What's the Deal with Bluetooth's Weird Name?
“In the Middle" All Juiced Up!
beanz magazine June 2019: Volume 6 Issue 6 Issue 42 (online) & 27 (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: Tim Slavin Staff Writers: Erin Winnick, Amy S. Hansen, Les Pounder, Bonnie Roskes, Simon Batt, Patricia Foster, Clarissa Littler, Jennifer Newell, Tim McGuigan, Bianca Rivera, Tim Slavin Contributors: David Dodge, Jay Silver, Jeremy Kubica, Colleen Graves, Daniel Fenjves, Ali Hagen, Emeline Swanson, Jean-Francois Nguyen, Paul Seal, Madeleine Slavin Back Office Magic: Wendy Garrison Copy Editor: Eileen Seiler Art Director: Kelley Lanuto Webmistress: Patricia Foster COVER IMAGE: IAN D. KEATING, FLICKR
Publisher’s Note It’s summer at last, at least here in the Northern Hemisphere. This issue has a lot of projects and ideas you can try out over the summer. If you turn a (code) turtle around and around, does it get dizzy? Find out inside with a fun Python project. Play Minecraft IRL with papercraft projects. Or help with a NASA citizen science project to measure and count trees. There’s also an article about creating a game without code. And Fibonacci flowers and mazes. If reading is more your speed, this issue features a reading guide, highlighting several great books about science and adventure. There’s a computer science activity book, a series about Ada Lace, a third-grade scientist and adventurer who investigates mysteries, builds robots, and creates art. And a book about the Great Barrier Reef written by an Australian marine scientist. Plus you can learn how one technology, Bluetooth, is not only named after a real Danish king, but the symbol for Bluetooth is made of the runes that make up his name. Maybe the neatest story in this issue is Speedgate, a game created by an artificial intelligence which also designed the game logo. It wouldn’t be too hard to play if you’re creative and have friends, a field, a ball, and markers to stand in for the poles. Whatever you do, enjoy your summer, and this issue!
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.
June 2019
26
STEAM Summer Reading List
22
Cover Story
History Why "Bluetooth?"
2 3 4
Concepts Time to Pack It In!
7 8
Programming Spin That Turtle!
14
History What Was Deep Blue? Electronics Code Your Arduino with Tinkercad
Projects Back to the Drawing Board!
In the Middle All Juiced Up! Cover Story
tidbitz
11 Trees in Space, Sort Of 11 Um, Ok . . . 11 What Will They Think of Next?
18 21 25 27
10
Programming Building Blocks of App Development
12 13 16 17
Concepts Can You 3D Print a Galaxy? History Not YOU Again! Scratch Dynamic Gravity Projects Minecraft-ing With Paper
SketchUp Making Fibonacci Flowers Programming Maze Generator Languages Getting Rust-y Cover Story
Programming Learning JavaScript with Cue
28
Parents and Teachers Gamifying the Kids' Summer
SPIRIT-FIRE, FLICKR
Cover Story
contents
advanced
intermediate
beginner
scribe b u s / m ag.co m z n a e b http://
BY PATRICIA FOSTER
Time to Pack It In!
When you pack for a trip, do you throw all your clothes into your suitcase in a big messy heap? Many of us embrace the ‘blob’ method while travelling, and it works because suitcases aren’t very big. It won’t take long to find our favorite jammies, even if we have to go through every item one at a time. The blob strategy doesn’t work when you organize your closet. And imagine if stores displayed clothes in a giant pile! We’d never buy new jeans if we had to wade into a sea of scattered shirts, sweaters, and socks to find the ideal pair. Long story short: the bigger the system, the more structure it needs. The same is true for software.
Design Patterns
Design patterns are like the shelves, hangers, and boxes in your closet. They organize your code to tell you what code sections are responsible for what actions. Design patterns keep your code tidy, preventing unrelated tasks from spilling into each other! Model-View Controller
“Model-View-Controller” (MVC) is a popular design pattern for games and websites. It divides code into three sections. 1. The model stores data. If there are functions in this section, they’re functions for accessing, manipulating, and transferring that data. Models must represent (or “model”) something real. If you write a web server for your school, your model will contain student names, grades, and the files in each student’s computer account. If you make an adventure game, your model contains your character’s stats, the game map, and the stats of enemies.
KEITH WILLIAMSON, FLICKR
Concepts
2
2. The view contains code to display data. This might mean a bunch of print statements to display text in your console, or it might mean complex mathematics to animate 3D graphics. The view also contains mechanisms to record user input. When you press a button, move your mouse, or hit the spacebar, the view detects these actions. However, the view doesn’t react. Instead, it passes the user’s choices along to the third and final component of MVC. 3. The controller is the “brain” of the entire operation. This section connects the model and the view, and it’s also in charge of your program’s logic. When the view notices the user has clicked a button, the controller is notified and it chooses what to do next: does it reload the webpage, open a portal, send an email? In certain cases, the values of the user’s input are used to update the model. In other words, the controller is a kind of middle-man, passing information back and forth between the model and the view, and
updating each one accordingly. The model stores data, which it passes to the controller. The view displays data and detects user input. The controller receives user input, decides what actions to take, and updates the model. It then updates the view to display the new info. b
What Was Deep Blue? When you hear the term “deep blue,” what do you think about? There’s lots of things which are a nice shade of deep blue; it may be your favorite color! Did you know, however, that the term “deep blue” has a second meaning in artificial intelligence, also called AI, and it was one of the milestones in creating the AI we have today? Deep Blue was the name given to a chess-playing AI programmed by IBM, which emerged around 1995. You may be familiar with AI in video games; it’s what pilots your computer-controlled teammates, including hard to beat enemies. In 1995, however, AI was simple and didn’t do much past moving a small character around a screen. It came as a shock when IBM announced a supercomputer that could play chess at the same level as a human. IBM said its bot couldn’t beat just anyone; it could beat the top grandmaster of chess at the time, Garry Kasparov. This may seem trivial today: of course, AI is very good at chess! At the time, however, this claim was huge. People could not imagine calculators and cash registers they used on a daily basis could defeat a chess grandmaster! The first match was held on February 10th, 1996. To everyone’s surprise, Deep Blue managed to win a game against Kasparov. It was the first computer to beat a chess grandmaster. While it won the battle, it did not win the war: Kasparov won the match at 4-2. IBM kept trying. They improved Deep Blue and requested a rematch in May 1997. This time was different; Deep Blue managed to squeak out a JE SHOOTS, UNSPLASH
win with a score of 3.5 to 2.5. This win was viewed in positive and negative ways. On one hand, people saw this as the first major breakthrough of AI and a sample of what the future holds. On the other hand, people believed IBM had somehow cheated. Kasparov pointed at a move that Deep Blue made in one game, calling it “too human” to be done by an AI. IBM said the move was a bug in the AI’s program, an accident. Deep Blue was unfortunately
scrapped soon after this momentous win. You can still see Deep Blue’s games online, however, forever showcasing the moment where AI started to outsmart the humans. Take a look at the links included with this article online to see some of those momentous games. The next time you play a video game against an AI, consider the code behind its actions. We expect AI to be on-par with us, but once upon a time a computer playing chess was a technological marvel! b
3
History
BY SIMON BATT
Languages Electronics
4
BY LES PONDER
Code Your Arduino With
KEVIN
The Arduino board has been with us for many years and it has become the brand leader in microcontrollers. It's not as powerful as a Raspberry Pi, in fact the two are very different boards.
For sheer simplicity, Arduino cannot be beaten. All we need to do is write some code, upload it to the board, and away we go. But learning the Arduino language, a version of C, can be off-putting to new users. So when Tinkercad released its Circuits
ICKR
TT, FL
JARRE
project, we had to have a try. Tinkercard Circuits is an online tool to create virtual circuits using common electronics and boards such as the Arduino. We can build a circuit using components, then write code for the board using a block editor. We can even simulate our code before we upload it to a real Arduino. In this project we will learn
Tinkercad how to create circuits using the Tinkercad Circuits editor, how to write Arduino code with blocks, how to work with inputs and control output devices, how to use comments in our code, and how to upload code to an Arduino. To use Tinkercad, first we need to visit https://tinkercad.com and sign up for an account.
Once we have an account we need to login and then from the dashboard click on Circuits. Then we need to click on Create New Circuit to load a blank project and the first task that we have is to make a basic circuit. The Tinkercad Circuit layout is simple, but a little cluttered at times. The main area, a large grey portion of the screen, is where we build our circuit. We get components, such as Arduino, LEDs, buttons, etc., from the right hand side of the screen. We click on the component and then move the mouse to the center. We then see the component appear under the pointer.
5
You'll Need
• An Arduino Uno (or compatible) • A computer with the Arduino IDE installed • An LED • A 330 Ohm resistor (Orange-Orange-Brown-Gold) • A 10K Resistor (Brown-Black-Orange-Gold) Let's • Male to male jumper wires start by • A push button adding an • Breadboard Arduino Uno to the project. From the components list look for “Arduino Uno R3” and drag that to the center. Now let's add a breadboard in the same way.
Now we connect the 5V output on the Arduino to the bottom right leg of our button. Again we click on the connections that we wish to make.
And now add a button and LED to the breadboard.
Next we shall connect GND (Ground) from the Arduino to the GND (-) rail of the breadboard using a male to male jumper wire. This means that our circuit now has a common GND connection for all of the components used. To connect components, click on where you would like to start, in this case the GND pin on the Arduino, then click on where you want it to go, the - rail. To shape the wire, double left click on the wire and a node (circle) will appear, you can now move the wire around to form paths around the circuit.
Our pushbutton needs a pull down resistor. This is a resistor that is connected to the GND (-) rail of the breadboard, and its job is to ensure that we have a clear distinction between a button press, and not. When the button is not pressed, we need to ensure that our Arduino sees 0V, so by pulling the button pin down to GND, we get 0V. When the button is pressed, it connects the button pin to 5V and that triggers our code to work.
6 Next we connect a 330 Ohm resistor from the short leg (cathode) of the LED to the GND rail of the breadboard. This means that our LED is connected to GND.
Our button is used as an input to trigger our code, and so we need to connect it to a pin on the Arduino. Pin 2 is connected to the top left leg of the button via a male to male jumper wire. This means that when we press the button, pin 2 receives the 5V signal to trigger the code.
JUSTUS BLĂœMER, FLICKR
be found by clicking the Code button, found in the top right of the screen.
Our LED needs to be connected to pin 7 as we shall be controlling this in our code later. In the same way as for our button, connect pin 7 to the anode (long leg) of the LED. That is all of the connections made in Tinkercad, now we can concentrate on writing the code to control it. Coding in Tinkercad Circuits is very similar to Scratch. We use blocks to build up the code step by step. The code section can
This is where we run out of room in the print version of this magazine! Read the online version of this article to learn how to finish the code in Tinkercad Circuits, and how to finish the rest of the project. See you online! b
Spin That Turtle!
from turtle import Turtle, Screen screen = Screen() rosa = Turtle() rosa.shape('turtle') First, we import some functions from the turtle library. Libraries are collections of code files written by experts. Often, you can find functions to perform tricky tasks that would be annoying to write yourself. No point in reinventing the wheel! Next lines, we create our turtle, Rosa, and we make a screen for her to draw on. We also use the “shape” function to change Rosa’s icon into a turtle. If you run the code at this point, you should see a blank screen with Rosa chilling in the center. You can run your code by hitting the green button near the top of the screen. Before diving into more complex shapes, let’s warm up Rosa by making her draw a circle: rosa.circle(100) The value between the brackets of the “circle” function determines the size of the circle Rosa is drawing. In a circle, all the points on the edge are the same distance from the center. The length
between the edge and the center is known as the radius. A bigger radius means a bigger circle. Degrees are units used to measure angles. Imagine cutting a gigantic pie into 360 equal slices. Each slice would have an angle of 1 degree. If you put 180 pieces together, you get a half circle, and 180 degrees. What about a quarter circle? That would require 90 pieces of pie, or 90 degrees. With the “circle” function, you can add a second argument to specify the number of degrees. What happens if you use a negative number? Or a number bigger than 360?
radius = 10 while radius < 200: rosa.circle(radius, 180) radius += 20 The “+=“ symbol is a programming shorthand for “increase by the following amount”. The “while loop” runs until its condition is no longer true. In our case, that means the loop will repeat over and over until we’ve increased the radius of our circle so that it’s less than 200. Try it out!
rosa.circle(100, -180) To create a spiral, we need to stop Rosa halfway through her circle. This means that she’ll only turn 180 degrees instead of 360. Afterwards, we’ll start a new, bigger circle. Again, Rosa only completes half of it before stopping. If we repeat this process multiple times, increasing the radius by 20 units at a time, the result is a perfect spiral! Any time you see the word “repeat” in your programming instructions, it’s time to use a loop. Writing the same code over and over is boring. Instead, let’s throw in some variables, and keep our code short with the help of a while loop: from turtle import Turtle, Screen screen = Screen() rosa = Turtle() rosa.shape('turtle') NICK ABRAMS, UNSPLASH
Ta-da! If you want to create even cooler spirals, try multiplying the radius by a fixed value instead of adding to it. A low value, like 1.3 or 1.5, should keep things interesting. radius *= 1.3
I'm dizzy!
7
Programming
Let's experiment with a little code, a little geometry, and a little art! The goal: draw whimsical spirals across our screen. The language: Python, which is beginner-friendly and perfect for simple code. We’re also going to use Turtle, Python’s popular graphics extension. Start by navigating to https:// repl.it/languages/python_turtle. In the left-hand editor, set up the basics of our program with the following code:
BY PATRICIA FOSTER
b
Projects
8
BY CLARISSA LITTLER
Back to the Drawing C
A It's summer, at least if you're in the northern hemisphere, and you’re probably on break from school. So? Well it means more time for projects but, if you don't have your own computer at home, it might mean less time to code! It's a good thing, then, that you don't really need a computer to make some games! In this article, we're going to be talking about how to make games with paper, pens, or—if you happen to have gotten one as a gift— a 3d pen. First, let’s talk more generally about the kinds of games you can make and the idea of prototyping. Prototyping is when you make a
quick and simple version of the thing you want to make. Why? Because that's how you figure out which of your ideas are good and which need improvement. You can test the prototype out, ask your friends to try it, and do a lot of tweaks and changes. Doing this with pen, paper, and crafts actually has a big advantage over starting with code. (Namely, that figuring out a complex game code can be kinda hard.) You can spend a lot of time writing code to add features into a game that you might decide you want to test again. Meanwhile, with a non-code prototype, you can just add a feature by changing the rules! You can add entire new game
BACKGROUND: KELLY SKIKEMA,, UNSPLASH ALL OTHER IMAGES BY TOR LOWELL
mechanics in the middle of play. In this article, we’ll examine how to make a board game version of a battle-royale! Check out the online version of this article for a deckbuilding card game as well. Let's outline some possible rules for our Paper Royale: • Each player is going to have a squad of two characters in their party. • On each player's turn they move both their players in any order and declare whether each of them is going to pick something up or fire on another or resurrect another character as their non-movement action. Movement happens and then the other actions. If you attack without moving, you gain a +2
9
Board!
E bonus for aim. • Firing on players: you have to first pick up a weapon before you can fire. Different weapons have different ranges, accuracy, and damage. • Pistol: range of 5, does one damage, hits on a roll of 4 or more • Gun-sword: range of 3, does three damage, hits on a roll of 5 or more • Everyone has 5 hp by default. • Knocking down a door requires one non-move action • Bonuses for aim add to your die roll to hit • A player who's resurrected comes back with one less max hp. Terrain affects line of sight, or in other words how firing at each
D other works. You can only fire at someone if you can take a ruler and create a straight line through the air from one player to the other. This means that you can hide behind terrain! If you're up high you have an accuracy boost and can shoot one square further for each space up you are. If you're shooting through trees, your accuracy is worse. How are we going to make all of this? There's a lot of opportunities for creativity here so we're just presenting one possibility. To start with, you can take a really big piece of paper and draw a grid on it. What about the terrain? At my house we made the terrain out of papercrafts: buildings were made out of
B paper folded and glued together with holes cut for doors. As you can see. A Our trees were cones taped to cylinders, held in little tree stands I made with a 3d pen so I could move them around easily. B Our other terrain was made from folding cubes by cutting and folding diagrams like I drew. C Finally, our players are made as little figures with the 3d pen. D We also used a 3d pen to make the weapons you can pick up. E Our final game looked pretty cool at the end! I bet you can make something even better! Make a big table or floor-size board so you have room for all your friends and have a real battle royale. b
Programming
10
BY JENNIFER NEWELL
Building Blocks of App Development In 2008 MIT professor Hal Abelson was on sabbatical at Google in Mountain View, California. He had spent decades developing engaging ways for kids and other non-computer scientists to learn how to program, and Google had already spent years developing Android software for mobile devices. But developing mobile apps on Android was out of reach for anyone other than an experienced software engineer. Professor Abelson had an idea: create a block-based programming environment that would enable anyone to develop mobile apps. Getting started with App Inventor is a free and easy process. Creating an application is done online in a web browser (at ai2. appinventor.mit.edu), and apps can be tested directly on your Android device. All you will need is to download the MIT AI2 Companion App and a QR scanner onto your device (both free). As you develop your app, scan the QR code the App Inventor generates for the app onto your device to see how it works. If you do not have access to
an Android device, download the phone emulator onto your computer (a pretend phone), and test your app through the emulator. Designing a mobile application with App Inventor involves two phases. First, decide what components to include in the application and where to place them. Next, you must program each component. For example, imagine a silly application where every time the user touches an image on the screen, the phone emits a funny sound. I need a component that is “clickable”, and perhaps another component that provides brief instructions for the user. I also need a component to store a sound. Each component I drag onto the Viewer screen contains a hidden box of commands I can later use to code it. Part of coding with App Inventor is learning which component can be programmed to do what. For instance, a “Button” can be programmed to respond to a click, however a “Label” cannot. Once I design the opening
screen of my application, I can switch from the Designer window to the Blocks window and choose which component to program first. Each component I drag into the Viewer on the Designer window is listed in the margin of the Blocks window. I select the component I want to program first then connect blocks of code that tell that component what to do. In this case, I might first select the Button component, and use the blocks of code associated with it to follow instructions that translate to “when clicked, call the sound component and have it play the sound”. This is quickly done by connecting two blocks of code. Of course I would need to already have the sound loaded onto the sound component in order for my application to function properly. App Inventor can do much more than play a sound when a button is pushed. In fact, App Inventor includes an impressive range of blocks, from speech to text, to drawing and animation, sensors, and even databases. Interested in controlling your most recent Lego Mindstorm creation with your phone? There are blocks for that. How about a mobile app that connects to an Arduino project? This is possible as well. And what if all of the devices at your house are made by Apple? App Inventor is now available for trial on iOS machines, with a more complete rollout likely to happen by the middle of 2019 Ready to give it a try? Check out App Inventor at http:// appinventor.mit.edu/explore/ and click on the Create button to get started on your first app! b AARON BRINKER, FLICKR
tidbitz
11
Trees in Space, Sort Of NASA’s ICESat-2 satellite calculates the height of trees from space and needs help from people on the ground to confirm the accuracy of its measurements. Every second the satellite orbits the earth it shoots 60,000 pulses of light at the earth’s surface. The satellite measures the health of the world’s forests and how much carbon trees soak up. All you need to help is a smartphone, the NASA GLOBE Observer app, a tree, and a tape measure if you have one. b https://icesat-2.gsfc.nasa.gov/ https://icesat-2.gsfc.nasa.gov/ articles/help-nasa-measure-treesyour-smartphone https://observer.globe.gov/doglobe-observer/trees https://youtu.be/_pE26h4xluI
OBSERVER.GLOBE.GOV
Um, Ok...
Why not build a computer out of pasta? Micah Laplante took an old notebook computer, pulled it apart, then put the internals inside dry lasagna noodles hot glued together to create a computer made out of lasagna. There’s no sausage or tomato sauce, of course, because electronics don’t do well with moisture. But there is creative use of ziti noodles for spacers! Laplante proves nothing is impastable. b https://youtu.be/h0TgLg0rThE
What Will They Think of Next? RG ATE.O PEEDG PLAYS
Surely all possible sports have been created: soccer, football, volleyball, lacrosse, rugby, baseball, cricket, the list is endless. College students even play Quidditch, from the Harry Potter books! A marketing company, however, taught an artificial intelligence (AI) the rules for 400 sports then asked its AI to come up with a new game. Speedgate was the most interesting, after a few small changes by the human collaborators. With six players on each of two sides, the game is fun, fast, and physical, relying heavily on teamwork and passing to score and win. b https://playspeedgate.org/ https://vimeo.com/329923291
Concepts
12
BY CLARISSA LITTLER
Can You 3D Print a Galaxy? A Screenplay, of Sorts What are the limits of computers and computation? They sure seem like they can do anything, limited only by storage and speed. Are there problems we can never solve, even with computers a quadrillion times better than we have now? Let's set the scene for our story, sending ourselves through time and space to a far distant future: an age of hyper-tech with unimaginably fast computers and yottabytes of data that can fit in your palm. We find ourselves watching over the shoulders of three engineers: Adam Turing, Kat Goedel, and Gabriel Cantor. They're discussing their next big project: a machine that will be able to create stars, planets, and (if our characters have their way), entire galaxies. We enter at the point at which our engineers realize that their goal of building a galaxy engine isn’t so sure a thing! Let’s listen… "I was doing some reading on 21st century technology and I had a bit of an odd thought," said Turing, hoping to get the group's attention. Cantor folded their translucent tablet and sighed. "And would you care to share what this odd thought is?" he asks with some annoyance. Goedel is staring at her tea, listening. "Well, I was thinking: take away all the references to particle physics and a star builder is a lot like an old-fashioned 3d printer! It's still a device that has to be told how to put things in places, but with quarks and
electrons instead of plastic or metal." "That makes sense but I'm not sure how it's helpful." "Well, Cantor, the interesting thing is that since we want one machine to create a variety of objects we need to be able to tell it what to do; hence, it needs to be programmable!" "But wouldn't that be a programming language for physics at small scales, for quantum mechanics itself?" they ask. "Exactly! Once we've got our programming language we'll be able to code up atoms, then stars, planets, and eventually galaxies! The mechanics of the machine will almost certainly be trivial." At this point, Goedel interrupts the conversation. "That might be a problem." "Why?" "Three things need to be true for a problem to be computable. It needs to take finite time, use finite resources, and be written down in a finite length program." "Yes, obviously, but where's the problem?" Goedel holds up her thumb and forefinger with a space between them. "How many points in space exist between my fingers?" she asks. "Well an infinite number of them! Space is continuous, which means between any two points there’s always more points between them. That implies an infinite number!" "And how many decimal places would you need to describe each and every one of them to
perfect accuracy?" Cantor's eyes go wide as they say, "ah, of course, an infinite number of decimal places are needed." "Further," Goedel continues "there are at least as many configurations of an atom as there are points in space. There aren't enough programs to describe them all!" "But aren't they both infinite?" Turing asks skeptically. "There are different sizes of infinity, though!" Cantor points out. "The number of possible programs is the smallest infinity. The number of points between her fingers is the next smallest infinity in size, which is massively larger." Turing thinks for a moment. "That's disappointing— but wait, what if the universe is discrete instead of continuous? What if there are a finite number of points between Goedel's fingers instead of infinite!" Goedel frowns at this. "We have over 800 years of physics built around the assumption that space is smooth, continuous, with no gaps between points!" "But that doesn't make it true! We need to go talk to the physicists…" What happened after this? Were Turing, Goedel, and Cantor ever able to build their engine? I don’t know. What I do know is that people are working on understanding these very problems today and not in some hyper-tech future! That brings us to the dramatis personae in our story: they were named after three important people in the history of computation: Alan Turing, Kurt Goedel, and Georg Cantor. b
Not YOU Again! Clippy, a paperclip avatar with big eyes and eyebrows, was created by Microsoft to help people. What started as a novelty in 1995, however, grew to annoy people. Any time you opened Word or other Microsoft Office software, for example, Clippy would appear. Start a Word document with “Dear so-and-so” and Clippy might pop up to offer tips on writing a letter. Open Excel, and Clippy might greet you offering tips to format a spreadsheet. Considering the many relatively new features of Office software used by thousands of first time computer owners, having Clippy help seemed like a great idea. Until it wasn’t. The first time a person tried out a new feature, Clippy might offer useful advice. However, Clippy could not learn from experience and instead relied heavily on preplanned responses. He quickly became more of a nuisance than a helper, popping up repeatedly with the same questions and responses. For a decade it was hard to escape Clippy: he was included in Windows 97 through 2003, popping up by default. Clippy was still around in Office XP, but not as a default feature. By 2007, the world was tired of Clippy and Microsoft turned him off for good before releasing Office 2007. However, Clippy reappeared recently as a sticker available in Microsoft’s Team chat software. Users could be ironic and send Clippy to their co-workers and friends for a laugh. Then someone in the Microsoft marketing department found out and removed
the Clippy sticker. Clippy went into hiding again. For now, Clippy has disappeared once again. The current high school age-and-under crowd has likely never heard of this somewhat intrusive assistant. However, many of us are familiar with the modern day versions of digital helpers. Siri, the voiceactivated iPhone program, can find you the best local restaurant, give you movie reviews, or play songs you want to hear. Siri is the first assistant from CALO (Cognitive Assistant that Learns and Organizes), created by the US DARPA agency, the group that helped develop many early internet technologies. CALO was inspired partially by Clippy. Alexa from Amazon, Google Home, and Cortana, a more sophisticated Microsoft assistant, all were created to help us to seek assistance from digital helpers. Fortunately for these more modern-day assistants, artificial intelligence has made the gains necessary for them to speak with us, not just at us. And if AI continues to develop at the rapid pace we see today, perhaps one day we will scoff at our current high-tech assistants the way those who recall Clippy do. In the meantime, Clippy is in hiding again and not likely to reappear except briefly as a prank. b
I see you're trying to get some work done! Do you mind if I annoy you for awhile?
History
13
BY JENNIFER NEWELL
! p U d e c i u J l Al
+14– + – + – + – + – + – + – + – + – + – + – + – + – –+–+–+–+–+–+–+–+–+–+–+–+–+ +–+–+–+–+–+–+–+–+–+–+–+–+– –+–+–+–+–+–+–+–+–+–+–+–+–+ +–+–+–+–+–+–+–+–+–+–+–+–+– –+–+–+–+–+–+–+–+–+–+–+–+–+ +–+–+–+–+–+–+–+–+–+–+–+–+– –+–+–+–+–+–+–+–+–+–+–+–+–+ +–+–+–+–+–+–+–+–+–+–+–+–+– –+–+–+–+–+–+–+–+–+–+–+–+–+ +–+–+–+–+–+–+–+–+–+–+–+–+– –+–+–+–+–+–+–+–+–+–+–+–+–+ +–+–+–+–+–+–+–+–+–+–+–+–+– –+–+–+–+–+–+–+–+–+–+–+–+–+ +–+–+–+–+–+–+–+–+–+–+–+–+– –+–+–+–+–+–+–+–+–+–+–+–+–+ +–+–+–+–+–+–+–+–+–+–+–+–+– –+–+–+–+–+–+–+–+–+–+–+–+–+ +–+–+–+–+–+–+–+–+–+–+–+–+– –+–+–+–+–+–+–+–+–+–+–+–+–+ +–+–+–+–+–+–+–+–+–+–+–+–+– –+–+–+–+–+–+–+–+–+–+–+–+–+ +–+–+–+–+–+–+–+–+–+–+–+–+– –+–+–+–+–+–+–+–+–+–+–+–+–+ +–+–+–+–+–+–+–+–+–+–+–+–+– –+–+–+–+–+–+–+–+–+–+–+–+–+ In the Middle: A Deeper Dive Into Everyday Stuff
BY TIM SLAVIN
bleu! Sacre
Old D batteries
A Leyden Jar
Rows of cannons were called "batteries".
A chunk of amber
Volta demonstrates his Voltaic Pile to Napoleon
+ – + – + – + – + – + – + – + – + – + – + – + – +15 – – + – + – + – + – + Electronics –+– +–+–+–+–+–+–+ use a massive amount of electricity to power them up. No power means no computers. Some electricity is provided on +–+–+–+–+– +–+–+–+–+–+–+–+– demand from power plants, when we plug into a wall outlet. Batteries deliver it slowly, for example, in our phones and – + – + – + – + – +store –electricity + –and+ –+–+–+–+–+–+ wireless keyboards and computer mice. What is a battery, exactly? It’s a device that contains two chemicals +–+–+–+–+– –mixed+together, – +generate – +electricity. – +A battery – +is designed –+–+– that,+ when to keep the chemicals apart. When you connect one end of the battery – + – + – + – + – +to the–other+end,–the+two–chemicals + –send+a stream – +of electricity – +from –+–+ one end to the other. If you put a light bulb in the middle of this flow of electricity, +–+–+–+–+– + –the bulb + will –light +up.– + – + – + – + – + – When these two chemicals mix, negative particles in their atoms flow and create electricity. The word electron – + – + – + – + – +called –electrons + –begin+to– +–+–+–+–+–+ comes from the Greek word for amber, the yellow fossilized sap from evergreen trees. Ancient Greeks discovered that amber, when rubbed +–+–+–+–+– +attracted – +bits– + British – +physician –+ –Gilbert +–+– with+ a dry– cloth, of paper. William with this attraction effect and, in 1600, invented the word – + – + – + – + – +experimented – +to describe – +amber-like – +attractions. –+– +– +– electricus The word electricity was + – + first used in 1646 by Sir Thomas Browne based on Gilbert’s word. Today we call +–+–+–+–+– +amber-like – + attraction – + static – electricity. +–+–+–+–+– Benjamin Franklin first used the term batteries in 1748 to describe jars, devices used– to store static electricity. Franklin thought – + – + – + – + – +Leyden – + – + + – + – + – +–+–+ Leyden jars next to each other looked like batteries or rows of cannon used in the military that would fire at the same time. The metal terminal +–+–+–+–+– +–+–+–+–+–+–+–+– rod that sticks out from the top of a Leyden jar also might have Franklin of a rammer, the long rod used to pack cannons with – + – + – + – + – +reminded – + – +balls.– + – + – + – + – + – + powder and cannon Alessandro Volta created the first battery, called a voltaic pile, in +–+–+–+–+– +He – +copper – +and – +– –of another + –with+ – + – 1800. stacked zinc plates one + on top wet paper in between each plate. The paper had soaked in salt brine. salt + – + – + – + – + – + – +While –voltaic + piles – produce + –electricity + –for+long–periods + of–time,+the– brine wears down the plates and ruins the battery. Voltaic pile batteries were used only for experiments because +–+–+–+–+– +–+–+–+–+–+–+–+– they did not produce a steady current of electricity. British chemist 1836 created the first batteries with steady current, – + – + – + – + – +John –Daniell + in– –for + –+ –+ –+–+ called Daniell cells. + They– were+ used telegraph networks. Daniell cells were wet cell batteries, using liquid chemicals stored in glass +–+–+–+–+– + –containers. + –Today, +– +dry–cell + – with + two –+–+– or copper we use batteries chemicals in paste form. chemicals work– better – + – + – + – + – + Some –+ –+ +than–others. + And, –over +time, – the+ – + – + chemicals degrade and no longer cause electrons and electricity to flow. Common battery sizes+ are – much+ older than you– might think. The +–+–+–+–+– + – + – – + + – +–+– D battery, for example, was introduced in 1898 as the first battery flashlights. AA batteries first appeared in 1907 and AAA batteries – + – + – + – + – +for –+–+–+–+–+–+–+–+ appeared in 1911. Batteries are either primary (used once then tossed away when +–+–+–+–+– +or– + –(used+and–recharged + –multiple +– +–+–+– spent), secondary times). We use batteries in many devices, from phones and laptop – + – + – + – + – +computers – +to hearing – +aids,–remote +– +toy–cars,+real– –+–+ control cars,+ watches, cameras, and almost every kind of mechanical and electronic object. b +–+–+–+–+–+–+–+–+–+–+–+–+– –+–+–+–+–+–+–+–+–+–+–+–+–+ A Voltaic Pile
Daniell Cells
PHOTOS::DANIELL CELLS, VOLTAIC PILE, BENJAMIN FRANKLIN, CANNON, LEYDEN JAR, AND AMBER ALL FROM WIKIMEDIA COMMONS; IMAGE OF VOLTA AND NAPOLEON BY GIUSEPPE BERTINI; D BATTERIES BY JOE HAUPT, FLICKR
Scratch
16
For info on Scratch go to https://scratch.mit.edu BY CLARISSA LITTLER
Dynamic Gravity Remember the old Mario Galaxy games from the 00s? Unlike other Mario games, where there were platforms and terrain and gravity always pulled from the top of the screen towards the bottom, the Mario Galaxy games involved Mario moving between "planetoids" whose gravity pulled Mario towards their center. Can we make a 2d platformer in Scratch that has this kind of gravity? Yes! It just requires a few tricks! There's two parts to this tutorial. We'll use basic trigonometric functions to make a sprite get pulled by gravity towards the center of a circular planetoid. Secondly, we'll have our sprite get pulled towards different planetoids based on where they are at the time. First, we'll make a tiny simple Scratch project with the Scratch cat and a single planetoid. Start by making a new sprite that's a circle and place it somewhere on the screen. A Add code to make our cat face in the right direction relative to the planetoid. We'll point towards the planetoid then rotate 90 degrees CCW in order to face like our sprite is standing on the planetoid. B You can move around and see that your arc is rotating around the planet, but we need to fall towards the planet. We need a little trig: -sin(direction) is the y-component of gravity and cos(direction) is the x-component of gravity. We're using separate x and y velocities in order to properly keep track of the speeds on each axis. C Now, add a jump in the opposite direction of gravity. D You can write code to "bump" the sprite out of the body of the planet if it starts to shift down. This is easier if you make your planetoids have two layers of color, one that acts like the ground for setting the velocity to zero and an interior layer of color that pushes the sprite up. Shrink the sprites because we want more room on the screen. My sprites look pretty tiny, like this. E Now, generate a bunch of planetoids as clones. We'll do that with the following code. F How do we pick which planetoid to orbit? You can't pick out clones by name, but we can point at a particular sprite that just happens to always be sitting at the center of closest planetoid. Let's outline the steps. First, make a new sprite. Make it invisible, make it small, and make sure its single costume is centered. Mine is a little purple rectangle that has the following code on it. G This means that you need to create two variables X center and Y center. How do these variables get set? By the following key loop we add to our planetoid. H This code gets every planetoid to check how close they are to the player and, if they're closer than the last planetoid checked, move the helper shape right to their center. Look at the code and see if you can make sense of how this if-statement ensures that, no matter how many times the helper shape moves around it always ends up at the closest planetoid by the end. Finally, we can change our main sprite's code just a little bit to send the message that moves our helper shape before pointing at it. I That's it! b You can find the full project at https://scratch.mit.edu/projects/297794638/
A
B
C
D E
F
G
H I
Minecraft-ing with Paper My name is not Polly, but sure, now that you ask, I do want a cracker.
IMAGE FROM PIXELPAPERCRAFT.COM
Have you made something out of paper before? Not writing or drawing, however. We mean actually folding paper to form shapes and figures. You may have seen the origami paper art, where artists create intricate birds and other shapes with paper. Minecraft has a very recognizable blocky art which is simple to recreate in paper form. Box-based shapes are easy to build using paper. Minecraft naturally lends itself very well to this art medium. If you like, you can make Minecraft scenes in real life from papercraft! If you feel brave, try creating the papercraft yourself. Look at the in-game model of what you want to make then try to remake it in real life. You can decorate the model as you please, so you can remix and remake the characters! If you don’t want to build papercraft from the ground up, don’t worry. There are resources on the internet you can use to download templates for papercraft. You download the image, print it off, then fit it together for a Minecraft model in real life. Pixel Papercraft is a great site (pixelpapercraft.com) to do just that. Visit their main site, then click “Browse Designs” at the top of the page to see every Minecraft monster and character you can make. Each character has multiple models created by different people. If you find one too hard, you can try someone else’s instead. Pixel Papercraft also contains paper models of things that appear in mods, too! If you like the animals in the Mo’ Creatures mod, you can find a wide selection ready to be made by clicking the Mo’ Creatures tag. If you want to make a model of your own character, the site supports that as well! Click the “Generators” button at the top and you’ll be taken to a selection of different models you can try. Upload your skin into the generator, and the site will give you a template to create your character in real life! When you print the models, use a heavyweight printer paper. Regular paper could work but it may be a bit flimsy. Thicker printer paper makes the model more rigid and able to stand on its own. Don’t get paper that’s too thick, though, or else you’ll find it hard to fold. Once you’ve printed out the model, cut it out with scissors or ask an adult to use a cutting knife. Then fold along the black lines and stick the tabs to the inside of the model with glue. If you’ve never built a paper model before, the online version of this article includes links to a handy guide to help you get started! Always remember, if you’re really struggling to get something done, it’s worth asking an adult to help you out. This goes double if you’re have issues cutting the paper, as you could get a nasty cut if you’re not careful. Who knows, the adults may even help you build a fun Minecraft setting with creatures of their own! b
17
Projects
BY SIMON BATT
SketchUp
18
BY BONNIE ROSKES
Making Fibonacci Flowers In last issue's SketchUp article, we created a Fibonacci spiral:
In this project, we’ll use this spiral to create flowers. If you created your own spiral and saved it, here’s how to get it back: Open my.sketchup. Click the Folder icon at the top left corner and choose Open.
If you didn’t create your own spiral before, never fear—you can download one. Open my.sketchup. We don’t need Josh in the model, so press E for the eraser, and click on any of Josh’s edges. To use the spiral, we want to start in Plan view (also known as top view or bird’s eye view). Click the Views icon on the right side. In the Views window, click the Top view icon.
Now we’re looking straight down at the “ground.” To find the spiral model to bring in, click the Components icon on the right side. In the search field at Browse to the spiral model you the top, enter “fibonacci saved, and open it. spiral.” There will be several results, but the one we want to use is this one, by Bonnie Roskes. Click this thumbnail, then click SketchUp is a free anywhere in program for 3D modeling. You the model can use SketchUp to design just to bring it in.
about anything, from furniture to a dream bedroom to an entire city. There is a downloadable version called SketchUp Make, which you can get at https://www.sketchup.com/ download/all. But there is also a webbased version which works right in your Internet browser called my.sketchup. Just go to www. my.sketchup.com.
Anything brought into SketchUp this way comes in as a component —a single object comprised of faces or edges. We don’t want this spiral to remain as a component, so rightclick on it and choose Explode.
Once exploded, the spiral is broken down into a new set of smaller components. While all of these are still selected, right-click on any edge and choose Explode again.
Now there are no more components, just one long curve. Leave it selected. Activate the Rotate tool (press Q), and click to place the protractor at the inner endpoint of the spiral. You’ll have to zoom in very closely to click this point.
Press the Ctrl key (PC) or Option key (Mac) to make copies. You don’t have to keep this key pressed, just tap it to make the “plus” sign appear. The next two clicks define the rotation angle - click anywhere to start, then move your mouse and click again when the Angle field indicates a 45-degree angle. (If you can’t get 45 to appear, just type 45 and press Enter.)
Click the handle at the center of the left side, and move it to the right so that the spirals turn inside-out. Click to finish when the Red Scale value is -1, or just type -1 and press Enter. Leave these spirals selected. Immediately after that first copy is created, type 7x and press Enter. (Remember, you never have to click in the field that currently reads Angle - just type and the numbers appear.) Be patient if SketchUp needs a few seconds to complete this. Now we have seven copies, or eight total spirals.
The trick to making the flower is taking the eight spirals we have and making a mirrored copy of them. We’ll start by making a copy in blank space. Select everything again (Ctrl + A), and activate the Move tool (press M). Tap the Ctrl or Option key again to make a copy, and click two points so that a copy is placed anywhere in blank space.
19
Now the copied spirals should be the ones selected. With the copied spirals selected, press the S key to activate the Scale tool. A set of eight drag handles now surrounds the spirals.
Zoom in very closely at the center of the selected spirals and activate the Move tool again. Click the center of the selected spirals.
For the second move point, zoom out then in again, in order to click the center of the original set of spirals.
To break up all of the curves where they intersect other curves, select everything, right-click on any selected curve, and choose Intersect Faces / With Model.
Use the Eraser to remove the partial curves around the outer edges.
Now comes the fun (colorful) part. We’ll create one set of spiral faces first, then make rotated copies of those faces to complete the first flower. Activate the Line tool (L) and click any two adjacent endpoints within the edge shown below.
This fills in faces on either side of the traced edge.
Zoom out, and this is what you should have:
20
Continue tracing small lines along every other edge, working from outside to inside. When finished, you should have one complete spiral filled in.
To paint these faces, first click the Materials icon on the right side. Click the Browse icon at the top right, then open the Colors collection In this example, the six rainbow colors are used in a repeating pattern.
To copy this painted spiral, select everything again. (This selects edges as well as faces, but it doesnâ&#x20AC;&#x2122;t matter if edges are copied on top of existing edges.) Activate Rotate, and place the protractor at the center of the spirals.
Press Ctrl or Option, and click any two adjacent, similar points around the flower. The angle, as when you created the rotated set of spirals, should be 45 degrees.
Enter 7x, and the faces are copied. (This is a resource-heavy operation, so donâ&#x20AC;&#x2122;t be surprised if SketchUp takes a few minutes to complete it.)
You can create flowers using different rotation angles and color schemes. If your Fibonacci spiral is rotatecopied using an angle of 30 degrees with 11 copies, you can get something like this:
For an even more detailed flower, this example uses a rotation angle of 12 degrees and 29 copies. It took quite a while for SketchUp to complete the rotated copies. b
more 's lots There Check the . online this article r o f er. k lin k cov e bac on th
Have you ever played a game that feels infinite? As if the map could go on forever, generating new level after new level no matter how much you play? Infinite games aren’t so impossible, or uncommon! The secret? Writing code that creates maps. Let’s start with a simple labyrinth written in Python. Part One: The Frame
Picture your labyrinth as a checkerboard of squares. Each square is referenced by the unique combination of its row number and column number, and each square contains a wall or a hallway. Characters can move into hallways, but can’t walk into, over, or through walls. (Unless they’re ghosts?) A To get started, navigate to https://repl.it/languages/python3 and add the following code to the left-hand editor: from random import random numRows = 20 numCols = 40 So far we’ve imported the “random” module, which we need to keep our maps unpredictable. We’ve also created two variables that represent the length and width of our rectangular labyrinth. To display each square in our map we can use a nested for loop. At any given moment, “i” represents
the row number, and “j” the column number. Each variable starts at 0 and increases by a value of 1 each round. Eventually, they’ll max out at the sizes defined by numRows and numCols. (Remember, in computer science, all lists start at position “0”!) Next, our labyrinth needs walls around its edges so that it’s not too easy for our heroes to escape. We’ll place these walls in the first row (i == 0), the last row (i == numRows - 1), the first column (j == 0), and the last column (j == numCols 1). Walls are represented with the character “X”, and hallways with a space: for i in range(numRows): for j in range(numCols): if i == 0 or j == 0 or i == numRows - 1 or j == numCols -1: print("X", end="") else: print(" ", end="") print() You need to end your “print” statements with an empty string, otherwise Python starts a new line after each one. So don’t forget the print statement at the end of the first for loop! Otherwise you’ll never
A
B
HENRY BURROWS, FLICKR
Maze Generator
start a new row. When you’re ready, hit the “run” button and try the code out. B Part Two: Entrances and Exits
Next, our characters need to get in and out of this cunning trap. To place entrances and exits in the outer walls, change your if statement to look like this: if i == 0 and (j == 1 or j==2): print(" ", end="") elif i == numRows-1 and (j == numCols-2 or j==numCols-3): print(" ", end="") elif i == 0 or j == 0 or i == numRows - 1 or j == numCols -1: print("X", end="") else: print(" ", end="") Why is it important for the first check to be the position of the entrances and exits? What if we switch the order in this “if statement”? Read the rest of this article online (the link is on the back cover of this issue) to learn how to add walls, provide a little more structure to the game, and ideas about how you might make the game better and different! b
Programming
21
BY PATRICIA FOSTER
summer reading
22
Get Outside and BY ERIN WINICK
Summer is coming up, and that means free time! Time to make, time to explore, and of course, time to read! A number of masterful scientists and authors have created books that tell some fantastical science adventures, as well as offer some super fun ways to spend your time this summer. Here’s my list of six you need to add to your book shelves to prepare for that summer break boredom. Ada Lace Series by Emily Calandrelli
This is actually more than a single book. It’s a series! There are five books in all that follow the marvelous Ada Lace, a third-grade scientist, powerhouse inventor, and awesome student. Along with her neighbor Nina, she investigates mysteries, builds robots, creates art, and even fixes up a ham radio. She’ll make you want to get out and make something cool. The author, Emily Calandrelli, is a super cool science communicator you may have seen on Bill Nye Saves the World or
Xploration Outer Space. Emily has a background in engineering. As an added bonus, if you read these books, you will also be reading a book that has been sent into space! Aboard a SpaceX rocket as a part of the Story Time from Space program, Ada Lace got to go to space. An astronaut aboard the International Space Station reads the chapter book, Ada Lace: Take Me to Your Leader for kids here on Earth to enjoy. It’s actually the first chapter book read in its entirety in space as a part of the program. Pretty cool. Right? https://www.simonandschuster. com/books/Ada-Lace-on-theCase/Emily-Calandrelli/An-AdaLace-Adventure/9781481485982 https://www.simonandschuster. com/books/Ada-Lace-TakeMe-to-Your-Leader/EmilyCalandrelli/An-Ada-LaceAdventure/9781481486040 https://www.netflix.com/ title/80117748
“Rosie Revere, Engineer" by Andrea Beaty
Rosie loves making things. She can turn random trash from around the house into treasure. But she hasn’t always been confident in sharing her inventions. Her greatgreat-aunt Rose helps her see how incredible her inventions are, and helps her keep going and become an incredible engineer. Rosie realizes that the only real failure is quitting. And Rosie even has some friends, Ada Twist, Scientist and Iggy Peck, Architect who also love exploring other areas of STEM in other books. This book is a New York Times Bestseller, so you’ll be joining a big group that has loved this book! https://www.amazon.com/ Rosie-Revere-Engineer-AndreaBeaty/dp/1419708457
23
Read! â&#x20AC;&#x153;Super Cool Scientists Coloring Book" by Sara McSorley
Do you like to color? Do you also like learning about awesome women scientists? Then you need to check out the Super Cool Scientists Coloring Book, and its sequel, Super Cool Scientists #2! The book highlights women working in fields ranging from marine biology to technology, and comes with some awesome pictures of them and their work to color in while you learn their stories. They include women like astronaut Anne McClain, who is currently on the International Space Station, and biologist Danielle Lee who studies the African giant pouch rat. I particularly enjoyed coloring the picture of Michelle Barboza who we featured in a recent issue of beanz magazine!
and artist, Great Barrier Thief takes you along with Anthia, who notices the colors are starting to disappear from her beloved coral reef. In this adventure, learn how hotter waters are affecting our oceans, and help Anthia return the color back to her beloved coral reefs. And if you like it, the author will be coming out with another book soon, Cranky Franky: Oceans of Trash. https://drsuepillans.com/ books/the-great-barrier-reef/ https://drsuepillans.com/ books/marine-debris/ â&#x20AC;&#x153;Great Barrier Thief " by Dr. Suzie Starfish
This one is for the younger crowd out there, but has some really beautiful illustrations. Written by an Australian marine scientist
https://www.kidscodecs. com/michelle-barbozaramirez/ https://www. amazon.com/SuperCool-Scientists-SaraMacSorley/dp/ 1534662235/
JYOTIRMOY GUPTA, UNSPLASH
summer reading
24
“Magic Tree House: Midnight on the Moon" by Mary Pope Osborne
This book isn’t new, but it was one of my favorites growing up, so I had to add it to the list! One of the first books in the Magic Tree House Series (number eight to be exact), the book follows Jack and Annie on a trip through time and space. Their magic tree house that they discover near their home takes them to the moon in the year 2031 where they look for a piece of the puzzle they are trying to solve. But they need to make sure they solve the mystery before their oxygen runs out! This is an awesome chance to go on an outer space adventure, and possibly find a fun new series that has over 50 books to enjoy. https://www.magictreehouse. com/books/125151/midnight-onthe-moon
“The Computer Science Activity Book" by Christine Liu and Tera Johnson
This fun activity book was created by two awesome women scientists and artists from Two Photon Art, a science pin and 'zine company. And there’s no computer required to do the activities! Spend your rainy summer days learning
the ins and outs of computer science and coding. There are 24 projects that will let you explore everything from circuits to neural networks through some fun cartoony artwork. https://www.amazon.com/ Computer-Science-Activity-BookPaper/dp/1593279108 https://twophotonart.com/
b
Getting Rust-y In previous issues we've talked about programming languages that are important for low-level programming. We talked about assembly languages, which are the lowest level human-readable programming languages, before the raw instructions to the processor. We've talked about C, an old language still used for programming microcontrollers and making operating systems. Here's the third part of our trilogy of systems programming languages: Rust. If you have a repl.it account, you can follow along as Rust is one of their supported languages. Otherwise, you'll probably want to install Rust by following the instructions at https://www.rustlang.org/tools/install. Rust, despite its name, is a pretty new and exciting language! With C, we explained the idea of a runtime system. The runtime system is all the code included in your compiled program that does things like allocate memory for the data the program needs and give memory back to the operating system when it's done. Runtime systems are usually RALF STEINBERGER, FLICKR
big, complex pieces of code that interrupt or slow down the program you wrote in order to handle all the clean-up. A big reason why C doesn't need one is that it forces you to allocate and deallocate memory yourself, so thereâ&#x20AC;&#x2122;s no need to have another chunk of code running, watching to see if something needs to be taken care of. But that can be easy to mess up! Over the years, programmers have caused bugs by not freeing up memory when they were supposed to, which is called a memory leak, or by not matching the size of the memory theyâ&#x20AC;&#x2122;ve allocated with the size of the data theyâ&#x20AC;&#x2122;re reading in and storing. Rust doesn't require a runtime and makes practicing good memory management easier than C. How? It does a lot of checks at compile time to make sure it knows, before the code is ever run, what happens to your data and when it's no longer being used. Rust can actually insert the necessary code to free up memory at compile time because of these checks! For example, here's a simple Rust program that fails:
fn main() { let x = 10; x = 5; } If you try this out at the repl.it website, you should see the error: error[E0384]: cannot assign twice to immutable variable `x` --> main.rs:3:3 | 2 | let x = 10; | - first assignment to `x` 3 | x = 5; | ^^^^^ cannot assign twice to immutable variable Oh, huh! It says that x is immutable, which means it can't be changed. Yes, by default variables in Rust can't be changed. If you want to change it, you need to use the mut (or mutate) modifier like: fn main() { let mut x = 10; x = 5; } to say that it's "mutable" rather than "immutable". Read the online version of this article to learn more about how Rust works with links to learn all about this language. The link is on the back cover of this magazine. b
Languages
25
BY CLARISSA LITTLER
History
26
BY SIMON BATT
Why “Bluetooth?"
t phabe nic Al u R e Th
RAWPIXEL, FLICKR
In the early days of technology, Bluetooth connections were a luxury. Now, you can’t buy a PC or smartphone without a Bluetooth transmitter inside of it! Have you ever wondered why ‘Bluetooth’ has such an odd name to begin with? Where did this weird name come from? Oddly enough, the name “Bluetooth” came from an ancient king of Denmark and Norway! His full name was Harald “Bluetooth” Gormsson, and he was a very powerful and influential king at the time. Harald was the son of a man called Gorm the Old, who ruled over a divided Denmark and tried to unite the country. After Gorm passed away, Harald stepped up to finish what his father started. Thankfully, he was able to reunite the country of Denmark under a single banner. He then turned his attention to the neighboring country, Norway. He managed to take over Norway, but he didn’t stop there; he also helped bring the two countries together as well. Harald had a knack for bringing people together using peaceful negotiations. As such, his ability to unite others with speech alone gave him a reputation as being very skilled at negotiation. Thankfully, people took a liking to Harald despite the fact that one of his teeth had gone bad and had gone a nasty bluey-black shade—hence, “Bluetooth.” Fast forward to the modern day: Jim Kardach of Intel was working on developing a new means of wireless communication. The main goal was to create a standard communication method that would allow PCs and mobile phones to talk to one another. Jim happened to be reading the book The Long Ships, a historical novel about the Viking Age in which Harald Bluetooth features prominently. He got the idea of naming the technology after Harald because of how Harald united both Denmark and Norway. It's a great choice of name for his technology which unites computers and mobile phones. You can even find the influence of Harald in the Bluetooth logo itself! It looks like a strange B, but it’s actually two Scandinavian runes (letters) put together. The runes are h and B, which are Harald’s initials in that alphabet. Put these together and you get the unique Bluetooth icon. Harald could not have had a better technology named after him. Without the use of any wires, your computer and phone can to talk to one another. And through Bluetooth you can also connect headphones, mice, and keyboards to any device that supports Bluetooth. This may seem trivial now, but back when everything connected via wires, there were a lot of connectivity issues between devices. In order to solve this problem, a “standard” has to be adopted. This is a common agreedupon method of communication that everyone uses to enhance connectivity. In a way, the Bluetooth technology bridges gaps just like the ancient king did. Harald would be proud! b
Psst! Harald says BRUSH YOUR TEETH and then check out the link on the back cover of this issue for more info!
Learning Javascript with Cue Wonder Workshop made waves with their first CleverBots, Dash and Dot. This chirpy duo introduced block coding to kids using Google’s Blockly. Wonder Workshop has now brought our little blue friends’ older, smarter sibling on board—Cue. Cue includes all of the features fans have come to expect, including sensors, lights, programmable buttons, microphones and speakers. Cue is a step up from its predecessors though, teaching users the in-demand text programming language, JavaScript. Utilizing Microsoft’s free app, MakeCode for Cue, users can tackle well-designed coding challenges. Lessons start users with block coding but swiftly transition to real JavaScript. Being thrown into the deep end works well as scaffolding is utilized in the 50+ tutorials. When
a user hits a stumbling block, they can flip between block and text coding to visually compare what’s happening with the code. Inside the app, users can find a Challenges button. Clicking on it displays block and JavaScript lessons split into three major units. Lessons progress in difficulty, taking users from simple sequencing to JavaScript fundamentals including events, loops, functions, variables, conditionals and arrays. Most lessons start with block coding but by the end of each lesson, users are typing JavaScript code. As soon as lesson 5 in Unit 1, users are introduced to JavaScript, where they will make Cue move and turn. Users can easily see how block and text accomplish the same task at the click of a button. In A, block coding programs Cue to move 25 centimeters at the speed of 20 centimeters a second. The block coding also results in Cue turning 90 degrees after each movement. In B, the JavaScript equivalent of the block coding produces the same
The new re's a sh in to eriff wn!
THE LATEST CLEVERBOT FROM WONDER WORKSHOP
movement and turns: actions. move(25, 20) = Cue moving forward 25 centimeters at the speed of 20 centimeters a second; actions. A turn(90) results in Cue turning 90 degrees. Another fun challenge includes changing Cue’s facial expressions when he’s picked up (or she, depending on the Avatar selected). Possible JavaScript code would look like: events.whenPickedUp(function () { actions. setFacePattern("'111111111111'", 255) }) Users could also try changing the 0s and 1s to ‘101010101010’. What do you think would happen? For the adventurous user that wants to forgo working through the challenges and jump right into coding, they should go directly to the menu. The menu options include Actions, Events, Control, Variables, Functions and Math (Accessories are extra). An advanced feature of the app is providing auto code completion for JavaScript programming – especially handy for beginners B that will benefit from seeing a menu of options. And if the inevitable syntax error occurs, Cue politely lets the user know to try again! b
Programming
27
BY BIANCA RIVERA
Parents and Teachers
28
BY TIM McGUIGAN
Gamifying the
As summer break begins and days consumed with school become days consumed with anything else, you can almost hear a collective sigh of relief. Summer really is wonderful. As a teacher, part of me wants kids to enjoy the nice weather outdoors climbing trees and building forts. However, the reality for many kids is that the summer also can bring summer work. From a teacherâ&#x20AC;&#x2122;s perspective, this reading and math enrichment is quite meaningful as it helps students retain knowledge over a long hiatus. However, for many families and students this summer homework can be a bit of a chore. Summer work tends to be less than engrossing for most kids, especially the gaming and technology crowd. Teachers work to scaffold and support the students during the school year,
although many times summer enrichment work is assigned with very little structure. Recently a gamification program at our school has helped structure these assignments for students outside of the classroom and school walls. Gamification applies the traditional game mechanics of quests, competition, levels, and unlocks prevalent in video and board games to education. Through these activities, students gain an added incentive to learn the material and engage with the content. When it comes to summer reading, adding a few side quests like investigating characters or unlocking features can help students approach the material in a new way. One project I helped design was a side quest that asked students to choose a character
from a summer novel and develop a Scratch game. The quest asked them to build the game based on the characterâ&#x20AC;&#x2122;s struggle. As students were reading, in order to develop an engaging game they needed to pay close attention to the characters to find one with a relevant story line. Then, using Scratch they translated what they read in the novel into a game with traditional levels, obstacles, and power-ups. Many students were quick to identify the characters' internal or external conflicts and then assign them to ghost or ogre sprites. As more and more students played their games, the designers earned unlocks like homework passes or special privileges they could use in the fall. This competition
29
Kids' Summer incentivized students to read closely and build games that were fun to play. Technology is not always a prerequisite for gamification either. During a summer course recently, while reading a novel I asked students to keep track of the setbacks and breakthroughs for the different characters. Students then applied these notes by creating a traditional board game based on their notes. After many conversations about design and a few days researching different game boards, students got to work. Without exception, each student built adventurous games with imaginative features like chutes,
chance cards, or teleports. The results really surprised me. Students engaged with the content in deep and meaningful ways while having quite a bit of fun. Reading and comprehension are still the main skills they practice, although the act of building a game engages different parts of the brain. This can be a benefit to students with different learning styles. I noticed a few students who struggled as readers and writers flourished during the board game unit. â&#x20AC;&#x2039;The effectiveness of games and gamification to teach concepts and keep students focused over a long series of
assignments is one of the most surprising teaching outcomes Iâ&#x20AC;&#x2122;ve observed as a classroom teacher. It is a tool parents and teachers can use to build engagement over a long, hot summer. The world of badges, level-ups, and side quests is a very familiar world for kids. When students feel more comfortable, they tend to learn more easily and retain what they have learned. More importantly, gamification can help make the summer work manageable so that students can spend the rest of their time exploring, building, and imagining. b
MARCO VERCH, FLICKR
“Games have so much freedom. You can go anywhere you want.”
—Jenova Chen
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. Time to Pack It In! http://beanzmag.com model-view-controller
Can You 3D Print a Galaxy? http://beanzmag.com/ print-3d-galaxy
STEAM Summer Reading List http://beanzmag.com/ steam-reading-list
What Was Deep Blue? http://beanzmag.com/ deep-blue-chess
Not YOU Again! http://beanzmag.com/ clippy-returns
Getting Rust-y http://beanzmag.com/ rust-language
Code Your Arduino With Tinkercad http://beanzmag.com/ tinkercad-circuits-arduino
All Juiced Up! http://beanzmag.com/ battery-history
Why "Bluetooth?" http://beanzmag.com/ bluetooth
Dynamic Gravity http://beanzmag.com/ scratch-gravity
Learning JavaScript with Cue http://beanzmag.com/ learn-javascript-cue
Spin That Turtle! http://beanzmag.com/ turtle-circles-python Back to the Drawing Board! http://beanzmag.com/ paper-games Building Blocks of App Development http://beanzmag.com/ app-inventor tidbitz http://beanzmag.com/ june-2019-news-wire
Minecraft-ing With Paper http://beanzmag.com/ minecraft-papercraft Making Fibonacci Flowers http://beanzmag.com/ sketchup-fibonnaci-flower
Gamifying the Kids' Summer http://beanzmag.com/ gamify-summer-learning
ibe r c s b u om/s c . g a Subscribe! anzm e b / / : p htt
Maze Generator http://beanzmag.com/ maze-generator