Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 02-28-2013, 03:07 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by KLS View Post
(moving to spaces over tabs for instance)
I disagree with spaces over tabs. I think it would be fine to use spaces over tabs in cases such as structs or comments, just to standardize them, but for everything else (like tabbing out functions), I think spaces would suck.

Spaces are much harder to tell if you have the correct number of them for the current line you are writing. Of course, most editors will set you at the correct place automatically, but accidentally deleting an extra space will throw off the whole block you are working on if you keep working from that line on.

All decent editors allow you to tab out blocks of code by selecting the code and hitting tab X number of times. If you try that with space, it deletes your code and replaces it with a space. Even manually cleaning up formatting with this technique is much easier than doing it line by line with spaces.

If you are writing a new line of code and at the beginning of the line, you can hit tab a few times to put your code's start at the right position, but spaces would be a lot more. That is assuming you mean using multiple spaces in place of each tab. If planning to use a single space in place of each tab, that would just make it that much harder to read the format IMO.

Tabbing allows for easier movement around the source. I am sure there are alternatives to get around quickly, but tabs keep it nice and simple.

The only advantage I am aware of that spaces give over tabs is that all editors will display them the same so everything will line up no matter what you are using to view/edit the source. This is nice, but I think the benefits of tabs far outweighs a few comments (or whatever) not lining up. Maybe I am missing something?

I should have mentioned this in IRC when it was discussed a while back, but by the time I saw it the conversation had moved on and I forgot to get back to it.

Of course, it isn't my call and I am sure everyone can get by with whichever path is chosen. I just prefer stuff being easier/faster vs. lining up 100% of the time in every possible view. It will be great to have set standards for the project though. Many people are used to different styles and there is quite a mix in the source. At least with standards, some real formatting cleanup can be done throughout the source and not have people cleaning it up in their own way
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 02-28-2013, 03:26 AM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

Yeah, but all editors can be set up to have the tab key insert spaces. (all as in all but maybe notepad ...)
Reply With Quote
  #3  
Old 02-28-2013, 03:59 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by demonstar55 View Post
Yeah, but all editors can be set up to have the tab key insert spaces. (all as in all but maybe notepad ...)
That would help with some of the inconvenience of using spaces over tabs, but can you also configure them to backspace to delete a tab worth of spaces in a single button press? My carpal tunnel is bad enough that I try to keep things as minimal as possible when I can.

Pretty simple change to switch tabs to use space for Notepad++ here:
http://stackoverflow.com/questions/4...tabs-to-spaces

Either way, I like it when stuff works out of the box without requiring configuring stuff like editors to simplify things. No doubt people will be coding without awareness of that setting and it would be harder on them. Even if it is a simple configuration change, I think no change required is still best.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 02-28-2013, 09:35 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Decrease indent by a tab worth of spaces on any Windows editor worth something: shift+tab.

Pretty sure Vim has a way to decrease indent too but I don't use it enough to know how offhand.
Reply With Quote
  #5  
Old 02-28-2013, 08:56 PM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

Quote:
Any (commercial) software developers here that have joined an established company will most likely all have a similar story. They are handed the coding standard and expected to write code which conforms to it. End of story.
This not a company though, it is a handful of people developing the source in their limited spare time. Making the process more burdensome may raise the level entry for new contributors and discourage others.
Reply With Quote
  #6  
Old 02-28-2013, 09:34 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

Quote:
Originally Posted by Kayen View Post
This not a company though, it is a handful of people developing the source in their limited spare time. Making the process more burdensome may raise the level entry for new contributors and discourage others.
But standardizing things can help with maintenance by the other devs
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:56 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3