37
A Puzzle for You

A Puzzle for You

  • Upload
    betrys

  • View
    36

  • Download
    3

Embed Size (px)

DESCRIPTION

A Puzzle for You. Puzzle. Someone is working for you for 7 days You have a gold bar, which is segmented into 7 pieces, but they are all CONNECTED You have to pay the person 1 segment at the end of each day You can only break the bar in two places! How do you pay your worker?. - PowerPoint PPT Presentation

Citation preview

Page 1: A Puzzle for You

A Puzzle for You

Page 2: A Puzzle for You

Puzzle• Someone is working for you for 7 days• You have a gold bar, which is segmented into 7 pieces, but

they are all CONNECTED

• You have to pay the person 1 segment at the end of each day• You can only break the bar in two places!• How do you pay your worker?

Page 3: A Puzzle for You

Welcome to BCS 465!

Page 4: A Puzzle for You

Agenda• Introductions• Course overview

Official outline What will we cover? Why a course in programming?

• Programming Introduction

Page 5: A Puzzle for You

IntroductionsDavid Bath

Office: C2012 Drop by for a chat!

Phone: 416-491-5050 x6230Office Hours: See web siteWeb Site: http://people.senecac.on.ca/david.bathE-mail: [email protected]

Page 6: A Puzzle for You

About Me• Eigth year at Seneca• Both Business and IT background• Experience working in finance

/technology• Have taught many of the BCS courses

Page 7: A Puzzle for You

About You….• Introductions

Page 8: A Puzzle for You

Course Overview• Course Outline

• Informal: What is this course about? Why is it important, really?

Page 9: A Puzzle for You

Text• An Introduction to Programming

using Visual Basic .Net (Fifth Edition)By David I. Schneider

Page 10: A Puzzle for You

“Modes of Evaluation”(i.e., marking scheme)

Cases, assignments and project 35%Two tests (20% each) 40%Final exam 25%Total 100%

Page 11: A Puzzle for You

Expectations/Policies• You need to be in class! – this is a difficult course

for BCS students!!! Programming is not about memorizing information

• It’s about grasping and applying new skills

• You’ll be responsible for in-class material and assigned readings

• Deadlines will be strictly enforced! Late penalties will be applied

• Cheating absolutely will not be tolerated!

Page 12: A Puzzle for You

Expectations• If you have a problem, I can help… But

you have to bring it to my attention…

Page 13: A Puzzle for You

Course Overview• An introduction to programming

Understand how software is developed Develop fundamental programming skills

• Which can be applied in many areas! Strengthen problem solving ability Give you a taste of the discipline

Page 14: A Puzzle for You

About Programming and VB

• The primary concern is that you grasp the concepts The concepts that you will learn are applicable to virtually

ANY programming language

• Visual Basic happens to be the platform which we are using to learn the concepts Added bonus that VB is a widely applicable language, and

that it is fast and easy to build useful applications

Page 15: A Puzzle for You

Why Study Programming?• Isn’t this too much technical detail for a

business student?

• Not at all!• There are many reasons that a course

in programming will benefit you

Page 16: A Puzzle for You

Do you want to……Work in business/systems analysis or

Project Management?

Understand how the technology can be applied to meet customers’ needs

Manage and/or understand development and delivery process/schedules

Communicate with technical staff, and your customers’

Page 17: A Puzzle for You

Do you want to……Work in Web Design/Development?

Plan dynamic and/or interactive web sites Interface web sites with backend systems (e.g.,

databases)

Page 18: A Puzzle for You

Do you want to……Work in IT?

Write scripts to perform configuration(e.g., login scripts)

Write scripts to automate tasks (e.g., add 500 users)

Page 19: A Puzzle for You

Do you want to……Get a taste of as many areas as

possible, so that you can choose the best career path? This course will help you find out if programming is

an attractive area to you

…do well in job interviews?

Page 20: A Puzzle for You

Career Options• Business + Tech = Excellent skill set

In reality, it you can pursue anything between the two extremes- Options!

• Programming is a fundamental technology discipline, and you need to understand it to have a complete base

Pure technology

Pure Business

Page 21: A Puzzle for You

The Course!

Page 22: A Puzzle for You

Today’s Topic

An Introduction to Programming

Page 23: A Puzzle for You

How many of you like Math?

Page 24: A Puzzle for You

How many of you like puzzles and problems?

Page 25: A Puzzle for You

How many of you can give good directions?

Page 26: A Puzzle for You

How many of you can TELL people how to cook

or build things?…Not SHOW, but TELL…

(Or have told people how to mix complicated drinks?)

Page 27: A Puzzle for You

If you answered yes to these questions…

• You may find that you like programming!

• Programming, in a very pure sense, is problem solving You have a task that you want to accomplish, and you have

to find a way to accomplish it• Programming revolves around finding a set

of steps to perform the task Instructions!

Page 28: A Puzzle for You

Exercise: Directions• Here is your first programming-type

assignment!

• I need to get from this lab, down to the cafeteria You need to give me precise directions!

• Work in pairs, to write out a set of directions

Page 29: A Puzzle for You

Taking it up: Some issues• Were your directions correct?

• Were the instructions: Not detailed enough? Too detailed?

• How do we know how detailed the steps should be?

Page 30: A Puzzle for You

The Language!• If we are programming a computer, the

language tells us exactly which instructions the computer understands If you know what instructions the computer understands, you

know exactly how much detail is needed• E.g., Visual Basic uses different commands than Java

• In the planning stage, you need to use your judgment

Page 31: A Puzzle for You

Exercise: Putting a list of numbers in Order

• I’m going to place eight numbers, written on pieces of paper, on the board They aren’t in order! You can do the same at your desk

• You need to put them in order from highest to lowest Known as ‘Sorting’

Page 32: A Puzzle for You

Sorting• This is a very easy task for you to do by

hand, on a particular set of numbers

• However, I don’t want you to give me the instructions for this particular set

• You need to come up with a set of steps that will work on ANY list!

Page 33: A Puzzle for You

Sorting• This is a much tougher problem!

Suggestion:1. Do it a few times by hand

While you are doing it, PAY ATTENTION TO THE STEPS YOU TAKE

2. Try to find a well-defined method that works every time3. Write down the steps of your method!4. Test them!

Page 34: A Puzzle for You

Sorting: Taking it up Did you have any luck?

Don’t worry if you didn’t!

Let’s look at a few approaches

Page 35: A Puzzle for You

Algorithms• The algorithm is the central idea in programming

A procedure, or set of steps, which will accomplish a certain task• E.g., sorting a list!

• The algorithm is independent of programming language It should work on any platform!

• The algorithm is most important! Implementing it in a given language comes afterward

Page 36: A Puzzle for You

Next problem!• Create an algorithm for a chess game!

Page 37: A Puzzle for You

For next class• Make sure that you get the textbook

• Find the weekly schedule on my web site

• Do the readings for week 1!