<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Tom Dalling - 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-53612ba2" type="application/json"/><link>http://tomdalling.disqus.com/</link><description></description><atom:link href="http://tomdalling.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 08 May 2012 05:24:13 -0000</lastBuildDate><item><title>Re: SOLID Class Design: The Liskov Substitution Principle</title><link>http://www.tomdalling.com/blog/software-design/solid-class-design-the-liskov-substitution-principle#comment-522529123</link><description>&lt;p&gt;I guess it doesn't technically violate LSP. However, because there is no difference between flying and non-flying birds in your code, you can remove INotFlyingBird and IFlyingBird. Just inherit straight from IBird. Although, if you're only subclassing to provide a new value for IBird::MovingDistance, you might as well have a single class called "Bird" with a setMovingDistance method on it.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tom Dalling</dc:creator><pubDate>Tue, 08 May 2012 05:24:13 -0000</pubDate></item><item><title>Re: Model View Controller Explained</title><link>http://www.tomdalling.com/blog/software-design/model-view-controller-explained#comment-516525473</link><description>&lt;p&gt;Great article, Tom!  Thanks for dumbing this down for 'the rest of us' and understanding that not all of us have a masters in computer science!&lt;/p&gt;

&lt;p&gt;I've just made the jump into MVC with CI, and wow!  It seems so crazy &lt;br&gt;complicated until you wrap your head around it, and then it is crazy &lt;br&gt;simple.  I'm loving this framework.  What you really have to do to get &lt;br&gt;this is to really look at the classes in the model and controller &lt;br&gt;folders (YouTube has some great tutorials as well for those of us who &lt;br&gt;are too lazy to read, and oh by the way, if you didn't 'get' OOP before, learning the MVC basics will completely clarify that for you!).  Between this framework and the javascript libraries, I'm looking like a pro!  This is probably the most dramatic improvement I've experienced in my programming in the span of 2 or 3 days.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dane Calderon</dc:creator><pubDate>Wed, 02 May 2012 07:54:52 -0000</pubDate></item><item><title>Re: SOLID Class Design: The Liskov Substitution Principle</title><link>http://www.tomdalling.com/blog/software-design/solid-class-design-the-liskov-substitution-principle#comment-514809381</link><description>&lt;p&gt;Great article, thanks!&lt;/p&gt;

&lt;p&gt;My question, can i do next inheritance, that, in my opinion, not violates LSP?&lt;/p&gt;

&lt;p&gt;public interface IBird&lt;br&gt;{&lt;br&gt;   int MovingDistance();&lt;br&gt;}&lt;/p&gt;

&lt;p&gt;public abstract class IFlyingBird : IBird&lt;br&gt;{&lt;br&gt;   public abstract int FlyingDistance();&lt;/p&gt;

&lt;p&gt;   public int MovingDistance()&lt;br&gt;   {&lt;br&gt;      return FlyingDistance();&lt;br&gt;   }&lt;br&gt;}&lt;/p&gt;

&lt;p&gt;public abstract class INotFlyingBird : IBird&lt;br&gt;{&lt;br&gt;   public abstract int SteppingDistance();&lt;/p&gt;

&lt;p&gt;   public int MovingDistance()&lt;br&gt;   {&lt;br&gt;      return SteppingDistance();&lt;br&gt;   }&lt;br&gt;}&lt;/p&gt;

&lt;p&gt;public class KingFisher : IFlyingBird&lt;br&gt;{&lt;br&gt;   public override int FlyingDistance()&lt;br&gt;   {&lt;br&gt;      return 600;&lt;br&gt;   }&lt;br&gt;}&lt;/p&gt;

&lt;p&gt;public class Ostrich : INotFlyingBird&lt;br&gt;{&lt;br&gt;   public override int SteppingDistance()&lt;br&gt;   {&lt;br&gt;      return 123;&lt;br&gt;   }&lt;br&gt;}&lt;/p&gt;

&lt;p&gt;using:&lt;br&gt;static void Main(string[] args)&lt;br&gt;{&lt;br&gt;   IBird[] birds = new IBird[2];&lt;br&gt;   birds[0] = new KingFisher();&lt;br&gt;   birds[1] = new Ostrich();&lt;br&gt;   DoFlyBirds(birds);&lt;br&gt;}&lt;/p&gt;

&lt;p&gt;private static void DoFlyBirds(IBird[] birds)&lt;br&gt;{&lt;br&gt;   foreach (IBird b in birds)&lt;br&gt;   {                &lt;br&gt;      Console.WriteLine("Bird {0} can overcome {1} kilometers", b.GetType().Name,  b.MovingDistance());&lt;br&gt;   }&lt;br&gt;}&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Efim Zabarsky</dc:creator><pubDate>Tue, 01 May 2012 04:52:50 -0000</pubDate></item><item><title>Re: How Cocoa Bindings Work (via KVC and KVO)</title><link>http://www.tomdalling.com/blog/cocoa/how-cocoa-bindings-work-via-kvc-and-kvo#comment-498817097</link><description>&lt;p&gt;Got some basic understanding about KVO and KVC. Really helpful.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Purnachandra Obulasetty</dc:creator><pubDate>Mon, 16 Apr 2012 10:00:08 -0000</pubDate></item><item><title>Re: How To Set Up A Secure Git Server At Home (OSX)</title><link>http://www.tomdalling.com/blog/software-processes/how-to-set-up-a-secure-git-server-at-home-osx#comment-491358619</link><description>&lt;p&gt;Yes, it just has to be in a different directory, and the remote url is different when you clone it. For example, if you wanted a working clone in "/Users/mindwalker/projects/my_repo" you'd do:&lt;/p&gt;

&lt;p&gt;cd /Users/mindwalker/projects&lt;br&gt;git clone /Users/git/my_repo.gitOr maybe, if the mindwalker user is set up like the other client machines:git clone ssh://git@localhost/Users/git/my_repo.git&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tom Dalling</dc:creator><pubDate>Sun, 08 Apr 2012 01:08:24 -0000</pubDate></item><item><title>Re: How To Set Up A Secure Git Server At Home (OSX)</title><link>http://www.tomdalling.com/blog/software-processes/how-to-set-up-a-secure-git-server-at-home-osx#comment-491004325</link><description>&lt;p&gt;Assuming one has set this up using the steps described, how would one go about working with a repository on the actual server itself? Is there a way on the server to pull down a copy from that as if using a remote client, such that the master branch would never be checked out on the server?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mindwalker</dc:creator><pubDate>Sat, 07 Apr 2012 22:11:25 -0000</pubDate></item><item><title>Re: Model View Controller Explained</title><link>http://www.tomdalling.com/blog/software-design/model-view-controller-explained#comment-487249805</link><description>&lt;p&gt;Not to be nit picky but in example 4 couldn't you pass in the type and have a single line per var with an overloaded function for the new gui? &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CodeMonkey</dc:creator><pubDate>Thu, 05 Apr 2012 09:28:19 -0000</pubDate></item><item><title>Re: When A Café Is Not A Café – A Short Lesson In Unicode Featuring NSString</title><link>http://www.tomdalling.com/blog/coding-tips/when-a-cafe-is-not-a-cafe-a-short-lesson-in-unicode-featuring-nsstring#comment-483471237</link><description>&lt;p&gt;Thank you! Very instructive :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eva</dc:creator><pubDate>Mon, 02 Apr 2012 08:29:36 -0000</pubDate></item><item><title>Re: Gotchas With Grand Central Dispatch (libdispatch) And Blocks</title><link>http://www.tomdalling.com/blog/cocoa/gotchas-with-grand-central-dispatch-libdispatch-and-blocks#comment-464770607</link><description>&lt;p&gt;Another point I think you should have made was that doing anything synchronously kind of defeats the spirit and the design of GCD.  Why dispatch_sync() to the main queue when, 9 times out of 10 (and I've yet to see the 10th) you can do it async?  Why use barrier blocks at all when there are other design patterns which avoid these sorts of deadlocks, such as group completion callbacks and/or completion callbacks with careful association of queues to resources?  As the GCD docs point out, creating queues is cheap, and if you factor your code appropriately you need never run into any of the issues you point out.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jkh</dc:creator><pubDate>Tue, 13 Mar 2012 22:38:08 -0000</pubDate></item><item><title>Re: Gotchas With Grand Central Dispatch (libdispatch) And Blocks</title><link>http://www.tomdalling.com/blog/cocoa/gotchas-with-grand-central-dispatch-libdispatch-and-blocks#comment-461473001</link><description>&lt;p&gt;Your point about needing to make a copy of a block if it escapes the scope of the stack frame is absolutely correct. However, given that you write that in the context of using GCD, it is only fair to mention that the GCD functions retain and perform a Block_copy() on the blocks you pass into them, as any good API that accepts block parameters should.&lt;/p&gt;

&lt;p&gt;I think Apple makes it pretty clear that GCD relieves developers of a lot of the error-prone boilerplate code they have to write when one thread needs to communicate to another thread, such as when the main thread needs to spin off a new thread to do some work or when a non-main thread needs to notify the main thread of the result of that work. Developers should still have an understanding of how threads work, and be thinking in terms of threads and thread safety when designing their programs. (Similar to how ARC doesn't _really_ relieve developers of the responsibility of thinking about retain counts and proper object ownership semantics.)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Erik</dc:creator><pubDate>Sat, 10 Mar 2012 10:46:20 -0000</pubDate></item><item><title>Re: Crack an MD5 hash in less than a second</title><link>http://www.tomdalling.com/blog/security/crack-an-md5-hash-in-less-than-a-second#comment-458592324</link><description>&lt;p&gt;pass space is only 72^8&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Defense</dc:creator><pubDate>Wed, 07 Mar 2012 06:16:55 -0000</pubDate></item><item><title>Re: Gotchas With Grand Central Dispatch (libdispatch) And Blocks</title><link>http://www.tomdalling.com/blog/cocoa/gotchas-with-grand-central-dispatch-libdispatch-and-blocks#comment-458227900</link><description>&lt;p&gt;For massively concurrent operations, you don't have to use a serial queue to avoid the thread limit. Another option is NSOperationQueue and -setMaxConcurrentOperationCount: which allows you to control the flow of operations while still preserving concurrency. It uses GCD under the covers, so it's one of the easier ways to control such situations.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Quinn Taylor</dc:creator><pubDate>Tue, 06 Mar 2012 18:07:15 -0000</pubDate></item><item><title>Re: Model View Controller Explained</title><link>http://www.tomdalling.com/blog/software-design/model-view-controller-explained#comment-441843602</link><description>&lt;p&gt;Very clear differentiation for the Model, View, and Controller.&lt;br&gt;Perhaps, a small program example (.zip) in your blog may make your explanations perfect&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lee</dc:creator><pubDate>Fri, 17 Feb 2012 08:36:37 -0000</pubDate></item><item><title>Re: Why performSelector: Is More Dangerous Than I Thought</title><link>http://www.tomdalling.com/blog/cocoa/why-performselector-is-more-dangerous-than-i-thought#comment-440658161</link><description>&lt;p&gt;Interesting solution.&lt;/p&gt;

&lt;p&gt;I've also created a similar wrapper like your method, which returns pointers to objects/structs/primitives/enums depending on the return value, and also handles primitives/structs/enums as arguments.You can find more info (and the code) here: &lt;a href="http://jona.than.biz/blog/performselector-with-primitives-enums-structs-and-objects/" rel="nofollow"&gt;http://jona.than.biz/blog/perf...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jon</dc:creator><pubDate>Thu, 16 Feb 2012 05:20:52 -0000</pubDate></item><item><title>Re: How To Set Up A Secure Git Server At Home (OSX)</title><link>http://www.tomdalling.com/blog/software-processes/how-to-set-up-a-secure-git-server-at-home-osx#comment-430539945</link><description>&lt;p&gt;Great post, but one more point you should add is connecting an existing local repo to a bare remote repository - i.e.:&lt;/p&gt;

&lt;p&gt;git remote add origin ssh://.... &lt;br&gt;git push origin master&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will D</dc:creator><pubDate>Sun, 05 Feb 2012 22:39:16 -0000</pubDate></item><item><title>Re: How To Set Up A Secure Git Server At Home (OSX)</title><link>http://www.tomdalling.com/blog/software-processes/how-to-set-up-a-secure-git-server-at-home-osx#comment-429102042</link><description>&lt;p&gt;It is multi-user in the sense that multiple people can use the git repo with their own name and email address. Everyone has access to everything, so if you want advanced permission settings you will need to set it up differently - probably with an ssh account per user.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tom Dalling</dc:creator><pubDate>Fri, 03 Feb 2012 22:08:46 -0000</pubDate></item><item><title>Re: How To Set Up A Secure Git Server At Home (OSX)</title><link>http://www.tomdalling.com/blog/software-processes/how-to-set-up-a-secure-git-server-at-home-osx#comment-428780689</link><description>&lt;p&gt;This is good, but the problem here is this works only for one user, right? When you try to go beyond that you are going to have to try and use gitosis or gitolite. That is a huge PITA. I was way down the road with gitosis before I ran into some insoluble issues with OS/X (and it's a dead project making them even more insoluble).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rob Williams</dc:creator><pubDate>Fri, 03 Feb 2012 13:43:08 -0000</pubDate></item><item><title>Re: How To Set Up A Secure Git Server At Home (OSX)</title><link>http://www.tomdalling.com/blog/software-processes/how-to-set-up-a-secure-git-server-at-home-osx#comment-425286487</link><description>&lt;p&gt;Just wanted to say thanks for this guide, I've set up a remote git repository on a old mac mini here at work and it works like a charm. I feel powerful now.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">H-Max</dc:creator><pubDate>Tue, 31 Jan 2012 03:20:39 -0000</pubDate></item><item><title>Re: Why performSelector: Is More Dangerous Than I Thought</title><link>http://www.tomdalling.com/blog/cocoa/why-performselector-is-more-dangerous-than-i-thought#comment-424509576</link><description>&lt;p&gt;I've been tracking an issue like this all day. Now I know what is going wrong. Thanks!&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">gk_brown</dc:creator><pubDate>Mon, 30 Jan 2012 14:06:17 -0000</pubDate></item><item><title>Re: Model View Controller Explained</title><link>http://www.tomdalling.com/blog/software-design/model-view-controller-explained#comment-407581352</link><description>&lt;p&gt;Woah, wacky #ifdef intendation alert!&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chris</dc:creator><pubDate>Tue, 10 Jan 2012 22:02:22 -0000</pubDate></item><item><title>Re: Implementing Your Own Cocoa Bindings</title><link>http://www.tomdalling.com/blog/cocoa/implementing-your-own-cocoa-bindings#comment-376620571</link><description>&lt;p&gt;Hi Tom,&lt;/p&gt;

&lt;p&gt;thanks a lot for that piece of code! I used your code to make bindings work in a custom subclass of NSTextField which reacts to scrolling.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bastian Bechtold</dc:creator><pubDate>Thu, 01 Dec 2011 07:37:54 -0000</pubDate></item><item><title>Re: Model View Controller Explained</title><link>http://www.tomdalling.com/blog/software-design/model-view-controller-explained#comment-362194018</link><description>&lt;p&gt;Thank you so much for providing such a good explanation for MVC.. clarified many doubts :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Snehal Masne</dc:creator><pubDate>Sun, 13 Nov 2011 01:56:50 -0000</pubDate></item><item><title>Re: How To Set Up A Secure Git Server At Home (OSX)</title><link>http://www.tomdalling.com/blog/software-processes/how-to-set-up-a-secure-git-server-at-home-osx#comment-346977220</link><description>&lt;p&gt;I haven't done a whole lot of ssh config before, so I'm not sure how to do that I'm afraid.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tom Dalling</dc:creator><pubDate>Thu, 27 Oct 2011 07:18:11 -0000</pubDate></item><item><title>Re: How To Set Up A Secure Git Server At Home (OSX)</title><link>http://www.tomdalling.com/blog/software-processes/how-to-set-up-a-secure-git-server-at-home-osx#comment-346865572</link><description>&lt;p&gt;Is there a possibility to disable the password authentication only for the git user? According to "man ssh_config" this should be possible by editing ~/.ssh/config the same way as you suggested to edit /etc/sshd_config (sans the root-part of course), but I can't seem to get it running...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nebu</dc:creator><pubDate>Thu, 27 Oct 2011 05:38:09 -0000</pubDate></item><item><title>Re: Model View Controller Explained</title><link>http://www.tomdalling.com/blog/software-design/model-view-controller-explained#comment-325104951</link><description>&lt;p&gt;Awesome - great explanation, thanks.  Appreciate the benefits write up - helps understand the competitive edge of using MVC&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hsharif2</dc:creator><pubDate>Sun, 02 Oct 2011 14:05:17 -0000</pubDate></item></channel></rss>
