Programmierung
C++ mit Visual Studio 2019
C++ hat sich in den letzten Jahren rasant entwickelt: C++11, C++14, C++17 und C++20 haben viele Verbesserungen und neue Möglichkeiten gebracht. Vieles, was vor 10 Jahren noch gut und empfehlenswert war, kann heute besser und sicherer gemacht werden.Dieses Buch stellt C++ mit Visual Studio 2019 auf dem Stand von Mai 2020 umfassend dar. Das ist nicht nur der Umfang von C++17, sondern auch schon ein Teil von C++20.Es entstand aus zahlreichen Vorlesungen und Firmenseminaren. Dementsprechend richtet es sich einerseits an STUDIERENDE, die C++ lernen wollen. Der Aufbau, die vielen Beispiele und Übungsaufgaben sind erprobt und bewährt. Es eignet sich zum Selbststudium und als Lehrbuch für Vorlesungen an Fachhochschulen und Universitäten.Dieses Buch zeigt aber ebenso PROFESSIONELLEN SOFTWARE-ENTWICKLERN mit einer jahrelangen C++-Praxis den aktuellen Stand der Technik. Viele der Spracherweiterungen machen elementare Programmiertechniken einfacher und sicherer. Dazu kommen neue Konzepte, die bessere und effizientere Lösungen als noch vor einigen Jahren ermöglichen.Dieses Buch erscheint in zwei weitgehend identischen Ausgaben:– IN DER VORLIEGENDEN AUSGABE werden Programme ohne eine graphische Benutzeroberfläche geschrieben. Alle Ein- und Ausgaben erfolgen mit cin und cout über die Konsole.– IN DER ANDEREN AUSGABE „C++ mit Visual Studio 2019 und Windows-Forms-Anwendungen“ werden Programme geschrieben, in denen alle Ein- und Ausgaben über eine Windows-Benutzeroberfläche erfolgen.Nach seinem Mathematikstudium an der Universität Tübingen war Richard Kaiser in der Lehrerausbildung tätig, Trainer in der Industrie, Software-Entwickler und -Abteilungsleiter. Als Professor an der Dualen Hochschule Baden-Württemberg hat er Vorlesungen über C, C++, C# und Mathematik gehalten und zahlreiche Firmenseminare über C++ und C# durchgeführt.Die Entwicklungsumgebung.- Steuerelemente für die Benutzeroberfläche.- Elementare Datentypen und Anweisungen in C und C++.- Sie Stringklassen string und wstring.- Arrays und Container.- Einfache selbstdefinierte Datentypen.- Zeiger, Strings und dynamisch erzeugte Variablen.- Überladene Funktionen und Operatoren.- ObjektorientierteProgrammierung.- Namensbereiche.- Exception-Handling.- Containerklassen der C++-Standardbibliothek.- Dateibearbeitung mit den Stream-Klassen.- Funktionsobjekte und Lambda-Ausdrücke.- Templates und STL.- C++11 Smart Pointer: shared_ptr, unique_ptr und weak_ptr.- Literatur.- Index.
C++20 Quick Syntax Reference
This quick C++ 20 guide is a condensed code and syntax reference to the popular programming language, fully updated for C++20. It presents the essential C++20 code syntax in a well-organized format that can be used as a handy reference.This edition covers topics including designated initializers, lambdas and lambda captures, the spaceship operator, pack expressions, string literals as template parameters, atomic smart pointers, and contracts. It also covers library changes including extended futures, latches and barriers, task blocks, and text formatting.In the C++20 Quick Syntax Reference, you will find short, simple, and focused code examples. This book includes a well-laid-out table of contents and a comprehensive index allowing for easy review. You won’t find any technical jargon, bloated samples, drawn out history lessons, or witty stories in this book. What you will find is a language reference that is concise, to the point, and highly accessible. The book is packed with useful information and is a must-have for any C++ programmer.WHAT YOU'LL LEARN* Discover the key C++20 features* Work with concepts to constrain template arguments* Use modules as a replacement for header files* Take advantage of the three-way comparison operator* Create immediate functions using the consteval keyword* Make use of constexpr, constinit and designated initializersWHO THIS BOOK IS FORExperienced C++ programmers. Additionally, this is a concise, easily-digested introduction for other programmers new to C++.Mikael Olsson is a professional web entrepreneur, programmer, and author. He works for an R&D company in Finland where he specializes in software development. In his spare time he writes books and creates websites that summarize various fields of interest. The books he writes are focused on teaching their subject in the most efficient way possible, by explaining only what is relevant and practical without any unnecessary repetition or theory. 1. HelloWorld2. Compile and Run3. Variables4. Operators5. Pointers6. References7. Arrays8. String9. Conditionals10. Loops11. Functions12. Class13. Constructor14. Inheritance15. Overriding16. Access Levels17. Static18. Enum19. Struct and Union20. Operator Overloading21. Custom Conversions22. Namespaces23. Constants24. Preprocessor25. Exception Handling26. Type Conversions27. Smart Pointers28. Templates29. Headers
Grundkurs Machine Learning
Maschinelles Lernen – alle Grundlagen! Paul Wilmott ist für seine erhellende und unterhaltsame Darstellung angewandter Mathematik bekannt. Von der linearen Regression bis zu Neuronalen Netzwerken führt er Sie durch alle Verfahren, und zwar komplett Software-unabhängig. Der Vorteil dabei: Jeder Schritt ist schwarz auf weiß zu sehen, kein Framework kann etwas „verstecken“, es geht immer um die Sache selbst. Mit vielen Beispielen, Grafiken und Schritt-für-Schritt-Kästen. Für alle, die wirklich verstehen wollen, wie Maschinen lernen. Aus dem Inhalt: Lineare Regressionk-Nearest NeighborsNaive Bayes-Klassifikatorenk-Means-AlgorithmusSupport Vector MachinesLogistische RegressionSelbstorganisierende KartenEntscheidungsbäumeReinforcement LearningNeuronale Netze Vorwort ... 13 1. Einführung ... 17 1.1 ... Maschinelles Lernen ... 18 1.2 ... Lernen ist der Schlüssel ... 19 1.3 ... Ein wenig Geschichte ... 20 1.4 ... Schlüsselmethodiken in diesem Buch ... 22 1.5 ... Klassische mathematische Modellierung ... 26 1.6 ... Maschinelles Lernen ist anders ... 28 1.7 ... Einfachheit führt zu Komplexität ... 29 1.8 ... Weiterführende Literatur ... 33 2. Allgemeines ... 35 2.1 ... Jargon und Notation ... 35 2.2 ... Skalierung ... 37 2.3 ... Distanzmessung ... 38 2.4 ... Fluch der Dimensionalität ... 39 2.5 ... Hauptkomponentenanalyse ... 39 2.6 ... Maximum-Likelihood-Schätzung ... 40 2.7 ... Konfusionsmatrix ... 44 2.8 ... Kostenfunktion ... 47 2.9 ... Gradientenabstieg ... 52 2.10 ... Training, Testen und Validieren ... 54 2.11 ... Bias und Varianz ... 57 2.12 ... Lagrange-Multiplikatoren ... 63 2.13 ... Mehrfachklassen ... 65 2.14 ... Informationstheorie und Entropie ... 67 2.15 ... Verarbeitung natürlicher Sprache (NLP) ... 70 2.16 ... Bayes-Theorem ... 72 2.17 ... Was nun? ... 73 2.18 ... Weiterführende Literatur ... 74 3. K-nächste Nachbarn ... 75 3.1 ... Wofür können wir die Methode verwenden? ... 75 3.2 ... Wie die Methode funktioniert ... 76 3.3 ... Der Algorithmus ... 78 3.4 ... Probleme mit KNN ... 78 3.5 ... Beispiel: Körpergröße und -gewicht ... 79 3.6 ... Regression ... 83 3.7 ... Weiterführende Literatur ... 85 4. K-Means Clustering ... 87 4.1 ... Wofür können wir die Methode verwenden? ... 87 4.2 ... Was macht K-Means Clustering? ... 89 4.3 ... Scree-Plots ... 93 4.4 ... Beispiel: Kriminalität in England, 13 Dimensionen ... 94 4.5 ... Beispiel: Volatiliät ... 98 4.6 ... Beispiel: Zinssatz und Inflation ... 100 4.7 ... Beispiel: Zinssätze, Inflation und BIP-Wachstum ... 103 4.8 ... Ein paar Kommentare ... 104 4.9 ... Weiterführende Literatur ... 105 5. Naiver Bayes-Klassifikator ... 107 5.1 ... Wofür können wir ihn verwenden? ... 107 5.2 ... Verwendung des Bayes-Theorems ... 108 5.3 ... Anwendung des NBK ... 108 5.4 ... In Symbolen ... 110 5.5 ... Beispiel: Politische Reden ... 111 5.6 ... Weiterführende Literatur ... 114 6. Regressionsmethoden ... 115 6.1 ... Wofür können wir sie verwenden? ... 115 6.2 ... Mehrdimensionale lineare Regression ... 116 6.3 ... Logistische Regression ... 117 6.4 ... Beispiel: Noch einmal politische Reden ... 119 6.5 ... Weitere Regressionsmethoden ... 121 6.6 ... Weiterführende Literatur ... 122 7. Support-Vektor-Maschinen ... 123 7.1 ... Wofür können wir sie verwenden? ... 123 7.2 ... Harte Ränder ... 123 7.3 ... Beispiel: Iris (Schwertlilie) ... 126 7.4 ... Lagrange-Multiplier-Version ... 128 7.5 ... Weiche Ränder ... 130 7.6 ... Kernel-Trick ... 132 7.7 ... Weiterführende Literatur ... 136 8. Selbstorganisierende Karten ... 137 8.1 ... Wofür können wir sie verwenden? ... 137 8.2 ... Die Methode ... 138 8.3 ... Der Lernalgorithmus ... 140 8.4 ... Beispiel: Gruppierung von Aktien ... 142 8.5 ... Beispiel: Abstimmungen im Unterhaus ... 147 8.6 ... Weiterführende Literatur ... 149 9. Entscheidungsbäume ... 151 9.1 ... Wofür können wir sie verwenden? ... 151 9.2 ... Beispiel: Zeitschriftenabo ... 153 9.3 ... Entropie ... 158 9.4 ... Überanpassung und Abbruchregeln ... 161 9.5 ... Zuschneiden ... 162 9.6 ... Numerische Merkmale/Attribute ... 162 9.7 ... Regression ... 164 9.8 ... Ausblick ... 171 9.9 ... Bagging und Random Forest ... 171 9.10 ... Weiterführende Literatur ... 172 10. Neuronale Netze ... 173 10.1 ... Wofür können wir sie verwenden? ... 173 10.2 ... Ein sehr einfaches Netzwerk ... 173 10.3 ... Universelles Approximations-Theorem ... 174 10.4 ... Ein noch einfacheres Netzwerk ... 176 10.5 ... Die mathematische Manipulation im Detail ... 177 10.6 ... Häufige Aktivierungsfunktionen ... 181 10.7 ... Das Ziel ... 182 10.8 ... Beispiel: Approximation einer Funktion ... 183 10.9 ... Kostenfunktion ... 184 10.10 ... Backpropagation ... 185 10.11 ... Beispiel: Buchstabenerkennung ... 188 10.12 ... Training und Testen ... 190 10.13 ... Mehr Architekturen ... 194 10.14 ... Deep Learning ... 196 10.15 ... Weiterführende Literatur ... 197 11. Verstärkendes Lernen ... 199 11.1 ... Wofür können wir es verwenden? ... 199 11.2 ... Geländeausfahrt mit Ihrem Lamborghini 400 GT ... 200 11.3 ... Jargon ... 202 11.4 ... Ein erster Blick auf Blackjack ... 203 11.5 ... Der klassische Markow-Entscheidungsprozess für Tic-Tac-Toe ... 204 11.6 ... Noch mehr Jargon ... 206 11.7 ... Beispiel: Der mehrarmige Bandit ... 207 11.8 ... Etwas anspruchsvoller 1: Bekannte Umgebung ... 211 11.9 ... Beispiel: Ein Labyrinth ... 214 11.10 ... Notation zu Wertefunktionen ... 218 11.11 ... Die Bellman-Gleichung ... 220 11.12 ... Optimale Policy ... 221 11.13 ... Die Bedeutung der Wahrscheinlichkeit ... 222 11.14 ... Etwas anspruchsvoller 2: Modell-frei ... 223 11.15 ... Monte Carlo Policy Evaluation ... 224 11.16 ... Temporal-Difference-Lernen ... 227 11.17 ... Vor- und Nachteile: MC versus TD ... 228 11.18 ... Finden der optimalen Policy ... 229 11.19 ... Sarsa ... 230 11.20 ... Q-Lernen ... 232 11.21 ... Beispiel: Blackjack ... 233 11.22 ... Große Zustandsräume ... 245 11.23 ... Weiterführende Literatur ... 245 Datensätze ... 247 Epilog ... 251 Index ... 253
Einstieg in C++
Mit diesem Buch gelingt Ihnen der Einstieg in die C++-Entwicklung mühelos. Anschauliche Erklärungen, praxisnahe Beispiele und Übungen begleiten Sie von den ersten Schritten bis zum fertigen Programm. Sie lernen alle wichtigen Themen wie Vererbung, Objektorientierung, Polymorphie, GUI-Entwicklung und Datenbanken. Kenntnisse in C oder einer anderen Sprache werden nicht vorausgesetzt. Aus dem Inhalt: SprachgrundlagenReferenzen und PointerObjektorientierte ProgrammierungVererbung und PolymorphieModerne Bibliotheken: chrono, random, thread, filesystemArbeiten mit ContainernGUI-Entwicklung mit QtDatenbanken mit SQLite verwalten Materialien zum Buch ... 17 1. Eine erste Einführung ... 19 1.1 ... Was machen wir mit C++? ... 19 1.2 ... Was benötige ich zum Programmieren? ... 20 1.3 ... Die Entwicklung von C++ ... 20 1.4 ... So sieht das erste Programm aus ... 21 1.5 ... Kommentieren Sie Ihre Programme ... 22 2. Arbeiten mit Zahlen und Operatoren ... 25 2.1 ... Wie speichere ich Zahlen? ... 25 2.2 ... Rechnen mit Operatoren ... 27 2.3 ... Fehler suchen ... 29 2.4 ... Wie können Daten eingegeben werden? ... 31 2.5 ... Zahlen formatieren mit Manipulatoren ... 33 2.6 ... Zuweisungen kürzer schreiben ... 34 2.7 ... Übung ... 36 2.8 ... Mehr über die Speicherung von Zahlen ... 37 2.9 ... Feste Werte in Konstanten speichern ... 41 2.10 ... Konstanten in Enumerationen zusammenfassen ... 42 2.11 ... Zahlensysteme ... 43 2.12 ... Initialisierung ... 45 2.13 ... Wie erzeuge ich zufällige Zahlen? ... 47 2.14 ... Übung ... 48 3. Mehrere Zweige in einem Programm ... 49 3.1 ... Zwei Zweige mit »if« und »else« ... 49 3.2 ... Bedingungen benötigen Vergleiche ... 51 3.3 ... Mehr als zwei Zweige ... 53 3.4 ... Wie kann ich Bedingungen kombinieren? ... 55 3.5 ... Zweige zusammenfassen mit »switch« und »case« ... 57 3.6 ... Was ist mit dem Rest? ... 58 3.7 ... Welcher Operator hat Vorrang? ... 59 3.8 ... Übungen ... 60 3.9 ... Wie speichere ich Wahrheitswerte? ... 63 3.10 ... Die Kurzform: der bedingte Ausdruck ... 65 4. Teile von Programmen wiederholen ... 67 4.1 ... Regelmäßige Wiederholungen mit »for« ... 67 4.2 ... Wiederholungen für einen Bereich ... 70 4.3 ... Bedingte Wiederholungen mit »do-while« ... 71 4.4 ... Besser vorher prüfen mit »while« ... 72 4.5 ... Wiederholungen abbrechen oder fortsetzen ... 73 4.6 ... Die Wiederholung der Wiederholung ... 75 4.7 ... Übungen ... 76 5. Programme aufteilen in Funktionen ... 79 5.1 ... So schreibe ich eine eigene Funktion ... 79 5.2 ... Wie übergebe ich Daten? ... 81 5.3 ... Wie erhalte ich ein Ergebnis zurück? ... 87 5.4 ... Mehr Ordnung im Programm ... 88 5.5 ... Statische Variablen behalten ihren Wert ... 90 5.6 ... Fehler suchen ... 91 5.7 ... Übungen ... 92 5.8 ... Standardwerte vorgeben ... 93 5.9 ... Beliebig viele Parameter ... 94 5.10 ... Funktionen mehrfach definieren ... 96 5.11 ... Funktionen, die sich selbst aufrufen ... 98 5.12 ... Anonyme Funktionen ... 99 5.13 ... Funktionen als Parameter ... 105 6. Große Datenmengen speichern in Feldern ... 109 6.1 ... Wie werden Felder unterschieden? ... 109 6.2 ... Einfache Felder mit fester Größe ... 110 6.3 ... Intelligente Felder mit fester Größe ... 111 6.4 ... Ausnahmen behandeln ... 113 6.5 ... Einfache und intelligente Zeiger ... 115 6.6 ... Intelligente Felder mit variabler Größe ... 122 6.7 ... Felder initialisieren ... 124 6.8 ... Felder als Parameter ... 125 6.9 ... Daten in mehreren Dimensionen speichern ... 127 6.10 ... Übungen ... 131 7. Arbeiten mit Zeichen und Texten ... 133 7.1 ... Einzelne Zeichen ... 133 7.2 ... Einfache Zeichenketten ... 134 7.3 ... Intelligente Zeichenketten: Strings ... 137 7.4 ... Wie wandle ich Zahlen in Strings um? ... 143 7.5 ... Wie verarbeite ich Eingaben? ... 144 7.6 ... Felder von Zeichenketten ... 147 7.7 ... Suchen und Ersetzen ... 149 7.8 ... Übungen ... 154 8. Daten in Strukturen zusammenfassen ... 157 8.1 ... Wie speichere ich zusammengehörige Daten? ... 157 8.2 ... Besser einen Typ definieren ... 159 8.3 ... Strukturen und Felder ... 161 8.4 ... Strukturen und Funktionen ... 165 8.5 ... Eine Hierarchie von Strukturen ... 170 8.6 ... Übung ... 172 9. Vorhandene Funktionen nutzen ... 175 9.1 ... Umgang mit Datum und Uhrzeit ... 175 9.2 ... Bessere zufällige Zahlen ... 181 9.3 ... Mehrere Threads zur gleichen Zeit ... 184 9.4 ... Nützliche mathematische Funktionen ... 193 9.5 ... Übungen ... 202 9.6 ... Rechnen mit komplexen Zahlen ... 203 9.7 ... Daten mit dem Betriebssystem austauschen ... 210 9.8 ... Zugriff auf Dateien und Verzeichnisse ... 219 10. Eigene Klassen entwerfen ... 237 10.1 ... Klassen umfassen Eigenschaften und Methoden ... 237 10.2 ... Schützen Sie die Daten ... 240 10.3 ... Wie erzeuge und lösche ich Objekte? ... 244 10.4 ... Statische Elemente einer Klasse ... 248 10.5 ... Wie überlade ich Operatoren? ... 252 10.6 ... Objekte und Felder ... 256 10.7 ... Objekte ausgeben ... 260 10.8 ... Eigenschaften können Objekte sein ... 262 10.9 ... Übungen ... 264 11. Vererbung und Polymorphie ... 269 11.1 ... Basisklasse und abgeleitete Klassen ... 269 11.2 ... Welche Elemente sind an welcher Stelle erreichbar? ... 276 11.3 ... Konstruktoren in abgeleiteten Klassen ... 277 11.4 ... Was bedeutet Polymorphie? ... 281 11.5 ... Erben von mehreren Klassen ... 284 12. Datenströme verarbeiten ... 289 12.1 ... Sequenzielles Schreiben und Lesen ... 289 12.2 ... Schreiben und Lesen an beliebiger Stelle ... 296 12.3 ... Wie leiten Sie Datenströme? ... 305 12.4 ... Wie ist das CSV-Format zum Austausch aufgebaut? ... 308 12.5 ... Übung ... 315 13. Container sind vielfältige Datenstrukturen ... 319 13.1 ... Wie durchlaufe ich Container? ... 320 13.2 ... Intelligente Felder mit fester Größe ... 322 13.3 ... Intelligente Felder mit variabler Größe ... 326 13.4 ... Eine Warteschlange mit zwei Enden ... 330 13.5 ... Daten in Listen verketten ... 334 13.6 ... Drei einfache Container ... 344 13.7 ... Zwei nützliche Typen ... 351 13.8 ... Eine Menge von Elementen ... 355 13.9 ... Schlüssel und Werte in einer Map ... 362 13.10 ... Algorithmen für Bereiche ... 369 13.11 ... Mengenlehre ... 374 13.12 ... Eine Menge von Bits ... 378 14. Mehr zu eigenen Klassen ... 383 14.1 ... Objekte initialisieren, kopieren und erzeugen ... 383 14.2 ... Klassen können Freunde haben ... 386 14.3 ... Namen müssen eindeutig sein ... 389 14.4 ... Fehler behandeln mit Ausnahmen ... 392 14.5 ... Innere Klassen ... 400 14.6 ... Templates sind Vorlagen ... 402 15. Präprozessor-Anweisungen ... 409 15.1 ... Einbinden von Dateien ... 409 15.2 ... Definitionen und Makros ... 410 15.3 ... Definitionen und Verzweigungen ... 412 15.4 ... Eine Systemweiche ... 414 16. Grafische Benutzeroberflächen mit der Qt-Bibliothek ... 417 16.1 ... Die erste GUI-Anwendung ... 418 16.2 ... Ein einfacher Kopfrechentrainer ... 429 16.3 ... Ein erweiterter Kopfrechentrainer ... 434 16.4 ... Weitere Widgets ... 441 17. Datenbanken mit SQLite verwalten ... 449 17.1 ... Der Aufbau einer Datenbank ... 449 17.2 ... Wie erzeuge ich Datenbank und Tabelle? ... 450 17.3 ... Wie speichere ich Daten in einer Tabelle? ... 455 17.4 ... So zeige ich alle Daten einer Tabelle an ... 457 17.5 ... Wie wähle ich bestimmte Daten aus? ... 460 17.6 ... Der Benutzer wählt Daten aus ... 464 17.7 ... Daten sollten sortiert werden ... 465 17.8 ... Wie ändere ich Daten? ... 466 17.9 ... Vorsicht beim Löschen von Daten ... 468 17.10 ... Eine Datenbank mit mehreren Tabellen ... 469 17.11 ... Projekt Vokabeln ... 476 17.12 ... Übung ... 497 Anhang ... 501 A ... Installationen ... 501 B ... Hilfestellungen und Übersichten ... 525 Index ... 531
Clean Agile. Die Essenz der agilen Softwareentwicklung
* LERNEN SIE AUS UNCLE BOBS JAHRZEHNTELANGER ERFAHRUNG, WORAUF ES BEI DER AGILEN SOFTWAREENTWICKLUNG WIRKLICH ANKOMMT* DIE URSPRÜNGLICHEN AGILEN WERTE UND PRINZIPIEN KURZ UND PRÄGNANT FÜR DEN PRAXISEINSATZ ERLÄUTERT* VON DEN UNTERNEHMERISCHEN ASPEKTEN ÜBER DIE KOMMUNIKATION IM TEAM BIS ZU DEN TECHNISCHEN PRAKTIKEN WIE TEST-DRIVEN DEVELOPMENT (TDD), EINFACHES DESIGN UND PAIR PROGRAMMINGFast 20 Jahre nach der Veröffentlichung des agilen Manifests ruft der legendäre Softwareentwickler Robert C. Martin (»Uncle Bob«) dazu auf, sich wieder auf die ursprünglichen Werte und Prinzipien zurückzubesinnen, die den eigentlichen Kern der agilen Softwareentwicklung ausmachen und die für die Praxis von zentraler Bedeutung sind. Mit Clean Agile lässt er alle an seiner jahrzehntelangen Erfahrung teilhaben und räumt mit Missverständnissen und Fehlinterpretationen auf, die im Laufe der Jahre entstanden sind. Dabei wendet er sich gleichermaßen an Programmierer und Nicht-Programmierer.Uncle Bob macht deutlich, was agile Softwareentwicklung eigentlich ist, war und immer sein sollte: ein einfaches Konzept, das kleinen Softwareteams hilft, kleine Projekte zu managen - denn daraus setzen sich letztendlich alle großen Projekte zusammen. Dabei konzentriert er sich insbesondere auf die Praktiken des Extreme Programmings (XP), ohne sich in technischen Details zu verlieren.Egal, ob Sie Entwickler, Tester, Projektmanager oder Auftraggeber sind - dieses Buch zeigt Ihnen, worauf es bei der Umsetzung agiler Methoden wirklich ankommt.AUS DEM INHALT:* Ursprünge der agilen Softwareentwicklung* Agile Werte und Prinzipien* Der richtige Einsatz von Scrum* Agile Transformation* Extreme Programming* Unternehmensbezogene Praktiken: User Stories, Velocity, kleine Releases und Akzeptanztests* Teambezogene Praktiken: gemeinsame Eigentümerschaft, kontinuierliche Integration und Stand-up-Meetings* Technische Praktiken: TDD, Refactoring, einfaches Design und Pair Programming* Zertifizierung und Coaching* Software CraftsmanshipSTIMMEN ZUM BUCH:»Bobs Frustration spiegelt sich in jedem Satz des Buchs wider - und das zu Recht. Der Zustand, in dem sich die Welt der agilen Softwareentwicklung befindet, ist nichts im Vergleich zu dem, was sie eigentlich sein könnte. Das Buch beschreibt, auf was man sich aus Bobs Sicht konzentrieren sollte, um das zu erreichen, was sein könnte. Und er hat es schon erreicht, deshalb lohnt es sich, ihm zuzuhören.«- Kent Beck»Uncle Bob ist einer der klügsten Menschen, die ich kenne, und seine Begeisterung für Programmierung kennt keine Grenzen. Wenn es jemandem gelingt, agile Softwareentwicklung zu entmystifizieren, dann ihm.«- Jerry FitzpatrickRobert C. Martin (»Uncle Bob«) ist bereits seit 1970 als Programmierer tätig. Neben seiner Beraterfirma Uncle Bob Consulting, LLC gründete er gemeinsam mit seinem Sohn Micah Martin auch das Unternehmen The Clean Coders, LLC. Er hat zahlreiche Artikel in verschiedenen Zeitschriften veröffentlicht und hält regelmäßig Vorträge auf internationalen Konferenzen. Zu seinen bekanntesten Büchern zählen Clean Code, Clean Coder und Clean Architecture.
Beginning C
Learn how to program using C, beginning from first principles and progressing through step-by-step examples to become a competent, C-language programmer. All you need are this book and any of the widely available C compilers, and you'll soon be writing real C programs.You’ll discover that C is a foundation language that every programmer ought to know. Beginning C is written by renowned author Ivor Horton and expert programmer German Gonzalez-Morris. This book increases your programming expertise by guiding you through the development of fully working C applications that use what you've learned in a practical context. You’ll also be able to strike out on your own by trying the exercises included at the end of each chapter. At the end of the book you'll be confident in your skills with all facets of the widely-used and powerful C language.WHAT YOU WILL LEARN* Discover the C programming languageProgram using C starting with first steps, then making decisions * Use loops, arrays, strings, text, pointers, functions, I/O, and moreCode applications with strings and text * Structure your programs efficientlyWork with data, files, facilities, and moreWHO THIS BOOK IS FORThose new to C programming who may or may not have some prior programming experience.GERMAN GONZALEZ-MORRIS is a software architect/engineer working with C/C++, Java, and different application containers, in particular, with WebLogic Server. He has developed different applications including JEE/Spring/Python. His areas of expertise also include OOP, design patterns, Spring Core/MVC, and microservices.IVOR HORTON is self-employed in consultancy and writes programming tutorials. He worked for IBM for many years and holds a bachelor's degree, with honors, in mathematics. Horton's experience at IBM includes programming in most languages (such as assembler and high-level languages on a variety of machines), real-time programming, and designing and implementing real-time closed-loop industrial control systems. He has extensive experience teaching programming to engineers and scientists (Fortran, PL/1, APL, etc.). Horton is an expert in mechanical, process, and electronic CAD systems; mechanical CAM systems; and DNC/CNC systems.1. Programming in C2. First Steps in Programming3. Making Decisions4. Loops5. Arrays6. Applications with Strings and Text7. Pointers8. Structuring Your Programs9. More on Functions10. Essential Input and Output Operations11. Structuring Data12. Working with Files13. Supporting Facilities14. Advanced and Specialized TopicsA. Computer ArithmeticB. ASCII Character Code DefinitionsC. Reserved Words in CD. Input and Output Format SpecificationsE. Standard Library Headers
Advanced Python Development
This book builds on basic Python tutorials to explain various Python language features that aren’t routinely covered: from reusable console scripts that play double duty as micro-services by leveraging entry points, to using asyncio efficiently to collate data from a large number of sources. Along the way, it covers type-hint based linting, low-overhead testing and other automated quality checking to demonstrate a robust real-world development process.Some powerful aspects of Python are often documented with contrived examples that explain the feature as a standalone example only. By following the design and build of a real-world application example from prototype to production quality you'll see not only how the various pieces of functionality work but how they integrate as part of the larger system design process. In addition, you'll benefit from the kind of useful asides and library recommendations that are a staple of conference Q&A sessions at Python conferences as well as discussions of modern Python best practice and techniques to better produce clear code that is easily maintainable.Advanced Python Development is intended for developers who can already write simple programs in Python and want to understand when it’s appropriate to use new and advanced language features and to do so in a confident manner. It is especially of use to developers looking to progress to a more senior level and to very experienced developers who have thus far used older versions of Python.WHAT YOU'LL LEARN* Understand asynchronous programming* Examine developing plugin architectures* Work with type annotations* Review testing techniques* Explore packaging and dependency managementWHO THIS BOOK IS FORDevelopers at the mid to senior level who already have Python experience.Matthew Wilkes is a European software developer who has worked with Python on web projects for the last fifteen years. As well as developing software, he has long experience in mentoring Python developers in a commercial setting.He is also very involved in open source software, with commits to many popularframeworks. His contributions in that space are focused on the details of database and security interactions of web frameworks.Chapter 1: Prototyping and EnvironmentsChapter Goal: Create a prototype script to read a single sensor valueNo of pages 25Sub -Topics1 Introduce the example of collating data from a large number of othermachines1.1 Possible usecases of this pattern include log aggregation, servermonitoring, IoT, monitoring of customer servers, etc1.2 We’ll use raspberry pis with a mix of server monitoring andvery basic sensors like temperature sensors. There’ll be no IoTspecific setup or detail, it’s just that this is easier for people tofollow along with without inventing another system beingmonitored.1.3 There’ll be plenty of extra context here for how to apply theongoing example if you do already have a system that needsmonitoring.2 Prototyping using jupyter and nbconvert3 Use pipenv to set up dependency environment3.1 Note that by introducing pipenv before setuptools we’repreempting the confusion about the right way to do dependencyand environment management.Chapter 2: Testing, Checking and LintingChapter Goal: Progress the prototype to a series of reliable functions thatcan be testedNo of pages: 30Sub - Topics1 Testing with PyTest (especially fixtures and MUT style)2 Type hinting and checking with mypy3 Linting with flake8 and autoformatting with black4 pre-commit and commit hooks5 GitHub CI integration for easier contributionsChapter 3: Packaging ScriptsChapter Goal: Create an installable package that gives a single script toread the sensor valueNo of pages : 30Sub - Topics:1 setup.py and setuptools when it comes to packaging (not pip /setup.py for environment management, that’s in chapter 1)2 Namespace packages3 Console entrypoint4 argparseHelpful aside: Package name conflicts, installing from GitHub releases,release hashing, wheelsChapter 4: From Script to LibraryChapter Goal: Extend the package to allow reading of multiple sensorsthrough the command lineNo of pages: 20Sub - Topics:1. Abstract Base Classes2. Second sensor value3. argparse subcommandsChapter 5: Alternative InterfacesChapter Goal: Make the script functionality available as a HTTPmicroserviceNo of pages : 40Sub - Topics:1 Simple API servers using flask2 Plugin architecture using entrypoints3 Dynamic dispatch4 Serialisation considerations with custom classes (like units from pintspackage)Chapter 6: Speeding Things UpChapter Goal: Discuss optimisation strategies, what the tradeoffs betweenasync and different types of caching are. We’ll use cachinghere, but async laterNo of pages : 25Sub - Topics:1 asyncio vs lru_cache vs redis vs sqlite etc2 Use of timeit3 File operations using context managersChapter 7: Aggregation ProcessChapter Goal: Create a new package, read configuration files, do a basicHTTP loopNo of pages : 25Sub - Topics:1 cookiecutter2 Config files (configparser vs json vs yaml)3 Requests library4 More depth in pytest usageChapter 8: Asynchronous ProgrammingChapter Goal: Understand the event loop, especially async for loops,demonstrate how it’s a good fit for the aggregation processNo of pages : 40Sub - Topics:1 Defining asynchronous functions2 Using the event loop3 Syntactic sugar for loops and iterators4 Async tasks vs await5 async executorsChapter 9: Asynchronous DatabasesChapter Goal: Understand async executors, using sqlalchemy and JSONBNo of pages : 30Sub - Topics:1 sqlalchemy (and why pandas isn’t a good fit here)2 JSONB format and schemaless3 aiofile, asyncpg and usability/speed tradeoffsChapter 10: Viewing the DataChapter Goal: Creating Jupyter notebooks and using matplotlibNo of pages : 35Sub - Topics:1 Calling async functions from Jupyter Notebooks2 Binding function calls to ipywidgets for interactive reports3 Examples of matplotlib4 GeoJSONChapter 11: Fault ToleranceChapter Goal: Extending ABC interfaces and efficient use of iterables forlarge HTTP responsesNo of pages : 20Sub - Topics:1 Using __subclasshook__ effectively2 Chunked responses vs framing3 JSON deserialisation of partial data and efficient data transferChapter 12: Callbacks and Data AnalysisChapter Goal: Using generators, iterators and coroutines for dataanalysis, async timeoutsNo of pages : 30Sub - Topics:1 Iterator based filtering2 Coroutine based plugins, for example a coroutine that pulls historicaldata and compares it to the current value to decide if an alarm shouldbe raised3 waitfor and executor timeout considerations
Modern C++ for Absolute Beginners
Learn the C++ programming language in a structured, straightforward, and friendly manner. This book teaches the basics of the modern C++ programming language, C++ Standard Library, and modern C++ standards. No previous programming experience is required.C++ is a language like no other, surprising in its complexity, yet wonderfully sleek and elegant in so many ways. It is also a language that cannot be learned by guessing, one that is easy to get wrong and challenging to get right. To overcome this, each section is filled with real-world examples that gradually increase in complexity. Modern C++ for Absolute Beginners teaches more than just programming in C++20. It provides a solid C++ foundation to build upon.The author takes you through the C++ programming language, the Standard Library, and the C++11 to C++20 standard basics. Each chapter is accompanied by the right amount of theory and plenty of source code examples.You will work with C++20 features and standards, yet you will also compare and take a look into previous versions of C++. You will do so with plenty of relevant source code examples.WHAT YOU WILL LEARN* Work with the basics of C++: types, operators, variables, constants, expressions, references, functions, classes, I/O, smart pointers, polymorphism, and more * Set up the Visual Studio environment on Windows and GCC on Linux, where you can write your own code* Declare and define functions, classes, and objects, and organize code into namespaces* Discover object-oriented programming: classes and objects, encapsulation, inheritance, polymorphism, and more using the most advanced C++ features* Employ best practices in organizing source code and controlling program workflow* Get familiar with C++ language dos and donts, and more* Master the basics of lambdas, inheritance, polymorphism, smart pointers, templates, modules, contracts, concepts, and moreWHO THIS BOOK IS FORBeginner or novice programmers who wish to learn C++ programming. No prior programming experience is required.Slobodan Dmitrovic is a C++ software developer with a strong interest in software architecture, modern C++, research and development, and training.1. Introduction2. What is C++?3. C++ Compilers4. Our First Program5. Types6. Exercises7. Operators8. Standard Input9. Exercises10. Arrays11. Pointers12. References13. Introduction to Strings14. Automatic Type Deduction15. Exercises16. Statements17. Constants18. Functions19. Exercises20. Scope and Lifetime21. Exercises22. Classes - Part I23. Exercises24. Classes – Part II25. The static Specifier26. Templates27. Enumerations28. Organizing code29. Exercises30. Conversions31. Exceptions32. Smart Pointers33. C++ Standard Library and Friends34. C++ Standards35. C++1136. C++1437. C++1738. C++20
From Chaos to Concept
THIS BOOK IS WRITTEN FOR PRODUCT DESIGN, SOFTWARE DEVELOPMENT, GRAPHIC DESIGN, AND UX PROFESSIONALS WITH A FOCUS ON CREATING MEASURABLY BETTER USER EXPERIENCES.If you want to design solutions to meet business goals and delight your users, you can look to this resource which covers the following areas:* Creating and documenting goals, strategies, objectives, and tactics* Defining or refining personas based on your measurable objectives (OKRs)* Creating and iterating on scenarios based your prioritized personas* A team approach to defining the product and roadmap to address critical use cases* Team based divergent ideation and solution exploration* Team based convergent solution definition* Wireframing potential solutions for rapid research and iteration* Using quantitative and qualitative methods to understand usage and test with users* Exploring approaches to taxonomy and information architecture* Using psychology and human factors to drive your design decisions* Developing performant, accessible, maintainable experiences* Using analytics to measure the results and inform the next iteration* How this process differs based on the size of the company or team that is employing itKEVIN C. BRAUN is a UX design leader, speaker, educator, and author. He is the founder of Braun Interactive, a design consultancy located in the heart of the Silicon Valley. Kevin has over 24 years of software design and development experience. In that time he has worked to improve user experiences with world-class companies including Google, Samsung, Rolex, Hyundai, Michael Kors, MIT, Harvard, Cisco Systems, Keurig, and Vermont Teddy Bear. He has also worked with industry leaders in healthcare, insurance, automotive, mobile devices, and consumer goods. Introduction: The Golden Butter Knife xvCH 1: MAKE IT USEFUL 1What are We Trying to Do and How Will We Know If We Did It? 1CH 2: MAKE IT USABLE 31Who are We Designing This For?—Personas/User Segments 31What Do They Need?—Scenarios 38When Will We Design and Build It?: The Product Roadmap 42CH 3: MAKE IT BEAUTIFUL 59Scannability, Readability, Comprehension 62Using the Inverted Pyramid Model for Content 63Alignment and the Grid 65Visual Hierarchy 67Composition 69Scope 74The Golden Triangle 74The F, Z, and Other Gaze Patterns 76Gestalt Patterns 77Color 86Thematic Appropriateness 88Data Visualization 90Further Reading 94CH 4: MAKE IT FUNCTIONAL 95Framework-itis and Code Bloat 98Testing across Platforms, Browsers, and Devices 99Accessibility 102Further Reading 105CH 5: MAKE IT MEASURABLE 107FaUX 107Analytics 110Conversions and Micro Conversions 111Be Curious and Analytical 113Google Analytics 115Mouseflow 115Reverse Path Analysis to Understand Failure 117Being Misled by Your Data 118Fear of Change 119Ease the Fear of Change with A/B Testing 120Some Helpful Tools of the Trade 121Further Reading 122CH 6: MAKE IT BETTER 123Planning Your Iterations 123Research 124Analysis 125Findings 126Recommendations 128Prioritization 130Effort 132Further Reading 133CH 7: MAKE THESE METHODS WORK FOR YOU 135Starting with a Greenfield Project or at a Startup 135Understanding the Market 136What Comes Next? 154Working within an Established Company 168Conclusion 176Index 179
Advanced R 4 Data Programming and the Cloud
Program for data analysis using R and learn practical skills to make your work more efficient. This revised book explores how to automate running code and the creation of reports to share your results, as well as writing functions and packages. It includes key R 4 features such as a new color palette for charts, an enhanced reference counting system, and normalization of matrix and array types where matrix objects now formally inherit from the array class, eliminating inconsistencies.Advanced R 4 Data Programming and the Cloud is not designed to teach advanced R programming nor to teach the theory behind statistical procedures. Rather, it is designed to be a practical guide moving beyond merely using R; it shows you how to program in R to automate tasks.This book will teach you how to manipulate data in modern R structures and includes connecting R to databases such as PostgreSQL, cloud services such as Amazon Web Services (AWS), and digital dashboards such as Shiny. Each chapter also includes a detailed bibliography with references to research articles and other resources that cover relevant conceptual and theoretical topics.WHAT YOU WILL LEARN* Write and document R functions using R 4* Make an R package and share it via GitHub or privately* Add tests to R code to ensure it works as intended* Use R to talk directly to databases and do complex data management* Run R in the Amazon cloud* Deploy a Shiny digital dashboard* Generate presentation-ready tables and reports using RWHO THIS BOOK IS FORWorking professionals, researchers, and students who are familiar with R and basic statistical techniques such as linear regression and who want to learn how to take their R coding and programming to the next level.MATT WILEY leads institutional effectiveness, research, and assessment at Victoria College, facilitating strategic and unit planning, data-informed decision making, and state/regional/federal accountability. As a tenured, associate professor of mathematics, he won awards in both mathematics education (California) and student engagement (Texas). Matt earned degrees in computer science, business, and pure mathematics from the University of California and Texas A&M systems.Outside academia, he co-authors books about the popular R programming language and was managing partner of a statistical consultancy for almost a decade. He has programming experience with R, SQL, C++, Ruby, Fortran, and JavaScript.A programmer, a published author, a mathematician, and a transformational leader, Matt has always melded his passion for writing with his joy of logical problem solving and data science. From the boardroom to the classroom, he enjoys finding dynamic ways to partner with interdisciplinary and diverse teams to make complex ideas and projects understandable and solvable.JOSHUA F. WILEY is a lecturer in the Turner Institute for Brain and Mental Health and School of Psychological Sciences at Monash University. He earned his PhD from the University of California, Los Angeles and completed his post-doctoral training in primary care and prevention. His research uses advanced quantitative methods to understand the dynamics between psychosocial factors, sleep and other health behaviours in relation to psychological and physical health. He develops or co-develops a number of R packages including varian, a package to conduct Bayesian scale-location structural equation models, MplusAutomation, a popular package that links R to the commercial Mplus software, extraoperators for faster logical operations, multilevelTools for diagnostics, effect sizes, and easy display of multilevel / mixed effects models results, and miscellaneous functions to explore data or speed up analysis in JWileymisc.PROGRAMMING1.Programming Basics2.Programming Utilities3.Loops, flow control, and *apply functions4.Writing Functions5.Writing Classes and Methods6.Writing a PackageDATA MANAGEMENT7.Data Management using data.table8.Data Munging With data.table9.Other Tools for Data Management10.Reading Big Data(bases)CLOUD COMPUTING11.Getting a Cloud12.Ubuntu for Windows Users13.Every Cloud has a Shiny lining…14.Shiny Dashboard Sampler15.Dynamic Reports and the CloudReferences (backmatter)
Python für Dummies
Python ist eine der beliebtesten und vielseitigsten Programmiersprachen überhaupt. Für viele Entwickler führt deshalb kein Weg an Python vorbei. Schöpfen Sie mit diesem Buch aus dem reichen Erfahrungsschatz zweier langjähriger Softwareentwickler. Sie lernen zunächst die Syntax der Sprache und vertiefen dann das Erlernte anhand von konkreten Aufgabenstellungen. Für den Blick über den Tellerrand sorgen Kapitel zu Programmierparadigmen, Code-Qualität, Test-Ansätzen und Dokumentation. Jede Menge Tipps und Tricks und ein breites Spektrum an Beispielen lassen Sie zu einem wahren Python-Profi werden. Johannes Hofmeister lebt in Heidelberg. Am Psychologischen Institut der Universität Heidelberg erforscht er zur Zeit, was Code verständlich macht. Als Softwareentwickler und Berater hat er in großen und kleinen Unternehmen C#, Java und JavaScript eingesetzt, aber am liebsten liest und schreibt er Python-Code.Horst Schneider lebt in Mannheim und arbeitet seit mehr als zehn Jahren als Softwareentwickler. Sein Schwerpunkt ist die Anwendungsentwicklung in verschiedenen Sprachen, von Java über C# bis zu JavaScript und Python. Aktuell arbeitet er als Coach und Berater im Raum Heidelberg und löst vielfältige Probleme - vorzugsweise mit Python.Über die Autoren 11EINLEITUNG 23Törichte Annahmen über den Leser 23Wie Sie dieses Buch nutzen können 23Was Sie nicht lesen müssen 24Wie dieses Buch aufgebaut ist 24Symbole, die in diesem Buch verwendet werden 25Konventionen in diesem Buch 26TEIL I: LANGWEILIGE EINMALLEKTÜRE 27KAPITEL 1 ORIENTIERUNG29Motivation 29Was ist Python? 29Warum sollte ich Python lernen? 29Was ist an Python so besonders? 30Seit wann gibt es Python? 30Warum ist Python weniger verbreitet als andere Sprachen? 31Welche Sprachfeatures bringt Python mit? 31Ist Python eine Skript- oder eine Programmiersprache? 32Ich habe gehört, dass Python langsam ist Stimmt das? 32Anwendungsgebiete 33Wer verwendet Python? 33Kann man mit Python Geld verdienen? 33Was kann ich mit Python machen? 33Sollte ich nicht doch lieber eine andere Sprache lernen? 34KAPITEL 2 IM KRIECHGANG – DIE INSTALLATION35Windows 35Schritt 1 – Herunterladen 36Schritt 2 – Installieren 37Schritt 3 – Läuft’s? 39macOS 40Schritt 1 – Herunterladen 40Schritt 2 – Installieren 41Schritt 3 – Läuft’s? 44Alternative: Homebrew 44Linux 45Einer für alle 46KAPITEL 3 DER SCHLANGE BEINE MACHEN – PYTHON AUSFÜHREN49Der REPL 49Editor oder IDE? 50TEIL II: PYTHON SPRECHEN LERNEN 53KAPITEL 4 HIC FORUM EST – SCHNELLKURS55Vogelperspektive 56Das kleinste Python-Programm der Welt 59Zeichenketten und Bildschirmausgabe 60Rechnen mit Python 63Variablen 66Wahrheitswerte und bedingte Ausführung 69Boolesche Logik in Python 69Truthy und Falsy 71Wenn – Dann – Sonst 72Listen und Schleifen 74Funktionen und Module 77Funktionen definieren und aufrufen 78Module nutzen 79Fehlerbehandlung 80KAPITEL 5 DATEN STRUKTURIEREN85Listen 86Listen anlegen 86Was steckt drin? 86Listen verändern 88Listen sortieren 89Absteigend oder aufsteigend sortieren? 90Tupel 91Einpacken 91Entpacken 92Tupel verändern 94Tupel sortieren 95Wann Sie Listen und wann Tupel verwenden sollten 95Dictionarys 96Dictionarys anlegen 97Was steckt drin? 98Dictionarys verändern 99Sets 100Sets anlegen 101Was steckt drin? 101Sets verändern 102Mengenlehre 104KAPITEL 6 DATEN TRANSFORMIEREN109Iteration 109Comprehensions 112Syntax 112List Comprehensions 114Dictionary Comprehensions 115Set Comprehensions 116Generator Expressions 117Slicing 120Ein einziges Element 121Mehrere Elemente 122Schrittweise Auswahl 122Beispiel: IBAN validieren 123Iteration ohne Index 125FAQ – Leben ohne Index 127Nur ein Element 128Nummerierung 128Listen zusammenführen 129Listen zerteilen 129Dictionarys erzeugen 130Dictionarys iterieren 131Verschachtelte Iteration 131KAPITEL 7 MIT DER AUẞENWELT KOMMUNIZIEREN133Selbstgespräche führen 134Text ausgeben 134Text einlesen 135Textausgabe steuern 136Längere Texte zusammenbasteln 137Texte formatieren 137Textkodierung 140Kommandozeilenparameter 140Textdateien einlesen 142Im Ganzen lesen 142Zeilenweise lesen 143Textdateien schreiben 146Dateimodi: Behalten oder neu machen? 146Im Ganzen schreiben 147Zeilenweise schreiben 148Vollständiges Beispiel 149Alles fließt 150Bin∖xc3∖xa4rdaten lesen 152Im Ganzen lesen 153Häppchenweise lesen 154Binärdaten schreiben 158TEIL III: MIT PYTHON PROBLEME LÖSEN 161KAPITEL 8 WAS PYTHON SCHON KANN163Built-ins 163Built-ins für den REPL 165Umwandlungsfunktionen 166Mathematische Funktionen 171Mengen aggregieren 172Daten transformieren 173Module und Pakete 175Module importieren 176Direktimporte 176Aus Paketen importieren 177Namenskonflikte verhindern 177Import mit Wildcard – Alle für einen 178Die Standardbibliothek 179Im Lieferumfang enthalten sind 180os – Welches Betriebssystem läuft? 180random und secrets – Zufall 183imaplib – E-Mails versenden 184urllib und json – Web 186Minisprachen 187Datum- und Zeitangaben 187Strings formatieren 192KAPITEL 9 WAS PYTHON (NOCH) NICHT KANN197Pip installieren 197Pakete installieren 198Installierte Pakete ansehen 199Spezifische Versionen installieren 199Pakete entfernen 200KAPITEL 10 WAS SIE PYTHON BEIBRINGEN KÖNNEN201Eigene Module 201Eigene Module anlegen 202Eigene Pakete 202Eigene Skripte 204Hintergrund: Wie Module geladen werden 206Wo sucht Python Module? 206Module Laden 207TEIL IV: PYTHON ALS HANDWERK 209KAPITEL 11 FUNKTIONALE PROGRAMMIERUNG211Anatomie einer Funktion 212Definition 212Aufruf 212Namen und Konzepte 213Effekte und Nebeneffekte 213Positionale Argumente 214Benannte Argumente 215Regeln für Funktionsaufrufe aufstellen 216Optionale Argumente 219Variable Argumente mit *args und **kwargs 222Argumente entpacken 225Funktionen haben »Bürgerrechte« 226Funktionen zusammenstecken 227Arbeitsteilung 229Funktionen, die Funktionen erzeugen 232Dekoratoren 233Generatoren 235KAPITEL 12 OBJEKTORIENTIERTE PROGRAMMIERUNG239Anatomie eines Objekts 240Objekte 241Klassen und Konstruktoren 241Attribute und Methoden 242Instanzen 246Operatoren 248Beziehungen 252Vererbung – Objekte als Familie 253Komposition – Objekte im Team 263In Objekten denken 270Was ist eigentlich objektorientierte Programmierung? 271Wie man gute Objekte designt 273KAPITEL 13 AUSNAHMEN279Ausnahmen behandeln 281Eigene Ausnahmen auslösen 282Ausnahmen als Signale nutzen 283Beispiel: Hotels buchen 285KAPITEL 14 TESTEN 295Wenn Ihr Programm nicht tut, was es soll 296Eigenschaften von Python 296Fehlerklassen (oder: Was alles schief gehen kann) 298Wo und wie Tests helfen können 300Python bei der Arbeit zuschauen 301Debuggen mit print 301Bedingungen prüfen mit assert 302Den Programmfluss kontrollierbar machen 303Unit-Tests schreiben mit dem unittest-Modul 305Unit-Tests erstellen und ausführen 306Bestehende Komponenten testen 309TEIL V: BRÖTCHEN (ODER LORBEEREN) MIT PYTHON VERDIENEN 313KAPITEL 15 CODE-QUALITÄT315Werkzeuge 316Programmstil überprüfen mit Pycodestyle 317Code reformatieren 319Programmierfehler erkennen mit Pyflakes 321Dokumentation überprüfen mit Pydocstyle 323Sicherheitsrisiken finden mit Bandit 326Integrierte Code-Audits 328Modulare Audits mit Flake8 329Das Schweizer Taschenmesser: Pylint 333Chancen und Grenzen 335Listen to your tools 335Was Werkzeuge nicht leisten können 337KAPITEL 16 WEBANWENDUNGEN ENTWICKELN 339Python und das Web 339Die Qual der Wahl 340Django 340Was macht Django? 341Wie Django HTTP-Anfragen verarbeitet 342Ein Beispielprojekt 343Schritt 1 – Setup 344Schritt 2 – Die erste Seite 344Schritt 3 – Ein Modell 348Schritt 4 – Die Django-Verwaltung 350Schritt 5 – Eine eigene View 353Schritt 6 – HTML rendern 354Zusammenfassung 355KAPITEL 17 DATEN AUFBEREITEN, VISUALISIEREN UND AUSWERTEN357Setup 358Szenario: Minigolf 358Datensatz 359Schritt 0 – Fragen 361Schritt 1 – Daten einlesen 362Schritt 2 – Data Frames untersuchen 362Schritt 3 – Series-Objekte betrachten 364Schritt 4 – Beschreibende Statistiken ausgeben 365Schritt 5 – Filtern und Bereinigen 367Schritt 6 – Auswerten 369Schritt 7 – Visualisieren 371Schritt 8 – Schließende Statistik 372Zusammenfassung 373TEIL VI: DER TOP-TEN-TEIL 375KAPITEL 18 ZEHN GUTE BIBLIOTHEKEN377Die Standardbibliothek 377Requests 377BeautifulSoup 378Scrapy 378Selenium 379Cryptography 379Pypdftk 380Flask 380OpenCV 380NLTK 381KAPITEL 19 ZEHN DINGE, DIE WIR AUSGELASSEN HABEN383Python 2.7 383Interoperabilität mit C 384Python Bytecode disassemblieren 384Debugging 385Logging 385GUIs 386Nebenläufige Ausführung 387Typ-Annotationen 387Dataclasses 388Walross-Operator 389Stichwortverzeichnis 393
Android Application Development All-in-One For Dummies
CONQUER THE WORLD OF ANDROID APP DEVELOPMENTAndroid has taken over the mobile and TV markets and become unstoppable! Android offers a vast stage for developers to serve millions—and rake in the profits—with diverse and wide-ranging app ideas. Whether you're a raw recruit or a veteran programmer, you can get in on the action and become a master of the Android programming universe with the new edition of Android Application Development For Dummies All-in-One. In addition to receiving guidance on mobile and TV development, you'll find overviews of native code, watch, car, Android wear, and other device development.This friendly, easy-to-follow book kicks off by offering a fundamental understanding of Android's major technical ideas, including functional programming techniques. It moves on to show you how to work effectively in Studio, program cool new features, and test your app to make sure it's ready to release to a waiting world. You'll also have an opportunity to brush up on your Kotlin and develop your marketing savvy. There are millions of potential customers out there, and you want to stand out from the crowd!* Understand new features and enhancements* Get development best-practices* Know your Android hardware* Access online materialsWith a market share like Android's, the stakes couldn't be higher. Android Application Development For Dummies All-in-One levels the field and gives you the tools you need to take on the world.BARRY BURD, PHD, is a veteran author and educator. At the University of Illinois, he was five times elected to the university-wide List of Teachers Ranked as Excellent by their Students. He has written several books on Java and Android development. JOHN PAUL MUELLER has produced 115 books and more than 600 articles on topics ranging from functional programming techniques to application development using C++. INTRODUCTION 1How to Use This Book 1Conventions Used in This Book 2Foolish Assumptions 2Icons Used in This Book 3Beyond the Book 4Where to Go from Here 4BOOK 1: GETTING STARTED WITH ANDROID APPLICATION DEVELOPMENT 5CHAPTER 1: ALL ABOUT ANDROID 7The Consumer Perspective 8The Versions of Android 9The Developer Perspective 12Java and Kotlin 12XML 14Linux 16The Business Perspective 18CHAPTER 2: INSTALLING THE SOFTWARE TOOLS 19Setting Up the Software 20Considering the requirements 20Downloading the software 21Installing Android Studio 23Installing offline tools 25Launching the Android Studio IDE 28In Windows 29On a Mac 29In Linux 30In Chrome OS 30Using the Android Studio Setup Wizard 30Fattening Up the Android SDK 32The more things stay the same, the more they change 32Installing new versions (and older versions) of Android 33Creating an Android virtual device 35A third-party emulator 39CHAPTER 3: CREATING AN ANDROID APP 43Creating Your First App 43Starting the IDE and creating your first app 45Launching your first app 50Running Your App 52You Can Download All the Code 55Troubleshooting Common IDE Errors 58Error message: Failed to find target 58Error running ‘app’: No target device found 58Error message: Android Virtual Device may be incompatible with your configuration 58You lose contact with the Android Debug Bridge (ADB) 59You don’t like whatever AVD opens automatically 59The emulator stalls during startup 60Error message: The user data image is used by another emulator 61Error message: Unknown virtual device name 63The emulator displays a “process isn’t responding” dialog box 63Changes to your app don’t appear in the emulator 64Testing Apps on a Real Device 64CHAPTER 4: EXAMINING A BASIC ANDROID APP 67A Project’s Files 68The MainActivity.kt file 71The onCreate() method 72Using other templates 73The res Branch 76The res/drawable branch 77The res/layout branch 77The res/menu branch 78The res/mipmap branch 79The res/values branch 80Other Files in an Android Project 82The build.gradle file 82The AndroidManifest.xml file 85The R.java file 87The assets folder 89The android.jar archive 90The APK file 91What Did I Agree To? 93What’s in a name? 93Choosing a language 95Your app’s API levels 95CHAPTER 5: CONJURING AND EMBELLISHING AN ANDROID APP 101Dragging, Dropping, and Otherwise Tweaking an App 102Creating the “look” 102Coding the behavior 112A Bit of Debugging 118Try it! 118Discovering the secrets of Logcat 123Using the debugger 126CHAPTER 6: IMPROVING YOUR APP 131Improving the Layout 131Changing the layout 132Creating a reusable layout 139Reusing a layout 142Starting Another Activity 145Localizing Your App 151Responding to Check Box Events 155Displaying Images 157Sending in Your Order 162BOOK 2: ANDROID BACKGROUND MATERIAL 167CHAPTER 1: USING ANDROID STUDIO 169Good to Know versus Need to Know 170Getting a Feel for the Big Picture 171The main window 173Viewing modes 179The Designer tool 181Discovering What You Can Do 184Finding things 185Fixing code 190Refactoring 199CHAPTER 2: KOTLIN FOR JAVA PROGRAMMERS 203Using Kotlin or Java for Development 204Defining the Java Issues That Kotlin Fixes 207Improving control over null references 207Removing raw data types 210Using invariant arrays 210Working with proper function types 212Getting rid of the checked exceptions 213Nothing’s Perfect: Kotlin is Missing Features, Too 214Considering primitive types that are not classes 214Losing static members 214Eliminating non-private fields 215Reducing confusion by eliminating wildcard-types 216Abandoning the ternary-operator a ? b : c 217Looking at What Kotlin Adds to the Picture 218Considering higher order functions and lambdas 218Refining object orientation using extension functions 218Relying on smart casts 219Employing string templates 220Understanding primary constructors 221Implementing first-class delegation 221Using ranges of values 223Creating data classes 224Overloading operators 224Developing asynchronous code using coroutines 225CHAPTER 3: KOTLIN FOR EVERYONE 227Moving from Development to Execution with Kotlin 228What is a compiler? 228Understanding native code compiler or interpreter issues 230Considering the Android Runtime (ART) 231Grasping Kotlin Code 235Nearly everything begins with an expression 236The Kotlin class 238Classes and objects 239Kotlin types 240Performing casts 245The Kotlin function 249Objects and their constructors 252Classes grow on trees 254The Kotlin package 255Considering Kotlin visibility rules 257Defying your parent 258Kotlin comments 259CHAPTER 4: WHAT KOTLIN DOES (AND WHEN) 261Making Decisions (Kotlin if Statements) 261Testing for equality 264Choosing among many alternatives (Kotlin when statements) 266Repeating Instructions Over and Over Again 269Kotlin while statements 269Kotlin do statements 271Arrays in Kotlin 273Kotlin’s for statements 277Looping using Kotlin recursion 281Working with break and continue 283Jumping Away from Trouble 284Working with Kotlin Collections 286Considering the collection types 287Differentiating between read-only and mutable collections 289CHAPTER 5: OBJECT-ORIENTED PROGRAMMING IN KOTLIN 291Static Fields and Methods 291Interfaces and Callbacks 294Event handling and callbacks 299An object remembers who created it 302A less wordy way to implement an interface 303Classes That Must (and Must Not) Be Extended 305The need to override 306Java’s final classes 306Kotlin’s open classes 307Kotlin extensions 307Abstract classes 308Inner Classes 310Named inner classes 310Anonymous inner classes 312CHAPTER 6: FUNCTIONAL PROGRAMMING IN KOTLIN 315Defining Functional Programming 316Differences from other programming paradigms 316Understanding its goals 317Understanding Pure and Impure Languages 318Using the pure approach 318Using the impure approach 320Comparing the Functional Paradigm 320Using Kotlin for Functional Programming Needs 322Defining the Role of State 323Using Recursion to Perform Calculations 324Relying on standard recursion 324Relying on tail recursion 326Using Function Types 327Understanding Function Literals 329Lambda expressions 329Anonymous functions 330Defining the Function Types 331Comprehensions 331Receivers 332Inline 334Utility 335Using Functional Programming for Android Apps 336CHAPTER 7: ALOOK AT XML 339XML Isn’t Ordinary Text 340Of tags and elements 340Other things you find in an XML document 348What’s in a Namespace? 350The package attribute 353The style attribute 354BOOK 3: THE BUILDING BLOCKS 357CHAPTER 1: GETTING AN OVERVIEW OF JETPACK 359Understanding the Benefits of Jetpack 360Eliminating boilerplate code 360Managing background tasks 361Navigating between activities and fragments 362Managing memory 364Performing configuration changes 365Considering the Jetpack Components 366Foundation 367Architecture 368Behavior 370UI 372Getting an Overview of the AndroidX Package 373Working with Lifecycle-Aware Components 374Focusing on activities 375Understanding events and states 376CHAPTER 2: BUILDING A FOUNDATION FOR YOUR APP 377Working with Android KTX 378Getting a feel for KTX features 378Using KTX in your project 381Considering the modules 382Addressing Security Issues 389Benchmarking Your Application 392Removing barriers to correct results 393Creating a test app 394Profiling your app 397Tracing your app 398Checking for benchmarking module support 400Benchmarking the app 401Testing Application Functionality 403CHAPTER 3: CREATING AN ARCHITECTURE 405Managing Application Activities 405Defining an activity 406Getting an overview of intent filters 407Considering the activity lifecycle 407Understanding the backstack 409Working with fragments 412Considering the fragment lifecycle 416Seeing activities and fragments in action 417Providing for Navigational Needs 433Creating the navigational graph 434Adding a NavHostFragment to your activity 437Adding destinations 438Creating links between destinations 440Creating the required linkages 442Performing Background Tasks Using WorkManager 446CHAPTER 4: DEFINING AN APP’S BEHAVIOR 451Working with Notifications 452Understanding what notifications do 452Anatomy of a notification 454Assigning a channel to your notification 456Setting the notification importance 457Considering the notification types 458Relying on notification updates 459Do Not Disturb mode 460Creating a notification 460Getting Permission 466Considering permission use 467Configuring permissions in AndroidManifest.xml 468Complying with User Preferences 469Deciding on a preference set 470Setting preferences using the Preference Library 472Working with MediaPlayer 481Adding Camera Support Using CameraX 484Sharing with Others 487Performing simple share actions with other apps 487Using Slices 488CHAPTER 5: INTERACTING WITH THE USERS 491Creating a Great Layout 492Defining the View and ViewGroup elements 492Creating a layout using XML 493Modifying a layout at runtime 497Considering the common layouts 498Working with adapters 499Debugging your layout 500Employing Color and Texture 502Working with styles and themes 503Creating a palette 509Using swatches to create color schemes 510Using Animations and Transitions 510Understanding the need for animations 511Animating graphics 511Communicating with Emoji 514Keyboard emoji support 515Using the cut-and-paste method on standard controls 516Using the AndroidX approach 517BOOK 4: PROGRAMMING COOL PHONE FEATURES 521CHAPTER 1: HUNGRY BURDS: A SIMPLE ANDROID GAME 523Introducing the Hungry Burds Game 523The Hungry Burds Project’s Files 526The Main Activity 528The Code, All the Code, and Nothing But the Code 530Setting Up the Game 535Declaring properties 535The onCreate Method 537Displaying a Burd 538Creating random values 538Creating a Burd 539Placing a Burd on the constraint layout 540Animating a Burd 542Handling a Touch Event 544Finishing Up 546CHAPTER 2: AN ANDROID SOCIAL MEDIA APP 547Setting Things Up on Facebook’s Developer Site 548A Minimal Facebook App 549The build.gradle file 550The manifest file 550A Bare-Bones Main Activity 551Enriching the Minimal App 555Working with a radio group 559Controlling the web view 562Who tests your Facebook app? 563CHAPTER 3: GOING NATIVE 567The Native Development Kit 567Understanding why you need the NDK 568Knowing what you get 569Getting the NDK 570Creating an Application 573Starting with the template 573Seeing the essential project differences 575Considering the build.gradle (Module: app) differences 577Understanding the default template differences 580Getting an overview of the C++ file 582Seeing the result 583BOOK 5: APPS FOR TABLETS, WATCHES, TV SETS, AND CARS 585CHAPTER 1: APPS FOR TABLETS 587Gaining Perspective 588Creating the right devices 589Running code on multiple devices 593Copying the project 594Seeing presentation differences 596Developing a Nested Navigational Graph 603Understanding the uses for nested navigational graphs 603Developing an app design 604Considering the content needs 608Creating a Responsive App 612CHAPTER 2: DEVELOPING FOR ANDROID WEAR 615Seeing Where Wearables Are Used 615Setting Up Your Testing Environment 617Creating the project 617Configuring a wearable device emulator 620Other testing configurations 624Wearable Apps: What’s the Big Deal? 625Case Study: A Watch Face 626Defining the watch face project 627Testing the watch face app 628Dissecting the skeletal watch face project 631Enhancing the skeletal watch face project 634CHAPTER 3: DEVELOPING FOR ANDROID TV 637Getting Started 638Running the Skeletal App 641Dissecting the TV App 644Adding to the standard AndroidManifest.xml 644Looking into build.gradle (Module: app) 645Defining a layout 646The adapter and the presenter 647Using the Adapter class 648Using the Presenter class 650CHAPTER 4: DEVELOPING FOR ANDROID AUTO 653Checking Auto Compatibility 654Choosing the Google Play Services 656Considering Notification Limits 658Creating an Emulator 660Configuring your car for development 661Defining an emulator 662Developing an Android Auto App 670Creating the project 670Viewing the project configuration 672Performing required configuration tasks 674Touring the Media Service app 675BOOK 6: THE JOB ISN’T DONE UNTIL 679CHAPTER 1: PUBLISHING YOUR APP TO THE GOOGLE PLAY STORE 681Creating a Google Play Developer Account 681Preparing Your Code 682Un-testing the app 683Choosing Android versions 683Setting your app’s own version code and version name 684Choosing a package name 685Preparing Graphic Assets for the Play Store 685Creating an icon 686Creating screenshots 688Providing other visual assets 690Creating a Publishable File 691Differences among builds 692Creating the release build 697Running a new APK file 702Running the app in a new AAB file 703Another way to build and run an AAB file 705Publishing Your App 708The App Releases page 708The Store Listing page 710The App Signing page 711Other pages 711Leave No Stone Unturned 714Publishing Elsewhere 714The Amazon Appstore 714Other venues 715CHAPTER 2: MONETIZING AND MARKETING YOUR APP 717Choosing a Revenue Model 718Charging for your app 719Offering an extended free trial 723Freemium apps 724Selling things with your app 726Subscription pricing 729Earning revenue from advertising 729Variations on in-app advertising 731Donationware 732Offering your app for free 732Getting paid to develop apps for others 732Marketing Your Application 733Brick Breaker Master: An App Marketing Case Study 734CHAPTER 3: CREATING PUBLIC SUPPORT FOR YOUR APP 739Obtaining Support through Patreon 740Discovering that patronage isn’t new 740Considering crowdfunding 741Defining why you should use crowdfunding 741Understanding the development angle 742Determining the trade-offs 744Developing Your Own Distribution Stream 744Creating podcasts 744Developing YouTube videos 746Employing social media 748Answering questions 750Taking the Personal Approach 750Creating a blog 751Answering your email 752Considering App Store Alternatives 754Getting Awards 756Looking for awards in all the right places 757Strutting your stuff 757Index 759
Flutter For Dummies
CREATE AWESOME IOS AND ANDROID APPS WITH A SINGLE TOOL!Flutter is an app developer’s dream come true. With Google’s open source toolkit, you can easily build beautiful apps that work across platforms using a single codebase. This flexibility allows you to get your work out to the widest possible audience. With Flutter already being used by thousands of developers worldwide in a market where billions of apps are downloaded every year, now is the right time to get ahead of the curve with this incredible tool.Flutter for Dummies is your friendly, ground-up route to creating multi-platform apps.From how to construct your initial frameworks to writing code in Dart, you’ll find the essentials you need to ride the Flutter revolutionary wave to success. This book includes how to create an intuitive and stunning UI, add rich interactivity, and easily pull in data. You’ll also see how Flutter features like Hot Reload—providing sub-second refreshes as you refine your work—help you make sure your app is a delight to use.* Start simple: follow steps to build a basic app * It’s alive! Keep connected to online data * It moves! Make things fun with animated features * Get the word out: use tips to expand your audience Whether you’re a fledgling developer or an expert wanting to add a slick feather to your programming cap, join the Flutter revolution now and soar above the rest!BARRY BURD, PHD, is a veteran educator and a professor of mathematics and computer science at Drew University. When he's not lecturing at the university, Barry speaks at professional conferences and somehow finds time to write books, including Java For Dummies and Beginning Programming with Java For Dummies.INTRODUCTION 1How to Use This Book 1Conventions Used in This Book 2What You Don’t Have to Read 2Foolish Assumptions 3How This Book is Organized 4Part 1, “Getting Ready” 4Part 2, “Flutter: A Burd’s-Eye View” 4Part 3, “Details, Details” 4Part 4, “The Part of Tens” 4More on the web! 5Icons Used in This Book 5Beyond the Book 6Where to Go from Here 6PART 1: GETTING READY 7CHAPTER 1: WHAT IS FLUTTER? 9Hardware and Software (Things You May Already Know) 10Where Does Flutter Fit In? 15Cross-platform development 15A quick-and-easy development cycle 17A great way to think about app development 25Enough New Terminology! What’s Next? 28CHAPTER 2: SETTING UP YOUR COMPUTER FOR MOBILE APP DEVELOPMENT 29The Stuff You Need 30What to Do 32Getting and installing the stuff 32For Mac users only 34Configuring Android Studio 35Running your first app 36Dealing with the Devil’s Details 43On installing Android Studio 43On launching Android Studio for the first time 44On installing Android Studio’s Flutter plugin 44On adding virtual devices 46On installing Flutter 50Divisiveness Among Devices 52Running apps on an Android device 52Testing apps on a physical device 53Using Android Studio 59Starting up 59The main window 60Running This Book’s Sample Programs 63Enjoying reruns 65If you’re finicky 65Were These Setup Steps Fun or What? 66PART 2: FLUTTER: A BURD’S-EYE VIEW 67CHAPTER 3: “HELLO” FROM FLUTTER 69First Things First 69What’s it all about? 72A constructor’s parameters 75A note about punctuation 76Don’t relent — simply indent 77Classes, Objects, and Widgets 79A brief treatise on “within-ness” 81The documentation is your friend 82Making Things Look Nicer 83Creating a scaffold 86Adding visual tweaks 88Dart’s enum feature 89Hello from sunny California! 89Adding another widget 91Centering the text (Part 1) 94Centering the text (Part 2) 97Displaying an image 100Hey, Wait a Minute 104CHAPTER 4: HELLO AGAIN 105Creating and Using a Function 106The function declaration 107A function call 108Parameters and the return value 108Programming in Dart: The Small Stuff 112Statements and declarations 112Dart’s typing feature 113Literals, variables, and expressions 114Two for the price of one 117Dart’s var keyword 119Built-in types 121Types that aren’t built-in 123Using import declarations 123Variations on a Theme from Die Flutter Mouse 124Type names in function declarations 127Naming your parameters 128What about the build function? 129More Fun to Come! 130CHAPTER 5: MAKING THINGS HAPPEN 131Let’s All Press a Floating Action Button 132Stateless widgets and stateful widgets 134Widgets have methods 135Pay no attention to the framework behind the curtain 139Enhancing Your App 146More parameters, please 148The override annotation 151What does mean? 152Anonymous functions 153What belongs where 156Names that start with an underscore 160Whew! 162CHAPTER 6: LAYING THINGS OUT 163The Big Picture 164Creating bite-size pieces of code 167Creating a parameter list 169Living color 170Adding padding 171Your humble servant, the Column widget 173The SizedBox widget 175Your friend, the Container widget 176Nesting Rows and Columns 181More Levels of Nesting 183Using the Expanded Widget 186Expanded versus unexpanded 189Expanded widget saves the day 192Flexing some muscles 196How Big is My Device? 199PART 3: DETAILS, DETAILS 205CHAPTER 7: INTERACTING WITH THE USER 207A Simple Switch 208Dart’s const keyword 211Compatible or NOT? 213Wait For It! 214How Much Do You Love Flutter? 217Dealing with Text Fields 220Callouts 1 and 2 223Callout 3 225Callout 4 226Callout 5 230Creating Radio Buttons 230Creating an enum 233Building the radio group 233Displaying the user’s choice 235Creating a Dropdown Button 239Building the dropdown button 242The little Reset button 244Making a Map 245Onward and Upward 246CHAPTER 8: NAVIGATION, LISTS, AND OTHER GOODIES 247Extending a Dart Class 248From One Page to Another 251An icon on a button 254Pushing and popping 255Passing Data from Source to Destination 256Passing Data Back to the Source 261Dart’s async and await keywords 264Taking control of the app bar’s Back button 266Passing Data in Both Directions 267Creating Named Routes 272Creating a List 276The ListView widget 279Creating list items one-by-one 285Another new Dart language feature 288Fetching Data from the Internet 290Using a public API 293Sending a URL to a server 295Making sense of a JSON response 296What’s Next? 296CHAPTER 9: MOVING RIGHT ALONG 297Setting the Stage for Flutter Animation 297Moving Along a Straight Line 303Bouncing Around 308Animating Size and Color Changes 310Moving Along a Curve 312Dragging Things Around 314Where To Go From Here 319PART 4: THE PART OF TENS 321CHAPTER 10: TEN WAYS TO AVOID MISTAKES 323Put Capital Letters Where They Belong 323Use Parentheses When (and Only When) They’re Appropriate 323Limit Access to Variables 324Call setState 324Make Adjustments for Indices Starting at Zero 324Use the Expanded Widget 325Add itemCount to Your ListView.builder 325Add Imports When They’re Required 325Declare Assets and Dependencies in pubspec.yaml 325Indent Your Code According to Dart Language Guidelines 326CHAPTER 11: TEN WAYS TO ENHANCE YOUR APP DEVELOPMENT CAREER 327Practice! Practice! 327Critique Your Own Code 328Have Others Review Your Code 328Find Out Which Technologies Your Nearby Companies Use 328Attend User Group Meetings 328Ask Questions 329Ask Yourself Whether You Truly Understand 329Learn Things That You May Never Need to Know 329Do What You Love to Do 330Get Plenty of Sleep 330CHAPTER 12: TEN CHAPTERS ABOUT FLUTTER APP DEVELOPMENT 331Introduction 331What is Flutter? 331Setting Up Your Computer for Mobile App Development 332‘Hello’ from Flutter 332Hello Again 332Making Things Happen 332Laying Things Out 332Interacting with the User 332Navigation, Lists, and Other Goodies 333Moving Right Along 333PART 5: APPENDICES 335Appendix: Doris’s Dating App 337Index 347
Go - Das Praxisbuch
Ihr schneller Einstieg in Go.Sie haben schon Erfahrung mit objektorientierten Programmiersprachen und wollen sich jetzt Googles Programmiersprache Go genauer ansehen? Dann ist dieses Buch genau das Richtige für Sie! Denn Sie steigen direkt in die Besonderheiten von Go ein und lernen das Ökosystem rund um Tools und Testing kennen.Die Syntax der Programmiersprache und die Unterschiede zu gängigen objektorientierten Programmiersprachen wie Java oder C++ erläutert Andreas Schröpfer anhand von vielen Beispielen und zeigt Stolperfallen auf. Ein Fokus liegt auf dem Thema Nebenläufigkeit, für das Go so bekannt ist. Darüber hinaus beleuchtet der Autor das Ökosystem der Werkzeuge, die Go mitbringt. Für den Entwickleralltag wichtige Themen wie Codequalität und Code Conventions, Testing sowie Dokumentation ziehen sich quer durch das Praxisbuch.Das alles lernen sie nicht nur mit grauer Theorie, sondern direkt an der Tastatur mit Übungsaufgaben und Beispielprojekten. Alle Beispiele finden sich außerdem auf GitHub und sind so als Referenz für eigene Projekte jederzeit zugänglich. Dieses Gesamtpaket macht »Go – Das Praxisbuch« zu einem schnellen Start in eine schnelle Programmiersprache.Inhalt (PDF-Link)Leseprobe (PDF-Link)
Algorithmen in Python
Inhalt Algorithmen gehören zum Rüstzeug guter Entwickler und Programmierer. Dieses Buch stellt Ihnen eine Vielzahl an problemlösenden Techniken für den Programmieralltag vor und zeigt, wie Sie diese Techniken in Ihre Anwendungen implementieren. Dabei lernen Sie 32 Klassiker der Informatik kennen, vom einfachen Such-Algorithmus bis zu genetischen Algorithmen und neuronalen Netzen in der KI. Randvoll mit Codebeispielen in Python sowie Profitipps für Programmierer. Selbst wenn Ihnen einiges bekannt vorkommen wird, es warten zahlreiche Aha-Erlebnisse auf Sie. Ideal für alle, die ihre ersten Schritte in der Programmierung hinter sich haben und jetzt voll durchstarten wollen! - Programmieren trainieren mit bekannten und modernen Klassikern - Von der Suche bis zu k-Means, vom Dreizeiler bis zur dynamischen Programmierung und KI - Für Studium, Coding-Katas, Workouts oder in Eigeninitiative - Titel der amerikanischen Originalausgabe: "Classic Computer Science Problems in Python"
Hands-on Booting
Master the booting procedure of various operating systems with in-depth analysis of bootloaders and firmware. The primary focus is on the Linux booting procedure along with other popular operating systems such as Windows and Unix.Hands-on Booting begins by explaining what a bootloader is, starting with the Linux bootloader followed by bootloaders for Windows and Unix systems. Next, you’ll address the BIOS and UEFI firmware by installing multiple operating systems on one machine and booting them through the Linux bootloader. Further, you’ll see the kernel's role in the booting procedure of the operating system and the dependency between kernel, initramfs, and dracut. You’ll also cover systemd, examining its structure and how it mounts the user root filesystem. In the final section, the book explains troubleshooting methodologies such as debugging shells followed by live images and rescue mode.On completing this book, you will understand the booting process of major operating systems such as Linux, Windows, and Unix. You will also know how to fix the Linux booting issues through various boot modes.WHAT YOU WILL LEARN* Examine the BIOS and UEFI firmware * Understanding the Linux boot loader (GRUB)* Work with initramfs, dracut, and systemd* Fix can’t-boot issues on Linux WHO THIS BOOK IS FORLinux users, administrators, and developers.Yogesh has been with Red Hat for the past 10 years. He is presently working as a principal technical support engineer in the Linux kernel domain. He specializes in troubleshooting and tuning the performance issues of Linux enterprise servers. The Linux boot process is his forte and he regularly speaks at open source conferences and forums. He also conducts workshops on operating systems for engineering students.Chapter 1: IntroductionChapter Goal: Why should we learn booting? Why is it important?No of pages : 2Sub -Topics1. Why booting?2. What booting really is?3. What happens when you start your computer4. Supply goes to CPUChapter 2: Multi-BootChapter Goal: First stage of booting is firmware and boot loader. There are different firmware's and every OS vendor has their own boot loader. To make readers understand it better, in this chapter we will install different operating systems (windows, Linux, Unix etc.) on one machine and would boot them through Linux boot loader.No of pages: 75 pagesSub - Topics1. BIOS firmware2. Creating partition layout3. Installation sequence of different operating systems:a) Windows XPb) Solaris 2008c) PC-BSD 9.0d) Windows server 2k3e) Windows sevenf) Fedora 15g) Red Hat Enterprise Linux 74. Booting sequence of every operating system.5. Multi booting every operating system through Linux bootloader GRUB & through windows boot loaders (NTLDR / BCD)6. UEFI firmwarea. Why UEFI when we already have BIOS?b. Advantages of UEFI7. Creating GPT partition table8. Installation sequence of latest operating systems:a. Oracle Solaris 11b. Windows 10c. Fedora 31d. Red Hat Enterprise Linux 89. Booting sequence and flowchart of each and every OS.10. The 100 operating systems booting through one boot loader project.Chapter 3: GRUB BootloaderChapter Goal: This topic will cover the GRUB bootloader in much depth.No of pages : 40 pages.Sub - Topics:1.What is new in GRUB version 2? and why do we need it?2.GRUB 2’s structure on BIOS based system.3. GRUB 2’s structure on UEFI based system.4. Manual booting with GRUB 2.5. UEFI shell in detail.6. How to fix the corrupted GRUB.7. Some can’t boot scenarios (related to bootloader) and how to fix them.8. Secure Boot1. What is secure boot?2. Linux and secure boot?3. Shim bootloader of Ubuntu.4. How to add new keys to UEFI?5. How to sign kernel modules?Chapter 4: KernelChapter Goal: This chapter covers the kernel’s role in operating system’s booting sequence.No of pages: 15Sub - Topics:1. The kernel (vmlinuz) as an image file.2. Who and how vmlinuz file is extracted?3. Kernel will start the first process of Linux which is Systemd.Chapter 5: InitramfsChapter Goal: In order to understand the rest of booting sequence we need to understand the basics of initramfs, and why we need initramfs ?No of pages: 15Sub - Topics:1. Why Initramfs?2. Structure of Initramfs.3. How kernel extracts the initramfs in memory?4. How kernel mounts the initramfs as root?Chapter 6: DracutChapter Goal: Dracut is a tool which generates the initramfs. Initramfs is responsible for loading the appropriate modules which are necessary for successful booting.No of pages: Around 17Sub - Topics:1. How dracut makes initramfs image?2. How dracut choose modules to add in initramfs?3. How to customize the initramfs?4. Dracut command line options.5. How to blacklist or add modules in initramfs?Chapter 7: SystemdChapter Goal: The systemd process (first process of Linux) will be launched from initramfs. Once it launched its purpose is to mount the root filesystem and switch to it.No of pages: 55Sub - Topics:1. Structure of systemd.2. How does systemd reduces boot time?3. Booting flow of systemd inside initramfs.4. Plymouth5. Switching to new root filesystem.Chapter 8: Debugging ShellsChapter Goal: Systemd provide various shells to debug the cant boot issues. This topic will cover the booting flow to reach to these shells as well as how to use these shells to fix the cant boot issues.No of pages: 35Sub - Topics:1. Various dracut shells inside initramfs.2. Emergency shell.3. The default Rescue mode.4. Flowchart of so far booting sequence.Chapter 9: Live ImagesChapter Goal: The chapter will cover how does Live images of Operating System boots.No of pages: 4Sub-Topics:1. Filesystem used inside Live images.2. How does the live images boot.Chapter 10: Rescue ModeChapter Goal: Rescue mode plays a vital role in fixing the cant boot issues.No of pages: 15.
Practical R 4
Get started with an accelerated introduction to the R ecosystem, programming language, and tools including R script and RStudio. Utilizing many examples and projects, this book teaches you how to get data into R and how to work with that data using R. Once grounded in the fundamentals, the rest of Practical R 4 dives into specific projects and examples starting with running and analyzing a survey using R and LimeSurvey. Next, you'll carry out advanced statistical analysis using R and MouselabWeb. Then, you’ll see how R can work for you without statistics, including how R can be used to automate data formatting, manipulation, reporting, and custom functions.The final part of this book discusses using R on a server; you’ll build a script with R that can run an RStudio Server and monitor a report source for changes to alert the user when something has changed. This project includes both regular email alerting and push notification. And, finally, you’ll use R to create a customized daily rundown report of a person's most important information such as a weather report, daily calendar, to-do's and more. This demonstrates how to automate such a process so that every morning, the user navigates to the same web page and gets the updated report.WHAT YOU WILL LEARN* Set up and run an R script, including installation on a new machine and downloading and configuring R* Turn any machine into a powerful data analytics platform accessible from anywhere with RStudio Server* Write basic R scripts and modify existing scripts to suit your own needs* Create basic HTML reports in R, inserting information as needed* Build a basic R package and distribute itWHO THIS BOOK IS FORSome prior exposure to statistics, programming, and maybe SAS is recommended but not required.JON WESTFALL is an award-winning professor, published author, and practicing cognitive scientist. He teaches a variety of courses in psychology, from introduction to psychology to upper-level seminars. His current research focuses on the variables that influence economic and consumer finance decisions, and the retention of college students. With applications to both psychology and marketing, his work finds an intersection between basic and applied science. His current appointment is as an assistant professor of psychology, coordinator of the first year seminar program, and coordinator of the Okra Scholars program at Delta State University. Previously he was a visiting assistant professor at Centenary College of Louisiana, and the associate director for research and technology at the Center for Decision Sciences, a center within Columbia Business School at Columbia University in New York City. He now maintains a role with Columbia as a research affiliate and technology consultant.In addition to his research, Dr. Westfall also has career ties in information technology, where he has worked as a consultant since 1997, founding his own firm, Bug Jr. Systems. As a consultant he has developed custom software solutions (including native Windows 32 applications, Windows .NET applications, Windows Phone 7 and Android mobile applications, as well as ASP, ASP.NET, and PHP web applications). He has also served as a senior network and systems architect and administrator (on both Windows and Unix networks, and hybrids) and has also been recognized as a Microsoft Most Valuable Professional (MVP) 2008 – 2012. He has authored several books, and presented at academic as well as technology conferences and gatherings.Chapter 1: Getting Up and Running with RChapter 2: Getting Data into RChapter 3: Project 1: Launching, Analyzing, and Reporting a Survey using R and LimeSurveyChapter 4: Project 2: Advanced Statistical Analysis using R and Mouselab WebChapter 5: R in Everyday LifeChapter 6: Project 3: The R Form MailerChapter 7: Project 4: The R Powered PresentationChapter 8: R AnywhereChapter 9: Project 5: The Change Alert!Chapter 10: Project 6: The R Personal AssistantDETAILED VIEW BELOWChapter 1: Getting Up and Running with RChapter Goal:• Explain what R is, and what R isn’t• Explain the R landscape – it’s open source nature and the various ways people use it.• Explain how R is installed, what types of systems it runs on, and how the user interacts with it.• Explain the basic R script, running basic commands in R (e.g., a “Hello World”) and basic computations.Chapter 2: Feed the Beast: Getting Data into R• Explain the different types of data that R can work with, and how that data is stored.• Explain the basics of connecting R to flat files, database files, database servers, and published data on the internet.• Give examples for downloading data directly from Google Sheets, websites, and more directly from R.• Give examples of basic data scraping with R.• Explain writing of data objects to native RData format as well as other formats for interchangeable use.Chapter 3: Recipe 1: Launching, Analyzing, and Reporting a Survey using R and LimeSurvey• Explain a real-world scenario: A survey project applicable to market research.• Discuss an open-source tool, LimeSurvey, that can be used to create a survey, collect responses, and download those responses into R.• Bring the data into R and run basic summary statistics on the data.• Take those analyses farther into inferential statistics (Linear Regression).Chapter 4: Recipe 2: Advanced Statistical Analysis using R and Mouselab Web• A deeper data scenario than Chapter 3 discussing how Mouselab Web (an open source tool) can be used to track how people view products and services and make decisions.• Introduces advanced statistical design using Linear Mixed-methods regressions.• Also introduces the idea of R packages, and the perils of using packages (e.g., concerns over future-proofing). This chapter is a very deep concept that will be presented accessibly, so that readers learn the takeaways regarding how R works and how to futureproof your R projects, but also get a bit of a unique project applicable to psychology and market research.Chapter 5: R in Everyday Life• Perhaps you’re not a statistician, you just want R to be useful to you in your job. This chapter discusses how R can be used to automate…o Data formattingo Data manipulationo Data reporting• This chapter also talks about how users can write custom functions in R to speed up their workflows.• Finally this chapter talks about how to export results from R into common desktop software such as Microsoft Office.Chapter 6: Recipe 3: The R Form Mailer• Mail Merge is a great tool in Microsoft Office, but it’s entirely graphically driven – point and click, drag and drop. What if you could script it?• This recipe discusses scripting a Mail Merge type activity – sending custom emails with report information directly from R through an email server.• Along the way we learn a bit more about data manipulation by taking long format data (sales figures) and calculating salesmen commissions, then providing a report to each salesperson in their email.Chapter 7: Recipe 4: The R Powered Presentation• Discusses a real-world scenario where a presentation must be given that includes real-time data collection.• Participants during the presentation can take a quick survey (Using Google Forms), which will then be analyzed during the presentation and reported by the speaker.• Discusses how R can create and export results nearly instantly, right on a speaker’s laptop during the presentation.Chapter 8: R Anywhere• Final part of the book discusses using R on a server for always-on analytics, using open source software (RStudio Server).• The computing requirements for such a system, and how one sets it up either on a spare machine or on a dedicated Virtual Private Server.• Potential uses for such a setup, from analysis from devices that don’t support R (e.g., an iPad), or analysis for long-running tasks.Chapter 9: Recipe 5: The Change Alert!• Often work life requires one to check reports or other items to see if something has changed – perhaps a new person has been added to a team, or a new student added to a class.• This recipe demonstrates how to build a script with R that can run on an RStudio Server and monitor a report source for changes, and alert the user when something has changed.• This recipe demonstrates not only regular email alerting, but also push notification alerting through the service Pushover, an ultra low-cost ($4.99, one time) option for customized push notifications.Chapter 10: Recipe 6: The R Personal Assistant• Demonstrates how to use R to create a customized daily rundown report of a person’s most important information, such as the weather report, daily calendar, to-dos, and more.• Demonstrates how to automate such a process so that every morning the user navigates to the same webpage and gets the updated report.• Demonstrates how to build a simple skill in Amazon Alexa that will read the report daily as the user’s command.
OCP Oracle Certified Professional Java SE 11 Programmer II Study Guide
THIS OCP ORACLE CERTIFIED PROFESSIONAL JAVA SE 11 PROGRAMMER I STUDY GUIDE: EXAM 1Z0-815 AND THE PROGRAMMER II STUDY GUIDE: EXAM 1Z0-816 WERE PUBLISHED BEFORE ORACLE ANNOUNCED MAJOR CHANGES TO ITS OCP CERTIFICATION PROGRAM AND THE RELEASE OF THE NEW DEVELOPER 1Z0-819 EXAM.NO MATTER THE CHANGES, REST ASSURED BOTH OF THE PROGRAMMER I AND II STUDY GUIDES COVER EVERYTHING YOU NEED TO PREPARE FOR AND TAKE EXAM 1Z0-819. IF YOU’VE PURCHASED ONE OF THE PROGRAMMER STUDY GUIDES, PURCHASE THE OTHER ONE AND YOU’LL BE ALL SET.NOTE: The OCP Java SE 11 Programmer I Exam 1Z0-815 and Programmer II Exam 1Z0-816 have been retired (as of October 1, 2020), and Oracle has released a new Developer Exam 1Z0-819 to replace the previous exams. The Upgrade Exam 1Z0-817 remains the same.THE COMPLETELY-UPDATED PREPARATION GUIDE FOR THE NEW OCP ORACLE CERTIFIED PROFESSIONAL JAVA SE 11 PROGRAMMER II EXAM—COVERS EXAM 1Z0-816Java, a platform-independent, object-oriented programming language, is used primarily in mobile and desktop application development. It is a popular language for client-side cloud applications and the principal language used to develop Android applications. Oracle has recently updated its Java Programmer certification tracks for Oracle Certified Professional.OCP Oracle Certified Professional Java SE 11 Programmer II Study Guide ensures that you are fully prepared for this difficult certification exam. Covering 100% of exam objectives, this in-depth study guide provides comprehensive coverage of the functional-programming knowledge necessary to succeed. Every exam topic is thoroughly and completely covered including exceptions and assertions, class design, generics and collections, threads, concurrency, IO and NIO, and more. Access to Sybex's superior online interactive learning environment and test bank—including self-assessment tests, chapter tests, bonus practice exam questions, electronic flashcards, and a searchable glossary of important terms—provides everything you need to be fully prepared on exam day. This must-have guide:* Covers all exam objectives such as inheriting abstract classes and interfaces, advanced strings and localization, JDBC, and Object-Oriented design principles and patterns* Explains complex material and reinforces your comprehension and retention of important topics* Helps you master more advanced areas of functional programming* Demonstrates practical methods for building Java solutionsOCP Oracle Certified Professional Java SE 11 Programmer II Study Guide will prove invaluable for anyone seeking achievement of this challenging exam, as well as junior- to senior-level programmers who uses Java as their primary programming language.SCOTT SELIKOFF, OCA/OCP 8 AND OCP 11, has been a professional Java Enterprise architect for over 20 years. He is the founder of Selikoff Solutions, LLC, specializing in building custom mobile and server solutions for businesses in the tri-state New York City area. JEANNE BOYARSKY, OCA/OCP 8 AND OCP 11, is a Java Champion and has worked as a Java developer for a major bank for more than 18 years. She is a senior moderator at CodeRanch, and trains and mentors students of all levels, including the programming division of a FIRST robotics team.Introduction xxiAssessment Test xlivCHAPTER 1 JAVA FUNDAMENTALS 1Applying the final Modifier 2Declaring final Local Variables 3Adding final to Instance and static Variables 4Writing final Methods 5Marking Classes final 5Working with Enums 6Creating Simple Enums 6Using Enums in Switch Statements 8Adding Constructors, Fields, and Methods 9Creating Nested Classes 12Declaring an Inner Class 12Creating a static Nested Class 15Writing a Local Class 17Defining an Anonymous Class 18Reviewing Nested Classes 21Understanding Interface Members 22Relying on a default Interface Method 23Using static Interface Methods 27Introducing private Interface Methods 28Introducing private static Interface Methods 29Reviewing Interface Members 31Introducing Functional Programming 32Defining a Functional Interface 32Declaring a Functional Interface with Object Methods 34Implementing Functional Interfaces with Lambdas 36Writing Lambda Expressions 38Working with Lambda Variables 40Summary 43Exam Essentials 44Review Questions 46CHAPTER 2 ANNOTATIONS 59Introducing Annotations 60Understanding Metadata 60Purpose of Annotations 61Creating Custom Annotations 64Creating an Annotation 64Specifying a Required Element 65Providing an Optional Element 66Selecting an Element Type 67Applying Element Modifiers 67Adding a Constant Variable 68Reviewing Annotation Rules 68Applying Annotations 69Using Annotations in Declarations 69Mixing Required and Optional Elements 71Creating a value() Element 71Passing an Array of Values 73Declaring Annotation-Specific Annotations 74Limiting Usage with @Target 74Storing Annotations with @Retention 77Generating Javadoc with @Documented 77Inheriting Annotations with @Inherited 79Supporting Duplicates with @Repeatable 79Reviewing Annotation-Specific Annotations 81Using Common Annotations 83Marking Methods with @Override 83Declaring Interfaces with @FunctionalInterface 84Retiring Code with @Deprecated 85Ignoring Warnings with @SuppressWarnings 86Protecting Arguments with @SafeVarargs 88Reviewing Common Annotations 89Summary 91Exam Essentials 92Review Questions 94CHAPTER 3 GENERICS AND COLLECTIONS 105Using Method References 107Calling Static Methods 108Calling Instance Methods on a Particular Object 109Calling Instance Methods on a Parameter 109Calling Constructors 110Reviewing Method References 110Using Wrapper Classes 111Using the Diamond Operator 113Using Lists, Sets, Maps, and Queues 114Common Collections Methods 115Using the List Interface 119Using the Set Interface 124Using the Queue Interface 126Using the Map Interface 128Comparing Collection Types 135Sorting Data 137Creating a Comparable Class 137Comparing Data with a Comparator 141Comparing Comparable and Comparator 142Comparing Multiple Fields 143Sorting and Searching 145Working with Generics 147Generic Classes 148Generic Interfaces 151Raw Types 152Generic Methods 153Bounding Generic Types 154Putting It All Together 159Summary 161Exam Essentials 163Review Questions 164CHAPTER 4 FUNCTIONAL PROGRAMMING 175Working with Built-in Functional Interfaces 176Implementing Supplier 178Implementing Consumer and BiConsumer 179Implementing Predicate and BiPredicate 180Implementing Function and BiFunction 181Implementing UnaryOperator and BinaryOperator 183Checking Functional Interfaces 184Convenience Methods on Functional Interfaces 185Returning an Optional 187Creating an Optional 188Dealing with an Empty Optional 189Using Streams 191Understanding the Pipeline Flow 191Creating Stream Sources 194Using Common Terminal Operations 197Using Common Intermediate Operations 204Putting Together the Pipeline 209Working with Primitive Streams 213Creating Primitive Streams 214Mapping Streams 217Using Optional l with Primitive Streams 219Summarizing Statistics 220Learning the Functional Interfaces for Primitives 221Working with Advanced Stream Pipeline Concepts 224Linking Streams to the Underlying Data 224Chaining Optionals 224Collecting Results 227Summary 234Exam Essentials 236Review Questions 238CHAPTER 5 EXCEPTIONS, ASSERTIONS, AND LOCALIZATION 247Reviewing Exceptions 248Handling Exceptions 248Distinguishing between throw and throws 250Examining Exception Categories 250Inheriting Exception Classes 252Creating Custom Exceptions 253Declaring Exception Classes 253Adding Custom Constructors 253Printing Stack Traces 255Automating Resource Management 256Constructing Try-With-Resources Statements 256Learning the New Effectively Final Feature 259Understanding Suppressed Exceptions 261Declaring Assertions 264Validating Data with the assert Statement 264Enabling Assertions 266Disabling Assertions 267Applying Assertions 267Writing Assertions Correctly 268Working with Dates and Times 268Creating Dates and Times 269Formatting Dates and Times 271Supporting Internationalization and Localization 276Picking a Locale 276Localizing Numbers 279Localizing Dates 283Specifying a Locale Category 284Loading Properties with Resource Bundles 285Creating a Resource Bundle 286Picking a Resource Bundle 288Selecting Resource Bundle Values 289Formatting Messages 291Using the Properties Class 292Summary 293Exam Essentials 294Review Questions 295CHAPTER 6 MODULAR APPLICATIONS 309Reviewing Module Directives 310Comparing Types of Modules 311Named Modules 311Automatic Modules 312Unnamed Modules 315Comparing Module Types 315Analyzing JDK Dependencies 316Identifying Built-in Modules 316Using jdeps 318Migrating an Application 321Determining the Order 321Exploring a Bottom-Up Migration Strategy 322Exploring a Top-Down Migration Strategy 324Splitting a Big Project into Modules 325Failing to Compile with a Cyclic Dependency 326Creating a Service 328Declaring the Service Provider Interface 329Creating a Service Locator 330Invoking from a Consumer 332Adding a Service Provider 333Merging Service Locator and Consumer 334Reviewing Services 337Summary 337Exam Essentials 338Review Questions 339CHAPTER 7 CONCURRENCY 345Introducing Threads 347Distinguishing Thread Types 348Understanding Thread Concurrency 348Defining a Task with Runnable 349Creating a Thread 351Polling with Sleep 353Creating Threads with the Concurrency API 355Introducing the Single-Thread Executor 355Shutting Down a Thread Executor 356Submitting Tasks 357Waiting for Results 358Submitting Task Collections 362Scheduling Tasks 363Increasing Concurrency with Pools 366Writing Thread-Safe Code 367Understanding Thread-Safety 367Protecting Data with Atomic Classes 369Improving Access with Synchronized Blocks 371Synchronizing on Methods 373Understanding the Lock Framework 375Orchestrating Tasks with a CyclicBarrier 379Using Concurrent Collections 382Understanding Memory Consistency Errors 383Working with Concurrent Classes 383Obtaining Synchronized Collections 388Identifying Threading Problems 389Understanding Liveness 390Managing Race Conditions 393Working with Parallel Streams 394Creating Parallel Streams 395Performing a Parallel Decomposition 396Processing Parallel Reductions 398Avoiding Stateful Operations 403Summary 404Exam Essentials 405Review Questions 406CHAPTER 8 I/O 419Understanding Files and Directories 420Conceptualizing the File System 420Storing Data as Bytes 422Introducing the File Class 422Introducing I/O Streams 426Understanding I/O Stream Fundamentals 426Learning I/O Stream Nomenclature 427Common I/O Stream Operations 433Reading and Writing Data 433Closing the Stream 435Manipulating Input Streams 436Flushing Output Streams 438Reviewing Common I/O Stream Methods 439Working with I/O Stream Classes 440Reading and Writing Binary Data 440Buffering Binary Data 441Reading and Writing Character Data 443Buffering Character Data 444Serializing Data 445Printing Data 452Review of Stream Classes 457Interacting with Users 458Printing Data to the User 459Reading Input as a Stream 460Closing System Streams 460Acquiring Input with Console 461Summary 464Exam Essentials 464Review Questions 466CHAPTER 9 NIO.2 475Introducing NIO.2 476Introducing Path 477Creating Paths 478Understanding Common NIO.2 Features 483Interacting with Paths 486Viewing the Path with toString(), getNameCount(), and getName() 486Creating a New Path with subpath() 487Accessing Path Elements with getFileName(), getParent(), and getRoot() 488Checking Path Type with isAbsolute() and toAbsolutePath() 490Joining Paths with resolve() 491Deriving a Path with relativize() 491Cleaning Up a Path with normalize() 493Retrieving the File System Path with toRealPath() 493Reviewing Path Methods 494Operating on Files and Directories 495Checking for Existence with exists() 495Testing Uniqueness with isSameFile() 496Making Directories with createDirectory() and createDirectories() 497Copying Files with copy() 498Moving or Renaming Paths with move() 500Deleting a File with delete() and deleteIfExists() 500Reading and Writing Data with newBufferedReader() and newBufferedWriter() 501Reading a File with readAllLines() 502Reviewing Files Methods 502Managing File Attributes 503Discovering File Attributes 503Improving Attribute Access 506Applying Functional Programming 508Listing Directory Contents 508Traversing a Directory Tree 510Searching a Directory with find() 514Reading a File with lines() 515Comparing Legacy java.io.File and NIO.2 Methods 517Summary 518Exam Essentials 518Review Questions 520CHAPTER 10 JDBC 529Introducing Relational Databases and SQL 530Identifying the Structure of a Relational Database 532Writing Basic SQL Statements 533Introducing the Interfaces of JDBC 535Connecting to a Database 537Building a JDBC URL 537Getting a Database Connection 539Working with a PreparedStatement 542Obtaining a PreparedStatement 543Executing a PreparedStatement 543Working with Parameters 546Updating Multiple Times 549Getting Data from a ResultSet 551Reading a ResultSet 551Getting Data for a Column 555Using Bind Variables 556Calling a CallableStatement 557Calling a Procedure without Parameters 558Passing an IN Parameter 559Returning an OUT Parameter 559Working with an INOUT Parameter 560Comparing Callable Statement Parameters 560Closing Database Resources 561Summary 564Exam Essentials 564Review Questions 566CHAPTER 11 SECURITY 575Designing a Secure Object 576Limiting Accessibility 576Restricting Extensibility 577Creating Immutable Objects 578Cloning Objects 581Introducing Injection and Input Validation 583Preventing Injection with a PreparedStatement 583Invalidating Invalid Input with Validation 586Working with Confidential Information 588Guarding Sensitive Data from Output 589Protecting Data in Memory 589Limiting File Access 590Serializing and Deserializing Objects 591Specifying Which Fields to Serialize 591Customizing the Serialization Process 592Pre/Post-Serialization Processing 593Reviewing Serialization Methods 596Constructing Sensitive Objects 597Making Methods final 598Making Classes final 598Making the Constructor private 599Preventing Denial of Service Attacks 600Leaking Resources 600Reading Very Large Resources 600Including Potentially Large Resources 601Overflowing Numbers 601Wasting Data Structures 602Summary 603Exam Essentials 604Review Questions 605APPENDICES 611APPENDIX A THE UPGRADE EXAM 611Working with Local Variable Type Inference 612Type Inference of var 613Examples with var 614Review of var Rules 617Introducing Modules 617Exploring a Module 618Benefits of Modules 619Creating and Running a Modular Program 621Creating the Files 622Compiling Our First Module 623Running Our First Module 625Packaging Our First Module 627Updating Our Example for Multiple Modules 628Updating the Feeding Module 628Creating a Care Module 629Creating the Talks Module 631Creating the Staff Module 634Diving into the module-info File 635exports 635requires transitive 636provides, uses, and opens 639Discovering Modules 639The java Command 639The jar Command 643The jdeps Command 643The jmod Command 645Reviewing Command-Line Options 645Summary 648Exam Essentials 649Review Questions 650APPENDIX B ANSWERS TO REVIEW QUESTIONS 657Chapter 1: Java Fundamentals 658Chapter 2: Annotations 662Chapter 3: Generics and Collections 665Chapter 4: Functional Programming 669Chapter 5: Exceptions, Assertions, and Localization 672Chapter 6: Modular Applications 676Chapter 7: Concurrency 678Chapter 8: I/O 682Chapter 9: NIO.2 685Chapter 10: JDBC 689Chapter 11: Security 691Appendix A: The Upgrade Exam 693Index 697
Getting Started with Advanced C#
Understand and work with the most important features of advanced C# in different programming environments. This book teaches you the fundamental features of advanced C# and how to incorporate them in different programming techniques using Visual Studio 2019.The book is divided into two parts. Part I covers the fundamentals and essentials of advanced programming in C#. You will be introduced to delegates and events and then move on to lambda expressions. Part II teaches you how to implement these features in different programming techniques, starting with generic programming. After that, you will learn about thread programming and asynchronous programming, to benefit from a multi-threaded environment. Finally, you will learn database programming using ADO.NET to connect to a MySQL database and you will know how to exercise SQL statements and stored procedures through your C# applications.WHAT YOU WILL LEARN* Use delegates, events, and lambda expressions in advanced programming* Make your application flexible by utilizing generics* Create a fast application with multi-threading and asynchronous programming* Work in Visual Studio Community Edition, which is the most common IDE for using C#* Understand alternative implementations along with their pros and consWho This Book Is ForDevelopers and programmers who are already working in C#VASKARAN SARCAR obtained his Master of Engineering in software engineering from Jadavpur University, Kolkata (India) and an MCA from Vidyasagar University, Midnapore (India). He was a National Gate Scholar (2007-2009) and has more than 12 years of experience in education and the IT industry. Vaskaran devoted his early years (2005-2007) to teaching at various engineering colleges and later he joined HP India PPS R&D Hub Bangalore and worked there until August, 2019. At the time of his retirement from the IT industry, he was a senior software engineer and a team lead at HP. To follow his dream and passion, Vaskaran is now a full-time author. Other Apress books by Vaskaran include: Interactive Object-Oriented Programming in Java (second edition), Java Design Patterns (second edition), Design Patterns in C#, Interactive C#, Interactive Object-Oriented Programming in Java, and Java Design Patterns.INTRODUCTIONPART-ICHAPTER 1: DELEGATESSubtopics:· What is a delegate?· How to create and use delegates?· What is a multicast delegate (Chaining of Delegates) and its uses?· Adding and removing methods from a multicast delegate.· Covariance and contravariance in non-generic delegates.CHAPTER 2: EVENTSSubtopics:· Events overview* Creation of events and example of simple events* Subscribing single and multiple events* Passing data to events* Discussion on event accessorsCHAPTER 3: ANONYMOUS FUNCTION AND LAMBDA EXP.Subtopics:· A quick introduction to anonymous function and lambda expression.* Lambda’s with and without parameters* Types and scopes of a lambda expressionExpression syntaxes with exampleCHAPTER 4: LINQSubtopics:* LINQ overview* Different case studies with simple and complicated query expressions* Retrieving customized data from a query expression* Comparing a method call syntax and a query syntax. PART-IICHAPTER 5: GENERIC PROGRAMMINGSubtopics:* Generics overviewComparing a generic program with its counterpart-a non-generic program * Self-referenced generics* Use of ‘default’ in a generic programHow to put constraints in a generic program * Covariance and contravariance in the context of a generic programCHAPTER 6: DATABASE PROGRAMMINGSubtopics:· How to connect to a database· Exercise simple queries to database and retrieving results from the database.CHAPTER 7: THREAD PROGRAMMINGSubtopics:Threads overview * Different case studies with multithreaded programs* Use of ParameterizedThreadStart delegate in a multithreaded environment * Passing multiple parameters to a thread* Discussion on Synchronization and deadlock with examplesCHAPTER 8: ASYNCHRONOUS PROGRAMMINGSubtopics:Brief overview * Different techniques to implement an asynchronous program(e.g. using async/await, thread, thread pool etc)CHAPTER 9: DYNAMIC PROGRAMMINGSubtopics:* DLR overview* Dynamic type and its uses* Dynamic type checking* Runtime look up etc.
Homeoffice und mobiles Arbeiten im Team effektiv umsetzen
Produktives Arbeiten im Homeoffice erfordert neben richtiger Ausstattung, guter Sprach- und Datenkommunikation und Zugriff auf Daten auch die – durch IT-Tools unterstützten – passenden Führungs- und Arbeitsmethoden. Dieser Ratgeber bietet konkrete Anleitungen, um ohne IT-Fachkenntnisse das weltweite Arbeiten im Team schnell und pragmatisch möglich zu machen.Peter Bruhn ist Diplom-Wirtschaftsinformatiker (TU Darmstadt) und zweifacher Master of Science (Computer Science, University of Illinois (USA) und Informationswissenschaft, Hochschule Darmstadt). Bereits 2000 spezialisierte er sich als Berater bei McKinsey & Company auf die Digitale Transformation. Anschließend baute er als Senior Manager im Innovationsbereich der Deutschen Telekom AG neue Geschäftsmodelle u.a. für die Digital Business Unit auf. Als Vice President Group Digital Transformation übernahm Bruhn 2016 die Verantwortung für die Digitale Agenda der TAKKT AG in Europa und den USA.Peter Bruhn ist ein Vorreiter für mobiles Arbeiten und hat als Führungskraft jahrelange Erfahrung in der Führung verteilter Teams auf Distanz. Einleitung.- Hardware.- Konnektivität.- Software.- Anwendungen für die Team-Zusammenarbeit.- IT-Sicherheit und Datenschutz.- Fazit und Empfehlung
Agile Artificial Intelligence in Pharo
Cover classical algorithms commonly used as artificial intelligence techniques and program agile artificial intelligence applications using Pharo. This book takes a practical approach by presenting the implementation details to illustrate the numerous concepts it explains.Along the way, you’ll learn neural net fundamentals to set you up for practical examples such as the traveling salesman problem and cover genetic algorithms including a fun zoomorphic creature example. Furthermore, Practical Agile AI with Pharo finishes with a data classification application and two game applications including a Pong-like game and a Flappy Bird-like game. This book is informative and fun, giving you source code to play along with. You’ll be able to take this source code and apply it to your own projects.WHAT YOU WILL LEARN* Use neurons, neural networks, learning theory, and more* Work with genetic algorithms * Incorporate neural network principles when working towards neuroevolution * Include neural network fundamentals when building three Pharo-based applicationsWHO THIS BOOK IS FORCoders and data scientists who are experienced programmers and have at least some prior experience with AI or deep learning. They may be new to Pharo programming, but some prior experience with it would be helpful.ALEXANDRE BERGEL, PH.D., is an associate professor in the Department of Computer Science (DCC) at the University of Chile and is a member of the Intelligent Software Construction laboratory (ISCLab). His research interests include software engineering, software performance, software visualization, programming environment, and machine learning. He is interested in improving the way we build and maintain software. His current hypotheses are validated using rigorous empirical methodologies. To make his research artifacts useful not only to stack papers, he co-founded Object Profile.1: Introduction2: The Perceptron Model3: Artificial Neuron4: Neural Networks5: Theory on Learning6: Data Classification7: A Matrix Library8: Matrix-Based Neural Network9: Genetic Algorithm10: Genetic Algorithm in Action11: Traveling Salesman Problem12: Exiting a Maze13: Building Zoomorphic Creatures14: Evolving Zoomorphic Creature15: Neuroevolution16: Neuroevolution with NEAT17: The MiniMario Video GameLast Words (Afterword)
45 Elektronik-Projekte für den Raspberry Pi
Der Raspberry Pi stellt einen sehr preiswerten, aber doch vollwertigen Computer dar, an den auf einfache Weise verschiedenste Elektronik angeschlossen werden kann. Dieses Buch geht auf eine der Stärken des Raspberry Pi ein: die Kombination von Elektronik und Software.Nach einer kurzen Einführung zum Raspberry Pi wird auf die benötigte Software eingegangen. Im Anschluss wird das Linux-Betriebssystem kurz vorgestellt – gefolgt von einer Einführung in die Programmierung mit Bash, Python und JavaScript. Der Schwerpunkt liegt dabei auf Python. Die Erläuterungen sind in allen Fällen kurz und bündig und trotzdem so ausführlich, dass das Notwendigste besprochen wird, um die folgenden Projekte zu verstehen und individuell anzupassen.Dieses Buch beschreibt 45 spannende und interessante Projekte, wie zum Beispiel ein Wechselblinklicht, eine Motorregelung, Erzeugen und Verarbeiten analoger Signale, ein digitales Thermometer, ein Lichtmesser. Aber auch kompliziertere Projekte wie eine Motor-Geschwindigkeitsregelung, ein Webserver mit CGI (Common Gateway Interface) und Client-Server-Programme werden vorgestellt. Sie können dieses Buch als Projektbuch verwenden und die Projekte nachbauen, um sie dann in der Praxis einzusetzen. Durch die ausführliche Beschreibung mit Schaltplänen und Fotos gestaltet sich der Aufbau auf dem Steckbrett recht einfach.Sie können dieses Buch auch als Lehrbuch verwenden. Bei jedem Projekt wird erklärt, warum es auf diese Art und Weise ausgeführt ist. Sie lernen viel über den Raspberry Pi, Python und die verwendeten Bauteile, so dass Sie selbst die Projekte anpassen, nach eigenen Wünschen erweitern oder mehrere Projekte miteinander kombinieren können.Um Ihnen die Software-Installation zu erleichtern, hat der Autor das Betriebssystem und alle Programmbeispiele auf einer SD-Karte zusammengetragen. Passend zu den Projekten ist neben dieser SD-Karte auch ein Hardware-Starterkit bei Elektor erhältlich.Bert van Dam ist freiberuflicher Autor von Büchern, Kursen und Artikeln über PIC- und ARM Mikrocontroller, Arduino, Raspberry Pi, PCs, Künstliche Intelligenz und die Programmiersprachen JAL, C, Assembler, Python und Flowcode.
Programming with Node-RED
The Internet of Things (IoT) is becoming a major application area for embedded systems. As a result, more and more people are becoming interested in learning about embedded design and programming. Technical colleges and universities are moving away from legacy 8 and 16-bit microcontrollers and are introducing 32-bit embedded microcontrollers to their curriculums. Many IoT applications demand precision, high processing power, and low power consumption.Produced by IBM, Node-RED is an open-source visual editor for wiring the Internet of Things. Node-RED comes with a large number of nodes to handle a multitude of tasks. The required nodes are selected and joined together to perform a particular task. Node-RED is based on flow type programming where nodes are configured and joined together to form an application program. There are nodes for performing complex tasks, including web access, Twitter, E-mail, HTTP, Bluetooth, MQTT, controlling GPIO ports, etc. One particularly nice aspect of Node-RED is that the programmer does not need to learn how to write complex programs. For example, an email can be sent by simply joining nodes together and writing only a few lines of code.The aim of this book is to teach how Node-RED can be used in projects. The main hardware platform used with most of the projects in this book is Raspberry Pi 4. Chapters are included to show how Node-RED can be also be used with Arduino Uno, ESP32 DevKitC, and the ESP8266 NodeMCU microcontroller development boards.Prof. Dr. Dogan Ibrahim is a Fellow of the Institution of Electrical Engineers. He is the author of over 60 technical books, published by publishers including Wiley, Butterworth, and Newnes. He is the author of over 250 technical papers, published in journals, and presented in seminars and conferences.
C Programming with Arduino
Technology is constantly changing. New microcontrollers become available every year. The one thing that has stayed the same is the C programming language used to program these microcontrollers. If you would like to learn this standard language to program microcontrollers, then this e-book (pdf) is for you!Arduino is the hardware platform used to teach the C programming language as Arduino boards are available worldwide and contain the popular AVR microcontrollers from Atmel.Atmel Studio is used as the development environment for writing C programs for AVR microcontrollers. It is a full-featured integrated development environment (IDE) that uses the GCC C software tools for AVR microcontrollers and is free to download.At a glance:• Start learning to program from the very first chapter• No programming experience is necessary• Learn by doing - type and run the example programs• A fun way to learn the C programming language• Ideal for electronic hobbyists, students and engineers wanting to learn the C programming language in an embedded environment on AVR microcontrollers• Use the free full-featured Atmel Studio IDE software for Windows• Write C programs for 8-bit AVR microcontrollers as found on the Arduino Uno and MEGA boards• Example code runs on Arduino Uno and Arduino MEGA 2560 boards and can be adapted to run on other AVR microcontrollers or boards• Use the AVR Dragon programmer / debugger in conjunction with Atmel Studio to debug C programsWarwick A. Smith lives in South Africa and works as an Electronics Engineer and Embedded System Programmer. He is a bestselling author of the books C Programming for Embedded Microcontrollers, ARM Microcontroller Interfacing and Open Source Electronics on Linux.