![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
![]() "L Smith" wrote in message ... Roger Long wrote: Got it! Damn parentheses. What a difference a ( ) makes. For me, one of the biggest pains in programming, and the cause of more bugs and other problems than anything else, is trying to get my parentheses in the right places. I've recently had the "opportunity" to work with the Scheme programming language. What's one of the key structural elements of its syntax? Parentheses! Talk about a user-unfriendly language. Yes, it is a big problem-- that is, until you're mind is sufficiently expanded that you look at software in a whole new way and the parenthesis "dissolve" into the background. It's almost a kind of a "magic-eye" sort of thing, IYSWIM. Good luck, hope you eventually "get it" ![]() Cheers, John Clonts Temple, Texas |
#2
|
|||
|
|||
![]()
John Clonts wrote:
Yes, it is a big problem-- that is, until you're mind is sufficiently expanded that you look at software in a whole new way and the parenthesis "dissolve" into the background. It's almost a kind of a "magic-eye" sort of thing, IYSWIM. Good luck, hope you eventually "get it" ![]() Indentation is your friend. Actually, this is related to an aviation topic: CRM. Why do some pilots highlight their route on a chart? Because this makes it far easier for the human eye to locate the route when first looking (back at) the chart. Absent this, various forms of mental processing are required. This takes time and effort. In programming, we've the same opportunity to do things in a way that reduces the need to "think" over trivia. Indentation is one good example. Whether you're programming in a C derivative (in which case you must match braces), a LIST derivative (parens), a language with BEGINs and ENDs, or anything else, doing this "matching" involves work. Proper indentation makes this much easier, as a lexical block is made visually "obvious". It's the equivilent of highlighting the route. Most modern editors will indent automatically, and even using colors or graphical markers to further enhance the display of the code. Using one of these is like shifting to the use of a moving map GPS. - Andrew |
#3
|
|||
|
|||
![]()
On Wed, 06 Aug 2003 22:05:32 -0400, L Smith
wrote: Roger Long wrote: Got it! Damn parentheses. What a difference a ( ) makes. I forget those every once in a while. :-)), at least in spreadsheets. For me, one of the biggest pains in programming, and the cause of more bugs and There is so much math required to become a programmer, I'd think that using parentheses would become second nature. Prefix, postfix, and infix. other problems than anything else, is trying to get my parentheses in the right places. You should try writing a compiler :-)) I've recently had the "opportunity" to work with the Scheme programming language. I've not heard of that, but I've been out of the business for over 5 years now. What's one of the key structural elements of its syntax? Parentheses! Parenthesis is pretty important in most programming languages and in virtually all math that is done within the programs. It sets the order in which operations are performed. True the operators such as +, -, /, *, and ^ have their own precedence, but in the end they all bow to the parenthesis. In school we had a few exercises where we had to perform the same math using prefix, postfix, and infix. Now that got *really* confusing. I don't think I could do all of them now. Actually that's not true. I know I couldn't do all of them now. :-)) Post fix is, I believe the same as RPN and I've never successfully managed to use a calculator that used RPN. Talk about a user-unfriendly language. Try straight C using pointers and dynamic memory allocation. They call it a write only language for a reason. :-)) Straight C lets you do virtually anything with almost no type checking. You can add an integer to an address, to a pointer, to a piece of text and it won't complain. More recent compilers let you turn on type checking, or more correctly they are set up for ANSI C and will allow you to turn the type checking off if you wish. Still...Write something in straight C without internal documentation and then go back six months later and try to follow what you wrote. It's a relatively elegant language that lets you write very compact code, unlike the visual counterparts which are very easy to use, but generate "bloat code". Roger Halstead (K8RI EN73 & ARRL Life Member) www.rogerhalstead.com N833R World's oldest Debonair? (S# CD-2) Rich Lemert |
|
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
AOPA Stall/Spin Study -- Stowell's Review (8,000 words) | Rich Stowell | Aerobatics | 28 | January 2nd 09 02:26 PM |
Want simple flight planning software | marc | Home Built | 13 | December 20th 04 04:36 AM |
Logging approaches | Ron Garrison | Instrument Flight Rules | 109 | March 2nd 04 05:54 PM |
us air force us air force academy us air force bases air force museum us us air force rank us air force reserve adfunk | Jehad Internet | Military Aviation | 0 | February 7th 04 04:24 AM |
"I Want To FLY!"-(Youth) My store to raise funds for flying lessons | Curtl33 | General Aviation | 7 | January 9th 04 11:35 PM |