<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.wordaligned.org/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Word Aligned - Latest Comments</title><link xmlns="http://www.w3.org/2005/Atom" rel="http://api.friendfeed.com/2008/03#sup" href="http://disqus.com/sup/all.sup#forumcomments-4e0fcddc" type="application/json" /><link>http://wordaligned.disqus.com/</link><description>Tales from the code face</description><language>en</language><lastBuildDate>Sun, 09 Jun 2013 18:31:25 -0000</lastBuildDate><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.wordaligned.org/wordaligned/comments" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="wordaligned/comments" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>Re: Two star programming</title><link>http://wordaligned.org/articles/two-star-programming#comment-924649352</link><description>&lt;p&gt;Don't try this at home: I have a particular application where I needed to delete a structure from a singly-linked list. I already have the address of the structure, so I don't need any key compare, and I'm guaranteed that the structure is in fact in the list, and that the list is not empty. This allowed me to condense the delete into 3 lines:&lt;/p&gt;

&lt;p&gt;        pp = &amp;amp;head;&lt;br&gt;while (*pp != g) pp = &amp;amp;((*pp)-&amp;gt;next);&lt;br&gt;*pp = g-&amp;gt;next;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lee Crocker</dc:creator><pubDate>Sun, 09 Jun 2013 18:31:25 -0000</pubDate></item><item><title>Re: The Maximum Sum contiguous subsequence problem</title><link>http://wordaligned.org/articles/the-maximum-subsequence-problem#comment-895442295</link><description>&lt;p&gt;Nice article,well explained. problem i have is, i need to know between which elements of the stream,the max sequence is achieved. Anyone has an idea or suggestion for that?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">seba</dc:creator><pubDate>Sun, 12 May 2013 20:07:46 -0000</pubDate></item><item><title>Re: Angle brackets hurt my eyes</title><link>http://wordaligned.org/articles/angle-brackets-hurt-my-eyes#comment-886302506</link><description>&lt;p&gt;If that's ant, there's no need to check (it's mkdir -p by default). I agree with your point though. If redundant code is too scary to look at (or takes any mental effort to parse) it's harder to spot it does nothing but add noise. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Burns</dc:creator><pubDate>Mon, 06 May 2013 04:53:42 -0000</pubDate></item><item><title>Re: “Solutions”</title><link>http://wordaligned.org/articles/solutions#comment-866453444</link><description>&lt;p&gt;You need one of the Emacs/Perforce integrations (&lt;a href="http://public.perforce.com/wiki/Emacs_VC-P4" rel="nofollow"&gt;there's one with a VC-like interface&lt;/a&gt;, and &lt;a href="https://github.com/filsinger/p4.el/blob/master/p4.el" rel="nofollow"&gt;one with a Perforce-like interface&lt;/a&gt;).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gareth Rees</dc:creator><pubDate>Wed, 17 Apr 2013 18:15:28 -0000</pubDate></item><item><title>Re: An Exploration of the Phenomenology of Software Development</title><link>http://wordaligned.org/articles/an-exploration-of-the-phenomenology-of-software-development#comment-863241711</link><description>&lt;p&gt;Hi Thomas,&lt;/p&gt;

&lt;p&gt;Good to see you at ACCU. Also enjoyed Brian Marick's talk. Had an interesting talk with Tom Gilb too, who is a self-confessed fan of Descartes!&lt;/p&gt;

