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?
Agenda
• Introductions
• Course overview Official outline What will we cover? Why a course in programming?
• Programming Introduction
Introductions
David 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]
About Me
• Eigth year at Seneca
• Both Business and IT background
• Experience working in finance /technology
• Have taught many of the BCS courses
Course Overview
• Course Outline
• Informal: What is this course about? Why is it important, really?
“Modes of Evaluation”(i.e., marking scheme)
Cases, assignments and project 35%
Two tests (20% each) 40%
Final exam 25%
Total 100%
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!
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
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
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
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’
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)
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)
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?
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
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?)
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!
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
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?
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
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’
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!
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!
Sorting: Taking it up
Did you have any luck? Don’t worry if you didn’t!
Let’s look at a few approaches
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