Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

Programmieren Was ist das? Wozu brauch ich es? Wie funktioniert es?

Ähnliche Präsentationen


Präsentation zum Thema: "Programmieren Was ist das? Wozu brauch ich es? Wie funktioniert es?"—  Präsentation transkript:

1 Programmieren Was ist das? Wozu brauch ich es? Wie funktioniert es?
Trainerhinweise / Script: Erwartungen der Teilnehmer am besten auf Flipchart notieren, dann kann man beim Wrap-up noch mal darauf eingehen und hat gleichzeitig eine gute Vorlage für die Zusammenfassung am Ende. Außerdem generell: Manchmal passen Fragen / Einwürfe nicht zum unmittelbaren Slide-Inhalt oder die Zeit ist zu knapp, um direkt auf diese einzugehen. In diesem Fall die Gedanken / Ideen / Vorschläge „parken“: Ein Flipchart-Sheet als „Parking Lot“ vorsehen, in dem diese Themen gesammelt werden können. Evtl. sind einige davon hilfreich als spätere Diskussionsanreize. Ice breaker 1 (geeignet für längere Workshops): Jeder Teilnehmer schreibt 2 Wahrheiten & eine „Lüge“ über sich auf, die anderen Teilnehmer müssen raten, was stimmt / nicht stimmt Trainer lässt im Verlauf des Workshops immer wieder ein paar Teilnehmer die Infos vorlesen und die anderen müssen raten. Kann man immer dann machen, wenn die Konzentration nachlässt bzw. bevor man einen neuen Themenblock beginnt. Ice breaker 2 (geeignet für längere Workshops): Jeder Teilnehmer schreibt eine Sache auf, auf die er / sie besonders stolz ist (Post-it-notes) Alle Zettel werden auf ein Flipchart geklebt Trainer ließt nach und nach vor, Gruppe muss raten, um wen es sich handelt Was ist das? Wozu brauch ich es? Wie funktioniert es?

2 Hinweis - Haftungsausschluss
Inhalt der Digitalen Lernwerkstatt Sämtliche Inhalte unserer Digitalen Lernwerkstatt wurden und werden mit äußerster Sorgfalt erstellt und regelmäßig überprüft. Die Accenture-Stiftung übernimmt jedoch keinerlei Gewähr für die Aktualität, Korrektheit, Vollständigkeit oder Qualität der bereitgestellten Informationen sowie für Links oder Webseiten Dritter. Die Inhalte der digitalen Lernwerkstatt stellen keine Rechtsberatung dar. Haftungsansprüche gegen die Accenture-Stiftung, gegen die Accenture GmbH oder mit ihr verbundene Unternehmen, welche sich auf Schäden materieller oder ideeller Art beziehen, die durch die Nutzung oder Nichtnutzung der dargebotenen Informationen bzw. durch die Nutzung fehlerhafter und unvollständiger Informationen verursacht wurden, sind grundsätzlich ausgeschlossen. Die Inhalte der Accenture-Stiftung stehen zur freien Verfügung und Download bereit. Der Nutzer haftet selbst für die Verwendung der Materialien. Alle Copyrights Dritter wurden als solche markiert und sollten bei Wiederverwertung der Inhalte und Materialien angegeben werden.

3 Agenda Einstieg in die Programmierung Was ist ein Programm?
Programmiersprachen Übung

4 Was ist Programmieren? Was ist Programmieren?
Programming is the process of writing instructions for computers to produce software for users. It's the combining of minute details to form a cohesive whole. More than anything, it is a creative and problem-solving activity. The problem solving aspect of programming will become self-evident as we move forward. For now, I'd like to talk about the creative side. At a high level, it's obvious that creating software requires creativity. You are building something for people to use. It must therefore be clever without being complex. It must be intuitive and elegant. What isn't obvious to most people is that creativity plays an equally important role at the micro level of building software. Every instruction that you type requires consideration. In this respect, I've always likened programming to writing a book or painting a picture. Ultimately you have a finished product, but it's the sentences and the strokes, and how they are combined, which is where the book, painting or program truly comes to life. Codes sind die Anleitungen für Computer Wie bei einem Kochrezept ist jede einzelne Zutat und die Kombination der Zutaten werden wichtig für ein gutes Ergebnis