&lt;p&gt;Actual slides for my ACCU talk are available at slideshare here:&lt;br&gt;&lt;a href="http://www.slideshare.net/charlestolman/accu-2013-exploration-of-phenomenology-of-sw-development" rel="nofollow"&gt;http://www.slideshare.net/char...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Charles Tolman</dc:creator><pubDate>Sun, 14 Apr 2013 11:19:20 -0000</pubDate></item><item><title>Re: ACCU 2013</title><link>http://wordaligned.org/articles/accu-2013#comment-860692846</link><description>&lt;p&gt;I'd say you dispatched it in the sense of "dealt with a fire hazard". The show must go on! Excellent compering.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tag</dc:creator><pubDate>Fri, 12 Apr 2013 05:40:41 -0000</pubDate></item><item><title>Re: ACCU 2013</title><link>http://wordaligned.org/articles/accu-2013#comment-860656362</link><description>&lt;p&gt;Good to see you yesterday Tom. Note that I dispatched the cake in the sense of "took delivery of" rather than "ate the entire thing".&lt;/p&gt;

&lt;p&gt;I'll be doing that over the weekend.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ewan Milne</dc:creator><pubDate>Fri, 12 Apr 2013 04:58:54 -0000</pubDate></item><item><title>Re: An Exploration of the Phenomenology of Software Development</title><link>http://wordaligned.org/articles/an-exploration-of-the-phenomenology-of-software-development#comment-856502070</link><description>&lt;p&gt;Actually, it wasn't the title I was commenting on -- I meant the talk summary on the meetup and accu conference pages. Though now you mention it, maybe a more punchy title would help :-)&lt;/p&gt;

&lt;p&gt;I hope you have a great time at the conference. I suspect your talk will end up being one of many highlights.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tag</dc:creator><pubDate>Mon, 08 Apr 2013 12:32:26 -0000</pubDate></item><item><title>Re: An Exploration of the Phenomenology of Software Development</title><link>http://wordaligned.org/articles/an-exploration-of-the-phenomenology-of-software-development#comment-850014792</link><description>&lt;p&gt;Thanks Thomas for the comments. You're right about the title - thanks to pressure of life I didn't quite get around to giving it a snazzier one!&lt;/p&gt;

&lt;p&gt;Have just been reading Christopher Alexander's last book in the "Nature of Order" series : "The Luminous Ground", though more in  reflective mode now I have mostly wrapped up the talk content. I found a fair few epiphanies in it which prompted me to put a post on my blog on the "Importance of being an Amateur". I also attached the slides as a link there if anyone is interested.&lt;/p&gt;

&lt;p&gt;I like your site - nice title.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Charles Tolman</dc:creator><pubDate>Tue, 02 Apr 2013 19:31:38 -0000</pubDate></item><item><title>Re: Steganography made simple</title><link>http://wordaligned.org/articles/steganography#comment-824294586</link><description>&lt;p&gt;how to get the source code of it &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hemanth Kandukuri</dc:creator><pubDate>Sat, 09 Mar 2013 16:40:41 -0000</pubDate></item><item><title>Re: Next permutation: When C++ gets it right</title><link>http://wordaligned.org/articles/next-permutation#comment-823619325</link><description>&lt;p&gt;What a read! But is it possible to run permutations and filter them but what each permutation means? Like rolling two dice, but the code reads it at, say, forty six instead of 4 and 6? Just a question as I'm looking someone to hire that can work with this concept. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ddura001</dc:creator><pubDate>Fri, 08 Mar 2013 22:29:23 -0000</pubDate></item><item><title>Re: Two star programming</title><link>http://wordaligned.org/articles/two-star-programming#comment-822021476</link><description>&lt;p&gt;Have you seen the Linux (or git) source code?  It contains blatant undefined   behavior, including violations of strict aliasing and integer overflow in *security critical* networking code.&lt;/p&gt;

&lt;p&gt;As for what I've done:  I work on llvm and Firefox.  This is not really relevant Linus being a bad programmer though.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bob Pelorson</dc:creator><pubDate>Thu, 07 Mar 2013 10:56:50 -0000</pubDate></item><item><title>Re: More adventures in C++</title><link>http://wordaligned.org/articles/more-adventures-in-c++#comment-818150657</link><description>&lt;p&gt;Thanks for the write-up. With so many new features, it helps to have individual treatments rather than global feature tours.&lt;/p&gt;

