|
|
| EZRTools Newsletter ----------------------------------------- v1 2003 | |
Track those ChangesClay T MartinYou can quickly add a template that can be used to mark changes in a block of code with both date and programmer identification. You may already be aware of the /*d template. When you use this template, to the right of a line of code, you get: AVAR='VAL'; /* | 04/05/03 12:03:PM */ with your cursor sitting where the "|" character is, ready to add that insightful comment that will explain the dark secrets of the assignment. This article will show you two, no three ways to create a template to brand those changes with time stamp and a programmers name. Whole name pleaseIf you want to use the programmers name, and also already use the prolog and maint templates this is going to be real easy. As part of the function of those templates they depend on another template, Programmer_name being filled out. You would do that by selecting Tools-Edit Templates from the main menu. If SAS is not the selected template set, select it off of the dropdown list. Scroll down until you see Programmer_name in the template list. Select it and look at the editable text area to the right. If it still says "Your name", then you can type over that with your name now. Ok, Now back in the template list, scroll up a few lines until you see the template named ComEOLDate. Select it and press the copy button. You'll get a popup asking for a new name. Go ahead and give it something both unique and insightful like ComEOLName. Now in the edit box to the right change: <-TAB>/* <-CUR> <CDATE> to <-TAB>/* <-CUR> <CDATE> <CTIME> <^Programmer_name> */ the "<^Programmer_name>" says to expand the template Programmer_name at that position in the resultant text. The -CUR tag tells the template engine to leave the cursor there after expansion. A little secret, if you use a -CUR tag immediately to the left of a back quoted `field` in the template that field will be selected after the expansion. Thus the user can just start typing to replace `field` with a value. Cool! 'Nuff of that, now on to finish the job. We need to change the keyword, so that we can expand the old and new version of this template, the old keyword was "/*d", so we could change this one to "/*n" and no further changes are needed. If you feel the need to add more characters like "/*dn" or "/*dprogrammers name" then remember to change the Min length (located next to the keyword edit box) to represent how many letters of the keyword have to be typed before a blank to trigger the expansion. For "/*dn" it would be 4. All the other settings are done, so, we are too. Just select the close button and your done. Come on man, initials are okOk, so some of us are limited to 72 columns. So if we just want the programmers initials there are two ways we can go about it. If your a little up-tight, like me, you would create an new template called, oh let's say, "Programmers_initials" and insert that instead of using the "Programmers_name" template. Or if you are sloppy or just efficient you could just type your initials, favorite screen name, whatever in place of the template expansion metacommand. So your template would look like: <-TAB>/* <-CUR> <CDATE> <CTIME> CTM */ Now we need to take the steps listed above to finish off the new template and we are ready to go change some code! (hopefully without creating bugs 'cause or work can be tracked now). |
Tell a Friend!! Offer good through 6/1/03 |
Easy on the eyesClay T MartinWhile reading and article on web page design I got a flash of inspiration. Well actually the author had the flash but I saw how it could be used in MEW. The author was discussing the use of grey text on web pages. He felt that the publicly given reason, "to reduce eye strain" was actually "web designers don't read the text and thus think that blocks of text look artistically better (as images) if the edges are less well defined". He then went on to talk about reducing eye strain. His recommendation was to take the white background and reduce the amount of light put out by the CRT. Remember, CRT's are like a flash light, not a piece of paper. He had a simple example of black on white text and black on light grey text. You could feel your eyes saying "ahhhh." He actually recommended light pastel colors. This got me thinking about MEW. The edit window is a white background. But we have multiple color text displayed on it, more of a mix than on most web pages. Some experimenting showed that one needs a background that is not very dark. The color combination has to be close to white, in red-green-blue terms FF-FF-FF. A very light grey (EEEEEE) showed most of the colors well, but was rather depressing to look at for long periods of time. More experimenting led me to a realization that the real choice seemed to be where to put the one FF and where to put the two EE's. Ok, theoretically DDFFFF would have the same luminosity as EEFFEE, but have you seen the colors you get with those 3 possibilities. So for the sake of argument lets go with FFEEEE, EEFFEE and EEEEFF. Now how do we set this up in MEW? Select Tools-Customize-Colors from the main menu. You will need to Select the SAS color Template. Now MEW does not come with the light colors we need so we will have to create a custom color. Click on the Define button in the lower right hand corner of the dialog. Locate the red, green and blue edit boxes. Enter 255 for the FF entry and 238 for the EE entries of the color you picked. Then click the Add to custom colors button. OK, last step ahead. In the list box on the left, in the "Editing" section click on each item in turn (excepting Highlight text and Search highlight text) and then right click on the custom color you created. Do the same with all the items in the "Syntax highlighting" section except for brackets. Now most of the selections in the list should have your pastel background. You may want to create a second light background to use in the line changed marker, if you edit a lot of old code. When you are done you must press the Save button before you exit the dialog, otherwise you efforts will only last until you quit MEW. You might ask, why the slightly darkened background instead of using a black background with white and colored letters? Well, everyone has their preference. For myself, I don't like to be reminded of years of staring at black background'ed 12" dumb terminals connected to a IBM mainframe, Burrrr! We are currently working on Version 2 of EZRTools! Do you have any suggestions? Let us know! |
|
SubmissionsDo you have a article relating to the use of EZRTools or Multi-Edit. We would love to consider it for the next newsletter. You can email it to ezrtnews(AT)martinworks.com |
|
Sign UpIf you received this newletter from a friend and wish to receive a copy yourself, you can follow this link and fill out the form. |
CancelIf you received this in error or wish to no longer receive this newsletter follow this link and select "Cancel Newsletter Only" from the radio buttons. We are sorry if you were inconvenienced in any way. |
|
Martin Works Inc. can be contacted at 570-853-0940 weekdays 9a-5p eastern time. 312 Myrtle St. Susquehanna, PA 18847 or at support(AT)martinworks.com |
|
|
Copyright © 2003, Martin Works Inc., Text, graphics, and HTML code are protected by US and International Copyright Laws, and may not be copied, reprinted, published, translated, hosted, or otherwise distributed by any means without explicit permission. SAS® is a registered trademark of SAS Institute, Inc. in Cary, NC. Multi-Edit® is a trademark of Multi-Edit Software Inc. All other logos and trademarks in this site are property of their respective owners. |
|