|->src (our source code)
|->doc (our doc)
|...
|->ruby (code from c ruby)
|->lib
|->benchmark
|->sample
|->test
|...
What do you think? Thank you.
_________________________________________________________________
Catch suspicious messages before you open them謡ith Windows Live Hotmail.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_protection_0507
On 5/27/07, Xue Yong Zhi <zhixu...@hotmail.com> wrote:
>
> We have lots of ruby scripts copied from c ruby in our SVN ('benchmark',
> 'test', 'sample', 'lib\ruby'), and will add more in the future. I am
> thinking about adding a new folder called 'ruby' to host those third party
> code:
>
> |->src (our source code)
> |->doc (our doc)
> |...
> |->ruby (code from c ruby)
> |->lib
> |->benchmark
> |->sample
> |->test
> |...
>
> What do you think? Thank you.
>
> _________________________________________________________________
> Catch suspicious messages before you open them--with Windows Live Hotmail.
> http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_protection_0507
>
>
> >
>
--
Best Regards
XRuby http://xruby.com
femto http://hi.baidu.com/femto
And I agree Yongzhi's idea about re-organize the ruby scripts.
--
Michael Chen
--------------------------------
Blog: http://michael.nona.name
MSN: jzch...@hotmail.com
I feel quite the opposite as femto feels. I need to switch back and forth
between implementation and test all the time, and it is very painful to have
to go to another folder to find what I want, especially without an IDE.
You can still run all the unit tests in a folder even if the implementation
and test are mixed in the folder. I can not see a disadvantage here.
Of course if anyone has valid non-aesthetic reasons to seperate
implementation I would like to consider.
_________________________________________________________________
More photos, more messages, more storage--get 2GB with Windows Live Hotmail.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507
On May 27, 10:25 pm, "Xue Yong Zhi" <zhixuey...@hotmail.com> wrote:
> It is a widely used practice but I personally do not think it is a good
> practice, as it makes navigation in the project painful.
>
> I feel quite the opposite as femto feels. I need to switch back and forth
> between implementation and test all the time, and it is very painful to have
> to go to another folder to find what I want, especially without an IDE.
>
> You can still run all the unit tests in a folder even if the implementation
> and test are mixed in the folder. I can not see a disadvantage here.
>
> Of course if anyone has valid non-aesthetic reasons to seperate
> implementation I would like to consider.
>
>
>
>
>
> >From: "Michael Chen" <mechil...@gmail.com>
> >Reply-To: xruby...@googlegroups.com
> >To: xruby...@googlegroups.com
> >Subject: [xruby-devel] Re: New folder for third party code?
> >Date: Sun, 27 May 2007 16:45:11 +0800
>
> >No doubt, separate the java source and test source is a good practise.
>
> >And I agree Yongzhi's idea about re-organize the ruby scripts.
>
> >On 5/27/07, femto gary <femto...@gmail.com> wrote:
>
> > > And also for java test file, I believe it is best practice to use a
> >seperated
> > > test dir, just like in JRuby or springside's case, this practice is
> >widely
> > > accepted and is very well in practice. So I don't think the words from
> > > 'working effectively with legacy code' is quite valid, we don't need to
> >follow
> > > his opinion blindly.From my experience working on parser, I write some
> > > testcase of Rubyv3ParserTest, Rubyv3LexerTest, Rubyv3TreeParserTest,
> > > when I modify something, I always find it difficult to identity and
> > > find out these files in source tree,
> > > because these files are just mixed up with the source code and not
> > > aligned continuously,every time I modify something, it's quite
> > > irritating I look at the source code tree and try to find out all
> > > these 3 files and run them and let them passed, it is just irritating.
> > > What's other guys' experience? What do all of you think?
>
> > > On 5/27/07, femto gary <femto...@gmail.com> wrote:
> > > > actually I would prefer divide by funtionality rather
> > > > by source code type. People would recoginize(and find)
> > > > things by concept, rather just by source file type. say,
> > > > I want to find something related to benchmark, and I see
> > > > a folder called 'benchmark', and I think, "great, this is the folder
> > > > 'benchmark', and I can find all benchmark related stuff under here",
> > > > so if there is any Java benchmark file, I would assume it resides
> > > > in that folder too, rather than some java/benchmark folder,
> > > > that would cause least surprise.
>
> > > > On 5/27/07, Xue Yong Zhi <zhixuey...@hotmail.com> wrote:
>
> > > > > We have lots of ruby scripts copied from c ruby in our SVN
> >('benchmark',
> > > > > 'test', 'sample', 'lib\ruby'), and will add more in the future. I am
> > > > > thinking about adding a new folder called 'ruby' to host those third
> >party
> > > > > code:
>
> > > > > |->src (our source code)
> > > > > |->doc (our doc)
> > > > > |...
> > > > > |->ruby (code from c ruby)
> > > > > |->lib
> > > > > |->benchmark
> > > > > |->sample
> > > > > |->test
> > > > > |...
>
> > > > > What do you think? Thank you.
>
> > > > > _________________________________________________________________
> > > > > Catch suspicious messages before you open them--with Windows Live
> >Hotmail.
>
> >http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_m...
>
> > > > --
> > > > Best Regards
> > > > XRubyhttp://xruby.com
> > > > femtohttp://hi.baidu.com/femto
>
> > > --
> > > Best Regards
> > > XRubyhttp://xruby.com
> > > femtohttp://hi.baidu.com/femto
>
> >--
> >Michael Chen
> >--------------------------------
> >Blog:http://michael.nona.name
> >MSN: jzche...@hotmail.com
>
> _________________________________________________________________
> More photos, more messages, more storage--get 2GB with Windows Live Hotmail.http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_m...- Hide quoted text -
>
> - Show quoted text -
I use a mixed environments, including command line, eclipse, source insight
etc, and sometimes just browse the SVN in a web browser.
>problem for non-IDE user, anyway, you can just open up a dir for test and
>open those
>files using other editors.
> and two more points for seperating src dir and test dir.
I have used this in a work environment, dislike it because it wastes time as
I need to switch between windows frequently.
>First, just
>like JRuby's case,
>sometimes we want to add some file just for test purpose, like
>AlphaSingleton/BetaSingletion
>in JRuby's case, so it's better just put it in test dir there.
I see no reason why not just put those code in src dir.
> Second, for searching purpose, often I need to find out some thing
>in the src dir or test dir,
>firing up a search box in IDE and type in something to search under
>the whole project, the
>mixing of src and test is just inconvenient, yes, it's true I can (in
>theory) filter out *Test.java
>file in the file pattern, but it is just inconvient..
>
As for me, I think it is a advantage to get results from production code and
test code at the same time.
_________________________________________________________________
More photos, more messages, more storage揚et 2GB with Windows Live Hotmail.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507
> More photos, more messages, more storage-get 2GB with Windows Live Hotmail.http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_m...
I also used several computers and one has a small screen. If it is hard to
find the test files among other files, maybe we should change our naming
convention to Test***.java ('Test' as prefix). It is probably the best
approach as it combines the advantage of having production code and test
close to each other, and test files stand out because of the prefix.
Most people have not thought about this issue before making the decision to
separate src and test, and some are even surprised that they can be store
them in the same folder. I have used to separate the two for a long time,
but later find out it will save me lots of time by just having them in the
same folder -- I have been promoting this as a better way to organize code
since then. As Agile methodology becomes more adopted those days, unit tests
are not just for 'testing' in the traditionally way, it is used as of
'documentation' or 'samples'. As developer spend more time on the tests, I
think most of them would appreciate that the test code is one click away
from the production code.
_________________________________________________________________
> More photos, more messages, more storage-get 2GB with Windows Live Hotmail.http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_m...- Hide quoted text -
> > More photos, more messages, more storage-get 2GB with Windows Live Hotmail.http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_m...Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
Use **_Test.java(underscore) or whatever you feel comfortable to make test
file names stand out. I have no problem to spot the test files using the
current approach and no idea what works best for you.
> yes, unit testing can servce as 'documentation' and 'samples', but
>we
>don't mix 'documentation' and 'samples' with src, do we?
>
javadoc/rdoc is just part of the source code. I would rather have unit tests
in the same file with implemtation, but unfortunately no tools support this.
_________________________________________________________________
Catch suspicious messages before you open them謡ith Windows Live Hotmail.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_protection_0507
Thank you.
_________________________________________________________________
Like the way Microsoft Office Outlook works? You’ll love Windows Live
Hotmail.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_outlook_0507