If looking for a programing language that is more suited to a text reader,
then I'd suggest VB, where blocks are more self descriptive, eg:  If ...
Then ... Else .. End If.

|-----Original Message-----
|From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-
|boun...@ozdotnet.com] On Behalf Of Ben Scott
|Sent: Thursday, 14 February 2013 10:59 AM
|To: ozDotNet
|Subject: Re: does anyone know a good technique to keep track of your braces
in
|C#?
|
|Katherine, from what I understand you are vision-impaired? I can understand
that
|braces would quickly become a problem for you. Maybe you could look into a
|language like F# which uses tabs for nesting rather than braces. There
would be a
|learning curve but that may be worthwhile in the long term. Other
alternatives
|are Ruby and Coffeescript - Coffeescript may be a good start as you may be
able
|to leverage that in to developing Javascript-based Windows 8 apps.
|
|Other than that I would recommend just making sure each brace is on a new
line
|so that you can see the nesting. It is tempting to cram as much on each
line but in
|the long run spreading it out makes it much easier to maintain. Also use a
brace
|whenever you can, so no shortcuts like:
|
|if (something) Foo();
|
|Instead always do:
|
|if (something)
|{
|    Foo();
|}
|
|
|
|
|On Thu, Feb 14, 2013 at 9:42 AM, Craig van Nieuwkerk <crai...@gmail.com>
|wrote:
|
|
|       Sounds like you have too much nesting. If you have more than a
couple
|of levels maybe try separating it out into new methods. Hard to tell
without
|seeing the code.
|
|
|       On Thu, Feb 14, 2013 at 10:37 AM, Katherine Moss
|<katherine.m...@gordon.edu> wrote:
|
|
|               Hello all,
|               Does anyone know any methods I could use when practicing
|programming in C# (I'm kind of just learning, so it can get annoying
sometimes),
|to keep my braces straight?  I will be writing something simple, and then
before I
|know it, I'll have fifty errors show up all because of one brace not closed
or two
|braces in the wrong place.  Very annoying when fifty errors come up because
of a
|single problem.  And not only in keeping track of braces, I'm also confused
as to
|what goes in between braces since C# gets layered sometimes in terms of
code
|blocks.  Books demonstrate examples well, however, they do not do a very
good
|job telling you where braces go to begin with and why.  Responses would be
|great on this.  Thanks.
|
|
|
|


Reply via email to