5 Worauf muss ich achten? Programmieren ist eine Problemlösungsaktivität Sie soll kreativ und klug sein, aber möglichst wenig komplex Man muss auf jedes Detail achten Programming is the process of writing instructions for computers to produce software for users. It's the combining of minute details to form a cohesive whole. More than anything, it is a creative and problem-solving activity. The problem solving aspect of programming will become self-evident as we move forward. For now, I'd like to talk about the creative side. At a high level, it's obvious that creating software requires creativity. You are building something for people to use. It must therefore be clever without being complex. It must be intuitive and elegant. What isn't obvious to most people is that creativity plays an equally important role at the micro level of building software. Every instruction that you type requires consideration. In this respect, I've always likened programming to writing a book or painting a picture. Ultimately you have a finished product, but it's the sentences and the strokes, and how they are combined, which is where the book, painting or program truly comes to life.

6 Einstieg in die Programmierung
Programmierung beginnt einfach, aber wird immer schwieriger Learning how to program start really easy and then difficulty skyrocket. Don’t let it make you feel down, this is actually where fun begins. It is very same with learning to play chess. It is easy to learn which piece moves how. But it takes time to be able to combine these moves in a systematic way for an aim. This is where you need creativity. (To be honest computer programing is extremely similar with chess, I can explain a lot of issues by chess metaphors) Hier geht der Spaß erst richtig los!

7 Agenda Einstieg in die Programmierung Was ist ein Programm?
Programmiersprachen Übung

8 Welche Programme benutzt du?
You already know what a program is. You use an program, surf the web in a browser and interact with various websites every day. You text, take pictures (yes selfie is a result of program too), and check the weather on your phone. A program is the output, or goal, of programming. Wichtige Message: Programmieren ist nicht nur für Unternehmen oder langweilige Büro-Programme - alle Spiele, Websites und sonstige digitalen Web Inhalte basieren auf bestimmten Programmiersprachen!

