Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Tabs vs Spaces #165

Closed
ProLoser opened this Issue Aug 18, 2012 · 22 comments

Comments

Projects
None yet
6 participants
Owner

ProLoser commented Aug 18, 2012

I think the inconsistency is starting to become a problem. Of course it could just be that we must give people explicit instructions NOT to change the indentation format. Or we could just hold a vote and convert everything over to the new format in the next release.

Contributor

boneskull commented Aug 18, 2012

I would be all for that. My IDE will reformat stuff however I want it with minimal effort, so I could take care of this once we've decided.

I vote for 4 spaces.

On Aug 18, 2012, at 1:30 AM, Dean Sofer notifications@github.com wrote:

I think the inconsistency is starting to become a problem. Of course it could just be that we must give people explicit instructions NOT to change the indentation format. Or we could just hold a vote and convert everything over to the new format in the next release.


Reply to this email directly or view it on GitHub.

Owner

ProLoser commented Aug 18, 2012

Why do people like spaces?

+1 for deciding and re-formatting everything now and stick to it. As soon as we've got the decision I could change formatter in my IDE and would stop worrying about reformating the whole file. This change would also make lint happy as today it complains about mixed tabs and spaces.

As for votes, I really don't mind either way, spaces, tabs, whatever, as long as it is consistent.

Contributor

ajoslin commented Aug 18, 2012

Ya, we should be consistent. I vote for two spaces or two-wide tabs.

Sent from my iPhone

On Aug 18, 2012, at 4:30 AM, Dean Sofer notifications@github.com wrote:

I think the inconsistency is starting to become a problem. Of course it could just be that we must give people explicit instructions NOT to change the indentation format. Or we could just hold a vote and convert everything over to the new format in the next release.


Reply to this email directly or view it on GitHub.

Contributor

dandoyon commented Aug 18, 2012

I was following angularjs, two spaces, they called tabs evil. I'm ambivalent. +1 for consistency

Sent from my iPhone

On Aug 18, 2012, at 5:27 AM, Andy Joslin notifications@github.com wrote:

Ya, we should be consistent. I vote for two spaces or two-wide tabs.

Sent from my iPhone

On Aug 18, 2012, at 4:30 AM, Dean Sofer notifications@github.com wrote:

I think the inconsistency is starting to become a problem. Of course it could just be that we must give people explicit instructions NOT to change the indentation format. Or we could just hold a vote and convert everything over to the new format in the next release.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

Owner

petebacondarwin commented Aug 18, 2012

Tabs are evil (and not allowed as far as I know in coffeescript for
indentation).
I would go for 2 spaces as in javascript you tend to get quite deep
indentation due to its lambda nature.

Pete
...from my mobile.
On Aug 18, 2012 3:09 PM, "Dan Doyon" notifications@github.com wrote:

I was following angularjs, two spaces, they called tabs evil. I'm
ambivalent. +1 for consistency

Sent from my iPhone

On Aug 18, 2012, at 5:27 AM, Andy Joslin notifications@github.com
wrote:

Ya, we should be consistent. I vote for two spaces or two-wide tabs.

Sent from my iPhone

On Aug 18, 2012, at 4:30 AM, Dean Sofer notifications@github.com
wrote:

I think the inconsistency is starting to become a problem. Of course
it could just be that we must give people explicit instructions NOT to
change the indentation format. Or we could just hold a vote and convert
everything over to the new format in the next release.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/angular-ui/issues/165#issuecomment-7844749.

Contributor

boneskull commented Aug 18, 2012

Yeah, absolutely no tabs. I guess I can live with 2 spaces. :D

On Aug 18, 2012, at 7:13 AM, Pete Bacon Darwin notifications@github.com wrote:

Tabs are evil (and not allowed as far as I know in coffeescript for
indentation).
I would go for 2 spaces as in javascript you tend to get quite deep
indentation due to its lambda nature.

Pete
...from my mobile.
On Aug 18, 2012 3:09 PM, "Dan Doyon" notifications@github.com wrote:

I was following angularjs, two spaces, they called tabs evil. I'm
ambivalent. +1 for consistency

Sent from my iPhone

On Aug 18, 2012, at 5:27 AM, Andy Joslin notifications@github.com
wrote:

Ya, we should be consistent. I vote for two spaces or two-wide tabs.

Sent from my iPhone

On Aug 18, 2012, at 4:30 AM, Dean Sofer notifications@github.com
wrote:

I think the inconsistency is starting to become a problem. Of course
it could just be that we must give people explicit instructions NOT to
change the indentation format. Or we could just hold a vote and convert
everything over to the new format in the next release.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/angular-ui/issues/165#issuecomment-7844749.


Reply to this email directly or view it on GitHub.

Contributor

dandoyon commented Aug 18, 2012

I do have to say, I've been pretty fine with 2 spaces

Contributor

boneskull commented Aug 18, 2012

Sounds like we have a majority in agreement.

