Forum: Ruby conversion aid for 1.8.7 to 1.9.x transition?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D15a45a973443d4562051eb675b60474?d=identicon&s=25 Tom Cloyd (Guest)
on 2009-02-26 21:42
(Received via mailing list)
It seems odd that I've not seen this question here before, but maybe I
missed it (or just don't get it on some deeper level!):

My current project require some libraries (e.g., CSV) that have been
altered in 1.9. It's be comforting to know that when the time comes
there's some quick way to flag the areas of my code that need attention
if they're to run OK in 1.9. Yeah, it's be great if I had a test suite.
but honestly, it's all I can do to get the code together in the first
place. Tests are high on my todo list, but my need for my current
project is higher by far, and I'm close to having a complete function
set, so tests aren't on the menu today.

So - is there some 1.8-to-1.9 scanner or whatever?

Thanks,

t.

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D15a45a973443d4562051eb675b60474?d=identicon&s=25 Tom Cloyd (Guest)
on 2009-02-28 05:18
(Received via mailing list)
Tom Cloyd wrote:
> function set, so tests aren't on the menu today.
>
> So - is there some 1.8-to-1.9 scanner or whatever?
>
> Thanks,
>
> t.
>
I'm puzzled by the underwhelming response to this question. It is a
genuine one, for me, as I've not gone through a transition like this
before, being new to this programming community.

I'm just curious about how others handle, or will handle, this problem.
Surely one doesn't just launch the boat and hope there are no leaks,
yes? There has to be a better way. But...for me, it's far from obvious.

Still hoping for some response...

Tom

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
149379873fe2cb70e550c6bff8fedd0c?d=identicon&s=25 Jeff Schwab (Guest)
on 2009-02-28 05:36
(Received via mailing list)
Tom Cloyd wrote:
> Tom Cloyd wrote:

>> It's be comforting to know that when the time comes
>> there's some quick way to flag the areas of my code that need
>> attention if they're to run OK in 1.9. Yeah, it's be great if I had a
>> test suite. but honestly, it's all I can do to get the code together
>> in the first place.

>> So - is there some 1.8-to-1.9 scanner or whatever?

> I'm puzzled by the underwhelming response to this question.
>
> I'm just curious about how others handle, or will handle, this problem.

You appear to have answered your own question before even asking it.
I'm not a Ruby whiz, but AIUI, the only way to build robust systems with
dynamic languages is to test thoroughly.

> Surely one doesn't just launch the boat and hope there are no leaks,
> yes?

+1 Ironic
4feed660d3728526797edeb4f0467384?d=identicon&s=25 Bill Kelly (Guest)
on 2009-02-28 06:27
(Received via mailing list)
From: "Tom Cloyd" <tomcloyd@comcast.net>
>
>> [...] It's be comforting to know that when the time comes
>> there's some quick way to flag the areas of my code that need
>> attention if they're to run OK in 1.9. Yeah, it's be great if I had a
>> test suite. but honestly, it's all I can do to get the code together
>> in the first place. Tests are high on my todo list, but my need for my
>> current project is higher by far, and I'm close to having a complete
>> function set, so tests aren't on the menu today.
[...]
> Surely one doesn't just launch the boat and hope there are no leaks,
> yes? There has to be a better way.

I doubt this is the answer you were hoping for.  But deferring
writing tests is not generally a strategy for completing a
working project sooner.

If your need for your current project is high, having a
supporting network of unit tests continually verifying that
your features are still working _as you develop_ new features,
is a way to go faster over time, not slower.

One effective strategy for not falling behind in writing tests,
is to write a small test first (!) to verify a bit of
functionality you are about to implement in code.

For more info, see "Test-Driven Development Cycle", at:

http://en.wikipedia.org/wiki/Test-driven_development


Regards,

Bill
D15a45a973443d4562051eb675b60474?d=identicon&s=25 Tom Cloyd (Guest)
on 2009-02-28 07:29
(Received via mailing list)
Bill Kelly wrote:
> [...]
> is a way to go faster over time, not slower.
> Regards,
>
> Bill
>
>
>
>
Bill, Jeff - thanks. Your responses are genuinely helpful to me. I'm
highly educated in some fields, but not in this one, so I'm often in
need of guidance. I've wondered if I might have made a strategic error
by deciding to defer testing, especially when I implement a new feature
and then have to throw a bunch of ad-hoc tests at the code to make sure
I'm still advancing on all fronts. OK, I get the message. Changing
strategies, tonight. Sigh. I hope test writing goes faster than
generating the core code (which, being Ruby, really has gone rather
smoothly).

Thanks again (he says with some chagrin).

t.

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4feed660d3728526797edeb4f0467384?d=identicon&s=25 Bill Kelly (Guest)
on 2009-02-28 08:48
(Received via mailing list)
Tom,

From: "Tom Cloyd" <tomcloyd@comcast.net>
>
> [...] I hope test writing goes faster than
> generating the core code (which, being Ruby, really has gone
> rather smoothly).

:)

Myself, I'd been programming for about 17 years before I first
read about TDD a decade ago.  To this day, I often have to
cajole myself a little bit to proceed with writing tests first,
because it's not something i find 'easy', but 'worth it'.

In the past decade I've never yet regretted writing tests
first.  A number of times, however, I have come to regret
taking shortcuts with something that was supposed to be a
knock-off short-term project, where contrary to my predictions
it had morphed into a longer-term ongoing project where I
began to sorely regret having omitted writing unit tests from
the very beginning.

. . . So again, I don't find TDD easy; but worth-it.


Regards,

Bill
586ffd928258ee90d196b16e669b6f8a?d=identicon&s=25 qinzh (Guest)
on 2009-02-28 09:16
(Received via mailing list)
unsubscribe
D15a45a973443d4562051eb675b60474?d=identicon&s=25 Tom Cloyd (Guest)
on 2009-02-28 20:18
(Received via mailing list)
Bill Kelly wrote:
> Myself, I'd been programming for about 17 years before I first
> the very beginning.
>
Thanks Bill. I appreciate reading about your experience. Perhaps I can
shortcut my own development a bit, with help from more experienced folks
such as you.

t.

--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website)
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This topic is locked and can not be replied to.