9 Was ist ein Progamm? Programmiersprache ist wie unsere Sprache strukturiert Wie ist ein Buch aufgebaut? Kapitel Absätze Sätze Wörter Buchstaben Ähnlich wie ein Buch aus Kapiteln, Absätzen, Sätzen, Wörtern und schließlich Satzzeichen und Buchstaben besteht, lässt sich ein Programm in immer kleinere Bestandteile zerlegen Ein Programm ist eine Summe von Anweisungen Eine Anweisung ist eine Linie des Codes Minecraft Spiel als einfaches Beispiel von Codes: Die Spielfigur bewegt sich wenn der Spieler bestimmte Tastatureingaben macht bzw. die Maus bewegt. Diese Bewegungen sind vorprogrammiert. Es gibt einfache Befehle: „Vorwärts bewegen“, „nach links drehen“, aber auch kompliziertere Algorithmen mit Wiederholungen (Wenn du klickst, dann passiert 3 Mal dies und das“ und Bedingungen (Wenn das Feld vor dir leer ist, sind folgende Funktionen möglich, andere nicht). Much like a book is made up of chapters, paragraphs, sentences, phrases, words and finally punctuation and letters, so too is a program broken down into smaller and smaller components. For now, the most important is a statement. A statement is analogous to a sentence in a book. On its own, it has structure and purpose, but without the context of the other statements around it, it isn't that meaningful. A statement is more casually (and commonly) known as a line of code. That's because statements tend to be written on individual lines. As such, programs are read from top to bottom, left to right. You might be wondering what code (also called source code) is. That happens to be a broad term which can refer to the whole of the program or the smallest part. Therefore, a line of code is simply a line of your program. I think this would be a good time to introduce our first little program. There are more concepts and terms to learn, but it will be useful to have something to visualize. Although it's rather short, there's a lot going on here. We won't go into any of this in great detail. For now what's important is that our program is made up of four lines of code and that the program is read from top to bottom. The purpose of this program is to pick a random card from a partial deck. The first line collects a limited number of cards into a container, our deck. Next, we shuffle the deck. Finally, we pick the first card (which at this point could have any value) and print it out on the screen. You might be tempted to analyze this deeper. For example, maybe you are curious about the meaning of the square brackets [] in the first line of code. Or maybe you're wondering about the implication of the equal sign =. Those are all things we'll eventually cover. For now, this is a program made up of four lines of code which create a deck, shuffles it, picks the first card and prints it.

10 Was macht ein gutes Programm aus?
There are a lot of ways to write this program. The approach shown above is similar to how it works in the real-world, which makes it easy to understand. This is where creativity, at a micro level, comes into play. A good programmer wants to write code which is understandable to other programmers (and to his or her future self), which is correct (or bug free, of free from logical errors like 2+2=5 ), and which performs efficiently (memory efficient: as less memory as possible, time efficient: as quick running as possible (less number of statements)). Balancing these three aspects of programming is fundamental. But there's no shortcut to mastering this, one must learn through experience. Verständlich für andere Programmierer Auch zukünftig nachvollziehbar Korrekt und funktionstüchtig Effizient (wenig Speicherplatz & Zeit)

11 Das haben alle Programme gemeinsam
Programme gehen mit Daten aus verschiedenen Quellen um (Benutzereingaben, Datei, Internet, ...), Sie definieren Logiken, um auf Grundlage dieser Daten Aktionen zu bestimmen Sie führen die entsprechende Aktion aus Jede Bedingung muss explizit ausgedrückt werden Es gibt klar definierte Regeln Die Regeln müssen eindeutig und für alle gleich sein Neither of these descriptions tell us how to actually write programs. However, they both expose 3 core aspects of programming. First, both deal with data or values. The first deals with an and password, the second with an account number (retrieved from the card), your pin, your withdrawal amount and your account balance. Second, they both apply conditional logic. If the password is too short, or the withdrawal amount too large, display an error; otherwise, proceed to the next step. Finally, they both perform actions. For our account withdrawal, this is a simple subtraction of the withdrawn amount from our account balance. For the user registration, it's the process of saving the new user information for later use. This isn't too different than how we perform many day to day tasks. As you approach a traffic light, you collect data about your environment. At its simplest, you care about the color of the traffic light. If it's red or yellow, you stop. If it's green, you go. In reality, there are considerably more data points that you consider: the condition of the road, your current speed, what the cars and pedestrians around you are doing, how anxious you are to get home and so on and so forth. Our brain's ability to quickly consider all of these things and make such a absolute stop-or-go decision is impressive. A program isn't any different, except that every condition has to be explicitly expressed. There's no intuition, only the defined rules that we, as programmers, specified.

12 Agenda Einstieg in die Programmierung Was ist ein Programm?
Programmiersprachen Übung

13 Warum gibt es verschiedene Programmiersprachen?
Frage an die Teilnehmer: Kennt ihr Apps oder Spiele, die nur auf bestimmten Plattformen funktionieren? Kennt jemand Spiele, die sich auf der Playstation anders spielen als beispielsweise auf einer Xbox oder dem Computer? Was meint ihr, warum Spiele für die Playstation nicht auf der X-Box funktionieren, oder warum Spiele für die Playstation 2 nicht auf der Playstation 4 laufen? Es gibt viele verschiedene Programmiersprachen, die jeweils für bestimmte Plattformen oder Programme geeignet sind. Frage an die Schüler: Welche Sprachen kennt ihr oder habt ihr schon mal wofür benutzt? Jemand, der eine Website programmiert, benutzt wahrscheinlich eher Java oder Python, wohingegen Python zum Beispiel nicht für die App Programmierung geeignet ist. Wieder anders ist es mit Industriemaschinen oder Autos, die auf ganz bestimmten Programmiersprachen beruhen. Warum ist das so? So wie verschiedene Sprachen wie Deutsch, Englisch oder Chinesisch andere Grammatik und Vokabeln haben, gibt es bei Programmiersprachen auch Unterschiede. Inuit haben viel mehr Wörter für Schnee als in der deutschen Sprache, und ähnlich funktioniert es bei Programmen auch. Apps funktionieren besser mit bestimmten Sprachen, Computer Programme oder Websites und Betriebssysteme wiederum mit anderen. We have an idea of what a simple program looks like: a collection of lines of code. But that's still quite vague, so let's peel away the layers. When you write a program you do so using a programming language. A programming language defines the syntax that you use to write your program. Programming languages define more than just the syntax, but for now, that's all we'll concern ourselves with. Thankfully even though some languages are vastly different than others, most share a lot of common ground, so that once you know your first language, other languages are much easier to pick up. Ein Programm besteht aus einer Sammlung von Code-Zeilen Eine Programmiersprache definiert die Syntax, die man verwendet, um ein Programm zu schreiben Verschiedene Sprachen sind für verschiedene Anwendungen geeignet

14 Wie sehen verschiedene Programmiersprachen aus?
Wenn wir C mit Java und Python vergleichen, sehen wir deutlich die Unterschiede. In diesem Beispiel scheint Python am geeignesten, wenn es nur um die Ausgabe von einfachen Sprachbefehlen geht, in anderen Zusammenhängen (Steuerung eines Atomkraftwerks, Programmierung einer iPhone App oder eines Computerspiels) We have an idea of what a simple program looks like: a collection of lines of code. But that's still quite vague, so let's peel away the layers. When you write a program you do so using a programming language. A programming language defines the syntax that you use to write your program. In our above example, we used square brackets [] to group together our cards. A different programming language might insist that you use parenthesis (). We used print to output the picked card, while another language might use echo. You could say that different programming languages are like different spoken and written languages. The same book written in different languages tells the same story; much like a program written in different programming languages would have the same purpose. However, programming languages tend to be more similar than dissimilar and a more accurate comparison might be to dialects. Programming languages define more than just the syntax, but for now, that's all we'll concern ourselves with. Thankfully even though some languages are vastly different than others, most share a lot of common ground, so that once you know your first language, other languages are much easier to pick up. Die Sprache ist anders, die Funktion jedoch gleich

15 Was versteht der Computer?
High-Level Programmier-code in C Sprach-programm für den „Assembler“ Binärer Maschinen-programm-code The processor in your computer, or smartphone, doesn't know anything about a deck, card or even about printing something on the screen. These processors speak a basic language and require detailed instructions on what to do and how to do it. Writing our above sample in this low-level language might require 50 or more individual statements, none of which is obvious to read or write. This means that on the one hand, you have programming languages that humans can understand, on the other you have languages that computers understand. What's needed is a translation process to go from the code that we write, to the code that a computer reads. This process is known as compiling your code. A compiler takes your high-level program as input and outputs a low-level program which your computer will understand. Ein Compiler ist wie ein Übersetzer zwischen Mensch und Computer

16 Übersetzung zwischen Mensch und Maschine
High-level Sprache High-level Programmiersprache Unabhängig von Computern Funktioniert in jedem Computer Machinencode: Abhängig von CPU/Prozessor des Computers Prozessor-spezifisch Leicht für den Programmierer zu verstehen Enthält englische Wörter Übersetzungs-programm Verknüpfung mit Spielen für verschiedene Konsolen/Smartphone Betriebssysteme The processor in your computer, or smartphone, doesn't know anything about a deck, card or even about printing something on the screen. These processors speak a basic language and require detailed instructions on what to do and how to do it. Writing our above sample in this low-level language might require 50 or more individual statements, none of which is obvious to read or write. This means that on the one hand, you have programming languages that humans can understand, on the other you have languages that computers understand. What's needed is a translation process to go from the code that we write, to the code that a computer reads. This process is known as compiling your code. A compiler takes your high-level program as input and outputs a low-level program which your computer will understand. Eigene Sprache des Computers Binärer Code (Nullen und Einsen, 0 & 1) Maschinencode

17 Agenda Einstieg in die Programmierung Was ist ein Programm?
Programmiersprachen Übung

18 Wie würdest du die Website-Anmeldung programmieren?
Stellt euch vor, ihr programmiert die Registrierungsseite einer Website Consider the scenario of registering a user on a website. A basic implementation might ask for an and password. What might the code to register this user look like? First we'll collect the two provided pieces of information: the and password. Next we'll probably want our program to verify this data: is the password long enough and is the valid? If either of these things aren't true, we'll display an error message. Otherwise, we can save the information so that it can be used at a later point. Erhalte und Passwort Validiere ob real ist, ob das Passwort stark genug ist Gebe Fehlermeldung oder speichere in der Datenbank

19 Wie würdest du einen Bankautomaten programmieren?
Stellt euch vor, ihr programmiert einen Bankautomat. Empfange Information zur Kartennummer und Sicherheits-Pin Falls die Information falsch ist fragen, bis korrekte Information eingegeben wird Empfange Information, wieviel Geld abgehoben werden soll Verifiziere, ob das Konto genügend Geld aufweist Zeige Fehler an oder gebe Geld aus What about withdrawing money from your bank? First you enter your card and security pin. Again, the program collects this information and verifies it. If it's invalid, it'll display an error and repeat until the information provided is valid. Once valid, you provide a third piece of information, the amount you wish to withdraw. If the amount is too large, it'll once again display an error. Otherwise, the amount if subtracted from your account balance (a forth piece of information which, sadly, isn't supplied by you, but stored in the bank's system) and the requested funds made available.

20 Zum Abschluss auf die Erwartungen eingehen, die die Teilnehmer für sich notiert haben oder die am Flipchart stehen. Konkret darauf eingehen und nachhaken, wo noch Fragen offen sind. Habt ihr Fragen?

21 Hinweis - Haftungsausschluss
Inhalt der Digitalen Lernwerkstatt Sämtliche Inhalte unserer Digitalen Lernwerkstatt wurden und werden mit äußerster Sorgfalt erstellt und regelmäßig überprüft. Die Accenture-Stiftung übernimmt jedoch keinerlei Gewähr für die Aktualität, Korrektheit, Vollständigkeit oder Qualität der bereitgestellten Informationen sowie für Links oder Webseiten Dritter. Die Inhalte der digitalen Lernwerkstatt stellen keine Rechtsberatung dar. Haftungsansprüche gegen die Accenture-Stiftung, gegen die Accenture GmbH oder mit ihr verbundene Unternehmen, welche sich auf Schäden materieller oder ideeller Art beziehen, die durch die Nutzung oder Nichtnutzung der dargebotenen Informationen bzw. durch die Nutzung fehlerhafter und unvollständiger Informationen verursacht wurden, sind grundsätzlich ausgeschlossen. Die Inhalte der Accenture-Stiftung stehen zur freien Verfügung und Download bereit. Der Nutzer haftet selbst für die Verwendung der Materialien. Alle Copyrights Dritter wurden als solche markiert und sollten bei Wiederverwertung der Inhalte und Materialien angegeben werden.

22 Ansprechpartner und weiterführende Links
Trainerhinweise / Script:


Herunterladen ppt "Programmieren Was ist das? Wozu brauch ich es? Wie funktioniert es?"

Ähnliche Präsentationen


Google-Anzeigen