top of page
Writer's pictureJino Shaji

Basic Programming Tips

Updated: Jun 9, 2020

Tip #1: Avoid confusion by programming in small steps

Novice programmers frequently attempt too much at once with their programs. This practice tends to leave people feeling confused, overwhelmed, and often at a loss for what is really going on in their program. A better practice is to start out using small steps. This is less confusing and less frustrating when troubleshooting your programs. Example: The team wants its robot to drive forward three feet, turn 90 degrees to the left, drive until it sees a black line, stop and then beep. The team tries to program all these steps at once and then test the robot. Needless to say, the desired result is not achieved on the first try. A better way to go about programming this is to use a step-by-step method for programming. Step 1: Break the problem up into the individual programming steps required. In the above example the program would require 5 steps to complete the program. Step 2: Program the robot to drive forward three feet. Test this step to make sure this achieves the desired result. Then and only then, move on to step 3. Step 3: The 90-degree left turn. Again, test this step to make sure it achieves the desired result before moving on to step 4. Following this method you should achieve great results, saving time while attaining a better understanding of your program. To use these small steps easily in your program, be sure to put the step in a “My Block” (or Sub VI for Robolab™). “My Block” or Sub VI for Robolab™ allows you to easily reuse these small steps that you have taken the time to create. Please check out the section on “My Blocks” if you are unsure of them.


0 views0 comments

Recent Posts

See All

VB code to Unprotect Excel Sheet

Sub PasswordBreaker()     ‘Breaks worksheet password protection.     Dim i As Integer, j As Integer, k As Integer     Dim l As Integer, m...

Computer Programming Concepts

Computer programs are the collection of instructions that tells a computer how to interact with the user,interact with the computer...

Comments


bottom of page