1 / 11

Using Visual Logic To Teach A First Course In Programming Logic

Using Visual Logic To Teach A First Course In Programming Logic. Jorge Vallejos – Assistant Professor ( jvallejo@cscc.edu ) Computer Science Department Columbus State Community College. Logic – AND Benefits to our students. What Is Logic? – Loose Definitions

deva
Download Presentation

Using Visual Logic To Teach A First Course In Programming Logic

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. Using Visual Logic To Teach A First Course In Programming Logic Jorge Vallejos – Assistant Professor (jvallejo@cscc.edu) Computer Science Department Columbus State Community College Ohio Educational Technology Conference - January 2014

  2. Logic – AND Benefits to our students • What Is Logic? – Loose Definitions • The application of principles of correct reasoning • Proper thinking about the understanding of something • Interrelation of facts and events to reach valid conclusions • Why Is Logic Necessary? • Solve complex tasks by applying systematic reasoning • Establish an approach to understand, analyze and solve a problem • Discover simple and efficient solutions to implement processes and systems • What Do Students Gain By Learning Logic? • Develop skills for critical thinking • Gather relevant facts, analyze them, and derive conclusions to troubleshoot systems • Apply problem solving strategies – formalize theories, discard invalid assumptions, establish priorities (ordering of actions and validation), solve problem in incremental steps, isolate/reproduce issues, test solutions • Readiness for programming courses and other analytical courses Ohio Educational Technology Conference - January 2014

  3. courses THAT support PROGRAMMING logic • MATH courses – beyond the algorithms and formulas, MATH creates the foundation to discover relations between entities, combine building blocks to compose new entities, build sets of detailed instructions to complete a task • READING/WRITING courses focused on comprehension – analyze complex materials, apply critical analysis to reach conclusions, inductions and deductions • PHYLOSOPHY courses: cover topics like: critical thinking, methods of inductive, deductive and symbolic logic Ohio Educational Technology Conference - January 2014

  4. Tools for a First course in programming logic • Visual Logic • Creates visual/runnable representation of algorithms in flowchart format. The program does not use formal programming-language instructions – like Java, C#, or other programming languages • Alice/Alice3 • Creates 3D animations. Tool is oriented towards learning computer programming. Drag objects from a palette onto a scene canvas. Objects are constructed from Java classes. Methods are presented as menus – to control the actions performed by objects • Scratch • Creates animated objects. The program provides a list of instructions to control the actions performed by objects • Other Tools – Search the Internet Ohio Educational Technology Conference - January 2014

  5. Visual logic Features • Variables: store non-typed numeric and string constants • There is no variable declaration – variables are created at the point of use • Variable Scope: Global, Local • Constructs: • Operators • Arithmetic (+, -, *, /, Mod, ^), Comparison (<, >, …), Compound (AND, OR, …) • Assignment (=) • Sequences • Conditions: if-then-else • Loops • while, do-while, for – Control of execution can be modified with the exit, continue clauses • Arrays • Procedures (a.k.a., modules) – named set of instructions: • Parameters: passed by value, passed by reference • Do not return a value Ohio Educational Technology Conference - January 2014

  6. Visual logicFeatures - Continued • Functions • FormatCurrency(), FormatPercent(), Round(), Random(), … • There is no Wait()/Sleep()-equivalent function. • Alternative: to temporarily suspend the execution of instructions, create a busy-do-nothing loop – keeping the CPU busy for a while • Input/Output • Dialog boxes, Console, File • Enforces Structured Programming – There is no GOTO instruction • All programming structures have a single entry/exit point • It is not possible to create spaghetti code Ohio Educational Technology Conference - January 2014

  7. Visual logic PITFALLS • Variables are created at the point of use. Visual Logic creates a new variable for a misspelled variable identifier • Example: • firstName– Correctly spelled variable identifier • fisrtName– Misspelledvariable identifier.Visual Logic creates the new variable identifier with a default value zero (0) • Visual Logic does not enforce data types – (justification: students learn logic better when focusing on the concepts – rather than syntax) • It is possible to create invalid Boolean expressions in comparison/loop statements: • while (YES <> number) { … } • where YES stores the string constant “y”, and numberstores a numeric constant • The Boolean expression evaluates as false – no syntax error, the loop-body does not execute • A variable initially assigned a string value can be assigned a numeric value in a subsequent instruction Ohio Educational Technology Conference - January 2014

  8. VISUAL LOGIC DEMONSTRATIONS • Sequences • Decisions • Loops • Arrays • Parameterized Procedures • Graphics Ohio Educational Technology Conference - January 2014

  9. Conclusions/Experiences • The CSCC Computer Science Department has been using Visual Logic for the last three years. • The program has been favorably received by CSCC students, and transfer students from other colleges/universities • The student can verify the logic of her/his algorithm – the outputs generated by the program can be compared against a set of expectedoutputs • Programs can be easily created – by combining the Visual Logic instruction shapes • Visual Logic is used in a basic programming logic course – taken by Computer Science students pursuing different degrees (not just future programmers) • The program is used to implement: • Arithmetic algorithms • Simulation of events – e.g., execute logically organized activities when troubleshooting failures in hardware/software • Basic graphical animations Ohio Educational Technology Conference - January 2014

  10. Conclusions/Experiences - continued • Instructors must demonstrate how to avoid the Visual Logic pitfalls • Create examples to eliminate logic/(syntax) faults caused by the Visual Logic non-typed variables • Demonstrate the Visual Logic debugging capabilities • Create breakpoints, step into, step over, pause, run, … • List the variables defined within the scope of procedures – find misspelled variables, local variables obscuring global variables Ohio Educational Technology Conference - January 2014

  11. References • Visual Logic • http://www.visuallogic.org/– download the Visual Logicexecutable program • Each student must buy a Visual Logic access code – gives right to use the executable program • Companion book: A Guide to Working with Visual Logic. Thad Crews & Chip Murphy. Course Technology – Cengage Learning. ISBN 978-0-324-60119-0 • Alice • http://www.alice.org/index.php • Scratch • http://www.scratch.mit.edu Ohio Educational Technology Conference - January 2014

More Related