E-Book on Programming and Logic 2


I’m planning on writing an e-book about Programming and Logic. Right now, I have a basic Table of Contents set up, and I want to get some feedback from people who are learning to use Pseudocode and Flowcharting.

Some questions that I have for you are these:

1. Which do you think is harder, creating flowcharts or pseudocode?
2. Would you prefer to see a) more flowcharting examples, b) more pseudocode examples, or c) an equal share of each?
3. Which aspects of logic are you struggling with (for example but definitely NOT limited to: variables, arrays, looping, decisions, methods, classes, objects, or data types)?

Please post in the comments section, and I’ll be more than happy to frame the book along the requests. Also if there are other subjects that I haven’t covered in the questions, please post those as well.

At some point, I’ll be posting the table of contents for opinions on things like the chapter names, the order that I’m presenting things, and the structure of the book overall.

Thanks, and have a great weekend. ūüôā
Patrick.


Leave a comment

Your email address will not be published. Required fields are marked *

2 thoughts on “E-Book on Programming and Logic

  • No1dogpound

    1. Which do you think is harder, creating   pseudocode?2. Would you prefer to see   an equal share of each?3. Which aspects of logic are you struggling with (  arrays, looping,  )?

    • Patrick Dickey

      Do you have a pretty good understanding of variables and data types (at least as far as “logic” goes)? ¬†Such as num, char, String, int, float, boolean, or something else?

      Here are two basic psuedocode examples with comments (the comments start with //).

      Start
      ¬† ¬† print “Hello World” ¬†// Prints Hello World (without the quotes) on the screen)
      Stop

      Start
      ¬† ¬† String message = “Hello World” ¬†// creates a string type called message, and puts Hello World in the memory location
           print message  // Prints Hello World without the quotes on the screen
      Stop

      As far as arrays go, I always say picture an egg carton. ¬†If you split the carton in half (the long way, so you have one row of six eggs), that’s like a single dimensional array. The far left-most egg is in position 0, and the far right-most egg is in position 5. ¬†Since computers consider 0 as a valid number, everything starts with 0.

      If you take the same egg carton and leave it in one piece, it’s like a two dimensional array. The back row is row 0 (again with the 0), and the front row is row 1. So the far left-most egg in the back, would be 0,1 and the far right-most egg in the front would be 1,5. ¬†For each “row” you add 1, and for each “column” (left to right) you add 1.

      For looping, it always checks to see if a test passes or fails, and then repeats until the test passes. If it’s a “do while” or “do until” loop, it does the stuff inside of the loop, then checks to see if it needs to do it again. If it does, it does the stuff inside, and checks again. That’s why it’s called a post-test loop.

      If it’s a “while do” loop, it checks to see if it needs to do the stuff inside the loop, and only does it if necessary. Then it checks again. ¬†If it needs to repeat, it does. ¬†That’s why it’s called a pre-test loop.

      If it’s a “for loop” then it knows exactly how many times it should run. It runs the stuff inside of the loop, and increments the variable until it reaches one increment above the maximum/ (or one increment below the minimum) value.
       
      The important thing to remember with all loops is this: ¬†If you’re working with some data that was retrieved from somewhere (keyboard file, etc), you MUST retrieve a new line of data before the end of the loop. Otherwise it will continue on infinitely with the first piece of data that you gave it.

      I’ll go into more detail with more examples of loops in future posts and in the e-book. ¬†Thank you for your suggestion. It’s the best way for me to know what is important.

      Have a great day:)Patrick.