RE: [U2] INCLUDE weirdo
You do realise that you are showing U2 to be a sport of the pre-historic? My first experience with computers was paper tape. Version control was performed with a pencil on the leader of the tape. How many remember punch cards. How about a half a day turnaround to see if your program compiled? And the fun task of reading core dumps. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
[U2] blank lines in code / mixed case
How come my code won't compile if there are blank lines in it? And yet when I find source on the net it has blank lines in it? and while we're at it, what is the case for / against using lower or upper case code, and what do I need to set to allow this to happen? Thanks --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] blank lines in code / mixed case
Dennis I have no idea why your code should not compile ... I always use plenty of whitespace and, yes, for the past 15+ years I've been using mixed case. For good reasons - once you get used to ie (and that *IS* the caveat) it's much quicker to scan. That's why all modern languages use it. Of course, people who haven't taken time to get used to it, or don't use the huge number of client or web languages that use mixed case, don't see the benefit. If you're coming from an upper case only environment, you need time to train your brain to read it. Mixed casing has been on UniVerse since the year dot whereas UniData has only just emerged from the stone age on this one. Personally, since I spend much of my time in C#, Delphi, VB, PHP. mvScript etc. I much prefer to read: Fin = @False Loop ReadNext CustId Else Fin = @True Until Fin Do ReadU CustomerRec From CUSTOMER.F, CustId Then GoSub CalculateOrderTotal End Else Release CUSTOMER.F, CustId End Repeat RETURN Than: FIN = 0 LOOP READNEXT CUSTID ELSE FIN = 0 UNTIL FIN DO READU CUSTOMERREC FROM CUSTOMER.F, CUSTID THEN GOSUB 1000 END ELSE RELEASE CUSTOMER.F,CUSTID END REPEAT RETURN As I say, it's partly what you're used to and what you're prepared to learn. But there is another important argument: what the rest of the world is used to. Every other language in popular use today uses mixed case. Part of what I try to do - through the U2UG, training, articles etc - is to present U2 as a modern business platform. Anything that *looks* old, however effective, makes that more difficult and it is in all our interests to keep pushing that message. Now, I'm not suggesting that you convert any old code to mixed case, or that you start to insert mixed case into existing code. But for new ventures, it makes sense to work with what has been frequently proven to be best. I know we like to live in a technology bubble, but there are things we can learn from the rest of the industry. Regards Brian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Bartlett Sent: 08 March 2008 10:18 To: u2-users@listserver.u2ug.org Subject: [U2] blank lines in code / mixed case How come my code won't compile if there are blank lines in it? And yet when I find source on the net it has blank lines in it? and while we're at it, what is the case for / against using lower or upper case code, and what do I need to set to allow this to happen? Thanks --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] blank lines in code / mixed case
Just a reminder for UniData users using mixed case, you may need to consider compiling with the -I flag (Case Insensitive Keywords allowed) We were getting some syntax errors on programs that were using SB+ SQL commands, until we started compiling with this flag. (Ironically the flag is in upper case :-) ) You may want to read up on this flag. In reference to code not compiling, did you try reformatting your source code, before compiling? (Using the AE editor, 'FORMAT' command) This usually converts control characters to spaces. We had an issue years ago, that core dumped on an old RS/6000 every time we compiled a program that contained tabs in the source. UniData may have corrected this 'feature', though. Hope that helps. -Phil- -Original Message- From: Brian Leach [mailto:[EMAIL PROTECTED] Sent: Saturday, March 08, 2008 7:07 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] blank lines in code / mixed case Dennis I have no idea why your code should not compile ... I always use plenty of whitespace and, yes, for the past 15+ years I've been using mixed case. For good reasons - once you get used to ie (and that *IS* the caveat) it's much quicker to scan. That's why all modern languages use it. Of course, people who haven't taken time to get used to it, or don't use the huge number of client or web languages that use mixed case, don't see the benefit. If you're coming from an upper case only environment, you need time to train your brain to read it. Mixed casing has been on UniVerse since the year dot whereas UniData has only just emerged from the stone age on this one. Personally, since I spend much of my time in C#, Delphi, VB, PHP. mvScript etc. I much prefer to read: Fin = @False Loop ReadNext CustId Else Fin = @True Until Fin Do ReadU CustomerRec From CUSTOMER.F, CustId Then GoSub CalculateOrderTotal End Else Release CUSTOMER.F, CustId End Repeat RETURN Than: FIN = 0 LOOP READNEXT CUSTID ELSE FIN = 0 UNTIL FIN DO READU CUSTOMERREC FROM CUSTOMER.F, CUSTID THEN GOSUB 1000 END ELSE RELEASE CUSTOMER.F,CUSTID END REPEAT RETURN As I say, it's partly what you're used to and what you're prepared to learn. But there is another important argument: what the rest of the world is used to. Every other language in popular use today uses mixed case. Part of what I try to do - through the U2UG, training, articles etc - is to present U2 as a modern business platform. Anything that *looks* old, however effective, makes that more difficult and it is in all our interests to keep pushing that message. Now, I'm not suggesting that you convert any old code to mixed case, or that you start to insert mixed case into existing code. But for new ventures, it makes sense to work with what has been frequently proven to be best. I know we like to live in a technology bubble, but there are things we can learn from the rest of the industry. Regards Brian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Bartlett Sent: 08 March 2008 10:18 To: u2-users@listserver.u2ug.org Subject: [U2] blank lines in code / mixed case How come my code won't compile if there are blank lines in it? And yet when I find source on the net it has blank lines in it? and while we're at it, what is the case for / against using lower or upper case code, and what do I need to set to allow this to happen? Thanks --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] blank lines in code / mixed case
I am admittedly a dinosaur of the upper-case bent with U2. Before I put on my flame suit, hear me out.. We developers type thousands - possibly even millions - of characters of code per year To press the letter R with caps lock on or off is only one keypress - keeping in mind the state of the cApS LocK. To type READU then is only 5. ReadU however, is 7 - an increase of 40%. Now, assuming that a typical program is 4000 characters, there's a potential of an additional 1000+ shift keypresses just to maintain case. Meaningless, you say? Everything we do takes an investment of time, and even a fraction of a second can turn into a significant investment when multiplied times millions of occurrences. In Java, PHP, etc., mixed case code has been the norm from the beginning. People don't think about writing these languages in upper case because they were never designed to be written that way. BASIC, however has its roots in upper case, and - here's my big point - not being forced into mixed case provides a significant opportunity to produce more code in less time simply because of the reduced number of keystrokes. Also on the topic of productivity, a variable named ITEM.CUSTOMER has one presentation, no variants. Mixing case on this variable produces a number of variants which may be easily mistyped thus potentially increasing debugging time. I will admit, because I don't use mixed case I don't know if there's a compiler option that will allow ITEM.CUSTOMER and ItEm.CuStoMerto be the same variable, but even if such a thing exists, isn't that just adding confusion to whomever has to compile this thing six months from now? Those who have gone through my training have likely heard my rule about there's a time and place for everything, and it's not always and it's not never. Anyone who always writes in mixed case regardless of the language or environment, or anyone who never writes in mixed case for the same reason may very well be missing productivity gains, regardless of how distasteful the caps lock key might be to them personally. Yes, I do use mixed case - in user prompts - because the audience (i.e. users) interprets meaning in the case of a message. And one last point to really fire up some folks: To those who think mixed case is more readable, I offer this: It's syntax, not literature. While we should do everything we can to make the code as human readable as possible, greater readability gains are available through structural protocol than changing READU to ReadU. To put so much energy in all these extra keystrokes and then to create a 3000 line routine with 1200 GOTOs (oops, I meant GoTo's) is ... in my opinion... a lot of effort with minimal - if any - ROI. So, without turning this into a holy war, why do you prefer mixed case? -K --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] blank lines in code / mixed case
I donbt think anyone wants to make basic statements mixed case (do they) Mixed case for me is for the variables so I get rid of dots and would have, using your example, itemCustomer itemBlah etc so readu itemCustomer from cusFil ... for instance. Mixed case is basically lower case with the occasional upper case character to split/enhance a certain variable. Not just randomly mixed case ! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kevin King Sent: 08 March 2008 17:39 To: u2-users@listserver.u2ug.org Subject: Re: [U2] blank lines in code / mixed case I am admittedly a dinosaur of the upper-case bent with U2. Before I put on my flame suit, hear me out.. We developers type thousands - possibly even millions - of characters of code per year To press the letter R with caps lock on or off is only one keypress - keeping in mind the state of the cApS LocK. To type READU then is only 5. ReadU however, is 7 - an increase of 40%. Now, assuming that a typical program is 4000 characters, there's a potential of an additional 1000+ shift keypresses just to maintain case. Meaningless, you say? Everything we do takes an investment of time, and even a fraction of a second can turn into a significant investment when multiplied times millions of occurrences. In Java, PHP, etc., mixed case code has been the norm from the beginning. People don't think about writing these languages in upper case because they were never designed to be written that way. BASIC, however has its roots in upper case, and - here's my big point - not being forced into mixed case provides a significant opportunity to produce more code in less time simply because of the reduced number of keystrokes. Also on the topic of productivity, a variable named ITEM.CUSTOMER has one presentation, no variants. Mixing case on this variable produces a number of variants which may be easily mistyped thus potentially increasing debugging time. I will admit, because I don't use mixed case I don't know if there's a compiler option that will allow ITEM.CUSTOMER and ItEm.CuStoMerto be the same variable, but even if such a thing exists, isn't that just adding confusion to whomever has to compile this thing six months from now? Those who have gone through my training have likely heard my rule about there's a time and place for everything, and it's not always and it's not never. Anyone who always writes in mixed case regardless of the language or environment, or anyone who never writes in mixed case for the same reason may very well be missing productivity gains, regardless of how distasteful the caps lock key might be to them personally. Yes, I do use mixed case - in user prompts - because the audience (i.e. users) interprets meaning in the case of a message. And one last point to really fire up some folks: To those who think mixed case is more readable, I offer this: It's syntax, not literature. While we should do everything we can to make the code as human readable as possible, greater readability gains are available through structural protocol than changing READU to ReadU. To put so much energy in all these extra keystrokes and then to create a 3000 line routine with 1200 GOTOs (oops, I meant GoTo's) is ... in my opinion... a lot of effort with minimal - if any - ROI. So, without turning this into a holy war, why do you prefer mixed case? -K --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/