<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-13967713.post5459660748856496234..comments</id><updated>2011-07-05T12:14:45.470+02:00</updated><category term='AOP'/><category term='tools'/><category term='engineering'/><category term='process'/><category term='HCI'/><category term='quote'/><category term='multithreading'/><category term='UML'/><category term='multicore'/><category term='oop'/><category term='COM'/><category term='poll'/><category term='announce'/><category term='cloud'/><category term='algorithms'/><category term='concurrency'/><category term='profession'/><category term='form'/><category term='ASP.NET'/><category term='GUI'/><category term='C#'/><category term='C++'/><category term='article reference'/><category term='agile'/><category term='NOSD'/><category term='metrics'/><category term='analysis'/><category term='generics'/><category term='free time'/><category term='coding'/><category term='pattern'/><category term='real options'/><category term='windows'/><category term='link'/><category term='design'/><category term='quality'/><category term='modeling'/><category term='book reference'/><category term='project management'/><category term='requirements'/><category term='architecture'/><category term='teaching'/><category term='estimation'/><category term='database'/><category term='.NET'/><category term='thinking'/><category term='language design'/><title type='text'>Comments on Carlo Pescio - blog: Cut the red wire!</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.carlopescio.com/feeds/5459660748856496234/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default'/><link rel='alternate' type='text/html' href='http://www.carlopescio.com/2011/06/cut-red-wire.html'/><author><name>Carlo.Pescio</name><uri>http://www.blogger.com/profile/12652284939993729858</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-13967713.post-1993989311424699928</id><published>2011-07-05T12:14:45.470+02:00</published><updated>2011-07-05T12:14:45.470+02:00</updated><title type='text'>you can start with a recent overview paper, like t...</title><content type='html'>you can start with a recent overview paper, like this:&lt;br /&gt;&lt;br /&gt;http://cacm.acm.org/magazines/2011/7/109910-dsl-for-the-uninitiated/fulltext&lt;br /&gt;&lt;br /&gt;and then pick some of the bibliography. Most authors use a dynamic language, but it&amp;#39;s not really needed.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/1993989311424699928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/1993989311424699928'/><link rel='alternate' type='text/html' href='http://www.carlopescio.com/2011/06/cut-red-wire.html?showComment=1309860885470#c1993989311424699928' title=''/><author><name>Carlo.Pescio</name><uri>http://www.blogger.com/profile/12652284939993729858</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.carlopescio.com/2011/06/cut-red-wire.html' ref='tag:blogger.com,1999:blog-13967713.post-5459660748856496234' source='http://www.blogger.com/feeds/13967713/posts/default/5459660748856496234' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-377659270'/></entry><entry><id>tag:blogger.com,1999:blog-13967713.post-4378385002063435920</id><published>2011-07-05T11:49:05.049+02:00</published><updated>2011-07-05T11:49:05.049+02:00</updated><title type='text'>I will wait for you to write down the strategies, ...</title><content type='html'>I will wait for you to write down the strategies, then :-)&lt;br /&gt;&lt;br /&gt;About your approach to the problem: could you give me some good reading about DLS, please?&lt;br /&gt;&lt;br /&gt;Thanks a lot!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/4378385002063435920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/4378385002063435920'/><link rel='alternate' type='text/html' href='http://www.carlopescio.com/2011/06/cut-red-wire.html?showComment=1309859345049#c4378385002063435920' title=''/><author><name>Daniele</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.carlopescio.com/2011/06/cut-red-wire.html' ref='tag:blogger.com,1999:blog-13967713.post-5459660748856496234' source='http://www.blogger.com/feeds/13967713/posts/default/5459660748856496234' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1752352867'/></entry><entry><id>tag:blogger.com,1999:blog-13967713.post-6846503746141381822</id><published>2011-07-05T10:49:17.929+02:00</published><updated>2011-07-05T10:49:17.929+02:00</updated><title type='text'>Daniele: I&amp;#39;ll start with the easy part (C++).
...</title><content type='html'>Daniele: I&amp;#39;ll start with the easy part (C++).&lt;br /&gt;&lt;br /&gt;In a language without extension methods, you can either use subclassing (so you can keep using the dot notation) or change your syntax. The most notable difference between C++ and Java/C# is that in C++ you don&amp;#39;t need to put your functions inside a class, so you can leverage that as part of your little DSL. Generally speaking, embedding a DSL inside a programming language requires some creativity and a good knowledge of your material. In C++ we have (for instance) template specialization, which is absent in other languages. We can build stack-based, anonymous objects without using &amp;quot;new&amp;quot;. Etc.&lt;br /&gt;&lt;br /&gt;Just to play around with syntax, it would be trivial to mix template specialization, integral template parameters, and a couple of enumerated types with a single value inside and come up with a syntax like:&lt;br /&gt;&lt;br /&gt;Trim(roll).By&amp;lt;Count&amp;gt;(2).Top&amp;lt;Face&amp;gt;(1).Score();&lt;br /&gt;&lt;br /&gt;Where Trim returns a new, stack-based, anonymous object [of a new class, not Roll], and you can figure out the rest :-). The use of template specialization is just for fun, of course, but then I can say By&amp;lt;Count&amp;gt; or By&amp;lt;Face&amp;gt;, which I tend to like.&lt;br /&gt;&lt;br /&gt;Your question about strategies made me realize that I never took the time to write them down. It&amp;#39;s complicated - for instance, my little DLS could be seen as an instance of an architectural pattern (pipes and filters) but that&amp;#39;s a bit of a stretch. I guess that over the years I&amp;#39;ve accumulated a body of knowledge that I would have to unravel to give you a proper answer. Right now, I can&amp;#39;t :-(. A good understanding of architectural patterns and problem frames, however, is a first good step in the right direction.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/6846503746141381822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/6846503746141381822'/><link rel='alternate' type='text/html' href='http://www.carlopescio.com/2011/06/cut-red-wire.html?showComment=1309855757929#c6846503746141381822' title=''/><author><name>Carlo.Pescio</name><uri>http://www.blogger.com/profile/12652284939993729858</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.carlopescio.com/2011/06/cut-red-wire.html' ref='tag:blogger.com,1999:blog-13967713.post-5459660748856496234' source='http://www.blogger.com/feeds/13967713/posts/default/5459660748856496234' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-377659270'/></entry><entry><id>tag:blogger.com,1999:blog-13967713.post-8070382004575771615</id><published>2011-07-05T10:25:30.342+02:00</published><updated>2011-07-05T10:25:30.342+02:00</updated><title type='text'>Fulvio:
long before TDD, I used to do a &amp;quot;call...</title><content type='html'>Fulvio:&lt;br /&gt;long before TDD, I used to do a &amp;quot;caller-driven design&amp;quot;, which is a similar technique, to design the API of libraries / frameworks / components. Designing an API from the outside makes it easier to use, avoiding the temptation to expose the internal model (which is very common when you design an API &amp;quot;from the inside&amp;quot;). TDD is perfect here. Of course, the economic value of keeping all test cases alive forever is less clear-cut, just like the economic value of keeping models alive. I&amp;#39;ve written about this before in the context of self-fulfilling expectations.&lt;br /&gt;&lt;br /&gt;Assertions vs exceptions. I tend to use assertions to guard against programming errors. I tend to use exceptions to guard about unexpected environmental conditions (e.g. your network connection went down). In our specific case, an unchecked assertion (which means we did a poor job of testing our code) would still come up as an exception (out of bound access). There is little point in remapping that to another exception. It&amp;#39;s an unrecoverable [programming] error anyway.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t have the time and energy, at this time, to organize a design retreat or something. We&amp;#39;ll see :-)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/8070382004575771615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/8070382004575771615'/><link rel='alternate' type='text/html' href='http://www.carlopescio.com/2011/06/cut-red-wire.html?showComment=1309854330342#c8070382004575771615' title=''/><author><name>Carlo.Pescio</name><uri>http://www.blogger.com/profile/12652284939993729858</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.carlopescio.com/2011/06/cut-red-wire.html' ref='tag:blogger.com,1999:blog-13967713.post-5459660748856496234' source='http://www.blogger.com/feeds/13967713/posts/default/5459660748856496234' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-377659270'/></entry><entry><id>tag:blogger.com,1999:blog-13967713.post-5520559049900494188</id><published>2011-07-04T11:53:41.879+02:00</published><updated>2011-07-04T11:53:41.879+02:00</updated><title type='text'>Hi Carlo,

good post. I actually tried to solve th...</title><content type='html'>Hi Carlo,&lt;br /&gt;&lt;br /&gt;good post. I actually tried to solve the problem before going on with the reading, but obviously I couldn&amp;#39;t find a beautiful solution like yours: the DSL approach is really interesting.&lt;br /&gt;&lt;br /&gt;In the post you said: &amp;quot;Not every single problem lends itself well to the DSL approach. As usual, we have to be flexible, understand the nature of the problem, and choose the best design strategy&amp;quot;. Quite correct. Which &amp;quot;design strategy&amp;quot; do you know and use?&lt;br /&gt;&lt;br /&gt;And finally: what if you had to solve the problem using a language like C++ that doesn&amp;#39;t provide Extension Methods?&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Daniele</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/5520559049900494188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/5520559049900494188'/><link rel='alternate' type='text/html' href='http://www.carlopescio.com/2011/06/cut-red-wire.html?showComment=1309773221879#c5520559049900494188' title=''/><author><name>Daniele</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.carlopescio.com/2011/06/cut-red-wire.html' ref='tag:blogger.com,1999:blog-13967713.post-5459660748856496234' source='http://www.blogger.com/feeds/13967713/posts/default/5459660748856496234' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1752352867'/></entry><entry><id>tag:blogger.com,1999:blog-13967713.post-5324126971806953718</id><published>2011-07-03T20:53:01.847+02:00</published><updated>2011-07-03T20:53:01.847+02:00</updated><title type='text'>you do remember me of Harry Potter, you do magic :...</title><content type='html'>you do remember me of Harry Potter, you do magic :D&lt;br /&gt;&lt;br /&gt;This is really the kind of post I like to read, where someone explains how and why to challenge a problem, and don&amp;#39;t leave you with a plethora of principles context-less.&lt;br /&gt;&lt;br /&gt;I know your view about TDD, but there&amp;#39;s a context where you may suggest to use TDD?&lt;br /&gt;&lt;br /&gt;I noticed that you continue to use assertions where everyone use exceptions. Many think that an assertion goes away in release build, so there&amp;#39;s no chance to trap it. Sun (Oracle?) suggests to use assertions in private methods to check precondition and exceptions for public methods of a class. I like assertions cause i think it&amp;#39;s the best tool for the scope but someone could say that are useless without complete test coverage or strange runtime behaviour may raise. Why do you use assertion? :)&lt;br /&gt;&lt;br /&gt;I remember some times ago you express the will to plan an event to practice design. After this post, I vote to design it :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/5324126971806953718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/5324126971806953718'/><link rel='alternate' type='text/html' href='http://www.carlopescio.com/2011/06/cut-red-wire.html?showComment=1309719181847#c5324126971806953718' title=''/><author><name>Fulvio.Esposito</name><uri>http://www.blogger.com/profile/04630127186004942157</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='02755327984360126873'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='31' src='http://2.bp.blogspot.com/_HXw-L5xTzpk/SqDEAWrWc-I/AAAAAAAAAUg/RyPdd6jsyUg/S220/disney+robin+hood.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.carlopescio.com/2011/06/cut-red-wire.html' ref='tag:blogger.com,1999:blog-13967713.post-5459660748856496234' source='http://www.blogger.com/feeds/13967713/posts/default/5459660748856496234' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-276213240'/></entry><entry><id>tag:blogger.com,1999:blog-13967713.post-6082771846159901</id><published>2011-06-30T00:24:48.333+02:00</published><updated>2011-06-30T00:24:48.333+02:00</updated><title type='text'>Hey there Matteo :-)

I wouldn&amp;#39;t use a regular...</title><content type='html'>Hey there Matteo :-)&lt;br /&gt;&lt;br /&gt;I wouldn&amp;#39;t use a regular for, I&amp;#39;ve been bitten by off-by-one errors more than once. I&amp;#39;ve frequently forgotten to increment an iterator inside a while loop in C++ as well. A foreach would be ok, I guess, as I&amp;#39;m always iterating over the entire collection. &lt;br /&gt;Lacking linq, however, I would probably write my own methods at some point. Having a language with lambda functions and not using them is a capital offense :-) &lt;br /&gt;&lt;br /&gt;You wouldn&amp;#39;t drown DiceGroup in tests, but I know a few who would. That&amp;#39;s the problem with mantras :-).&lt;br /&gt;&lt;br /&gt;The next paragraph in Feathers&amp;#39; book reads like this: &amp;quot;You might think that this is severe. What about clean code? If a code base is very clean and well structured, isn&amp;#39;t that enough? Well, make no mistake. I love clean code. I love it more than most people I know, but while clean code is good, it&amp;#39;s not enough&amp;quot;, so I would say that my code is not good enough for him. Too bad :-).&lt;br /&gt;&lt;br /&gt;Dice: ouch, ouch, ouch, age is taking its toll? :-) I [quickly] fixed the post. Not the code, but it&amp;#39;s kinda late :-). Thanks!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/6082771846159901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/6082771846159901'/><link rel='alternate' type='text/html' href='http://www.carlopescio.com/2011/06/cut-red-wire.html?showComment=1309386288333#c6082771846159901' title=''/><author><name>Carlo.Pescio</name><uri>http://www.blogger.com/profile/12652284939993729858</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.carlopescio.com/2011/06/cut-red-wire.html' ref='tag:blogger.com,1999:blog-13967713.post-5459660748856496234' source='http://www.blogger.com/feeds/13967713/posts/default/5459660748856496234' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-377659270'/></entry><entry><id>tag:blogger.com,1999:blog-13967713.post-7566922329614799788</id><published>2011-06-29T23:36:24.761+02:00</published><updated>2011-06-29T23:36:24.761+02:00</updated><title type='text'>Hi Carlo, 

