Closed Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Coding style.

  1. #1
    Chinmoy's Avatar
    Chinmoy is offline Programming Expert
    Join Date
    Feb 2008
    Location
    where heaven meets earth
    Posts
    410
    Rep Power
    18

    Coding style.

    What coding style do you follow? It is good to follow a certain standard for better coding experience. See here : http://techarraz.com/2008/06/08/tren...-coding-style/
    God is real... unless declared an integer

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    owenclivet is offline Newbie
    Join Date
    Jun 2008
    Posts
    4
    Rep Power
    0

    Re: Coding style.

    coding shud be done nicely
    only
    Last edited by WingedPanther; 06-09-2008 at 08:48 AM. Reason: delete spam links

  4. #3
    Chinmoy's Avatar
    Chinmoy is offline Programming Expert
    Join Date
    Feb 2008
    Location
    where heaven meets earth
    Posts
    410
    Rep Power
    18

    Re: Coding style.

    Agreed. I wanted a response, not an echo!
    God is real... unless declared an integer

  5. #4
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,174
    Blog Entries
    13
    Rep Power
    114

    Re: Coding style.

    I think you should use the style of programming that you feel most comfortable with. It's like playing an instrument, painting a picture or masturbating - everybody does it their own way.

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

  6. #5
    Join Date
    Oct 2007
    Posts
    538
    Rep Power
    21

    Re: Coding style.

    It doesn't matter as long as anyone you work with agrees on a common standard. I'd also follow any language specific conventions. I hate camel case but will use it in places it is expected such as Java.

    I think more important is keeping your design sane by refactoring it to resist design rot in any case.

  7. #6
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,174
    Blog Entries
    13
    Rep Power
    114

    Re: Coding style.

    The code should be as efficient as possible, though, especially when writing games.

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

  8. #7
    Join Date
    Oct 2007
    Posts
    538
    Rep Power
    21

    Re: Coding style.

    Quote Originally Posted by Xav View Post
    The code should be as efficient as possible, though, especially when writing games.
    I think this might be on the wrong thread but I disagree strongly here. It's been proven nearly the point where its a law of nature that about 3% of our code accounts for 95% of our run time. Even if you reduce the overhead of the other 97% to zero you are only saving 5% of your resources.

    The best approach is to produce the absolute simplest design possible and keep code cohesive and decoupled. This wrecks performance but makes optimisation easy. The worse thing you will ever have to do is try and optimise a code base that has been 'optimised' already. It makes real advancement extremely difficult. Premature optimisation really is the root of all evil. That said games development is well understood and they know exactly which sections will need the most efficiency.

  9. #8
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,174
    Blog Entries
    13
    Rep Power
    114

    Re: Coding style.

    I disagree again - optimisation is crucial when writing games. In the rare times I have tried writing them using XNA with C#, my system slows to a crawl, with frame rates of around 1fps. And why? Because I had not optimised my code, and I was declaring a variable too many times. Once I had optimised, the frame rates climbed. From a book I have been reading, in the author's example, he wrote a game for Xbox 360. It was running at about 100fps. He did a couple of simple optimisations (like making a variable instantiated less often) and the frame rate soared to over 3000fps! Optimisation is very, VERY important in games.

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

  10. #9
    Chinmoy's Avatar
    Chinmoy is offline Programming Expert
    Join Date
    Feb 2008
    Location
    where heaven meets earth
    Posts
    410
    Rep Power
    18

    Re: Coding style.

    Xav, G_morgan was talking about 'premature optimization'. That means someting else than what you are debating on. And yes, optimization is important, but you should focus on the completion of the project first. An incomplete code is impossible to optimize. And may I know the name of the game your author wrote cz, Xbox games are made by companies, not individuals! And there work is divived, so the optimization team has to be seperate than the framebuffer management team..or whatever it is called...
    God is real... unless declared an integer

  11. #10
    Chinmoy's Avatar
    Chinmoy is offline Programming Expert
    Join Date
    Feb 2008
    Location
    where heaven meets earth
    Posts
    410
    Rep Power
    18

    Re: Coding style.

    And, whether you do it your way or following a standard depends of what type of a coder you are. If you are making school projects, which you are Xav, I think individual style works, but in a team you have to follow a standard. This is the standard widely followed.
    God is real... unless declared an integer

Closed Thread
Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. p style border help!
    By j.lai in forum HTML Programming
    Replies: 5
    Last Post: 06-07-2010, 06:54 AM
  2. SEO - Google Style
    By BlaineSch in forum Search Engine Optimization
    Replies: 6
    Last Post: 07-28-2009, 01:03 AM
  3. How to change the style of the form ?
    By kresh7 in forum Visual Basic Programming
    Replies: 84
    Last Post: 08-17-2008, 06:18 PM
  4. Html with style
    By priorityone in forum HTML Programming
    Replies: 5
    Last Post: 01-29-2007, 08:50 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts