on Science and
How does a computer play Chess? How can you create a space game using the laws of Gravity? Build a maze and find a way out? A language translator? Throw a dice and calculate the digits of Pi?
Yes, that’s right. You will achieve all of the above. You will play with and modify small computer programs packed with good ideas!
Read the book and meet three new friends. Sarah, Mike and Liliane will travel with you through the gates of Science.…
This book is great for teenagers (grade six and above), students, parents and teachers. It's a perfect gift for anyone with a curious mind! No programming experience is required. Really none.
Choose the eBook version if you'd like to read from your computer. The eBook is a regular PDF file without copyright locks. You can make backup copies in case your computer crashes e.g. to your USB key! The eBook format is great value and you get it right away. Do you want to be sure that your computer can read it? Try out the first twenty two pages for free. Then get the whole eBook for $3.99. Get your ticket for science now - for barely the cost of a movie ticket!
"Very interesting book. Hope this book will be introduced to students and teachers in my country [Japan]". (Osamu Akimatsu)
"If you want ... to introduce your kid to programming, this is an excellent first book. ... Chris teaches through great example projects step by step. The examples are non trivial ones but he patiently builds them showing how a professional programmer thinks and breaks down a problem into small parts and synthesizes a solution. Machine translation example, vector imaging are among my most favorite ones. I have been programming since 88 and java since hotjava browser came along in 95 and i learnt many things from his elegant thought process. The focus is on how a problem solver thinks about the problem and builds a solution, that is invaluable. ... This one [book] is wider in scope, simpler in style and more joyful to read. So first read this and write the code and then move on. I like the non greedy pricing, and the book is a no-brainer buy for the price. Java is still commercially sought after language and do yourself and your kids a favor by getting this book. Well done chris for taking time to write this great book for the next generation. And write more please." (Ravi Annaswamy)
"I must admit, this is a very interesting book for education." (David Mushroomer)
- Explore the unknown science behind something we use in our
- Transform small computer programs to do practical and fun
Computer programs are modified through elementary steps identified with simple pictures. E.g. 'Remove lines 12 to 15'. 'Execute the program again'. 'Insert the following 3 lines after line 5'.
My name is Chrix and I would like you to have
with science and computers. I am a software engineer at the IBM Ottawa Lab,
doing cool computer programs like Eclipse
and Jazz. I was a volunteer at the EX.I.T.E
science summer camp,
animating the computer activity. I wanted to write the book "Fun
Science With Your Computer" for many years. I decided to organize the
materials I had accumulated and I worked evenings and week-ends to
publish it for and before the birth of our baby, Alex. I am naive
enough to think Alex will learn about science and programming with the
help of this book in the future. The same way I hope you, your
children, or your students, will do too.
My full name is Christophe Cornu. The developers I work with nicknamed me Chrix and that's a lot easier that way.
Download book programs
This activity simulates a dice. Did you know it
is very hard to have
truly random numbers? Once we know how to generate numbers that
apparently look random, we will learn how to do very interesting things
Solution to exercise 1 Program PseudoRandom1.java
Solution to exercise 2 Program PseudoRandom2.java
What can you do with one random number? Or with
two random numbers?
Not much. Be prepared to be surprised. You can do nearly everything
with a million of them. This activity illustrates how the digits of Pi
be calculated by randomly picking points inside a square.
Solution to exercise 1 Program MonteCarlo1.java
Mystery Shape 1 - Program MonteCarlo2.java
Mystery Shape 2 - Program MonteCarlo3.java
Mystery Shape 3 - Program MonteCarlo4.java
Once you manipulate millions of random numbers,
you can predict
average behaviours. For example, if you walk randomly changing
direction after each step, you can estimate the distance you are from
your starting point. Can you guess what that distance is? This activity
introduces you to something very dear to biologists and physicists.
Solution to exercise 1 Program RandomWalk1.java
Solution to exercise 2 Program RandomWalk2.java
Solution to exercise 2 Program Translator2.java
In 2006 Joshua Plotnik showed elephants pass the mirror test. Elephants, along with humans, dolphins and great apes can recognize themselves in a mirror. Well, this activity contains a program that knows how to look upon itself to discover what it can do. You can use it to start any of the programs from this book. And your owns.Program launcher.java
Solution to exercise 1 Program Launcher1.java
Solution to exercise 2 Program Launcher2.java
How does a postman decide the order in which
mail is to be
delivered? The postman doesn't. Computer searches the most efficient
trip for the postman. Just the same way you plan your
vacation road trip and find the best path from your home to your five
star hotel residence. Our program Path Finder can find any path in and
out of any map.
Solution to exercise 1 Program PathFinder1.java
Solution to exercise 2 Program PathFinder2.java
Consider a recipe that requires three hours to
make a cake for four
people. Can you improve the recipe so the cake is just as good but
requires less than sixty minutes of preparation? This activity
investigates two ways to resolve a mathematical problem. One is
constantly fast. The other is increasingly slow. Be a good cook, err,
a good programmer.
Solution to exercise 1 Program SlowFast1Constant.java
Solution to exercise 1 Program SlowFast1Linear.java
Solution to exercise 1 Program SlowFast1Square.java
Solution to exercise 1 Program SlowFast1Logarithmic.java
Solution to exercise 1 Program SlowFast1Exponential.java
Solution to exercise 2 Program SlowFast2.java
We all worry about weight or have relatives who
do worry about
theirs. Well it is time to have a little recreation with mass, gravity
and Lord Isaac Newton. Program Space Simulation is a multi player space
simulation action game realistically based on the laws of Physics.
Solution to exercise 1 Program SpaceSimulation1.java
Solution to exercise 2 Program SpaceSimulation2.java
We spend more time on the Internet than we do
watching TV. Have you ever wondered how a web browser works? This
activity shows how we can create a very simple text based web browser
by loading content and navigating through its hyperlinks.
Solution to exercise 2 Program WebBrowser2.java
Animation movies are for the most part computer
generated. There are
ways to create graphics that can be adjusted to any size, filled with
any kind of color you need. We will learn how to draw a Chess board in
this activity. You can of course change the knight pawn so it rather
looks like Pac Man or your favourite T-Rex dinosaur.
Chess pawns chess.svg
Solution to exercise 1 Program VectorGraphics1.java
Solution to exercise 2 chess2.svg Draw Pac Man pawns
What about the holy grail of artificial
intelligence? What greater
challenge than teaching a computer how to perform something only
intelligent human beings were thought to be capable of? Yes, we will
program and be able to play Chess against our own program in this
activity. Our brain really does work differently than our Chess machine
so is it fair to oppose a human to a machine?
Solution to exercise 1 Program Chess1.java
Solution to exercise 2 Program Chess2.java