• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: is this badly written code?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is this badly written code?


  • Subject: Re: is this badly written code?
  • From: glenn andreas <email@hidden>
  • Date: Tue, 15 Apr 2008 10:29:23 -0500


On Apr 15, 2008, at 9:25 AM, john darnell wrote:

2.)  Symmetry can add elegance to the visual aspect of your code, and
thus make it more pleasing to the eye, and easier to decipher. For
example, when I have a long list of includes, I often do this to them:

#include          <aaa.h>
#include <bbbbbbbbbbbb.h>
#include         <cccc.h>



Note that not everybody uses monospaced fonts everywhere - this is, after all, the 21st century. Especially considering that Xcode allows you to specify that different elements can be different fonts, styles, etc... For example, I've got my comments to be in a more readable non- monospaced font, and language keywords are in a bold font, etc... (funny how long it took for "modern" development systems to support features that Think Pascal nearly 20 years ago)


I've even seen code where people used "ascii art fonts" for major comment section headers. Needless to say, they are completely illegible with a non-monospaced font.

Using spaces to line up code is generally bad (tabs are somewhat better, but not perfect due to the whole "how many spaces per tab").

Maybe someday we'll be able to have real "word-processing style" formatting in source code so we can use real alignment rules, real table formatting, included image diagrams, etc... (and have semantic features so we won't have to rely on "comment markup" like HeaderDoc).



Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | prime : build, mutate, evolve, animate : the next generation of fractal art




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: is this badly written code?
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >is this badly written code? (From: "Adam Gerson" <email@hidden>)
 >Re: is this badly written code? (From: John Stiles <email@hidden>)
 >RE: is this badly written code? (From: "john darnell" <email@hidden>)

  • Prev by Date: RE: is this badly written code?
  • Next by Date: Re: Memory leak when re-alloc Methods
  • Previous by thread: Re: is this badly written code?
  • Next by thread: Re: is this badly written code?
  • Index(es):
    • Date
    • Thread