&lt;p&gt;One thing to add. For types like point that don't have a "natural" order, I try to define less&amp;lt;t&amp;gt; instead of operator&amp;lt;. Not a big difference, but I think the former supports the connotation that this ordering is artificial and only exists to satisfy the needs of ordered containers. And it prevents client code from using A &amp;lt; B as if it had a natural meaning.&amp;lt;/t&amp;gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Xan Gregg</dc:creator><pubDate>Sun, 03 Mar 2013 10:21:04 -0000</pubDate></item><item><title>Re: Why Python programmers should learn Python</title><link>http://wordaligned.org/articles/why-python-programmers-should-learn-python#comment-802545831</link><description>&lt;p&gt;I am java developer. I am scared of using python in a team after reading this.&lt;br&gt;It looks unmaintainable, slow and how will i code without intelli sense...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Test</dc:creator><pubDate>Sun, 17 Feb 2013 17:55:23 -0000</pubDate></item><item><title>Re: Why Software Development isn&amp;#8217;t Like Construction</title><link>http://wordaligned.org/articles/why-software-development-isnt-like-construction#comment-800386983</link><description>&lt;p&gt;le pedantic  trivia face xD&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lel</dc:creator><pubDate>Fri, 15 Feb 2013 10:37:37 -0000</pubDate></item><item><title>Re: Two star programming</title><link>http://wordaligned.org/articles/two-star-programming#comment-798343379</link><description>&lt;p&gt; This function never actually unlinks removed nodes from the list.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mikeb</dc:creator><pubDate>Wed, 13 Feb 2013 19:00:42 -0000</pubDate></item><item><title>Re: Copy, load, redirect and tee using C++ streambufs</title><link>http://wordaligned.org/articles/cpp-streambufs#comment-795793115</link><description>&lt;p&gt;What is the problem with the code under the title "A bus error on my platform".&lt;/p&gt;

&lt;p&gt;The fact that the code doesn't restore cout's streambuf before exiting is not a problem here. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">JohnKal</dc:creator><pubDate>Mon, 11 Feb 2013 16:02:09 -0000</pubDate></item><item><title>Re: Two star programming</title><link>http://wordaligned.org/articles/two-star-programming#comment-785500858</link><description>&lt;p&gt;shouldn't it be:&lt;br&gt;    *curr = &amp;amp;entry-&amp;gt;next;&lt;/p&gt;

&lt;p&gt;???&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">raja</dc:creator><pubDate>Fri, 01 Feb 2013 02:09:38 -0000</pubDate></item><item><title>Re: Python’s lesser known loop control</title><link>http://wordaligned.org/articles/pythons-lesser-known-loop-control#comment-776088684</link><description>&lt;p&gt;Yes you have to do edits twice now, but you can make that less error prone by abstracting away the parameters to the function calls (4096 here) as variables assigned above the loop.&lt;/p&gt;

&lt;p&gt;If you did that, then most edits arguably would only need to happen once - where you assign the variables values. If you really wanted you could make it a little more generic by using the functools approach and reduce the likelihood of having to make the edit in 2 places.&lt;/p&gt;

&lt;p&gt;I guess its a matter of preference, but I feel that the iter(object, sentinel) style is less optimal than the other 2 styles because its less known within both the python community and the bigger coding community. Even if you could make it popular among python programmers, a Java programmer for example, tasked to maintain python code would still find it confusing.&lt;/p&gt;

