Project 0
Until the last few decades, education focused on skills called the three Rs — reading, writing, and arithmetic. (I know what you’re thinking … adults who believe all these words begin with the letter R need to return to kindergarten!) If you mastered the three Rs, you were considered an educated person. But now, technology has changed everything. In your personal life, in school, and in your parents’ jobs, technology is in constant use. And communicating with technology requires a new skill called coding, or computer programming.
In this chapter, I explain what coding is and describe the types of projects you can create. Then, I introduce you to MicroWorlds EX, which is the software that you will use to create the projects in this book, as well as connect you with additional resources for extending your learning.
Coding means writing instructions that a piece of technology — usually a computer — understands so that the technology will perform a task. A computer programming language provides the vocabulary (words) and syntax (rules and punctuation) for communicating with a computer.
The instructions that you write and that the computer reads are a program. A computer program comprises code and communicates instructions about what is supposed to show on a computer screen and when it is supposed to happen. As you learn a computer programming language, you will be able to read and understand programs already written. Most importantly, you will be able to code — that is, design and write your own original programs.
Learning to understand and create code in a computer programming language allows you to communicate with technology. Just like there are tons of human languages, there are tons of computer programming languages. If you’re wondering which programming language you should learn, the answer is … any one of them! After you learn one programming language, there will be many similarities between that language and any other programming language you may need. Still, there are some programming languages that are much easier to start with and much more fun to learn if you’re a kid. And you are a kid, right?
In general, to get started coding, you need only a computer, the programming language software, and an up-to-date version of a consumer-grade operating system (Windows or Mac OS). Some languages, such as Scratch, operate in a web browser, so you must also have a browser such as Firefox to work with those options.
The programming language software that you will use with this book is MicroWorlds EX (MWEX), which is my favorite computer programming language of all time.
MWEX is a perfect first language for many reasons:
By working in MicroWorlds EX, you’ll sample important yet easy-to-understand programming paradigms that allow you to make cool projects now — and set the stage for more advanced coding in the future.
What kinds of things can you make? Everything! Up until now, you’ve probably been a user or consumer of technology. You play games, run a simulation or model for a science class, word-process a story, conduct web research, communicate with friends via social media, and order goods online. But by learning to code, you are now a maker of software, a producer in the world of technology!
In this book, you will make four different types of projects:
Ultimately, the coding skills you learn in this book are just the beginning. I hope you create all sorts of exciting new programs that are wilder and wackier than anything contained in these pages. And I hope you level up and tackle learning new programming languages as you increase your skill level in the coming years.
Your purchase of this book comes with a 35-day, 90 saves-allowed trial of MicroWorlds EX, so you can work through all the projects at the rate of approximately one part each week! At any time, you can purchase MicroWorlds EX at a deep discount so you can continue developing your coding skills creating new projects to share with friends and family.
To download and install the trial version of MicroWorlds EX, navigate to www.dummies.com/go/microworlds. Then follow the onscreen download and installation instructions.
After you've installed it, follow these steps to start MicroWorlds EX:
The backpack serves as the icon for MWEX because objects in this programming language are called turtles, and every turtle totes a backpack carrying important information just like your backpack.
As MicroWorlds EX starts, you see the splash screen shown in Figure 0-1.
A yellow Welcome to MicroWorlds EX screen opens and presents several options to you, as shown in Figure 0-2.
Upon choosing any option, you are presented with the MWEX interface. Free Mode presents a somewhat empty interface, as shown in Figure 0-3, because you haven’t created any code or graphics yet.
Note the following key areas of the MicroWorlds EX interface, shown in Figure 0-3:
Detailed use of each pane will be discussed further in the projects.
As you get started with the projects in this book, keep in mind that you can customize every project with your own personal creativity. Many video games have the same underlying structure, as do many toys. The coding of the gameplay is often the same for multiple games. Think about how many different forms a shooter game can take, all with the same code: a squid shooting ink at an approaching shark; a pig dropping water balloons on cows; a pea shooter aiming at targets in a carnival game; or a bomber dropping bombs on enemy battleships. If you remove the graphics and sound effects, you simply have an object shooting at another object, with target objects moving and some sort of lives and scoring system. Many simulations also involve the scattering or distribution of lots of objects in a region — the underlying code is the same whether these objects are walruses lounging on an ice floe, trees in a forest, or people walking around a mall.
I encourage you to invent new characters and new actions and make every project your own. Now get coding!