fascinating read.  I like the idea of ...</title><content type='html'>Hi Carlo, &lt;br /&gt;&lt;br /&gt;fascinating read.  I like the idea of looking for a little language to express the problem.  I like the idea of thinking how to write code that works the first time.  I like the little list of alternatives that you tried and rejected to design your little language.  I like how the &amp;quot;false start&amp;quot; shows by contrast what a good DSL should look like.&lt;br /&gt;&lt;br /&gt;I found difficult to follow the Linq bits.  It turns out you are way more anti-FOR than I am!  I don&amp;#39;t know Linq.  Also I&amp;#39;m tired right now :-)  I wonder if you&amp;#39;d find it that more difficult to write the little loops yourself?  (Always in the context of &amp;quot;it should work the first time or else the nukes are off&amp;quot; :-)&lt;br /&gt;&lt;br /&gt;Regarding the idea of &amp;quot;drowning&amp;quot; the little DiceGroup class with tests, I feel I should comment, given that I&amp;#39;m a TDD advocate :-)  Well I wouldn&amp;#39;t write tests for that, because the tests I write in TDD are a design technique, not a test technique.  &lt;br /&gt;&lt;br /&gt;If I wrote DiceGroup without tests because I used a different design process, like you are doing here, then I would not necessarily need to write tests after.  I would only write tests after if the code was not completely trivial.&lt;br /&gt;&lt;br /&gt;About the quote from Feathers: it should be taken in context.  Feathers is talking of code that makes you afraid to change! If your code is not obviously correct *and* you don&amp;#39;t have tests, then you have code that is difficult to change, and that is precisely the problem that Feathers deals with in his book.  OTOH, your Yahtzee DSL gives you feedback from the fact that it&amp;#39;s so close to the problem.  That makes it easy to change because it&amp;#39;s very easy to *understand*.  &lt;br /&gt;&lt;br /&gt;I would guess that Feathers had a lot of discussions with people who were honestly convinced of having good code (OOD and all) but had in fact code that is both nonobvious and without tests, therefore code that is a problem for whomever needs to change it.&lt;br /&gt;&lt;br /&gt;This essay reminded me of &lt;a href="http://multicians.org/andre.html" title="It Can Be Done" rel="nofollow"&gt;this story&lt;/a&gt; of a programmer who wrote a major bit of a filesystem on paper that worked the first time :-) Pity the story does not say much about what his thinking process was!  &lt;br /&gt;&lt;br /&gt;(Nitpicking: die=dado, dice=dadi, dices=not a word)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/7566922329614799788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13967713/5459660748856496234/comments/default/7566922329614799788'/><link rel='alternate' type='text/html' href='http://www.carlopescio.com/2011/06/cut-red-wire.html?showComment=1309383384761#c7566922329614799788' title=''/><author><name>xpmatteo</name><uri>http://matteo.vaccari.name/blog/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.carlopescio.com/2011/06/cut-red-wire.html' ref='tag:blogger.com,1999:blog-13967713.post-5459660748856496234' source='http://www.blogger.com/feeds/13967713/posts/default/5459660748856496234' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-202163027'/></entry></feed>
