IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Utility writing methods
I seem to write a lot of general purpose utilities.
They take a lot of options, I have to test that
certain arguments come in certain groupings.

I'd say about 90% of my code is sanity checking
the arguments I get. It also seems that I
may plug in a bit of logic during that phase
to setup general usage variables, such as
unpack patterns so no matter what arguments
the programs was given, I boil the intermediate
data structures to something common across the
various possible uses.

Oh, and my helpful error message on usage. I
catch almost all design holes as I am creating
the initial error message.

After that point, the actual implemention of the
business algrithm seems almost trivial.

Do others feel this way?

For example, I'm writing a Split / Interleave
utility to interleave print records together for
multi-up forms.

Here is the help message:
\n./ns_split.pl: NS Split / Interleave program\n\nThe following options can be used.\n\n        Input and output files.  Do not use\n        named pipes or STDIN / STDOUT. I might\n        want to optimize memory and seek a bit.\n\n        --in_name=s\n        --out_name=s\n\n        --log_name=s - default: ns_split.log\n\n        --split_type=s\n\n        Must be one of the following:\n\n                A           AMS Segment\n                A-EP        AMS Segment / Entry Point\n                A-EP-P      AMS Segment / Entry Point / Pallet\n                K-N         Kit / Numerical\n                N           Numerical Only\n\n\n\n        Must supply certain offsets, lengths, and / or counts\n        depending on what the above split_type is set to.\n        Offsets are specified starting at 1.\n\n        --ep_pos=i\n        --ep_len=i\n\n        --pal_pos=i\n        --pal_len=i\n\n        --ams_seg_pos=i\n        --ams_seg_len=i\n\n        --kit_pos=i\n        --kit_len=i\n\n        --max_seg_count=i\n\n        How many up?\n        --up=i\n\n        Disable segment break padding (enabled by default).\n        Padding occurs if there are not enough records to\n        fill a sheet of paper on a NS break.\n\n        --no_pad\n\n        Set --lrecl for fixed length processing.  Will assume NL terminated\n        records otherwise.\n\n        --lrecl=i\n\n        --verbose\n
New No command-line parsing here
I don't have any command-line code--it's all web apps. But if you're saying "writing docs first is keen" then I heartily agree.

One of the effects of no command line is that I can't think of a single call in my current apps that has as many options or arguments as does your example. I get to build things more incrementally.
New No command lines?
You mean you know what your code is supposed to do in advance?
Lucky guy.

Here's another list of arguments for another program.
The help screen is about 500 lines long.

\n                                        help\n                                        force_kit=s\n                                        g1_report=s\n                                        file_prefix=s\n                                        tray_feet_per_pallet=n\n                                        lrecl=n\n                                        prod_report=s\n                                        seg_off=n\n                                        first_class_report=s\n                                        report_dir=s\n                                        kit_off=n\n                                        mm_trays_per_pallet=n\n                                        first_class_pal_file=s\n                                        emm_trays_per_pallet=n\n                                        tray_off=n\n                                        tray_len=n\n                                        kit_len=n\n                                        entry_off=n\n                                        entry_len=n\n                                        pal_off=n\n                                        first_class_run_type=s\n                                        pal_len=n\n                                        project=s\n                                        entry_type=s\n                                        default_threshold=n\n                                        seg_file=s\n                                        output_file=s\n                                        match_type=s\n                                        run_type=s\n                                        segment_len=n\n                                        zip_off=n\n                                        project_len=n\n                                        map=s\n                                        mailer_entry_info=s\n                                        mailer_entry_info_size=n\n
     Utility writing methods - (broomberg) - (2)
         No command-line parsing here - (FuManChu) - (1)
             No command lines? - (broomberg)

He said, "Listen, shrimp. Don't you come trolling around here." What a crab. This guy was steamed. I could see the anchor in his eyes.
54 ms