Programming 101: The How and Why of Programming Revealed Using the Processing Programming Language 1st Edition Jeanine Meyer instant download
Programming 101: The How and Why of Programming Revealed Using the Processing Programming Language 1st Edition Jeanine Meyer instant download
https://textbookfull.com/product/programming-101-the-how-and-why-
of-programming-revealed-using-the-processing-programming-
language-1st-edition-jeanine-meyer/
https://textbookfull.com/product/the-rust-programming-
language-1st-edition-steve-klabnik/
https://textbookfull.com/product/coding-art-the-four-steps-to-
creative-programming-with-the-processing-language-yu-zhang/
https://textbookfull.com/product/101-challenges-in-c-
programming-1st-edition-yashavant-kanetkar/
https://textbookfull.com/product/the-rust-programming-
language-2nd-edition-steve-klabnik/
XcalableMP PGAS Programming Language From Programming
Model to Applications Mitsuhisa Sato
https://textbookfull.com/product/xcalablemp-pgas-programming-
language-from-programming-model-to-applications-mitsuhisa-sato/
https://textbookfull.com/product/programming-language-concepts-
peter-sestoft/
https://textbookfull.com/product/coding-art-the-four-steps-to-
creative-programming-with-the-processing-language-1st-edition-yu-
zhang-mathias-funk/
https://textbookfull.com/product/processing-an-introduction-to-
programming-1st-edition-nyhoff/
https://textbookfull.com/product/the-rust-programming-language-
covers-rust-2018-steve-klabnik/
Programming 101
The How and Why of Programming
Revealed Using the Processing
Programming Language
—
Jeanine Meyer
Programming 101
The How and Why of Programming
Revealed Using the Processing
Programming Language
Jeanine Meyer
Programming 101
Jeanine Meyer
Mt Kisco, New York, USA
Introduction������������������������������������������������������������������������������������������������������������xix
Chapter 1: Basics����������������������������������������������������������������������������������������������������� 1
Programming Concepts���������������������������������������������������������������������������������������������������������������� 2
Programming Languages and Natural Languages������������������������������������������������������������������ 2
Values and Variables��������������������������������������������������������������������������������������������������������������� 3
Functions��������������������������������������������������������������������������������������������������������������������������������� 5
Specifying Positions and Angles��������������������������������������������������������������������������������������������� 5
Colors�������������������������������������������������������������������������������������������������������������������������������������� 6
Development Environment������������������������������������������������������������������������������������������������������ 6
Role of Planning���������������������������������������������������������������������������������������������������������������������� 7
Under the Covers�������������������������������������������������������������������������������������������������������������������������� 7
Processing Programming Features����������������������������������������������������������������������������������������������� 8
Processing Development Environment������������������������������������������������������������������������������������ 8
Functions������������������������������������������������������������������������������������������������������������������������������� 10
Angles������������������������������������������������������������������������������������������������������������������������������������ 11
Implementing Hello, World���������������������������������������������������������������������������������������������������������� 13
Implementing the Daddy Logo���������������������������������������������������������������������������������������������������� 21
Planning��������������������������������������������������������������������������������������������������������������������������������� 21
Daddy Logo Program������������������������������������������������������������������������������������������������������������� 24
Things to Look Up����������������������������������������������������������������������������������������������������������������������� 27
How to Make This Your Own������������������������������������������������������������������������������������������������������� 27
What You Learned����������������������������������������������������������������������������������������������������������������������� 28
What’s Next��������������������������������������������������������������������������������������������������������������������������������� 29
v
Table of Contents
Chapter 2: Interactions������������������������������������������������������������������������������������������� 31
Programming Concepts�������������������������������������������������������������������������������������������������������������� 33
Events������������������������������������������������������������������������������������������������������������������������������������ 33
Randomness�������������������������������������������������������������������������������������������������������������������������� 34
Displaying Images from Files������������������������������������������������������������������������������������������������ 34
Calculations, Including Built-in Functions����������������������������������������������������������������������������� 34
Looping���������������������������������������������������������������������������������������������������������������������������������� 35
Processing Programming Features��������������������������������������������������������������������������������������������� 35
Under the Covers������������������������������������������������������������������������������������������������������������������������ 39
Polygon Sketch Operation Overview������������������������������������������������������������������������������������������� 40
Implementing the Polygon Sketch���������������������������������������������������������������������������������������������� 42
Planning��������������������������������������������������������������������������������������������������������������������������������� 42
Polygon Sketch Program������������������������������������������������������������������������������������������������������� 46
Coin Toss Sketch Operation Overview����������������������������������������������������������������������������������������� 48
Implementing the Coin Toss Sketch�������������������������������������������������������������������������������������������� 50
Planning��������������������������������������������������������������������������������������������������������������������������������� 50
Things to Look Up����������������������������������������������������������������������������������������������������������������������� 53
How to Make This Your Own������������������������������������������������������������������������������������������������������� 54
What You Learned����������������������������������������������������������������������������������������������������������������������� 55
What’s Next��������������������������������������������������������������������������������������������������������������������������������� 55
vi
Table of Contents
Chapter 4: Classes�������������������������������������������������������������������������������������������������� 83
Programming Concepts�������������������������������������������������������������������������������������������������������������� 83
Classes���������������������������������������������������������������������������������������������������������������������������������������� 83
Phases of Operations������������������������������������������������������������������������������������������������������������� 84
Tolerance or Margin��������������������������������������������������������������������������������������������������������������� 85
Processing Programming Features��������������������������������������������������������������������������������������������� 85
Classes���������������������������������������������������������������������������������������������������������������������������������� 85
Dynamic Arrays��������������������������������������������������������������������������������������������������������������������� 86
Tolerance and OK So Far Coding������������������������������������������������������������������������������������������� 88
Bouncing Objects Overview�������������������������������������������������������������������������������������������������������� 88
Implementing the Bouncing Objects������������������������������������������������������������������������������������������� 90
Planning��������������������������������������������������������������������������������������������������������������������������������� 90
Program��������������������������������������������������������������������������������������������������������������������������������� 92
Make Path and Travel Path Overview������������������������������������������������������������������������������������������ 96
vii
Table of Contents
viii
Table of Contents
ix
Table of Contents
xi
Table of Contents
Index��������������������������������������������������������������������������������������������������������������������� 313
xii
About the Author
Jeanine Meyer is a Professor at Purchase College/State
University of New York, where she teaches courses for
students in the combined mathematics and computer
science major, and across the College, including general
education mathematics courses. Before coming to Purchase,
she taught at Pace University, and prior to that was a
manager and research staff member at IBM Research in
robotics and manufacturing. She also worked as a research
consultant at IBM for educational grant programs.
She was moved to create this book because of a general wish to make programming
less mysterious and more appealing while featuring the challenges. She also felt the
need for an activity as she was phasing into retirement and she always enjoys spending
time with favorite pictures and video clips as well as producing new programs. Because
the unusual winter weather caused her to be housebound for many weeks, and with the
excellent support and help provided by the Apress team, the book is ahead of schedule.
She will need another retirement activity now, although programming, computer games,
and playing piano can occupy the day. Her other hobbies include origami (hints of this
are in the text), doing crossword puzzles, learning Spanish using Duolingo, enjoying
Aviva’s company and her cooking, baking, walking around town, and volunteering for
progressive causes.
xiii
About the Technical Reviewers
Massimo Nardone has more than 23 years of experience in
security, web and mobile development, and cloud and IT
architecture. His true IT passions are security and Android.
He has been programming and teaching programming with
Android, Perl, PHP, Java, VB, Python, C/C++, and MySQL for
more than 20 years.
He holds a master of science degree in computing
science from the University of Salerno, Italy. He has worked
as a project manager, software engineer, research engineer,
chief security architect, information security manager,
PCI/SCADA auditor, and senior lead IT security/cloud/SCADA architect for many years.
He has worked as a visiting lecturer and supervisor for exercises at the Networking
Laboratory of the Helsinki University of Technology (Aalto University).
His technical skills include security, Android, cloud, Java, MySQL, Drupal, Cobol,
Perl, web and mobile development, MongoDB, D3, Joomla, Couchbase, C/C++, WebGL,
Python, Pro Rails, Django CMS, Jekyll, Scratch, and more. He holds four international
patents in the PKI, SIP, SAML, and proxy areas.
He currently works as Chief Information Security Office (CISO) for Cargotec Oyj and
he is member of the ISACA Finland Chapter Board. Massimo has reviewed more than
40 IT books for different publishing companies and he is the coauthor of Pro Android
Games (Apress, 2015).
xv
About the Technical Reviewers
xvi
Acknowledgments
Much appreciation to the subjects of the illustrations in this book, starting with my father
(Joseph), and including my mother (Esther), Aviva, Grant, Liam, and especially Annika.
Thanks to my children, Aviva and Daniel, for the photography, video and computer
graphics work.
My students, teaching assistants, and colleagues always provide ideas, stimulation,
feedback, and advice. Thanks especially to Irina Shablinsky for her efforts teaching me
Processing, how to teach Processing, and introducing me to Takashi Mukoda. Thanks to
David Jameson, whose comments and concerns made me produce the Under the Covers
section for each chapter.
Thanks to the crew at Apress/Springer Nature, including Louise Corrigan, Nancy
Chen, James Markham, and others I do not know by name. Much appreciation to the
technical reviewers, Massimo Nardone and Takashi Mukoda.
xvii
Another Random Scribd Document
with Unrelated Content
Rochecotte, 23 février 1841.—On m'avait conseillé, il y a quelque
temps, de lire un roman de M. de Sainte-Beuve, sans m'effrayer du
titre: Volupté. J'en ai lu la moitié hier: malgré un peu de divagation
plus métaphysique que religieuse, une certaine afféterie et le
raboteux du style de Sainte-Beuve, je suis touchée de cet ouvrage,
dans lequel il y a une connaissance profonde du cœur humain, un
sentiment vrai du bien et du mal, et, en général, une élévation
délicate de la pensée, rare chez nos auteurs modernes.
On mande de Paris à mon gendre que la Chambre des Députés a été
émue du rapport de M. Jouffroy sur les fonds secrets. Il paraît que la
Chambre vivait dans une quiétude profonde et que ce rapport l'a
troublée: il ranime toutes les querelles, met tous les Ministères
passés sur la sellette; il fait de la politique du Cabinet actuel des
définitions inacceptables pour beaucoup de ceux qui le soutiennent.
Enfin, c'est un incident malheureux, qui a de la portée, en donnant
de la force à cette fraction importante de la Chambre qu'on appelle
Dufaure-Passy.
Viens, Aurore,
Je t'implore,
Je suis gai quand je te vois;
La Bergère
Qui m'est chère,
Est vermeille comme toi.
Elle est blonde,
Sans seconde,
Elle a la taille à la main;
Sa prunelle
Étincelle,
Comme l'astre du matin,
De rosée
Arrosée.
La rose a moins de fraîcheur;
Une hermine
Est moins fine;
Le lys a moins de blancheur!
Que c'est joli! Les lettres de Henri IV sont aussi charmantes. Enfin
c'est lui, quand il est en scène, qui donne de l'intérêt à ce singulier
ouvrage, le plus lourd, le plus diffus possible, mais néanmoins
attachant pour qui y sait ramer avec patience.
Paris, 1er mai 1841.—Hier, j'ai été prendre les commissions de Mme
la Duchesse d'Orléans pour Berlin; elle m'a montré ses deux enfants.
Le Comte de Paris, l'aîné, est tout le portrait du Roi, son grand-père,
timide du reste, et délicat; le second ressemble à sa mère et paraît
avoir plus de vivacité que son frère.
Paris, 3 mai 1841.—Le temps s'est un peu rafraîchi par un orage
dans la nuit, qui a eu le mérite de n'éclater qu'après tous les feux
d'artifice et les illuminations faits à l'occasion du baptême du jeune
Prince [22]. Tout s'est bien passé à Notre-Dame, noblement,
dignement; le petit Prince a été charmant. On a remarqué l'extrême
bonne grâce de Mme la Duchesse d'Orléans, ses belles révérences,
et le soin avec lequel elle a fait faire les signes de croix, dès l'entrée
à l'église. J'avais voulu y aller, et j'avais toutes les facilités pour le
faire grâce aux bontés de Madame Adélaïde, mais inquiète de ma
fille, et ne voulant pas manquer la visite de son médecin, je n'y ai
pas été [23].
Paris, 5 mai 1841.—M. Bresson, qui est venu me faire ses adieux
hier, me paraît destiné à retourner tout simplement à Berlin, ce qui
lui plaît médiocrement; il s'était évidemment flatté d'aller à Vienne.
Le Roi veut y envoyer Montebello, mais M. Guizot, poussé par Mme
de Lieven, veut que Vienne soit donné à M. de Flahaut. Il circule
beaucoup que Mme de Lieven fait et défait les ambassadeurs, et les
cris, contre elle, dans le Corps diplomatique français, sont violents.
Pauline est mieux, mais pas assez bien pour m'accompagner à
Berlin; j'ai le cœur gros de la quitter; ce long voyage à faire seule
me pèse lourdement. C'est du véritable isolement. Enfin je serai
ravie quand je me retrouverai en Touraine; je sens que c'est là que
sont mes vraies racines; j'y ai des intérêts, des devoirs, un bon
centre d'activité. Partout ailleurs je vivote, mais je ne m'enracine
pas.
Metz, 6 mai 1841.—Me voici donc hors de Paris, n'y regrettant rien
que ma fille, mais n'espérant pas grand'chose de mon voyage
comme agrément; je redoute les déplacements et cette vie
fatigante, vide et bête, des grandes routes et des auberges.
Gotha, 12 mai 1841.—Je voulais arriver hier soir ici, mais il y a tant
de côtes aux environs de Fulda et d'Eisenach qu'il m'a fallu coucher
à Eisenach, où, comme de raison, j'ai rêvé à sainte Élisabeth! Je
m'arrête ici quelques heures, pour voir la Duchesse douairière qui
était fort aimée de ma mère, et qui m'en a voulu, l'année dernière,
d'avoir été en Allemagne sans être venue jusqu'ici. Mon très
ennuyeux voyage se passe du reste sans accident et par un assez
beau temps.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com