Dennis Brown wrote:
Thank you for the praise. I hope the example inspires others to not be afraid to dive in and achieve more than they thought they could. I just wanted to do something useful for others to thank those on this list for all the help they are unselfishly giving to everyone.

I doubt my scripts would be a model of superb Transcript.

Maybe not, but your process is a model for us all.

To dive head-first like that into a problem you knew little about was bold; to produce a working and valuable result in just a few hours was brilliant.

I don't ever think I can bring myself to putting lower case typing characters in front of the names of my variables. I gave it a try, but I will have to come up with something else, because it just hurts my eyes...

That's precisely why I adopted that style (called "Hungarian-lite", as described at <http://www.fourthworld.com/embassy/articles/scriptstyle.html>).

For true readability, yes, few things seem as smooth to the native-English-reader's eye as plain English (though I can tell you from recently doing a version of one of my projects localized for the UK that there's no such thing as "plain English" <g>).

But programming serves a different function than other forms of writing, and often relies on different cognitive processes.

While most text is designed to be read (usually in a sort of whole-sentence fashion) programming code is *skimmed* more often than it's truly read, usually searching for specific elements.

Code might be truly read once, if the code is passed from one person to another, or perhaps if you've put something away for a long time and come back to it again so much later that you no longer remember how it works.

But in the day-to-day code is skimmed frequently, tracking down bugs, adding new features, optimizing, etc. For these tasks, skimming uses a cognitive process more akin to searching than that used for narrative reading.

By making variables stand out visually within a block of text does indeed jar the eye -- they draw attention to themselves because they're different from the rest of the text, which is mostly native language keywords. I know the engine (mostly) works, so I'm most interested in quickly identifying the stuff that's uniquely mine.

I also tend to capitalize custom functions and handlers for the same reason, to make them more visually distinct on screen, while I leave built-in handlers and functions with an initial lower-case character so they visually recede.

With variable names I find that describing the type with the first letter also lets me rapidly distinguish between element: I know at a glance that pText is declared in the parameter list, while uText is a user-defined property and tText is a temporary (local) variable and gText is a global; I never need to backtrack to determine where it came from.

Sure, it's a bit anal. And there's certainly no harm in defining one's own style; after all, part of the joy of programming is self-expression. I know many professional scripters who use quite a wide variety of styles.

I only require Hungarian-lite of contractors; for everyone else I encourage them to do whatever feels most right and lets them get through the day with the greatest ease.

--
 Richard Gaskin
 Fourth World Media Corporation
 __________________________________________________
 Rev tools and more: http://www.fourthworld.com/rev
_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to