Hi there, I'm wondering how did you (the original WebKit developers) recommend to configure Xcode (I'm using 2.1) in order to edit WebKit files. Right now it's very strange for me because there is something in the coding style that really doesn't reflect my own. Lines are wider than wide, for example, as message sends are almost never broken in multiple lines. Maybe is that I have to get used to it, or that my PowerBook 15 screen is smaller than the ones in which it was developed, don't know. So I think it would help us knowing what layout and preferences are you using or recommending in order to adapt my environment. I also think that that "never break a message" should be in the coding guidelines if it is the preferred form. Cheers, David.
On Jun 10, 2005, at 12:49 PM, David Lázaro Saz wrote:
I'm wondering how did you (the original WebKit developers) recommend to configure Xcode (I'm using 2.1) in order to edit WebKit files. Right now it's very strange for me because there is something in the coding style that really doesn't reflect my own. Lines are wider than wide, for example, as message sends are almost never broken in multiple lines.
The only important settings are to set Indentation as follows: - do *not* insert tabs instead of spaces - tab width: 8 (won't matter once we expunge all the tabs, but that could take a while) - indent width: 4 But I don't think this addresses the issue we are talking about. I think you're correct if you're saying that some of our source code has lines that are long and don't fit on a small screen.
Maybe is that I have to get used to it, or that my PowerBook 15 screen is smaller than the ones in which it was developed, don't know. So I think it would help us knowing what layout and preferences are you using or recommending in order to adapt my environment.
Some of us do use computers with screens that size, but most use much bigger screens. I do a lot of my work on a PowerBook 17".
I also think that that "never break a message" should be in the coding guidelines if it is the preferred form.
I'm not sure I'd put it quite like that. We will put parameters to function calls on different lines if the line gets super long, but I agree it would be good to somehow address this in the coding guidelines. As far as personal preferences are concerned, if there is a function call line that's very long, I prefer to make it shorter by introducing some named local variables before breaking it across multiple lines. Often naming the parameters can provide additional documentation about what's intended. -- Darin
On 10/06/2005, at 22:15, Darin Adler wrote:
I'm not sure I'd put it quite like that. We will put parameters to function calls on different lines if the line gets super long, but I agree it would be good to somehow address this in the coding guidelines.
Yes, because that is a preference that could vary wildly between different developers. I, for one, write almost vertical code. I sometimes joke calling it Chinese notation. There's also another curiosity that I'd like to know: why is the WebKit project divided in folders with the .subproj extension and only a .pbproj project file available? Isn't that too NeXT for such a modern project as the WebKit? Thanks for your previous answers, David.
On Jun 10, 2005, at 2:52 PM, David Lázaro Saz wrote:
There's also another curiosity that I'd like to know: why is the WebKit project divided in folders with the .subproj extension and only a .pbproj project file available? Isn't that too NeXT for such a modern project as the WebKit?
That's because the engineer who started that particular framework, Richard Williamson, chose that style. And it's not so easy to change such things with cvs. I suspect that if we go over to Subversion we will rename those directories, since it will then be easy to do so without damaging project history. I'd like to find a nice place on our website or Wiki to keep track of "renaming ideas". I often have files and classes I'd like to rename, and I want to float those names with the community for a while before doing the name changes. -- Darin
On 11/06/2005, at 0:08, Darin Adler wrote:
That's because the engineer who started that particular framework, Richard Williamson, chose that style. And it's not so easy to change such things with cvs. I suspect that if we go over to Subversion we will rename those directories, since it will then be easy to do so without damaging project history.
Yes, Subversion would be much nicer. Although a rename is still a delete followed by an add, the capability of following history through renaming is worth millions in flexibility and refactoring capabilities. For what is worth, I've been testing the new Xcode 2.1 support for storing bundles in Subversion today with some old projects and that was the last piece I needed for a full repository conversion. It has worked without a glitch so far.
I'd like to find a nice place on our website or Wiki to keep track of "renaming ideas". I often have files and classes I'd like to rename, and I want to float those names with the community for a while before doing the name changes.
Community-driven refactoring? Nice. The day that Xcode supports full refactoring and full plug-ins--model editor, view and editor extending, for example--I'll be so happy that I'm sure it will hurt. Cheers, David.
participants (2)
-
Darin Adler
-
David Lázaro Saz