TDD and static and dynamic languages

View: New views
12 Messages — Rating Filter:   Alert me  

TDD and static and dynamic languages

by Josue :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello all,

I have a doubt. Is it is not harder to do TDD in  dynamic languages than in
static typed languages, especially in refactoring? For example, in Java I
can right click a method and apply the rename refactoring, and all
references will be changed. I suppose that in dinamic languages that is not
possible. Or is it? Sorry if it is a stupid question, but I never programmed
in such kind of language, but read about its concepts.

If refactoring is the weakness of dynamic languages (to TDD), what is its
strength?

Abraços,

Josué.


[Non-text portions of this message have been removed]


Re: TDD and static and dynamic languages

by Joshua Kerievsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Josue,

The world's first genuine automated refactoring tool was written for Smalltalk, a dynamic language.  It supported many sophisticated refactorings.  So it is possible to have such tools in dynamically-typed languages.  

Best
Jk
Sent via BlackBerry from T-Mobile

-----Original Message-----
From: Josue Barbosa dos Santos <josuesantos@...>

Date: Wed, 26 Aug 2009 23:53:11
To: <testdrivendevelopment@...>
Subject: [TDD] TDD and static and dynamic languages


Hello all,

I have a doubt. Is it is not harder to do TDD in  dynamic languages than in
static typed languages, especially in refactoring? For example, in Java I
can right click a method and apply the rename refactoring, and all
references will be changed. I suppose that in dinamic languages that is not
possible. Or is it? Sorry if it is a stupid question, but I never programmed
in such kind of language, but read about its concepts.

If refactoring is the weakness of dynamic languages (to TDD), what is its
strength?

Abraços,

Josué.


[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links





------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/testdrivendevelopment/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/testdrivendevelopment/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:testdrivendevelopment-digest@...
    mailto:testdrivendevelopment-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    testdrivendevelopment-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


Re: TDD and static and dynamic languages

by franz see :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

IMHO, TDD is much more important to dynamic language than to static language
because you cannot rely on your compiler for everything :-)

In static language, there are some things that you break that your compiler
will notify you about. But in dynamic languages, if you don't have test
cases, you will not catch these till you run your app.

It's a pain to (manually) refactor dynamic languages without unit tests.
Again, due to the lack of a strict compiler, you won't know that you broke
something with your refactoring till you run your app ....or you run your
tests :-)

Cheers,
--
Franz Allan Valencia See | Java Software Engineer
franz.see@...
LinkedIn: http://www.linkedin.com/in/franzsee


On Thu, Aug 27, 2009 at 10:53 AM, Josue Barbosa dos Santos <
josuesantos@...> wrote:

>
>
> Hello all,
>
> I have a doubt. Is it is not harder to do TDD in dynamic languages than in
> static typed languages, especially in refactoring? For example, in Java I
> can right click a method and apply the rename refactoring, and all
> references will be changed. I suppose that in dinamic languages that is not
> possible. Or is it? Sorry if it is a stupid question, but I never
> programmed
> in such kind of language, but read about its concepts.
>
> If refactoring is the weakness of dynamic languages (to TDD), what is its
> strength?
>
> Abraços,
>
> Josué.
>
> [Non-text portions of this message have been removed]
>
>  
>   Messages in this topic
> <http://groups.yahoo.com/group/testdrivendevelopment/message/31625;_ylc=X3oDMTM2YW9wdmhuBF9TAzk3MzU5NzE0BGdycElkAzUwMzEyNTUEZ3Jwc3BJZAMxNzA1MDA3MTgxBG1zZ0lkAzMxNjI1BHNlYwNmdHIEc2xrA3Z0cGMEc3RpbWUDMTI1MTM0MTY2MgR0cGNJZAMzMTYyNQ-->(
> 1)  Reply (via web post)
> <http://groups.yahoo.com/group/testdrivendevelopment/post;_ylc=X3oDMTJxbjMzYmpnBF9TAzk3MzU5NzE0BGdycElkAzUwMzEyNTUEZ3Jwc3BJZAMxNzA1MDA3MTgxBG1zZ0lkAzMxNjI1BHNlYwNmdHIEc2xrA3JwbHkEc3RpbWUDMTI1MTM0MTY2Mg--?act=reply&messageNum=31625>| Start
> a new topic
> <http://groups.yahoo.com/group/testdrivendevelopment/post;_ylc=X3oDMTJlNDk0aTRmBF9TAzk3MzU5NzE0BGdycElkAzUwMzEyNTUEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwNmdHIEc2xrA250cGMEc3RpbWUDMTI1MTM0MTY2Mg-->
>  Messages<http://groups.yahoo.com/group/testdrivendevelopment/messages;_ylc=X3oDMTJlM2c5ZHZrBF9TAzk3MzU5NzE0BGdycElkAzUwMzEyNTUEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwNmdHIEc2xrA21zZ3MEc3RpbWUDMTI1MTM0MTY2Mg-->|
> Members<http://groups.yahoo.com/group/testdrivendevelopment/members;_ylc=X3oDMTJlMTRzM29yBF9TAzk3MzU5NzE0BGdycElkAzUwMzEyNTUEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwNmdHIEc2xrA21icnMEc3RpbWUDMTI1MTM0MTY2Mg-->
>   [image: Yahoo! Groups]<http://groups.yahoo.com/;_ylc=X3oDMTJkYm90MW5zBF9TAzk3MzU5NzE0BGdycElkAzUwMzEyNTUEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwNmdHIEc2xrA2dmcARzdGltZQMxMjUxMzQxNjYy>
> Change settings via the Web<http://groups.yahoo.com/group/testdrivendevelopment/join;_ylc=X3oDMTJmaWNxb2xmBF9TAzk3MzU5NzE0BGdycElkAzUwMzEyNTUEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwNmdHIEc2xrA3N0bmdzBHN0aW1lAzEyNTEzNDE2NjI->(Yahoo! ID required)
> Change settings via email: Switch delivery to Daily Digest<testdrivendevelopment-digest@...?subject=Email+Delivery:+Digest>| Switch
> format to Traditional<testdrivendevelopment-traditional@...?subject=Change+Delivery+Format:+Traditional>
>  Visit Your Group
> <http://groups.yahoo.com/group/testdrivendevelopment;_ylc=X3oDMTJkcjVkcWI4BF9TAzk3MzU5NzE0BGdycElkAzUwMzEyNTUEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwNmdHIEc2xrA2hwZgRzdGltZQMxMjUxMzQxNjYy>| Yahoo!
> Groups Terms of Use <http://docs.yahoo.com/info/terms/> | Unsubscribe
> <testdrivendevelopment-unsubscribe@...?subject=>
>    Recent Activity
>
>    -  13
>    New Members<http://groups.yahoo.com/group/testdrivendevelopment/members;_ylc=X3oDMTJmN2JjaXJyBF9TAzk3MzU5NzE0BGdycElkAzUwMzEyNTUEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwN2dGwEc2xrA3ZtYnJzBHN0aW1lAzEyNTEzNDE2NjI->
>
>  Visit Your Group
> <http://groups.yahoo.com/group/testdrivendevelopment;_ylc=X3oDMTJlaGQwNmpmBF9TAzk3MzU5NzE0BGdycElkAzUwMzEyNTUEZ3Jwc3BJZAMxNzA1MDA3MTgxBHNlYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTI1MTM0MTY2Mg-->
>   Give Back
>
> Yahoo! for Good<http://us.lrd.yahoo.com/_ylc=X3oDMTJtNjNuamNpBF9TAzk3MzU5NzE0BF9wAzEEZ3JwSWQDNTAzMTI1NQRncnBzcElkAzE3MDUwMDcxODEEc2VjA25jbW9kBHNsawNicmFuZARzdGltZQMxMjUxMzQxNjYy;_ylg=1/SIG=11314uv3k/**http%3A//brand.yahoo.com/forgood>
>
> Get inspired
>
> by a good cause.
>  Y! Toolbar
>
> Get it Free!<http://us.lrd.yahoo.com/_ylc=X3oDMTJvcjkyZ3RyBF9TAzk3MzU5NzE0BF9wAzIEZ3JwSWQDNTAzMTI1NQRncnBzcElkAzE3MDUwMDcxODEEc2VjA25jbW9kBHNsawN0b29sYmFyBHN0aW1lAzEyNTEzNDE2NjI-;_ylg=1/SIG=11c6dvmk9/**http%3A//toolbar.yahoo.com/%3F.cpdl=ygrps>
>
> easy 1-click access
>
> to your groups.
>  Yahoo! Groups
>
> Start a group<http://groups.yahoo.com/start;_ylc=X3oDMTJvc245MmhjBF9TAzk3MzU5NzE0BF9wAzMEZ3JwSWQDNTAzMTI1NQRncnBzcElkAzE3MDUwMDcxODEEc2VjA25jbW9kBHNsawNncm91cHMyBHN0aW1lAzEyNTEzNDE2NjI->
>
> in 3 easy steps.
>
> Connect with others.
>   .
>
>
>


[Non-text portions of this message have been removed]


Re: TDD and static and dynamic languages

by cheezy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Josué,

I have worked a lot in Ruby and Java.  In those two languages it is
far easier to write the tests
and make the test pass in Ruby but harder to refactor as I do not use
an IDE with refactoring
capabilities.  In my opinion it is easier to write the tests because
the tools in Ruby (rspec
and mocking gems) are far simpler to use than JUnit and the java
mocking libs.  Another
factor is that Ruby applications do not tend to be as "architected" as
Java applications.

One interesting observation (and perhaps this is due to the issues
Franz mentions) is that
TDD adoption is far more pervasive in the dynamic languages than in
the static ones.

-Cheezy


On Wed, Aug 26, 2009 at 10:53 PM, Josue Barbosa dos
Santos<josuesantos@...> wrote:

>
>
> Hello all,
>
> I have a doubt. Is it is not harder to do TDD in dynamic languages than in
> static typed languages, especially in refactoring? For example, in Java I
> can right click a method and apply the rename refactoring, and all
> references will be changed. I suppose that in dinamic languages that is not
> possible. Or is it? Sorry if it is a stupid question, but I never programmed
> in such kind of language, but read about its concepts.
>
> If refactoring is the weakness of dynamic languages (to TDD), what is its
> strength?
>
> Abraços,
>
> Josué.
>
> [Non-text portions of this message have been removed]
>
>

Re: TDD and static and dynamic languages

by Adrian Howard :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 27 Aug 2009, at 13:10, Jeff Morgan wrote:

> One interesting observation (and perhaps this is due to the issues
> Franz mentions) is that
> TDD adoption is far more pervasive in the dynamic languages than in
> the static ones.


Interesting.

I've noticed a much more pervasive testing culture with dynamic  
languages - but the chunk of that doing TDD seems to be bout the same.

Wonder why I've encountered a different segment...

Adrian
--
http://quietstars.com  -  twitter.com/adrianh  -  delicious.com/adrianh




RE: TDD and static and dynamic languages

by Charlie Poole-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Quite possibly, other factors than the particular language or
language family influence the cultures of different groups. :-)

Charlie

> -----Original Message-----
> From: testdrivendevelopment@...
> [mailto:testdrivendevelopment@...] On Behalf Of
> Adrian Howard
> Sent: Friday, August 28, 2009 9:21 AM
> To: testdrivendevelopment@...
> Subject: Re: [TDD] TDD and static and dynamic languages
>
>
> On 27 Aug 2009, at 13:10, Jeff Morgan wrote:
>
> > One interesting observation (and perhaps this is due to the issues
> > Franz mentions) is that TDD adoption is far more pervasive in the
> > dynamic languages than in the static ones.
>
>
> Interesting.
>
> I've noticed a much more pervasive testing culture with
> dynamic languages - but the chunk of that doing TDD seems to
> be bout the same.
>
> Wonder why I've encountered a different segment...
>
> Adrian
> --
> http://quietstars.com  -  twitter.com/adrianh  -  
> delicious.com/adrianh
>
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>



Re: TDD and static and dynamic languages

by Carlos Ble-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Interestingly enough, it turns out that the code produced by TDD is
really similar
despite of the language I choose. I've tried Java, C# and Python and
the outcome is really similar. It might be because TDD enforces S.O.L.I.D
principles.

As many others have said, dynamic languages have some features that
compiled languajges don't and viceversa. I'd say everything is fine for TDD.

The most interesting advantage I see with dynamic languages is that it is
easier to write tests for legacy code without changing the code first, thanks
to the advanced interception features. But that is not TDD, is testing
legacy code ;-)




2009/8/27 Josue Barbosa dos Santos <josuesantos@...>:

>
>
> Hello all,
>
> I have a doubt. Is it is not harder to do TDD in dynamic languages than in
> static typed languages, especially in refactoring? For example, in Java I
> can right click a method and apply the rename refactoring, and all
> references will be changed. I suppose that in dinamic languages that is not
> possible. Or is it? Sorry if it is a stupid question, but I never programmed
> in such kind of language, but read about its concepts.
>
> If refactoring is the weakness of dynamic languages (to TDD), what is its
> strength?
>
> Abraços,
>
> Josué.
>
> [Non-text portions of this message have been removed]
>
>

Re: TDD and static and dynamic languages

by Olof Bjarnason :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/8/31 Carlos Ble <ble.jurado@...>:

>
>
> Hi,
>
> Interestingly enough, it turns out that the code produced by TDD is
> really similar
> despite of the language I choose. I've tried Java, C# and Python and
> the outcome is really similar. It might be because TDD enforces S.O.L.I.D
> principles.
>
> As many others have said, dynamic languages have some features that
> compiled languajges don't and viceversa. I'd say everything is fine for TDD.
>
> The most interesting advantage I see with dynamic languages is that it is
> easier to write tests for legacy code without changing the code first,
> thanks
> to the advanced interception features. But that is not TDD, is testing
> legacy code ;-)

What about refactoring in dynamic languages..?

>
> 2009/8/27 Josue Barbosa dos Santos <josuesantos@...>:
>
>>
>>
>> Hello all,
>>
>> I have a doubt. Is it is not harder to do TDD in dynamic languages than in
>> static typed languages, especially in refactoring? For example, in Java I
>> can right click a method and apply the rename refactoring, and all
>> references will be changed. I suppose that in dinamic languages that is
>> not
>> possible. Or is it? Sorry if it is a stupid question, but I never
>> programmed
>> in such kind of language, but read about its concepts.
>>
>> If refactoring is the weakness of dynamic languages (to TDD), what is its
>> strength?
>>
>> Abraços,
>>
>> Josué.
>>
>> [Non-text portions of this message have been removed]
>>
>>
>



--
twitter.com/olofb
olofb.wordpress.com
olofb.wordpress.com/tag/english

Re: TDD and static and dynamic languages

by isaiahperumalla :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>>What about refactoring in dynamic languages..?
it depends, i do a lot of smalltalk in my spare time and i have to say it has got one of the nicest refactoring browsers around. Not only that i find its one of the most powerful programming environments around.
here is a screencast, http://www.cincomsmalltalk.com/files/bobw/screencasts/Refactoring_Steroids/

--- In testdrivendevelopment@..., Olof Bjarnason <olof.bjarnason@...> wrote:

>
> 2009/8/31 Carlos Ble <ble.jurado@...>:
> >
> >
> > Hi,
> >
> > Interestingly enough, it turns out that the code produced by TDD is
> > really similar
> > despite of the language I choose. I've tried Java, C# and Python and
> > the outcome is really similar. It might be because TDD enforces S.O.L.I.D
> > principles.
> >
> > As many others have said, dynamic languages have some features that
> > compiled languajges don't and viceversa. I'd say everything is fine for TDD.
> >
> > The most interesting advantage I see with dynamic languages is that it is
> > easier to write tests for legacy code without changing the code first,
> > thanks
> > to the advanced interception features. But that is not TDD, is testing
> > legacy code ;-)
>
> What about refactoring in dynamic languages..?
>
> >
> > 2009/8/27 Josue Barbosa dos Santos <josuesantos@...>:
> >
> >>
> >>
> >> Hello all,
> >>
> >> I have a doubt. Is it is not harder to do TDD in dynamic languages than in
> >> static typed languages, especially in refactoring? For example, in Java I
> >> can right click a method and apply the rename refactoring, and all
> >> references will be changed. I suppose that in dinamic languages that is
> >> not
> >> possible. Or is it? Sorry if it is a stupid question, but I never
> >> programmed
> >> in such kind of language, but read about its concepts.
> >>
> >> If refactoring is the weakness of dynamic languages (to TDD), what is its
> >> strength?
> >>
> >> Abra�os,
> >>
> >> Josu�.
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >>
> >
>
>
>
> --
> twitter.com/olofb
> olofb.wordpress.com
> olofb.wordpress.com/tag/english
>



Re: TDD and static and dynamic languages

by ablmf :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Most of my programming experience on dynamic language is about python.  I have to admit that there is no mature python refactor tools comparing to what Visual Studio provided for C#.

There are some very difficult program for writing a refactor tools for dynamic language because many thing are only decided when the program runs.  

But, I think it's hard, but not impossible.  The only problem is python is not really popular enough to encourage big investment on TDD tools for python.

--- In testdrivendevelopment@..., Josue Barbosa dos Santos <josuesantos@...> wrote:

>
> Hello all,
>
> I have a doubt. Is it is not harder to do TDD in  dynamic languages than in
> static typed languages, especially in refactoring? For example, in Java I
> can right click a method and apply the rename refactoring, and all
> references will be changed. I suppose that in dinamic languages that is not
> possible. Or is it? Sorry if it is a stupid question, but I never programmed
> in such kind of language, but read about its concepts.
>
> If refactoring is the weakness of dynamic languages (to TDD), what is its
> strength?
>
> Abraços,
>
> Josué.
>
>
> [Non-text portions of this message have been removed]
>



Re: Re: TDD and static and dynamic languages

by Adam Sroka-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bicycle Repair Man + emacs (or vi, if you swing that way) doesn't
suck. Sure, it's not as pretty as VS + ReSharper, or the various Java
tools, but it doesn't hog resources the way they do either.

On Mon, Aug 31, 2009 at 11:01 PM, ablmf<ablmf@...> wrote:

>
>
> Most of my programming experience on dynamic language is about python. I
> have to admit that there is no mature python refactor tools comparing to
> what Visual Studio provided for C#.
>
> There are some very difficult program for writing a refactor tools for
> dynamic language because many thing are only decided when the program runs.
>
> But, I think it's hard, but not impossible. The only problem is python is
> not really popular enough to encourage big investment on TDD tools for
> python.
>
> --- In testdrivendevelopment@..., Josue Barbosa dos Santos
> <josuesantos@...> wrote:
>>
>> Hello all,
>>
>> I have a doubt. Is it is not harder to do TDD in dynamic languages than in
>> static typed languages, especially in refactoring? For example, in Java I
>> can right click a method and apply the rename refactoring, and all
>> references will be changed. I suppose that in dinamic languages that is
>> not
>> possible. Or is it? Sorry if it is a stupid question, but I never
>> programmed
>> in such kind of language, but read about its concepts.
>>
>> If refactoring is the weakness of dynamic languages (to TDD), what is its
>> strength?
>>
>> Abraços,
>>
>> Josué.
>>
>>
>> [Non-text portions of this message have been removed]
>>
>
>

Re: TDD and static and dynamic languages

by Carlos Ble-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Olof,

2009/8/31 Olof Bjarnason <olof.bjarnason@...>:

>
>
> 2009/8/31 Carlos Ble <ble.jurado@...>:
>
>>
>>
>> Hi,
>>
>> Interestingly enough, it turns out that the code produced by TDD is
>> really similar
>> despite of the language I choose. I've tried Java, C# and Python and
>> the outcome is really similar. It might be because TDD enforces S.O.L.I.D
>> principles.
>>
>> As many others have said, dynamic languages have some features that
>> compiled languajges don't and viceversa. I'd say everything is fine for
>> TDD.
>>
>> The most interesting advantage I see with dynamic languages is that it is
>> easier to write tests for legacy code without changing the code first,
>> thanks
>> to the advanced interception features. But that is not TDD, is testing
>> legacy code ;-)
>
> What about refactoring in dynamic languages..?
>

Lack of refactoring tools is a disadvantage but on the other hand, the
amount of code you
have to write in a dynamic language is dramatically less than in a
compiled one. So it
is all about trade off.  One size does not fit all. I tend to choose
the language/platform
depending on my problem. And whenever it is possible try to combine
both, i.e, through
hybrid things like Boo or IronPython.

Cheers




>>
>> 2009/8/27 Josue Barbosa dos Santos <josuesantos@...>:
>>
>>>
>>>
>>> Hello all,
>>>
>>> I have a doubt. Is it is not harder to do TDD in dynamic languages than
>>> in
>>> static typed languages, especially in refactoring? For example, in Java I
>>> can right click a method and apply the rename refactoring, and all
>>> references will be changed. I suppose that in dinamic languages that is
>>> not
>>> possible. Or is it? Sorry if it is a stupid question, but I never
>>> programmed
>>> in such kind of language, but read about its concepts.
>>>
>>> If refactoring is the weakness of dynamic languages (to TDD), what is its
>>> strength?
>>>
>>> Abraços,
>>>
>>> Josué.
>>>
>>> [Non-text portions of this message have been removed]
>>>
>>>
>>
>
> --
> twitter.com/olofb
> olofb.wordpress.com
> olofb.wordpress.com/tag/english
>