Thread: indentation o indentation!

  1. #16
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by rogster001 View Post
    after recently being moaned at again for indentation i am a bit mystified by this, its just so subjective, no matter what you do always someone will complain they find it hard to read because they are used to something different, basically i go with the indentation defaults that are produced by code::blocks, if i type a for loop and press enter after the opening curly braces the cursor gets indented and i am happy with that, a nested loop will be indented again and so forth, equally when i add the closing brace it automatically tabs it back in line with the opening braces for that statement block, happy days, i dont mind that at all, suits me fine and find it quite readable.

    yet when i posted code with this layout recently i got moaned at by the first reply over dreadful indentation, why???

    I have read loads of code online and in textbooks and have never seen one conventional style being adhered to, barely the broadstrokes concur, as i read in one C++ guide a nice comment about design was 'i am far more interested in shipping product than producing nice design diagrams and methodology and producing perfect indentation that everyone agrees is perfect. far too much is made of this.

    i think this is a nice point!
    There are several different styles of indentation out there, it is true. But as long as you pick one, no one will yell at you even if we prefer one of the others. It is far far far far far more important that you have indented source code, then that you pick 1TBS over Allman or whatever.

  2. #17
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Albeit badly paraphrased, your point was good. Design is more important
    In my experience, sloppy coders are sloppy designers, and meticulous coders are meticulous designers. You can't be a meticulous designer, then just flip a switch and write sloppy code; it goes too much against the grain. So it's usually a safe assumption that if the code is written without a care, the design is likely to be poor as well.
    My best code is written with the delete key.

  3. #18
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Quote Originally Posted by rogster001 View Post
    well there are certainly some freudian classics that could be applied yes..but obbsessing over minutae is what it is all about like you say, otherwise no software would be released to start with, not working versions anyhow
    It's a lot like preparing a meal, actually. Presentation doesn't make the food taste any better, but it makes a big difference nonetheless.

    The main thing to remember, though, is just to be consistent. Choose a good style and stick with it.

  4. #19
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472
    then could we say as a chef would...'the first byte is with the eyes'

    ....i'll get my coat...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 05-23-2009, 06:20 PM
  2. Indentation in Code::Blocks
    By PING in forum Tech Board
    Replies: 8
    Last Post: 03-26-2008, 03:33 PM
  3. Fixing the Indentation draft
    By Elysia in forum A Brief History of Cprogramming.com
    Replies: 47
    Last Post: 02-23-2008, 11:17 AM
  4. setting indentation in dev-c++
    By richdb in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 06-12-2006, 08:03 PM
  5. indentation error
    By cc870 in forum C Programming
    Replies: 3
    Last Post: 06-24-2005, 11:06 AM