Like BillKSmith I tend to go straight to sketch code rather than something that looks a little like code but doesn't morph directly into anything in particular. That gives me a head start in writing the actual code and also helps me think about testing.

So for your sample I might write something like:

use strict; use warnings; my @tableLines = FetchTable(); for my $tableLine (@tableLines) { next if $tableLine->{expressionLevel} >= 100; print "TableLine->{geneID} TableLine->{expressionLevel}\n"; }

which is at least as good as the pseudo code at elaborating the idea for the program, is insignificantly harder to set down, and focuses attention on important elements of the program that are unclear in the pseudo code (what does PRINT geneID IN table really mean?). In the real world these days tools like pseudo code and flow diagrams (for code) are seldom used and are of limited utility compared to things like test driven development.

If this is a homework exercise it may still be worth sketching the program as I have done above and then "reverse engineer" the pseudo code from it. If my sketch code captures your intent then the pseduo code you have as it stands is fine.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

In reply to Re^3: pseudocode for getting data from table by GrandFather
in thread pseudocode for getting data from table by shabird

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.