--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
The distinction that David West is drawing is between a program having a single entry point that delegates control to sub-modules, and between a program being a collaborating web of live objects that are sending messages to one another and that you modify to define system behaviour.
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I think the distinction he's making is that it takes effort to program the same way when programming in Java. The grain of the language is, at first, entirely procedural. You have to expend effort to organise the system into collaborating objects. In Smalltalk, the grain of the language is the other way: you have to expend effort to organise a program in the procedural style he describes.
> I think the distinction he's making is that it takes effort to program the same way when programming in Java. The grain of the language is, at first, entirely procedural. You have to expend effort to organise the system into collaborating objects. In Smalltalk, the grain of the language is the other way: you have to expend effort to organise a program in the procedural style he describes.Is that the case? The code examples that David West displayed near the beginning included "Smalltalk from a Pascal programmer", which suggests to me that it's just as easy to program procedurally in Smalltalk as it is Java, C#, etc. IMHO the problem is more one of adopting the right mindset - thinking in terms of behaviours and messages, rather than flow of execution - and that will cut across all languages.
--
--
This still doesn't say much about testing, where this list is all about.
On Monday, 21 October 2013 19:28:19 UTC+2, Anthony Green wrote:Earlier this year Steve arranged for Professor David West, author of Object Thinking, to come and give a talk at the BBC.
I've managed to get hold of a copy of the video of that talk and to upload it to Vimeo:
https://vimeo.com/77415896
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
This listing is not all about testing. GOOS is a book about OO design, not testing, so it's fine to talk about design or modelling on this list.
This listing is not all about testing. GOOS is a book about OO design, not testing, so it's fine to talk about design or modelling on this list.
This listing is not all about testing. GOOS is a book about OO design, not testing, so it's fine to talk about design or modelling on this list.
A point I've heard both you and Steve make on a number of occasions. I'm not sure what leads so many people to the conclusion it's about testing, I didn't get my impression reading it. I wonder what's missing from people's experience... perhaps the extended 'web' of affiliated ideas.
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
On 23 October 2013 10:56, Anthony Green <anthony.ch...@gmail.com> wrote:
This listing is not all about testing. GOOS is a book about OO design, not testing, so it's fine to talk about design or modelling on this list.
A point I've heard both you and Steve make on a number of occasions. I'm not sure what leads so many people to the conclusion it's about testing, I didn't get my impression reading it. I wonder what's missing from people's experience... perhaps the extended 'web' of affiliated ideas.I think it's the title. For some reason, the concept of "test" is understood very differently by programmers than by "normal" people, and if the word appears in a sentence it's as if it is in 500pt multicoloured bold italic capitals with marching ants, blink tag and marquee effects applied -- programmers notice the word "test" first and immediately become unable to parse the rest of the text
Case in point - test-driven development. Development is the noun. Test-driven is an adjectival clause. It' not a testing technique, but you wouldn't know that from looking at academic research into TDD.
That's why we called the book "Growing Object-Oriented Software Guided by Tests". We hoped people would realise that the book was about growing Object-Oriented software. But our hopes were soon dashed.
I meant the large-scale procedural style he described: top-down down decomposition of a program with a single entry point and a controlling "master control module" (I think he called it - is that a term from JSP?).
Java programs have a single entry point, and that entry point has to define & create all the objects that interface to the outside world. A Smalltalk program doesn't have a single entry point in that way.
Dave West chiming in
The rant against java - and the fact that if you decide to create a class - the class structure demands a main() with, usually, typed instance variables, and subroutines for each method. Without being given the opportunity to reflect or find alternatives, programmers are forced into thinking about their programs, and their objects, as tiny instances of the 1950s model of program architecture called a "Program Structure Chart" with its master control module, afferent, efferent, and transform modules (all subtroutines) called at the discretion of the master control module.
This causes all kinds of conflict - conflict exceeded only by trying to force fit object software into a relational database. You can have the most elegant of solutions and design for an implementation only to find yourself unable to express it directly and easily in Java.
I am very flattered to have been asked to go to the BBC and that some of you have expressed an interest in what I was saying (or trying to say).
All relevant information is not modeled as data on the system level, but as behaviour on the object level.
That did the trick. Complexity vanished. Not because the complexity was moved to the collaboration of objects, but because the complexity was only introduced by trying to "program" the system as a whole, with all the processes that influence each other. At the object level, things are relatively simple.
My current understanding is that West's point is that if you minimize accidental complexity to 0 your system will be simple enough for you understand. Maybe because you need to understand it, in order to build the model in the first place.
We can only build as good program as our current understanding for the real system, is that right ?
In Java in particular, or in any programming environment whose dominant model involves a main() routine?
--
But I a bit lost.. difference btw complication and complexity in English? For example, Rick Hickey usually talks about "incidental complexity" https://www.simple-talk.com/opinion/geek-of-the-week/rich-hickey-geek-of-the-week/
I normally use 'complex' for something that is composed of parts, put together. I use 'complicated' for something that is not easy to understand.
I cannot imagine anything useful with your definition of 'complex'; it reminds me of the last proposition of Wittgenstein's Tractatus: Wovon man nicht sprechen kann, darüber muss man schweigen. (“Whereof one cannot speak, thereof one must be silent.”).
What did you intend by this comment?
--
On Wednesday, 23 October 2013 21:32:20 UTC+2, J. B. Rainsberger wrote:What did you intend by this comment?Nothing nasty or unfriendly, of course.
Just that for me your definition of complex ("we can't understand it all, no matter how much effort we put in") doesn't seem very useful[…]
...and might be a symptom of this: if we cannot answer a question or solve a problem, then the question might be wrong or the problem wrongly stated. And that is, in my interpretation, exactly what Wittgenstein wanted to point out, hence the quotation.
Back to modeling: the goal must be to simplify things, often by just leaving out a lot of other things. For me the basic idea of OOP (or should I say OOM: Object Oriented Modeling) is to simplify things by decomposing the compexity to 'simple' (as opposed to complex) objects.
…except as a reminder not to waste our time trying to understand it all before trying to interact with it. People do try to do that. :) Similarly, Gödel's work discourages otherwise well-meaning people from spending their lives trying to axiomatise mathematics.
On Wed, Oct 23, 2013 at 4:47 PM, Herman Peeren wrote:
Back to modeling: the goal must be to simplify things, often by just leaving out a lot of other things. For me the basic idea of OOP (or should I say OOM: Object Oriented Modeling) is to simplify things by decomposing the compexity to 'simple' (as opposed to complex) objects.
I see that as the idea of modular design in general, not just specifically OOM/P. OOM/P certainly seems to involve a combination of decomposition and abstraction, using "shares the same pieces of data" as an organising mechanism for behavior.
On Thursday, 24 October 2013 21:08:29 UTC+2, J. B. Rainsberger wrote:…except as a reminder not to waste our time trying to understand it all before trying to interact with it. People do try to do that. :) Similarly, Gödel's work discourages otherwise well-meaning people from spending their lives trying to axiomatise mathematics.
Welcome to the OO philosophy list... ;-) Seriously, what I like about software development is that we are modeling pieces of the "real" world. That means that we are abstracting what we see around us, forming ideas about it. We sometimes even have to invent new words to express the models. In that way, modeling IS philosophy. For me Gödels theorems don't discourage axiomatisation, but only show that the set of axioms can never be complete. New axioms can always be made, that cannot be derived from the allready existing set of axioms. For me that means: creativity is endless! You can always come up with something new. For modeling it means: we can always extend our models, build new software, create new things. So for me it sounds a bit strange to hear that Gödel's work would discourage some people to do something, as it has exactly the opposite effect on me.
When I wrote "…axiomatise mathematics", I meant completely, because otherwise, it's not axiomatised. :) (Just how I meant the words.)
To axiomatise a domain is to set rules for a game. The rules can never be "complete" (that is what Gödel proved), but the game is still useful. A model is exactly the same: it is a set of rules for a game. You make rules that describe the domain (the game). You can always make up more rules and extend the model. But that doesn't reduce the usefulness of the limited model or game.
i think he is referring to this book http://www.amazon.com/Object-Technology-A-Managers-Guide/dp/0201309947 .its a short but interesting book, advocates "the mystical view of OO"
On Tue, Oct 22, 2013 at 1:52 PM, Douglas Waugh <douglas....@gmail.com> wrote:
Does anybody know which books he's talking about by David Taylor (at 52:29) concerning metaphors?On 22 October 2013 12:00, Nat Pryce <nat....@gmail.com> wrote:
He doesn't say that. He says that (paraphrased) every Java program starts with a thread of control running a main method, and you program by writing a main method to do something, and breaking down what it does into subordinate procedures and/or classes and objects.
Compare with a Smalltalk program in which there are lots of objects *already running*. Some of those objects translate between Smalltalk messages and hardware interrupts, for input, or control registers, for output, (usually via the OS these days). You program by modifying objects that are already running or creating new ones, and make your program do I/O by connecting your objects to those that interface with the hardware.
On 21 October 2013 19:13, Raoul Duke <rao...@gmail.com> wrote:
i don't understand what he means by saying every java class is a
program with a main(). i also don't understand why he claims
javascript has classes. there's probably other things i won't grok.
:-)
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriented-software+unsubscribe@googlegroups.com.
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriented-software+unsubscribe@googlegroups.com.
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriented-software+unsubscribe@googlegroups.com.
--
Isaiah Perumalla
...like: i would expect the rules thing that 'couldn't be done' would
best be tried in a lisp. and i find the claim that tdd is only good
when there are lots of lines of code odd, because to me it is more
about state space than about lines of code.
the Agile Manifesto http://agilemanifesto.org/ is easily abused to spread complexity #narcissisticdesign
So here’s the deal. Rich is concerned, and rightly so, that we have a culture of complexity. That when programmers are given a task, they race ahead and write masses of tangled code, using “easy” frameworks and tools, without giving the problem due thought. That we confuse easiness, with simplicity. (e.g. Rails is easy, it is not simple.) His complaint about tests is that we used them to replace thought. That we feel good about ourselves because we’ve written tests,
@philip_schwarz @stuarthalloway but 10th principle of Agile sw is "Simplicity--the art of maximizing the amount of work not done--is essential."
@philip_schwarz @stuarthalloway but "the design strategy in XP is to always have the simplest design that runs the current test suite" @KentBeck XP Explained
@stuarthalloway @philip_schwarz if you accidentally delete 'test' dir, must you then delete 'src' dir to comply with XP design? :-)
If, however, it was your tests that got deleted, then you'd have no tests to keep the production code clean. The production code would inevitably rot, slowing you down. The quality of the code, and the productivity of the team would be caught in the downward spiral towards zero -- and there's nothing they could do to stop it other than trying recreate the test suite. And, as we noted, recreating the test suite is very hard indeed.
If we lose the production code, we end up with a better designed system that stays clean because it has tests. If we lose the tests, then the production code rots and the team slows down in a never ending spiral of lost productivity.
So we can conclude that if it became a choice between the tests or the production code, we'd rather preserve the tests. And this means that the tests are a more important component of the system than the production code is. Because the tests are the specs."
The bottom line of all this is that we should consider our tests as beingfirst. We already know we should write them first; but we should also clean them first, maintain them first, think of them first, and keep them first. We should give our tests the highest priority.
That is what "Test First" really means. The Tests Come First!"
This is a crucial problem. I too see people writing tests for the
feeling of "I write tests, therefore I rock!!" but never stop
questioning: am I writing good tests? Tests give you "permission" to go
ahead, you've done the right thing, move on.
I can't imagine that feeling if you're doing TDD. It's not a matter of having written tests (that's a test-after phenomena IME), or that the tests are "good tests." It's whether or not the test pushes the design in a direction that will satisfy the requirements.
To me, that's the heart of TDD.
I'd love to see some examples of TDD done poorly.
The same thing happens, or used to happen, with design patterns. I used
4 patterns, therefore I rock, no need to think further.
I think we all agree here that Rick Hickey (and David West?) are
complaining about TDD done poorly; they probably would not complain
about TDD done well. But they have a point; many people do TDD poorly.
Doing TDD poorly is not a very big deal, actually. I mean, doing TDD poorly is still a vast improvement over doing programming without tests poorly. Doing TDD poorly only becomes a big problem when I think I'm doing it very well... and stop questioning and improving.
I think we all agree here that Rick Hickey (and David West?) are complaining about TDD done poorly; they probably would not complain about TDD done well. But they have a point; many people do TDD poorly.
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
Il giorno lunedì 28 ottobre 2013 21:07:00 UTC+1, Torbjörn Kalin ha scritto:
Also, I believe it's quite easy to do test-first poorly, but really hard to do TDD poorly. If you do TDD poorly you will automatically start doing (non-TDD) test-first.
At this point I have to ask: what’s the difference between test-first and TDD for you? I think that TFD was the original name that Kent Beck changed to TDD when he was writing his book “Test Driven Development: By Example”. But there are a lot of definitions out there. Someone thinks that TDD like TFD but when the architecture is not already clear, others see TDD as TFD + refactoring (?!).
My point is that sadly we don’t have many precise definitions. And this is crucial to be on the same page and have a meaningful debate.
Well, maybe there is an agreed upon definition of TDD here (sorry, I’m new in this group) :)
--
I think TDD can (and should) be about design.
But what am I doing at the moment, retrofitting tests onto a legacy application?
Trying to capture the essence of the design so that I don’t break it as I start to modify it.
Design-driven testing?!
John D.
--
Umm.. a bit long thread, maybe I missed some email....But, any concrete written example of "to do TDD poorly"? English is not my language, and I cannot grasp all the video talks.My guess point: following simple rules, you cannot do TDD poorly. If you "do poorly", then it is not TDD (you started to break YAGNI, don't write minimal code, skipped refactor, etc)Angel "Java" Lopez@ajlopezOn Mon, Oct 28, 2013 at 8:44 PM, Manuel Paccagnella <manuel.pa...@gmail.com> wrote:
Il giorno lunedì 28 ottobre 2013 21:07:00 UTC+1, Torbjörn Kalin ha scritto:
Also, I believe it's quite easy to do test-first poorly, but really hard to do TDD poorly. If you do TDD poorly you will automatically start doing (non-TDD) test-first.At this point I have to ask: what’s the difference between test-first and TDD for you? I think that TFD was the original name that Kent Beck changed to TDD when he was writing his book “Test Driven Development: By Example”. But there are a lot of definitions out there. Someone thinks that TDD like TFD but when the architecture is not already clear, others see TDD as TFD + refactoring (?!).
My point is that sadly we don’t have many precise definitions. And this is crucial to be on the same page and have a meaningful debate.
Well, maybe there is an agreed upon definition of TDD here (sorry, I’m new in this group) :)
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriented-software+unsubscribe@googlegroups.com.
Il giorno martedì 29 ottobre 2013 11:14:36 UTC+1, Björn Rasmusson ha scritto:
Keith Braithwaite describes one anti-pattern in his workshop "TDD as if You Meant It" as (basically a copy of his slide):
"
TDD the way it's often done ...
I see a lot of this thing:
- Think up a design
- Write a bunch of test that say the design exist
- Write the implementation
- Test, debug, test, debug, test, debug, test, debug, test, debug, test, debug, test, debug, test, debug, test, debug, test, debug, test, debug ...
- Write TODO saying to refactor
"
Uncle Bob defines TDD with 3 laws:
This set of rules effectively locks you in a virtuous circle of very short feedback loops, in which basically all relevant production code is tested and the overall design is informed and guided by tests. More than that, they prevents a bunch of common mistakes:
Its definitely an anti-pattern, but is it this some people refers to as (non-TDD) test-first?
Yes, but as far as I know there isn’t a single, precise and shared definition on what TDD exactly is. Maybe the best thing is looking for that definition at the source.
Cheers,
Manuel
In my vocabulary, TDD is the strict practise where you are not allowed to add any production code unless a test tells you to (with baby steps and YAGNI). The more general term test-first means that you write a test before the code, but without the strictness.
Test-first could give you a result similar to test-last except that the design is guaranteed to be testable.
But it seems I need to update my volcabulary...
Point is, I don't think I've ever met anyone claiming to practise TDD who actually does (strictly speaking). They all do test-first. Which is related to your point.
/T
This is a crucial problem. I too see people writing tests for the
feeling of "I write tests, therefore I rock!!" but never stop
questioning: am I writing good tests? Tests give you "permission" to go
ahead, you've done the right thing, move on.
I can't imagine that feeling if you're doing TDD. It's not a matter of having written tests (that's a test-after phenomena IME), or that the tests are "good tests." It's whether or not the test pushes the design in a direction that will satisfy the requirements.
To me, that's the heart of TDD.
I'd love to see some examples of TDD done poorly.I think we all agree here that Rick Hickey (and David West?) are
complaining about TDD done poorly; they probably would not complain
about TDD done well. But they have a point; many people do TDD poorly.
The big obstacle I see in getting individuals and teams to do TDD well
is the love of complexity, and that is a bigger problem with people who
are "good" programmers, or think they are good. And also with the fact
that when you look at the market for programming training, what gets the
most press are specific technologies, not fundamental issues that make
you think like "Object Thinking" or GOOS or the meaning of "Simple".
What do you think?
Also, I believe it's quite easy to do test-first poorly, but really hard to do TDD poorly. If you do TDD poorly you will automatically start doing (non-TDD) test-first.
What I'm about to say is probably heresy...
I don't believe it's possible to write an automated unit test without
having done some design in my head first. (There, said it!)
On Mon, Oct 28, 2013 at 9:07 PM, Torbjörn Kalin <tgo...@kalin-urena.com> wrote:Also, I believe it's quite easy to do test-first poorly, but really hard to do TDD poorly. If you do TDD poorly you will automatically start doing (non-TDD) test-first.
I see it the other way: if a programmer designs the way e wants, then implements the design test-first, e will more likely perform the steps of test-first programming correctly and diligently compared to forcing emself to practise TDD diligently and defer design decisions. Test-first has fewer rules to follow.
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriente...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
So you have to _listen_, right?
I have test-driven plenty of programs that sucked because I ignored the pain the tests were inflicting upon me.
In TDD, writing a test *is* a design activity. We design a little piece of expected behavior and the API that will expose that behavior. We document the design with a test. Then, we design the implementation that makes that test pass. So we are constantly designing. When TDD goes wrong is when people stop designing and treat it like a mindless rote exercise.
I have test-driven plenty of programs that sucked because I ignored the pain the tests were inflicting upon me.
I get the sense each object plays a role: a peer, a collaborator, a value object, maybe even more than one, so designing is like a writing workshop we know the rough narrative of our drama and through design explore and flesh out the dialogue between the actors that move the story forward.
For some scenes we get need all the actors onstage, for others where getting the real actors would be expensive we use stand ins to take part in the exchange, and read the dialogue from the rough improvised script. There are props and other plot devices actors make use of. Then there's continuity to check. As we feel parts of the script comes together we make less changes to it and it becomes hardened. We continue to edit, to drop scenes and add others and we get more of a feeling for how our drama is playing out.
For some scenes we get need all the actors onstage, for others where getting the real actors would be expensive we use stand ins to take part in the exchange, and read the dialogue from the rough improvised script. There are props and other plot devices actors make use of. Then there's continuity to check. As we feel parts of the script comes together we make less changes to it and it becomes hardened. We continue to edit, to drop scenes and add others and we get more of a feeling for how our drama is playing out.
I joked with Matt Wynne my term for this was 'Object Theatre'.
I get that with a single narrative strand this is probably more akin to Java's main() rather than Smalltalk's object pool. Maybe for proper OO I should be looking to employ The Mythology Engine.
Perhaps it's more like Java's main if you think you can lay out the whole narrative for your actors. Smalltalk's object pool could be more like an improv performance. Our tests are just the rehearsal, some constraints we set for the actors, but once the app is up and running they need to deal with whatever the audience throws at them.
>i find the claim that tdd is only good
>when there are lots of lines of code odd, because to me it is more
>about state space than about lines of code.Interesting, here is how he puts it:"if your design could create code that was never more than 3 or 4 lines long, and classes that had 7 of these 3 to 5 line methods, why do you need TDD? TDD is absolutely critical and essential when your code is, you know, a couple of 100,000 lines of code, it would be absolutely insane not to use it, but if your codebase is a 100 lines of code, who needs it. So we are doing a whole lot of things that are good practices, but the need for them could be eliminated, if you were thinking about design correctly."Philip
On Monday, 21 October 2013 19:30:54 UTC+1, raould wrote:...like: i would expect the rules thing that 'couldn't be done' would
best be tried in a lisp. and i find the claim that tdd is only good
when there are lots of lines of code odd, because to me it is more
about state space than about lines of code.
On Sun, Oct 27, 2013 at 4:56 PM, philip schwarz <philip.joh...@googlemail.com> wrote:
...So here’s the deal. Rich is concerned, and rightly so, that we have a culture of complexity. That when programmers are given a task, they race ahead and write masses of tangled code, using “easy” frameworks and tools, without giving the problem due thought. That we confuse easiness, with simplicity. (e.g. Rails is easy, it is not simple.) His complaint about tests is that we used them to replace thought. That we feel good about ourselves because we’ve written tests,
This is a crucial problem. I too see people writing tests for the feeling of "I write tests, therefore I rock!!" but never stop questioning: am I writing good tests? Tests give you "permission" to go ahead, you've done the right thing, move on.
The same thing happens, or used to happen, with design patterns. I used 4 patterns, therefore I rock, no need to think further.
I think we all agree here that Rick Hickey (and David West?) are complaining about TDD done poorly; they probably would not complain about TDD done well. But they have a point; many people do TDD poorly.
Doing TDD poorly is not a very big deal, actually. I mean, doing TDD poorly is still a vast improvement over doing programming without tests poorly. Doing TDD poorly only becomes a big problem when I think I'm doing it very well... and stop questioning and improving.
The big obstacle I see in getting individuals and teams to do TDD well is the love of complexity, and that is a bigger problem with people who are "good" programmers, or think they are good. And also with the fact that when you look at the market for programming training, what gets the most press are specific technologies, not fundamental issues that make you think like "Object Thinking" or GOOS or the meaning of "Simple".What do you think?
Matteo
Fogus: You have been known to speak out against test-driven development. Do you mind elaborating on your position?
Hickey: I never spoke out ‘against’ TDD. What I have said is, life is short and there are only a finite number of hours in a day. So, we have to make choices about how we spend our time. If we spend it writing tests, that is time we are not spending doing something else. Each of us needs to assess how best to spend our time in order to maximize our results, both in quantity and quality. If people think that spending fifty percent of their time writing tests maximizes their results—okay for them. I’m sure that’s not true for me—I’d rather spend that time thinking about my problem. I’m certain that, for me, this produces better solutions, with fewer defects, than any other use of my time. A bad design with a complete test suite is still a bad design.
The problem with talking about the tone of the Clojure community is that almost no statement can ever be proven. Rich Hickey and I went around and around about this on Twitter. So after citing this statement of his:
If people think that spending fifty percent of their time writing tests maximizes their results—okay for them. I’m sure that’s not true for me—I’d rather spend that time thinking about my problem.
… I could say that I read a snarky “[those losers]” implicitly attached to “okay for them.” I could say that “fifty percent of your time writing tests” and “rather spend that time thinking about my problem” are complete mischaracterizations of TDD as it’s actually done. And I can say that those mischaracterizations and that snark will be aped by programmers who want to be Rich Hickey.
I could say all those things, but the statement as written isn’t false. It can even be given a generous reading. But—if I’m right—programmers like me won’t stick around to hear defensible statements defended. They’ll just look for friendlier places where they aren’t expected to deal with decade-old arguments as if they were new and insightful.
Please note that I’m not saying Rich Hickie’s design approach is wrong. I suspect for the kinds of problems he solves, it may even be true that his approach is better across all designers than TDD is.
Philip...Clojure was designed to be “a tool for hardcore people to solve hardcore problems.” That’s what Rich Hickey wanted, and that’s what he built. He’s a hardcore person, and like many such people, he isn’t shy about expressing his opinions. Don’t take it personally. (And don’t try to hold a cogent dialogue on Twitter ;)
Yes, Rich Hickey doesn’t like TDD. I’m kind of meh on it, and I’ve written two Clojure testing frameworks! But it’s not a moral judgment. We’re not trying to drive anyone away. If anything, we’re trying to find our way to the next evolutionary step on that path. Maybe clojure.test.generative is that step, maybe it isn’t.
I sincerely hope that Clojure can continue to be valuable to both hardcore and “softcore” users. I believe it’s possible. ...
>>> I think we all agree here that Rick Hickey (and David West?) are
>>> complaining about TDD done poorly; they probably would not complain
>>> about TDD done well. But they have a point; many people do TDD poorly.
>>
>>
>> I'd love to see some examples of TDD done poorly.
>>
>
> My friend Uberto Barbini, who is also on this list, is going to show some at
> the Italian Agile Day next November.
yep, also this Friday at London Agile Tour.
The title of the talk is When TDD Goes Awry and it started as
reflection with Matteo about these same lines.
As Nat (re)pointed out recently on this list, TDD is a design
technique, not a way to test the application.
Interestingly enough if you try only to test the application (because
you know, I'm an architect and I know how to design) you'll finish
with a lot of very poor regression tests and no design at all.
Uberto
But we don't recommend limiting your tests to just one expectation and
everything else being allowed, and definitely not to just one mock and
the rest being stub objects.
Instead, expect the significant outgoing command messages that you are
testing for -- there may be more than one. Allow outgoing queries,
the results of which affect the behaviour under test. Don't constrain
order explicitly unless it is the behaviour being tested, and even
then do so as loosely as possible -- prefer state machines to
sequences, for example. And ignore any interactions that are not
germane to the behaviour being tested if you cannot avoid them
happening in some other way (in jMock you can use the ignoring clause
to ignore messages or entire objects).
Obviously there are situations where this does not hold. For example,
if testing a read-through cache, then you would care about the number
of times a query was made to pull data into the cache, so allowing the
query would not actually test the behaviour you want to test. But
most often, in my experience, it doesn't matter to the functionality of an object how many times a query is performed."
Is that Steve who asked the question about the complexity moved to the collaboration of the objects ?I don't really like West's answer, it's too vague. In my opinion the complexity in the real world is not as comprehensible as he described it. Even in his own example, with all these strange rules you have to apply to the formatting of a document, it will be difficult to be sure the system works as expected in all cases.I think you need an automated way to verify the behavior of the system just to be sure it is working as expected and you need that for every system of significant importance. What I really like in Kent Beck's ideas is that he acknowledges the fact that people make mistakes and need to find a way to minimize those mistakes. TDD in it's essence is just that - a technique that minimize the unconscious mistake we are going to make while programming. I have the feeling that David West overestimate our ability to think flawlessly which in reality is quite the opposite.I think the question about the complexity being moved from the code to the collaboration of the objects is a valid and important one.In a procedural program you can read the code and see the connections there, while in the OO one you need to understand the current objects graph structure. How you deal with that complexity and delegation ? I don't know of any other way than having automated test ...A side question: What he describes as behavior oriented design, is that the opposite of what Rich Hickey says about concentrating your model around the data structures ? Are these ideas completely different or I'm missing something ?On Tue, Oct 22, 2013 at 7:41 PM, J. B. Rainsberger <m...@jbrains.ca> wrote:
On Tue, Oct 22, 2013 at 1:32 PM, Alastair Smith <alas...@alastairsmith.me.uk> wrote:
> I think the distinction he's making is that it takes effort to program the same way when programming in Java. The grain of the language is, at first, entirely procedural. You have to expend effort to organise the system into collaborating objects. In Smalltalk, the grain of the language is the other way: you have to expend effort to organise a program in the procedural style he describes.Is that the case? The code examples that David West displayed near the beginning included "Smalltalk from a Pascal programmer", which suggests to me that it's just as easy to program procedurally in Smalltalk as it is Java, C#, etc. IMHO the problem is more one of adopting the right mindset - thinking in terms of behaviours and messages, rather than flow of execution - and that will cut across all languages.I don't find the grain particularly strong in either direction, but if you could have asked me 15 years ago, I'd probably respond differently. For me, TDD made all the difference, and not Java v. Smalltalk.--
http://blog.thecodewhisperer.com
Free Your Mind to Do Great Work :: http://www.freeyourmind-dogreatwork.com
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriented-software+unsubscribe@googlegroups.com.
--NatIt's nothing to do with threads. Smalltalk has reactive objects, not active (actor-like) objects.The distinction that David West is drawing is between a program having a single entry point that delegates control to sub-modules, and between a program being a collaborating web of live objects that are sending messages to one another and that you modify to define system behaviour.
As Kevlin Henney has put it, you *can* do object-oriented programming in Java, but it does take some effort.On 22 October 2013 13:58, Alfredo Casado <casado....@gmail.com> wrote:
This style is more similar to the actor's models we can see in languages like erlang or scala (scala integrated akka actors model in the language in the last versions). Each object/actor have data, behavior and its own running thread, this actors/objects receives messages asynchronously and this enforces a tell don't ask style. It's difficult to think in this style when we use languages in which "sending a message to an object" its more "calling a function with implicit state".Perhaps have each object in his own individual thread it's too much (think in a java program and each string having its own thread). How do you think about mix this style with functional decomposition or with "C++/java/etc" object oriented decomposition?, i see the actors/objects like element bigger than objects, and i don't sure if the typical rules or principles we apply like SRP can be applied to actors or we need to redefine those principles.2013/10/22 Nat Pryce <nat....@gmail.com>
He doesn't say that. He says that (paraphrased) every Java program starts with a thread of control running a main method, and you program by writing a main method to do something, and breaking down what it does into subordinate procedures and/or classes and objects.
Compare with a Smalltalk program in which there are lots of objects *already running*. Some of those objects translate between Smalltalk messages and hardware interrupts, for input, or control registers, for output, (usually via the OS these days). You program by modifying objects that are already running or creating new ones, and make your program do I/O by connecting your objects to those that interface with the hardware.
On 21 October 2013 19:13, Raoul Duke <rao...@gmail.com> wrote:
i don't understand what he means by saying every java class is a
program with a main(). i also don't understand why he claims
javascript has classes. there's probably other things i won't grok.
:-)
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriented-software+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriented-software+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
---
You received this message because you are subscribed to the Google Groups "Growing Object-Oriented Software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to growing-object-oriented-software+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
...Parnas' paper examined two conceptual abstractions for decomposing complex systems for the purposes of developing software. One was top-down functional decomposition, the approach that was gaining widespread acceptance under the label "structured design". Functional decomposition is based on an attempt to model the performance of the computer and software and to translate the requirements of the domain problem into those computer-based constructs. Parnas offered an alternative approach called "design decision hiding" [self: hiding of decisions which are difficult or changeable], in which the problem or problem domain is modeled and decomposed without consideration of how the component parts of that domain or problem would be implemented. He was able to show thathis alternative led to simpler, easier to read, easier to maintain, and more composable software modules than functional decomposition. Unfortunately his advice was essentially ignored as the juggernaut of structured development came to dominate, at least officially, the manner in which software was conceived and implemented. |
Why is function not considered a natural joint?
West quips about pointing out a function in the room - but don't functions occur just as naturally as objects?
(Is it Meyer who writes similarly that something less volatile than a system's main function is required for sustainable decomposition?)
How does function differ from behaviour?
What's so wrong with this picture?: http://en.m.wikipedia.org/wiki/Structure_chart
Since internals, by definition, are very near to the class actually
under tests using concrete classes or stubs should be enough to test
them using state.