Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] Pseudocode as a way to learn programming

Expand Messages
  • Chris Laarman
    ... ... So do I. :-) I haven t checked (validated?) the article or even the example, I merely pointed to the article as just an article on JSP, but within the
    Message 1 of 6 , Mar 20 12:06 AM
    • 0 Attachment
      Art Kocsis <artkns@...> on Fri, 19 Mar 2010 16:46:53 -0700:

      >>I'm not currently programming. However, I have cherished JSP for
      >>twenty years now.
      >><<http://en.wikipedia.org/wiki/Jackson_Structured_Programming>http://en.wikipedia.org/wiki/Jackson_Structured_Programming>

      >Maybe I'm missing something but the Wikipedia article is either very
      >poorly written or JSP doesn't make any sense. I suspect the former.
      ...

      So do I. :-)

      I haven't checked (validated?) the article or even the example, I
      merely pointed to the article as just an article on JSP, but within
      the Wikipedia framework that I appreciate.

      As I remember it, the beauty of the JSP model is twofold:
      1) It is data-driven. It shows the input you need to obtain the
      output.
      2) It shows the modules of the program (but leaves it to you to
      identify them), and has you describe the program in such a way (of
      pseudo-code) that you can translate it to the (procedural) programming
      languages you want.
      Coding in any programming language would merely mean replacing the
      pseudo-code words with the reserved words of that language - or find
      that that language would not fit the task.

      A third benefit would be, that the program design wouild be
      self-documenting, making it easier for successive programmers to
      maintain the code.

      I was taught the Nasi-Shneiderman (I too remember "Schneidermann")
      diagram, <http://en.wikipedia.org/wiki/Nassi-Schneidermann_diagram>,
      along with JSP (and COBOL as the final programming language...), and
      it nicely fit in for describing the conditions for loops or choices.

      Digressing:

      I have never programmed professionally. But having this knowledge, I
      became rather productive in writing MS-DOS batch files and coding my
      own accounting program in dBase (actually VP-Info).
      But soon visual programming took over, along with the (Windows) focus
      on the behavior of screen elements (and the growth from quick
      executable files measured in kB to sluggish files measured in MB).

      Anyway, if I should ever start writing Clips in NoteTab, I would
      definitely benefit from the lessons learned in JSP and N-S diagrams.
      :-)

      --
      Chris Laarman
    • Art Kocsis
      ... If you spend any time at all in NTB, I would encourage you to start writing clips. I procrastinated for years due to laziness, strange looking syntax, no
      Message 2 of 6 , Mar 20 5:16 PM
      • 0 Attachment
        At 03-20-10 00:06, Chris Laarman wrote:
        >Anyway, if I should ever start writing Clips in NoteTab, I would
        >definitely benefit from the lessons learned in JSP and N-S diagrams.
        >Chris Laarman

        If you spend any time at all in NTB, I would encourage you to start
        writing clips. I procrastinated for years due to laziness, strange
        looking syntax, no perceived need -- whatever. I guess it seemed valid
        at the time. However, after a long, steep and painful (unnecessarily so
        I feel), learning curve I am a convert to scripting.

        I would suggest starting with a few very small (2, 3, 4 line) clips that
        automate some of your common tasks:
        Create a personal clip library:
        (see my 11-18-09 post if you want to find its location but not necessary)
        display the libraries bar [View | Libraries bar],
        click on any clip
        click on the cliplib name above the cliplib panel & enter your new name
        press return and save the new file
        right click in the cliplib panel and choose "Add New Clip"
        create and save some clips
        Create a personal clipbar [View | New; right click | save as],
        drag each of your clips to your personal clipbar
        right click on the generic icons to replace them with meaningful ones
        Now you have the convenience of single click personal power functions.
        Careful though - it's addictive!<g>

        Use the built-in Clip programming help file. One BIG TIP to ease the
        learning curve is the follow the syntax EXACTLY. This especially holds
        true for delimiters - do NOT add a single space to make the code easier
        to read or debug - it will fail! That is my single biggest complaint about
        NTB's clip syntax and it is such an unnecessary restriction. It is trivial
        to parse multiple spaces and it has caused me (and I am sure countless
        others), untold hours of needless head scratching. [end of rant]

        Another biggie time saver and power tool is RegEx. The syntax is even
        more intimidating and esoteric than the clip syntax but its looks are
        worse than its bite, especially for someone who has dome some
        programming. The power of RegEx is truly amazing (and may be used
        in the menu bar Find & Replace commands as well as clips). Once you
        have tried it you will never go back! One RegEx search pattern can
        replace an entire page of clip code!

        The hardest part for me was getting the concept of what a regular
        expression actually is and its use. Many help files and tutorials forget
        to describe the on/off switch - the authors are so familiar with the product
        they don't go back far enough to help the newbie get started.

        My definition:
        A regular expression is an encoding of a pattern of text in a document
        which may be used to search for, change and/or manipulate said text.

        The simplest regular expression is a simple, static string of characters.
        This is the same as the normal string in the menu bar Find & Replace
        commands such as looking for a match of "abcdef". The power of RegEx
        comes from adding variability to the search to the search criteria. This is
        similar to a simple search engine's "<prefix>*<suffix>" to find any and
        all text between (and including), the prefix and suffix.

        In RegEx this becomes, for example, "abc.*?xyz" (for no embedded
        line breaks). [In RegEx each syntactical element has a distinct and
        well defined meaning: in the example, the "." means any character,
        the "*" means zero or more of them, and the "?" means stop at the
        first occurrence of "xyz".] The power of RegEx comes from combining
        these simple elements. Again, start small and gradually add scopes,
        sub-patterns, conditionals, alternates, groups, character sets, etc.
        Experiment with some simple regular expressions in the menu bar
        commands using the RegEx option checkbox.

        In addition to the NTB RegEx help file see my post of 09-04-09:

        The Perl 5 RegEx tutorials include a quick version and a fairly complete one
        (although the Perl implementation is not the same as PCRE, the concepts
        and constructs are almost identical. Certainly a good learning tool):
        Quick: http://perldoc.perl.org/perlrequick.html
        Complete: http://perldoc.perl.org/perlretut.html
        Docs Home: http://perldoc.perl.org/perlre.html

        This Wikipedia PCRE article includes interesting background and
        semi-tutorial info
        http://en.wikipedia.org/wiki/PCRE#Differences_from_Perl

        The PCRE home page (http://www.pcre.org/) has links to the FTP repository
        [This is the source, almost verbatim, for the NTB RegEx Help file]
        Distribution:
        ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.9.zip
        v7.8 Win Help:
        ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Contrib/pcre-7.8.chm

        and Sheri's (silvermoonwoman2001), posts for links to more tutorials and
        helpful info:

        [09-05-09]
        <http://gravitonic.com/c/dl.php?file=talks/php-quebec-2009/regex-clinic.pdf>http://gravitonic.com/c/dl.php?file=talks/php-quebec-2009/regex-clinic.pdf

        Jeffrey Friedl's soft back book, "Mastering Regular Expressions (3rd Edition)"
        <http://regex.info/>http://regex.info/

        [10-17-09]: There is a Wiki on PCRE that might be helpful:
        <<http://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions>http://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions>

        Lastly, as you probably have noticed, help on this forum is freely given and
        easily obtained.

        HTH,

        Namaste', Art

        For every expert, there is an equal and opposite expert.
        Arthur
        C. Clarke

        ----------


        No virus found in this outgoing message.
        Checked by AVG - www.avg.com
        Version: 9.0.791 / Virus Database: 271.1.1/2756 - Release Date: 03/19/10 00:33:00


        [Non-text portions of this message have been removed]
      • Chris Laarman
        ... Art, thank you for your extensive message! My reaction must be disappointing: I hardly spend time in NoteTab. On the other hand, I have been a lurking
        Message 3 of 6 , Mar 21 4:25 AM
        • 0 Attachment
          Art Kocsis <artkns@...> on Sat, 20 Mar 2010 17:16:33 -0700:

          >At 03-20-10 00:06, Chris Laarman wrote:
          >>Anyway, if I should ever start writing Clips in NoteTab, I would
          >>definitely benefit from the lessons learned in JSP and N-S diagrams.
          >>Chris Laarman

          >If you spend any time at all in NTB, I would encourage you to start
          >writing clips. I procrastinated for years due to laziness, strange
          >looking syntax, no perceived need -- whatever. I guess it seemed valid
          >at the time. However, after a long, steep and painful (unnecessarily so
          >I feel), learning curve I am a convert to scripting.

          Art, thank you for your extensive message!

          My reaction must be disappointing: I hardly spend time in NoteTab. On
          the other hand, I have been a lurking member of this Yahoo Group for
          years, glancing at the Subject lines and storing (keeping) all
          messages. Just to get a notion of when I should use NoteTab (Pro)
          instead of other software and have the discussions at hand.
          This latest message of yours even made it to a special reference
          folder. :-)

          Time for me to get back to lurking before staying off-topic.

          --
          Chris Laarman
        Your message has been successfully submitted and would be delivered to recipients shortly.