On Aug 18, 2012, at 8:55 AM, Dan Doyon notifications@github.com wrote:

I do have to say, I've been pretty fine with 2 spaces


Reply to this email directly or view it on GitHub.

Contributor

boneskull commented Aug 18, 2012

Next, how do we get the CoffeeScript out of the codebase? :D

Earlier I said I'd be ok with it if someone found they were more productive coding in it, but after editing a .coffee file or two I've changed my mind.

My reasoning is that everybody who programs JS knows JS and not everyone knows CS, which can be an impediment to contributing. I feel it's more of a write-only language as it's kind of terse and not obvious what the syntax means. Thirdly it introduces a dependency and extra build step that we don't really need.

I understand if others are not in agreement, and that's fine, I just wanted to voice my opinion in the off chance that somebody agreed with me. JS is good enough for me.

Also, if we end up with some markup somewhere, let's please not write it in Jade. HTML is good enough for me.

Chris

On Aug 18, 2012, at 8:58 AM, Christopher Hiller chiller@decipherinc.com wrote:

Sounds like we have a majority in agreement.

On Aug 18, 2012, at 8:55 AM, Dan Doyon notifications@github.com wrote:

I do have to say, I've been pretty fine with 2 spaces


Reply to this email directly or view it on GitHub.

Contributor

boneskull commented Aug 18, 2012

angular-ui#166

On Aug 18, 2012, at 8:58 AM, Christopher Hiller chiller@decipherinc.com wrote:

Sounds like we have a majority in agreement.

On Aug 18, 2012, at 8:55 AM, Dan Doyon notifications@github.com wrote:

I do have to say, I've been pretty fine with 2 spaces


Reply to this email directly or view it on GitHub.

So, from now on we are using 2 spaces :-)

Just a comment on coffee usage triggered by @boneskull. So, first of all I don't know coffee - I saw some examples and found them hard to read so kind of stayed away from it. It is probably just my ignorance / lack of experience but all in all I'm not great fan of coffee. I don't mind other people using it, it is just that at the moment it is a barrier for me to actively help with directives written in coffee.

For now I see 2 practical problems with coffee:

  • it might be putting off people not familiar with it (but once again, maybe the solution is to make other people learn & appreciate)
  • it makes build a bit more complex: for instance today I wanted to exclude *.coffee.js from lint task and hit a wall; once again this is probably due to my lack of knowledge / experience....

Just my 3 cents here....

Contributor

dandoyon commented Aug 18, 2012