&lt;p&gt;That said, your article did teach me about functools and iter that are missing in other languages - Thanks!&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Coolgg</dc:creator><pubDate>Wed, 23 Jan 2013 18:18:53 -0000</pubDate></item><item><title>Re: Folded files and rainbow code</title><link>http://wordaligned.org/articles/folded-files-and-rainbow-code#comment-776054755</link><description>&lt;p&gt;Thanks, dfarmer, I do like it, especially points 08 and 09!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tag</dc:creator><pubDate>Wed, 23 Jan 2013 17:33:34 -0000</pubDate></item><item><title>Re: Folded files and rainbow code</title><link>http://wordaligned.org/articles/folded-files-and-rainbow-code#comment-776039207</link><description>&lt;p&gt;Thought you might like this post by Russ Cox on what might be summarized as "The Acme Way" &lt;a href="http://9fans.net/archive/2008/08/134" rel="nofollow"&gt;http://9fans.net/archive/2008/...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dfarmer</dc:creator><pubDate>Wed, 23 Jan 2013 17:21:06 -0000</pubDate></item><item><title>Re: Python’s lesser known loop control</title><link>http://wordaligned.org/articles/pythons-lesser-known-loop-control#comment-776034027</link><description>&lt;p&gt;Yes, that works. The repeated calls to fp.read() aren't ideal though.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">tag</dc:creator><pubDate>Wed, 23 Jan 2013 17:16:58 -0000</pubDate></item><item><title>Re: Python’s lesser known loop control</title><link>http://wordaligned.org/articles/pythons-lesser-known-loop-control#comment-775996326</link><description>&lt;p&gt;Let me try pasting that one more time:&lt;/p&gt;

&lt;p&gt;data = fp.read (4096)&lt;br&gt;while data:&lt;br&gt;  ...{handle the chunk here}&lt;br&gt;  data = fp.read (4096)&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Coolgg</dc:creator><pubDate>Wed, 23 Jan 2013 16:38:52 -0000</pubDate></item><item><title>Re: Python’s lesser known loop control</title><link>http://wordaligned.org/articles/pythons-lesser-known-loop-control#comment-775994613</link><description>&lt;p&gt;&lt;/p&gt;

&lt;p&gt;I have zero python experience,&lt;br&gt;but wouldn’t the below be the more obvious&lt;br&gt;simpler solution?&lt;/p&gt;

&lt;p&gt; data = fp.read (4096)&lt;/p&gt;

&lt;p&gt; while data:&lt;/p&gt;

&lt;p&gt;               &lt;br&gt;… {handle the chunk here}&lt;/p&gt;

&lt;p&gt;              &lt;br&gt;data = fp.read (4096)&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Coolgg</dc:creator><pubDate>Wed, 23 Jan 2013 16:36:38 -0000</pubDate></item><item><title>Re: Python’s lesser known loop control</title><link>http://wordaligned.org/articles/pythons-lesser-known-loop-control#comment-772669878</link><description>&lt;p&gt;There is no code snippet that I can pull out that would really demonstrate this - as I said, the smaller and simpler the example, the less tangible the benefits (though I believe you still benefit from the decomposition of your problem into easily tested functions).&lt;/p&gt;

&lt;p&gt;As for a more complex scenario, one of our applications stores complex product data in a graph-like structure. Different sections of the code need to be able to run a check against a given node, while also traversing the parents and children (i.e., if I "own" a child node, I also indirectly own its parent; another scenario, if any of a selected nodes parents OR children require my DOB, a form needs to present the DOB field.). The initial implementation was built imperatively and resulted in a fair bit of similar, but mostly duplicated graph traversal code.&lt;/p&gt;

&lt;p&gt;I refactored the code to use a functional style, which resulted in a higher order function for the traversal code, which accepts two functions - the first is mapped against all of the parents and children and wraps the specific check to be run. The second is usually any() or all(), and is a fed a generator that yields the check function results.&lt;/p&gt;

&lt;p&gt;The functional style gave us excellent separation of concerns, easily testable functions, lazy evaluation and short circuiting with generators &amp;amp; any/all, and a very DRY set of code. It was definitely a big win and made the code much easier to understand and extend.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">robertfw</dc:creator><pubDate>Sat, 19 Jan 2013 14:06:51 -0000</pubDate></item></channel></rss>
