Should the source be beautiful or ugly?

Discussion in 'HTML & Website Design' started by abcdefGARY, Jan 6, 2008.

  1. #1
    So, this is sort of an opinion question. But should the source code appear beautiful (with even spacing of text, lines, etc.) or ugly (where everything is everywhere)?

    There is an advantage to beautiful code and that is that it appears to look more professional.

    However, the advantage to ugly code is that most will have a hard time trying to copy your site, etc. and that does slim down the file size by a bit.

    What about in terms of SEO? Will search engines crawl beautiful codes faster than ugly ones?
     
    abcdefGARY, Jan 6, 2008 IP
  2. VimF

    VimF Well-Known Member

    Messages:
    307
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    118
    #2
    It doesn't matter in term of SEO.

    But clean and proper coding make the site easy to update, maintain... especially when there will be more than one guy working on the site.
     
    VimF, Jan 6, 2008 IP
  3. bogs

    bogs Active Member

    Messages:
    2,142
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    80
    #3
    ^^thats right... but of course if you can make your code more shorter much better.. try to save some script as different file and just call it your page, since some scripts are crawlable... this can help bots to crawl the page faster..
     
    bogs, Jan 6, 2008 IP
  4. meridiancrest

    meridiancrest Peon

    Messages:
    171
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I prefer my code to look clean and organized.
     
    meridiancrest, Jan 6, 2008 IP
  5. cff

    cff Active Member

    Messages:
    114
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    53
    #5
    Clean and proper coding all the way. Nowadays I don't think that "stealing" code is an issue. There is nothing that you could have in you page that is not in another place or coudn'd be leard easly (unless we are takling about some fancy fancy javascript functions)
     
    cff, Jan 7, 2008 IP
  6. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #6
    More of the consideration is not people "stealing it" but the fact that the comments/ line spaces etc all add bytes to the file size which impacts speed of loading (minimal) and bandwidth useage.

    For your average hobby/ SME site it is next to nothing and so not really an issue. For a large corporate site receiving millions of page hits per day it can make a noticable cost difference in bandwidth.

    Interestingly with Ajax.Net the code for production and debugging is different - debug is nicely spaced and commented. Production the complete 1000+ line js file is written as a single line with not a single unnecessary space etc.
     
    AstarothSolutions, Jan 7, 2008 IP
  7. 123ecart

    123ecart Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    imho - if the site was built for a client, the source code should be written in such a way that the webmaster after you doesn't have to waste a lot of time trying to figure it out.
     
    123ecart, Jan 7, 2008 IP
  8. btsx

    btsx Well-Known Member

    Messages:
    223
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    110
    #8
    Interestingly most of the major commercial sites do not have nice, easily readable code.
     
    btsx, Jan 7, 2008 IP
  9. leviathan400

    leviathan400 Active Member

    Messages:
    451
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #9
    it should be beautiful imo.

    proper spacing, tabs etc.

    as if it was a c++/jave etc program.
     
    leviathan400, Jan 7, 2008 IP
  10. SalahStudios.com

    SalahStudios.com Well-Known Member

    Messages:
    169
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    121
    #10
    Clean, easy to read code is always the way to go for me. I don't think there is any benefit in making code "sloppy" to ward off stealing, if someone really wants to take it at best you'll slow them down a bit.
     
    SalahStudios.com, Jan 7, 2008 IP
  11. VeryCheaptemplates

    VeryCheaptemplates Active Member

    Messages:
    486
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #11
    Hey! :mad:
    Ugly codes need love too.
     
    VeryCheaptemplates, Jan 7, 2008 IP
  12. dpuser123

    dpuser123 Peon

    Messages:
    137
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Yeah, I would definitely say that your code need to be clean and organized. It will be easier for you to make changes, updates, etc... even if someone can copy it, it does not mean that their site will be successful.
     
    dpuser123, Jan 10, 2008 IP
  13. Kieran.in

    Kieran.in Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Thats because they think of it as a layer of security.

    Scares away script-kiddies, and people who wish to steal source :) Also you see a lot of sites with "one-lined" source, which is basically a compression method.

    They strip out like all the spaces, and comments to make the file smaller. Small difference in size, however, with the amount of traffic they recieve, it's going to lighten their bandwidth usage.
     
    Kieran.in, Jan 10, 2008 IP
  14. jams44

    jams44 Peon

    Messages:
    74
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    On the topic of comments. I have gotten into the habit of indexing all comments to reduce load speed on pages. For example:

    on my php page -

    <?php request_file(....) ?> //c. 34


    and on my comment indexer

    //c. 34
    Blah Blah Blah

    While I think in some cases comments are necessary, when a client requests them, I prefer this method.
     
    jams44, Jan 10, 2008 IP
  15. Firegirl

    Firegirl Peon

    Messages:
    1,257
    Likes Received:
    105
    Best Answers:
    0
    Trophy Points:
    0
    #15
    I like clean and organized code. When looking at other sites that I like, I tend to respect other webmasters more when they have a nice site, but also spent a lot of time organizing and cleaning their code. It also helps in finding tiny mistakes and mispellings in your codes which can help in SEO....
     
    Firegirl, Jan 10, 2008 IP
  16. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Well spaced and indented code here. Does anyone have a good tutorial on indenting HTML? Sorry, i dont mean to steal your thread.
     
    nicangeli, Jan 10, 2008 IP
  17. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #17
    Personally i'll make a sites code look as beautiful as I want it to. If someone wants to copy the site then they will, no point in trying to stop it unless you really want to get into legal issues, etc.
     
    twistedspikes, Jan 10, 2008 IP
  18. jams44

    jams44 Peon

    Messages:
    74
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Mimicry is the best form of flattery. So why not just make it pretty for people to copy!
     
    jams44, Jan 10, 2008 IP
  19. abcdefGARY

    abcdefGARY Well-Known Member

    Messages:
    665
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #19
    But then who would know and how could you tell which is the original code?
     
    abcdefGARY, Jan 19, 2008 IP
  20. Pentane

    Pentane Peon

    Messages:
    167
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Should be w3 compliant. Period.
     
    Pentane, Jan 19, 2008 IP