1 / 23

V2012.13

V2012.13. Agenda. Old Business Delete Files New Business Week 14 Topics : Upcoming Meeting Topics Intro to HTML/CSS Starts Next Week! Linux Scripts Review Introduction to Programming. Upcoming Meeting Topics. Introduction to Programming Arduino /Raspberry Pi/Embedded Projects

adler
Download Presentation

V2012.13

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. V2012.13

  2. Agenda • Old Business • Delete Files • New Business • Week 14 Topics: • Upcoming Meeting Topics • Intro to HTML/CSS • Starts Next Week! • Linux Scripts Review • Introduction to Programming

  3. Upcoming Meeting Topics • Introduction to Programming • Arduino/Raspberry Pi/Embedded Projects • Building a PC • Configuring a Server • Introduction to Web Development

  4. Video: What Most Schools Don’t Teach …

  5. Intro to HTML/CSS • First Session Starts Next Week • Nine Weeks • Exercises, Assignments • What You’ll Learn • HTML Basics • CSS • We’ll Use Code Academy • http://www.codecademy.com/learn • http://www.codecademy.com/tracks/afterschool-semester1

  6. Scripting Review • Intro to Linux Review • Scripts/scripting

  7. Create Your First Script • Open a text editor • Menu->Accessories->gedit • Scripts always begin with: #! /bin/bash • Save your script (date.sh) • Make the script executable $ chmod +x date.sh • Run your script $ ./date.sh

  8. Create Your First Script • Output $ ./date.sh Fri Mar 8 13:27:05 EST 2013

  9. Create Your First Script • Your Challenge: • Let’s add some features • Display only the date • Display the Day

  10. Create Your First Script

  11. Create Your First Script (date.sh) • Output $ ./date.sh Today's date is: March 8 The day of the week is: Friday The year is: 2013 The complete date is: Friday, March 8, 2013

  12. Create Your First Script (date.sh) #!/bin/sh echo -n "Today's date is: "; date +"%B %-d" echo -n "The day of the week is: "; date +"%A" echo -n "The year is: "; date +"%Y" echo -n "The complete date is: "; date +"%A, %B %-d, %Y"

  13. Script to Display Memory (mem.sh) #! /bin/bash # Total memory space details echo "Memory Space Details" free -t -m | grep "Total" | awk '{ print "Total Memory space : "$2 " MB"; print "Used Memory Space : "$3" MB"; print "Free Memory : "$4" MB"; }' echo "Swap memory Details" free -t -m | grep "Swap" | awk '{ print "Total Swap space : "$2 " MB"; print "Used Swap Space : "$3" MB"; print "Free Swap : "$4" MB";

  14. Introduction to Programming • Key Concepts • Terms • How do I get started?

  15. So, what is a program? A computer is a tool for solving problems with data. A program is a sequence of instructions that tell a computer how to PERFORM a task.

  16. THINK OF A PROGRAM AS A RECIPE! DATA RECIPE FLOW TASKS • INGREDIENTS • MIX/STIR • BAKE • SERVE OUTCOME

  17. PROGRAMS … Deal with data from various sources (user input, file, the internet) Determine a course of action (based on this data) Perform the appropriate action

  18. WHAT IS A PROGRAMMING LANGUAGE? designed to communicate instructions to a computer Used to create programs provide a better interface between us (programmers) and the computer

  19. Types of Programming languages HIGH-LEVEL LANGUAGES CLOSER TO NATURAL LANGUAGES ... Dynamic languages PROVIDES ABSTRACTION (JAVA) LOW-LEVEL LANGUAGES CLOSEST TO MACHINE CODE (ASSEMBLY LANGUAGE)

  20. Execution models … COMPILED STORES PROGRAMS IN MACHINE CODE … BINARY (MACHINE CODE IS 1’S AND 0’S … IN WINDOWS .EXE) INTERPRETED STORES PROGRAMS IN ‘HUMAN READABLE’ FORM (only a small number of instructions exist as machine code)

  21. HOW DO I BEGIN … tools 1. Text editor Windows: notepad, linux: gedit, many editors available IDE (integrated development environment) Netbeans, eclipse, visual studio ($) … man y more 2. Ambition

  22. HOW DO I BEGIN … requirements 1. Identify the problem: What problem does your program solve? If you can't clearly state what your program does, you won't know how to design it. 2. Identify the user: Who's going to use your program?

  23. HOW DO I BEGIN … requirements 3. Determine the target platform Is it a Windows computer, Mac, Linux, mobile, etc. 4. What skills will you need to develop Are you going to write the entire thing yourself or get help from others? If you're going to get others to help you, which parts of the program are they going to write?

More Related