<?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-22120968.post6935755028340951777..comments</id><updated>2008-01-26T21:31:09.851-05:00</updated><category term='recruiting'/><category term='registry'/><category term='fonts'/><category term='video card'/><category term='ccc'/><category term='rock band'/><category term='windows media center'/><category term='investigation'/><category term='visual sourcesafe'/><category term='windows 7'/><category term='c#'/><category term='htpc'/><category term='firefox'/><category term='troubleshooting'/><category term='windows search'/><category term='css'/><category term='ati'/><category term='tips'/><category term='spring'/><category term='rss'/><category term='notepad'/><category term='video'/><category term='email'/><category term='.net'/><category term='eclipse'/><category term='tv'/><category term='maintainability'/><category term='c++'/><category term='jax-ws'/><category term='future'/><category term='xml'/><category term='iis'/><category term='diy'/><category term='BoundsTest'/><category term='msoffice'/><category term='java'/><category term='authentication'/><category term='multiple monitors'/><category term='pdf'/><category term='oracle'/><category term='visual studio'/><category term='pocket pc'/><category term='thinkpad'/><category term='struts'/><category term='intel'/><category term='drm'/><category term='cmd.exe'/><category term='html'/><category term='weblogic'/><category term='testing'/><category term='vista'/><category term='google'/><category term='cellular phone'/><category term='internet service'/><category term='javascript'/><category term='debugging'/><category term='ebay'/><category term='april 1'/><category term='AJAX'/><category term='pathfind'/><category term='cxf'/><category term='conference'/><category term='hp-ux'/><category term='overheat'/><category term='excel'/><category term='Windows Forms hosted in IE'/><category term='skinning'/><category term='windows'/><category term='podcasts'/><category term='productivity'/><category term='usability'/><category term='confluence'/><category term='hardware'/><category term='linksys BEFW11S4'/><category term='linux'/><category term='htpc-build-2010'/><category term='vba'/><category term='windows media player'/><category term='netiquette'/><category term='character encoding'/><category term='culture'/><category term='foxit'/><category term='wii'/><category term='games'/><category term='COM'/><category term='live writer'/><category term='new PC build'/><category term='delicious.com'/><category term='web services'/><category term='ie'/><category term='groupwise'/><category term='bluetooth'/><category term='sql'/><category term='ipod'/><category term='languages'/><category term='jboss'/><category term='search'/><category term='household'/><category term='clipboard'/><category term='management'/><category term='utilities'/><category term='zip'/><title type='text'>Comments on Jon Schneider's Tech Blog: C#/Java/C++: Combining a variable assignment and e...</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.jonschneider.com/feeds/6935755028340951777/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default'/><link rel='alternate' type='text/html' href='http://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html'/><author><name>Jonathan Schneider</name><uri>https://profiles.google.com/109465809713280435321</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='32' height='32' src='//lh6.googleusercontent.com/-j4PSxfs0nrM/AAAAAAAAAAI/AAAAAAAAAAA/dgQ9YIg-ujc/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-22120968.post-2864725647393502178</id><published>2008-01-26T21:31:00.000-05:00</published><updated>2008-01-26T21:31:00.000-05:00</updated><title type='text'>Jon,&lt;br&gt;&lt;br&gt;No apologies necessary.  I always welc...</title><content type='html'>Jon,&lt;BR/&gt;&lt;BR/&gt;No apologies necessary.  I always welcome a great conversation.&lt;BR/&gt;&lt;BR/&gt;I completely agree with your last statement.  Even if you do have 100% test coverage, that does not ensure that you will avoid production issues in the future.&lt;BR/&gt;&lt;BR/&gt;Looking forward to hearing more from you in the future.&lt;BR/&gt;&lt;BR/&gt;Thanks&lt;BR/&gt;Carlus</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default/2864725647393502178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default/2864725647393502178'/><link rel='alternate' type='text/html' href='http://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html?showComment=1201401060000#c2864725647393502178' title=''/><author><name>Carlus Henry</name><uri>http://www.blogger.com/profile/10118327352251205251</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://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html' ref='tag:blogger.com,1999:blog-22120968.post-6935755028340951777' source='http://www.blogger.com/feeds/22120968/posts/default/6935755028340951777' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-817401263'/></entry><entry><id>tag:blogger.com,1999:blog-22120968.post-4518515084987059130</id><published>2008-01-25T16:00:00.000-05:00</published><updated>2008-01-25T16:00:00.000-05:00</updated><title type='text'>Carlus, I apologize, I think I probably wasn't cle...</title><content type='html'>Carlus, I apologize, I think I probably wasn't clear in my previous comment.  I wasn't advocating the use of the debugger in the coding phase of the development cycle as a means for establishing that a piece of code is behaving as expected prior to deployment.  Rather, I was suggesting that even for a piece of code that does have unit tests implemented, the tests aren't necessarily a guarantee that nothing will go wrong in production; and in the case that something does go wrong with the production code, the debugger can be a useful diagnostic tool.&lt;BR/&gt;&lt;BR/&gt;I also agree with the TDD guideline that when a bug is fixed in a piece of production code, a new unit test should be added to the existing test suite for the code that tests the failure case that led to the bug, to ensure that that particular bug can't be re-introduced in the future.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default/4518515084987059130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default/4518515084987059130'/><link rel='alternate' type='text/html' href='http://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html?showComment=1201294800000#c4518515084987059130' title=''/><author><name>Jon</name><uri>http://www.blogger.com/profile/05718316809087214442</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='25' height='32' src='http://jonschneider.com/images/jonfacesmall2_80.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html' ref='tag:blogger.com,1999:blog-22120968.post-6935755028340951777' source='http://www.blogger.com/feeds/22120968/posts/default/6935755028340951777' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-70639457'/></entry><entry><id>tag:blogger.com,1999:blog-22120968.post-2478226503929092564</id><published>2008-01-24T19:59:00.000-05:00</published><updated>2008-01-24T19:59:00.000-05:00</updated><title type='text'>Once again, I am not knocking the debugger....well...</title><content type='html'>Once again, I am not knocking the debugger....well not entirely, anyways.  I am knocking the use of the debugger over the use of tests.&lt;BR/&gt;&lt;BR/&gt;In your example, you are looking for the problem scenario.  You know what the bad input is that causes the problem, because you are stepping through the code anticipating it.  Once you see the problem you can make the necessary adjustments to resolve the issue.&lt;BR/&gt;&lt;BR/&gt;In my opinion, this approach works, but it could be enhanced through the use of tests.  If you do not use a test, that means that the issue can still crop up under the same conditions (especially if someone changes the code after you have made the fix).  &lt;BR/&gt;&lt;BR/&gt;You would start by creating a test that shows the exception - which should be obvious since you know the input which would put you in a failed state.  Then you change and modify the code until the test passes.  The benefit of this is that this test will always be ran.  And since most programmers are "lazy", whenever you deploy this product again, you don't have to worry about running it through the debugger in order to make sure that the problem doesn't exist or that someone has inadvertently brought the defect back into your code.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default/2478226503929092564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default/2478226503929092564'/><link rel='alternate' type='text/html' href='http://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html?showComment=1201222740000#c2478226503929092564' title=''/><author><name>Carlus Henry</name><uri>http://www.blogger.com/profile/10118327352251205251</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://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html' ref='tag:blogger.com,1999:blog-22120968.post-6935755028340951777' source='http://www.blogger.com/feeds/22120968/posts/default/6935755028340951777' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-817401263'/></entry><entry><id>tag:blogger.com,1999:blog-22120968.post-4682840976151968612</id><published>2008-01-24T17:01:00.000-05:00</published><updated>2008-01-24T17:01:00.000-05:00</updated><title type='text'>Carlus, I'm still fairly inexperienced at Test-Dri...</title><content type='html'>Carlus, I'm still fairly inexperienced at Test-Driven Development, but even given a project built using good TDD practices and with a set of test cases with 100% code coverage, there still may be cases where use of the debugger is needed, at least hypothetically.&lt;BR/&gt;&lt;BR/&gt;To take a contrived simple example, consider a method that does a few math operations, including a division.  Even if there are one or more unit tests that prove that the method returns the right result for several different inputs, the method could still blow up (throw an exception) if some specific input is passed to the method that results in the divisor in the division operation being 0; which in turn results in a division-by-zero exception.  In that case, it might be necessary to step into the logic in a debugger in order to see what is going on.&lt;BR/&gt;&lt;BR/&gt;As I mentioned, this example is somewhat contrived; hopefully the programmer in this case would have anticipated and handled the division-by-zero case, or at least the exception message and call stack would provide an obvious pointer to the problem (and thus debugging would not be necessary to find the problem).  There are most likely more realistic examples of the same variety of problem out there in the real world, though!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default/4682840976151968612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default/4682840976151968612'/><link rel='alternate' type='text/html' href='http://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html?showComment=1201212060000#c4682840976151968612' title=''/><author><name>Jon</name><uri>http://www.blogger.com/profile/05718316809087214442</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='25' height='32' src='http://jonschneider.com/images/jonfacesmall2_80.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html' ref='tag:blogger.com,1999:blog-22120968.post-6935755028340951777' source='http://www.blogger.com/feeds/22120968/posts/default/6935755028340951777' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-70639457'/></entry><entry><id>tag:blogger.com,1999:blog-22120968.post-8372596019111394146</id><published>2008-01-20T09:24:00.000-05:00</published><updated>2008-01-20T09:24:00.000-05:00</updated><title type='text'>The coding for debugging purposes is a valid argum...</title><content type='html'>The coding for debugging purposes is a valid argument.  If you structure your code in a certain fashion, then that does make it harder to debug.  I would stress the term harder, as oppose to impossible for a number of reasons.  &lt;BR/&gt;&lt;BR/&gt;One reason is that you can always, highlight the equation and instantly get a value that the equation evaluates to.  At least you can do this in Eclipse, so I can imagine that you can do this in other IDE's as well.&lt;BR/&gt;&lt;BR/&gt;It if funny that you mention the debug scenario.  While attending a conference where Uncle Bob Martin was speaking, he asked if anyone there was familiar with the Debugger for their particular language.  He asked if anyone was really good at the short cut keys for Step Over, Step Into and such.  Some people raised their hand, and he followed it up with that should not be a skilled to be envied.&lt;BR/&gt;&lt;BR/&gt;Reason why that is not a skill to be envied is because we all should be doing Test Driven Development, instead of debugging.  Using Test Driven Development tactics, you can  prove what the value of an equation is and how it will behave under the test circumstances.&lt;BR/&gt;&lt;BR/&gt;What are your thoughts around Test Driven Development and how it relates to the Debugger?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default/8372596019111394146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default/8372596019111394146'/><link rel='alternate' type='text/html' href='http://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html?showComment=1200839040000#c8372596019111394146' title=''/><author><name>Carlus Henry</name><uri>http://www.blogger.com/profile/10118327352251205251</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://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html' ref='tag:blogger.com,1999:blog-22120968.post-6935755028340951777' source='http://www.blogger.com/feeds/22120968/posts/default/6935755028340951777' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-817401263'/></entry><entry><id>tag:blogger.com,1999:blog-22120968.post-5741391167909769815</id><published>2008-01-02T19:05:00.000-05:00</published><updated>2008-01-02T19:05:00.000-05:00</updated><title type='text'>Another reason to avoid contructs like this is to ...</title><content type='html'>Another reason to avoid contructs like this is to make it easier to debug.  Depending on the symbolic debugger, it might not be a problem, but inserting a quick printf (substitute your favorite console output) is much harder when assignment and evaluation are combined into a single line.  With that said, for the code in question a printf of the case that fails the while makes no sense, so it isn't a problem there.  In more generic usage, I can think of cases where explicitly separating  assignment and evaluation is definitely advantageous for debugging/reading (well, in my opinion, anyway).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default/5741391167909769815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default/5741391167909769815'/><link rel='alternate' type='text/html' href='http://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html?showComment=1199318700000#c5741391167909769815' title=''/><author><name>Chris</name><uri>http://www.chrisoverbeek.com/</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://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html' ref='tag:blogger.com,1999:blog-22120968.post-6935755028340951777' source='http://www.blogger.com/feeds/22120968/posts/default/6935755028340951777' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1202463202'/></entry><entry><id>tag:blogger.com,1999:blog-22120968.post-65564832556894458</id><published>2007-12-29T23:49:00.000-05:00</published><updated>2007-12-29T23:49:00.000-05:00</updated><title type='text'>Be careful.  Soon you will start to appreciate the...</title><content type='html'>Be careful.  Soon you will start to appreciate the ternary operator as well. :-)&lt;BR/&gt;&lt;BR/&gt;String greeting = (name != null) ? "Hello " + name : "Hello Anonymous";&lt;BR/&gt;&lt;BR/&gt;Code readability is a subjective concept.  In order for code to be readable, the assumption is that the reader will understand it.  In the example that you give, that code is readable for those that understand what is going on.  &lt;BR/&gt;&lt;BR/&gt;I don't think that you sacrifice code readability for brevity, as long as the audience that is reading the code understands what is happening.  In the case that the audience doesn't understand what is happening, then either one of two things must occur.  The reviewer can take the opportunity to learn something new, or the developer has to change their code so the reviewer can understand what is happening.  In situations like the one that you presented, I would hope that the reviewer would take the opportunity to learn something new.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default/65564832556894458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/22120968/6935755028340951777/comments/default/65564832556894458'/><link rel='alternate' type='text/html' href='http://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html?showComment=1198990140000#c65564832556894458' title=''/><author><name>Carlus Henry</name><uri>http://www.blogger.com/profile/10118327352251205251</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://blog.jonschneider.com/2007/12/cjavac-combining-variable-assignment.html' ref='tag:blogger.com,1999:blog-22120968.post-6935755028340951777' source='http://www.blogger.com/feeds/22120968/posts/default/6935755028340951777' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-817401263'/></entry></feed>
