Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Programming for Everyone

Similar presentations


Presentation on theme: "Computer Programming for Everyone"— Presentation transcript:

1 Computer Programming for Everyone
Petri Kuittinen Lead Game Designer Riot Entertainment Ltd. 17/09/2018

2 Introduction No previous programming experience is required
Everyone will learn to program and know the basics of how computer works Everyone will make several programs and make additions to existing products Attitude is the most important thing 17/09/2018

3 Agenda I Introduction 9:30-9:32 How a Computer Works 9:32-9:38
What is Programming 9:38-9:45 (Monty) Python 9:45-9:50 Basics of Python 9:50-10:25 Revision 10:25:-10:30 15 Minute Break 17/09/2018

4 Agenda II Let’s See Some Games 11:00-11:10
Modify the Products 11:10-11:45 Check & Revision 11:45-11:55 Tips for Future 11:55-12:00 After that you will know more than most IT consultants ever know 17/09/2018

5 Computer Organization
INPUT/OUTPUT PERIPHERALS CPU BUS MEMORY 17/09/2018

6 Compilation Source Code Compiler Compilation Time Executable Binary
Output Run Time Input 17/09/2018

7 Interpretation Source Code Interpreter Output Input 17/09/2018

8 From C to Machine Language
int sum_of_squares(int a, int b) { return a*a+b*b; } C Assembler sum_of_squares: pushl %ebp movl %esp,%ebp movl 8(%ebp),%edx imull %edx,%edx movl 12(%ebp),%eax imull %eax,%eax addl %edx,%eax leave ret Machine Code sum_of_squares: 0 0x8be58955 4 0xaf0f0855 8 0x0c458bd2 12 0x01c0af0f 16 0x90c3c9d0 17/09/2018

9 (Monty) Python very high-level programming language highly modular
object-oriented automatic memory management dynamic typing interactive very easy to learn 17/09/2018

10 Hello World – Program In Java: In Python: class HelloWorld {
public static void main(String[] args) { System.out.println(”Hello World!”); } In Python: print ”Hello World!” 17/09/2018

11 Python free, open source
available for all major platforms, including Windows, Mac, UNIX/Linux, Palm etc. easily intergrated with other languages Jython = Python implemented in Java lots of support (libraries, books) 17/09/2018

12 Who Uses Python? Google Yahoo! Rebel Act Studios (Severance)
Industrial Light and Magic Lawrence Livermore Labs Digital Creations (ZOPE) Redhat (Linux) 17/09/2018

13 Software Development project overall planning (what? how? budget, schedule, resources) specification build prototype program design (split into smaller components: modules, classes, functions) implementation (programming) testing & fixing bugs (debugging) release maintenance 17/09/2018

14 Program Development Cycles
Traditional Development Python Development Start the Application Start the Application Test Behavior Test Behavior Stop the application Stop the application Edit Program Code Edit Program Code Recompile code Relink the executable 17/09/2018

15 Programming Paradigms
Imperative Programming (C, Pascal, Basic) Functional Programming (Lisp) Object-Oriented Programming (OOP) (C++) Logic Programming (Prolog) Concurrent programming (Ada) In Future: Aspect-Oriented Programming (AOP) Subject-Oriented Programming (SUP) 17/09/2018

16 Relational Databases (SQL)
Table MEMBERS ID FirstName LastName Address 001123 John Cleese Pet Shop 001124 Eric Idle London 002234 Terry Gilliam Spam 003245 Michael Palin Moon SELECT * FROM MEMBERS WHERE LastName=”Cleese”; 17/09/2018

17 Object-Oriented Modeling
Animal Super Class Inheritance Classes Mammal Instance King Arthur Age: 34 Residence: England Cat Human 17/09/2018

18 IDLE Alt+n next (in command history)
Alt+p previous (in command history) Cltr+a go to beginning of line Ctrl+c interrupt program Ctrl+e go to end of line Ctrl+k yank (delete) to the end of line Ctrl+s save Ctrl+F5 run script Ctrl-z undo 17/09/2018

19 Summary Python built-in data types:
numeric types: integer 1, long integer L, floating point number 3.14, complex number 2+3j sequence types: strings ””, list [”cat”, 3], tuple (1,2), xrange mapping type: dictionary {key:value} other: module, class, class instance, function, method, file object 17/09/2018

20 Summary II expressions: statements:
arithmethic operators: + - * / ** % statements: if ...: ... elif ...: ... else: while ...: ... for ... in ...: import return 17/09/2018

21 Summary III (Objects) class ClassName(superclass(es)):
constructor def __init__(self): generate instance: instance = ClassName() instance variables: self.variable methods def method(self, ...): call method: instance.method() Python instance objects are new namespaces! 17/09/2018

22 Where to Get More Information
Python WWW site (download Python, documentation, links) Vaults of Parnassus (Python resources) Usenet: news:comp.lang.python And of course Python’s built-in documentation! 17/09/2018

23 Recommended Books Harms; McDonald: The Quick Python Book (Manning Publications 2000) Lutz; Archer: Learning Python (O’Reilly 1999) Chun, Wesley J.: Core Python Programming (Prentice Hall 2000) Beazley, David: Python Essential Reference (New Riders 1999) Lutz, Mark: Programming Python (2nd Edition) (O’Reilly 2001) Grayson, John E.: Python and Tkinter Programming (Manning Publications 2000) 17/09/2018

24 On-line books Non-Programmers Tutorial for Python Learning to Program
Learning to Program How to Think Like a Computer Scientist Dive into Python (for experienced programmers) 17/09/2018

25 SQL (Structured Query Language)
Getting Started with SQL Introduction to Structured Query Language MySQL – free, opensource SQL database MySQL tutorials 17/09/2018

26 Programming Languages
Google Web directory > Programming > Languages The Great Computer Language Shootout Language Comparison and Critiques 17/09/2018

27 Language Comparisons An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl for a search/string-processing program An Analysis of Two Next-Generation Languages: Java and Python A subjective analysis of two high-level, object-oriented languages – Comparing Python to Java 17/09/2018

28 Successfull Software Projects
Brooks, Frederick: The Mythical Man-Month: Essays on Software Engineering (Addison-Wesley 1995) Beating the Averages Matloff, Norman: Debunking the Myth of a Desperate Software Labor Shortage Extreme Programming 17/09/2018


Download ppt "Computer Programming for Everyone"

Similar presentations


Ads by Google