I'll chime in on coffee, Initially, when using it and getting used to its structure (which took all of a day) I liked it. Problem is, if you don't use it constantly (which I don't), then you have to go back to doc to remember "how does that ()-> work" and that "indentation matters". IMHO, I would say that we should probably stick with POJS. However, I would say that for those who want to keep with coffee, I might recommend

- make pull requests WITH the coffee generated script, with the comment at top that it was generated by coffeescript, so then people looking at the extra return statements are not wigged out even if they don't know coffeescript, the fact that at the top it states that its generated should be a giveaway.

- the coffee script could be included in pull request, however the build process would not do anything with it.  This way anyone interested in it could use it.  But, then of course there could be confusion so this may not be a good thing generally speaking. 

How does this sound?

--dan

On Aug 18, 2012, at 10:55 AM, Pawel Kozlowski wrote:

Just a comment on coffee usage triggered by @boneskull. So, first of all I don't know coffee - I saw some examples and found them hard to read so kind of stayed away from it. It is probably just my ignorance / lack of experience but all in all I'm not great fan of coffee. I don't mind other people using it, it is just that at the moment it is a barrier for me to actively help with directives written in coffee.

For now I see 2 practical problems with coffee:

it might be putting off people not familiar with it (but once again, maybe the solution is to make other people learn & appreciate)
it makes build a bit more complex: for instance today I wanted to exclude *.coffee.js from lint task and hit a wall; once again this is probably due to my lack of knowledge / experience....
Just my 3 cents here....


Reply to this email directly or view it on GitHub.

Contributor

ajoslin commented Aug 18, 2012

I'm also not a fan of coffee - I have used it and can write/read it, but many cant. And when the guy who wrote something in coffee is away, it can be a problem.

Sent from my iPhone

On Aug 18, 2012, at 1:55 PM, Pawel Kozlowski notifications@github.com wrote:

Just a comment on coffee usage triggered by @boneskull. So, first of all I don't know coffee - I saw some examples and found them hard to read so kind of stayed away from it. It is probably just my ignorance / lack of experience but all in all I'm not great fan of coffee. I don't mind other people using it, it is just that at the moment it is a barrier for me to actively help with directives written in coffee.

For now I see 2 practical problems with coffee:

it might be putting off people not familiar with it (but once again, maybe the solution is to make other people learn & appreciate)
it makes build a bit more complex: for instance today I wanted to exclude *.coffee.js from lint task and hit a wall; once again this is probably due to my lack of knowledge / experience....
Just my 3 cents here....


Reply to this email directly or view it on GitHub.

Owner

petebacondarwin commented Aug 18, 2012

:-P

Pete
...from my mobile.
On Aug 18, 2012 8:00 PM, "Andy Joslin" notifications@github.com wrote:

I'm also not a fan of coffee - I have used it and can write/read it, but
many cant. And when the guy who wrote something in coffee is away, it can
be a problem.

Sent from my iPhone

On Aug 18, 2012, at 1:55 PM, Pawel Kozlowski notifications@github.com
wrote:

Just a comment on coffee usage triggered by @boneskull. So, first of all
I don't know coffee - I saw some examples and found them hard to read so
kind of stayed away from it. It is probably just my ignorance / lack of
experience but all in all I'm not great fan of coffee. I don't mind other
people using it, it is just that at the moment it is a barrier for me to
actively help with directives written in coffee.

For now I see 2 practical problems with coffee:

it might be putting off people not familiar with it (but once again,
maybe the solution is to make other people learn & appreciate)
it makes build a bit more complex: for instance today I wanted to
exclude *.coffee.js from lint task and hit a wall; once again this is
probably due to my lack of knowledge / experience....
Just my 3 cents here....


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/angular-ui/issues/165#issuecomment-7847055.

Owner

petebacondarwin commented Aug 18, 2012

Looks like I'm the only one who thinks coffeescript is the mutts nuts. Feel
free to rip it out of the project I'm happy to play jazz and classical.

Pete
...from my mobile.
On Aug 18, 2012 8:26 PM, "Peter Bacon Darwin" pete@bacondarwin.com wrote:

:-P

Pete
...from my mobile.
On Aug 18, 2012 8:00 PM, "Andy Joslin" notifications@github.com wrote:

I'm also not a fan of coffee - I have used it and can write/read it, but
many cant. And when the guy who wrote something in coffee is away, it can
be a problem.

Sent from my iPhone

On Aug 18, 2012, at 1:55 PM, Pawel Kozlowski notifications@github.com
wrote:

Just a comment on coffee usage triggered by @boneskull. So, first of
all I don't know coffee - I saw some examples and found them hard to read
so kind of stayed away from it. It is probably just my ignorance / lack of
experience but all in all I'm not great fan of coffee. I don't mind other
people using it, it is just that at the moment it is a barrier for me to
actively help with directives written in coffee.

For now I see 2 practical problems with coffee:

it might be putting off people not familiar with it (but once again,
maybe the solution is to make other people learn & appreciate)
it makes build a bit more complex: for instance today I wanted to
exclude *.coffee.js from lint task and hit a wall; once again this is
probably due to my lack of knowledge / experience....
Just my 3 cents here....


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/angular-ui/issues/165#issuecomment-7847055.

Owner

ProLoser commented Aug 18, 2012

I realize if we all adopted CS it would probably be a lot better, but my biggest frustration with HarvestHQ/Chosen was that it was written in CS. It exponentially increased the difficulty for me to contribute as I had never worked with CS before. That is slightly a concern for me for our users since this lib is almost as much a learning and example tool as it is a utility suite.

@ProLoser ProLoser reopened this Aug 18, 2012

Owner

petebacondarwin commented Aug 18, 2012

Well in that case it showcases how to write directives in coffeescript ;-)
for learning purposes of course!

Pete
...from my mobile.
On Aug 18, 2012 8:31 PM, "Dean Sofer" notifications@github.com wrote:

I realize if we all adopted CS it would probably be a lot better, but my
biggest frustration with HarvestHQ/Chosen was that it was written in CS. It
exponentially increased the difficulty for me to contribute as I had never
worked with CS before. That is slightly a concern for me for our users
since this lib is almost as much a learning and example tool as it is a
utility suite.


Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/angular-ui/issues/165#issuecomment-7847301.

Owner

ProLoser commented Aug 18, 2012

Wait I realize I've been completely out voted but I really want to know, WHY does everyone hate tabs? I have heard 'tabs are evil' a lot but never understood why.

I have always been against spaces for 2 reasons:

  • You force people to indent their code how YOU think it should be, rather than letting them choose.
  • A tab is 1 physical indentation character. Not everyone has shiny (or smart) IDE's.

I am quite aware that I'm outnumbered on more than just this project however.

Edward's reason against tabs used to be that it didn't "look pretty" when viewed on Github but that sort of seemed like a silly excuse to change how you code.
I figure if a tab character was used, the question of 2 vs 4 spaces would be irrelevant.

Owner

ProLoser commented Aug 18, 2012

We can't have both generated JS and CS files next to each other. It would create an inconsistency similar to what we've been seeing with building the project.

@petebacondarwin looks like you and I will have to be backing down lol.

@ProLoser ProLoser closed this Aug 18, 2012

Contributor

ajoslin commented Aug 18, 2012

Dean, I like 2 spaces better than tabs because 2 spaces always look two-wide in every editor, while a tab will look like 4 in some places, 8 in some places, or two in others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment