Cosimo Streppone
Recent Actions
-
Commented on Ditching A Language
Bjørn you are now officially one of my heroes :-)...
-
Commented on The Mind-killer
Thanks for this article. I'm also quite convinced that TDD helps and I could mention lots of examples. However, I'd like to clarify a bit further your reasoning. Whether the test has been written before or after the code doesn't...
-
Commented on The new ORLite 2.0 learns some amazing SQLite tricks
Hi Adam, so this mechanism is also used for Postgres and its oid? In older versions of Pg (8.0.x) I found that an explicit index on oid had to be created to get fast lookups. I guess this has been...
Comment Threads
-
Adam Kennedy commented on
The new ORLite 2.0 learns some amazing SQLite tricks
Robert: Incorrect!
The magic of the new rowid logic means that both update and delete on a single object will ALWAYS update or delete one and only one object.
To remove both you would either iterate and delete, or do a more general delete query.
# Iterative delete
$_->delete foreach @sydney;
# General query
Adam->do(
'delete from person where firstname = ? and lastname = ? and location = ?',
{},
'Adam',
'Kennedy',
'Sydney',
);
-
Robert commented on
The new ORLite 2.0 learns some amazing SQLite tricks
Hmmm...interesting.
-
tstanton.myopenid.com commented on
The Mind-killer
Wow, excellent post, Buddy! Your main point, elimination of fear, is something that I wholeheartedly agree with. As I stated in a slide from my TDD presentation, the test suite serves as a "safety harness" for developers, allowing them to push forward with confidence.
Programming can be so overwhelmingly complicated and stressful: why not let the code worry about the code a bit? It gives my brain a much-needed rest. Tests help me sleep at night. ( ^_^ )
-
Buddy Burden commented on
The Mind-killer
@cosimo:
Whether the test has been written before or after the code doesn't make much difference, at least with regards to guaranteeing code robustness (writing a test case before the code actually makes the code better, that's for sure!). In fact, every test will fail initially no matter what, because you have no code to run against it, by definition.
Hmmm ... I'm not sure if you're agreeing with me or disagreeing with me. :-) The purpose of writing the test before the code is not so much to guarantee code robustness as to improve (I'd say "guarantee…
-
leifove commented on
The Mind-killer
(Sorry for commenting a 4 months old post...)
I fully agree on the "removing fear" aspect, since this was exactly one of the Aha! moments from my first serious experiment with TDD. Some months ago I wrote an "automator" for one of the more painful, manual processes I have to perform from time to time at work (build & package software releases for embedded targets).
I knew the Perl code would grow to several hundreds of lines, and the finished, automated process simeply HAD to work EVERY time, so I figured this would be a good time to get down and dirty with TDD. Yes, it took l…
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.