<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Joshua Flanagan (Los Techies) - 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-81cc681e" type="application/json"/><link>http://joshuaflanaganlt.disqus.com/</link><description></description><atom:link href="http://joshuaflanaganlt.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 20 Apr 2012 15:58:09 -0000</lastBuildDate><item><title>Re: Use gitk to understand git – merge and rebase</title><link>http://lostechies.com/joshuaflanagan/2010/09/03/use-gitk-to-understand-git-merge-and-rebase/#comment-504354078</link><description>&lt;p&gt;GREAT JOB!  I've been struggling trying to learn Git as I go.  I've accumulated a ton of bookmarked information, but I think I can throw most of it away now.  Not only did you do a great job explaining Gitk, but provided a tremendous boost to my understanding of Git; just what you said you'd do!&lt;/p&gt;

&lt;p&gt;One minor thing I did not understand.  When you did the "git merge issue123", the commits shown in the "top pane" (does that pane have a name?) moved from being in line under master to being in line under issue123.  &lt;/p&gt;

&lt;p&gt;What is the significance of that shift ?&lt;/p&gt;

&lt;p&gt;Are you thinking about a series on Git Gui?&lt;/p&gt;

&lt;p&gt;thanks so much!&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mga555</dc:creator><pubDate>Fri, 20 Apr 2012 15:58:09 -0000</pubDate></item><item><title>Re: Coordinating multiple ajax requests with jquery.when</title><link>http://lostechies.com/joshuaflanagan/2011/10/20/coordinating-multiple-ajax-requests-with-jquery-when/#comment-501238115</link><description>&lt;p&gt;Excellent writeup. Thanks a lot. Your explanation clarified this in a way that the docs couldn't. Thanks again!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">HB</dc:creator><pubDate>Wed, 18 Apr 2012 18:27:13 -0000</pubDate></item><item><title>Re: A smarter Rails url_for helper</title><link>http://lostechies.com/joshuaflanagan/2012/03/27/a-smarter-rails-url_for-helper/#comment-478308986</link><description>&lt;p&gt;First, its worth pointing out that I only need to register handlers for the "special case" models. Everything else just falls through to url_for.&lt;br&gt;The predicate approach gives me more flexibility, but it is possible I won't need its full power. The class checking will likely be the most common case. Another possibility would be a hybrid approach - first check a hash for the class of the model. If it not found there, check the model against the collection of predicates, and only after that fails, fall through to url_for.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">joshuaflanagan</dc:creator><pubDate>Wed, 28 Mar 2012 08:27:20 -0000</pubDate></item><item><title>Re: A smarter Rails url_for helper</title><link>http://lostechies.com/joshuaflanagan/2012/03/27/a-smarter-rails-url_for-helper/#comment-478208914</link><description>&lt;p&gt;If you have a lot of models this becomes quite expensive though. As far as I can see the lookup is O(n). If your primary usecase is checking the model class, wouldn't it be better to store the mappings in a hash, so that lookup is constant? (and then per class you could possibly still do another check, if you need to check other stuff than the model class)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mark IJbema</dc:creator><pubDate>Wed, 28 Mar 2012 05:08:59 -0000</pubDate></item><item><title>Re: A smarter Rails url_for helper</title><link>http://lostechies.com/joshuaflanagan/2012/03/27/a-smarter-rails-url_for-helper/#comment-478092495</link><description>&lt;p&gt;If you can use a model of any kind, you can use Draper - it just decorates other models and you just replace their use with its decorator&lt;/p&gt;

&lt;p&gt;If your models are just conforming to one generic model, then just create a view model for that use case, which has the generic properties to display, and the url to go to&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jak Charlton</dc:creator><pubDate>Wed, 28 Mar 2012 00:51:10 -0000</pubDate></item><item><title>Re: A smarter Rails url_for helper</title><link>http://lostechies.com/joshuaflanagan/2012/03/27/a-smarter-rails-url_for-helper/#comment-478089610</link><description>&lt;p&gt;Thanks for your feedback, Jak. I didn't intend this as a patch submission to Rails, so I don't need everyone to like it. Personally, putting the url generation on the model (which is how we started) was hard for me to stomach. To each his own.&lt;br&gt;Wrapping each model in a decorator again presumes that you know the model type (I think) so that you know which decorator to wrap it with. I haven't used Draper yet, but I do agree with its intent. If it has a way to generically wrap a model with the correct decorator, without you explicitly telling it which decorator to use, it may be a possible solution.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">joshuaflanagan</dc:creator><pubDate>Wed, 28 Mar 2012 00:45:36 -0000</pubDate></item><item><title>Re: A smarter Rails url_for helper</title><link>http://lostechies.com/joshuaflanagan/2012/03/27/a-smarter-rails-url_for-helper/#comment-478082758</link><description>&lt;p&gt;And if you don't like the idea of using a view only property in your model, you should probably be using view models anyway, I suggest Draper, where you can then implement view only logic about models&lt;br&gt;&lt;a href="https://github.com/jcasimir/draper" rel="nofollow"&gt;https://github.com/jcasimir/dr...&lt;/a&gt;&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jak Charlton</dc:creator><pubDate>Wed, 28 Mar 2012 00:30:11 -0000</pubDate></item><item><title>Re: A smarter Rails url_for helper</title><link>http://lostechies.com/joshuaflanagan/2012/03/27/a-smarter-rails-url_for-helper/#comment-478082141</link><description>&lt;p&gt;Then ask the model&lt;/p&gt;

&lt;p&gt;class Comment&lt;br&gt;  def url    &lt;br&gt;      ... whatever ... &lt;br&gt;   end&lt;br&gt;end&lt;/p&gt;

&lt;p&gt;Personal opinion, I really dislike your current solution - overly complicated for a really simple thing &lt;/p&gt;

&lt;p&gt;Your assertion that "This is what url_for is supposed to do" is just wrong. There is a well founded presumption that the view knows the properties model structure it is displaying (as you would for knowing the fields for a form for example).&lt;/p&gt;

&lt;p&gt;If your view is that generic that it is only asking about a few properties of a model via a protocol (say "title" and url link), then implement a method as in the class above - models that implement this protocol can be displayed&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jak Charlton</dc:creator><pubDate>Wed, 28 Mar 2012 00:28:31 -0000</pubDate></item><item><title>Re: A smarter Rails url_for helper</title><link>http://lostechies.com/joshuaflanagan/2012/03/27/a-smarter-rails-url_for-helper/#comment-478078202</link><description>&lt;p&gt;The *call site* does not know the model. Yes, somewhere in my application, that knowledge exists (the config/initializer). But the point at which I need to generate a URL, I do not know the model. &lt;br&gt;I have a method that returns a collection of models. Models of different types. I want to display a list of links to those models. The code that iterates over the models doesn't know, and shouldn't have to care, what the models actually are. It just wants to ask Rails for their URL. That is what url_for is supposed to do. But it doesn't in some circumstances, like nested resources.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">joshuaflanagan</dc:creator><pubDate>Wed, 28 Mar 2012 00:19:01 -0000</pubDate></item><item><title>Re: A smarter Rails url_for helper</title><link>http://lostechies.com/joshuaflanagan/2012/03/27/a-smarter-rails-url_for-helper/#comment-478074725</link><description>&lt;p&gt;In what example wouldn't you know what the model was?&lt;/p&gt;

&lt;p&gt;Your solution knows, you just moved it into a helper&lt;/p&gt;

&lt;p&gt;If (and I have no idea why you would want to) you wanted to avoid knowing what the parent object was, you could just implement a method on comment and use that&lt;/p&gt;

&lt;p&gt;class Comment&lt;br&gt; def parent&lt;br&gt;    post&lt;br&gt; end&lt;br&gt;end&lt;/p&gt;

&lt;p&gt;url_for [@comment.parent, @@comment ]&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jak Charlton</dc:creator><pubDate>Wed, 28 Mar 2012 00:11:29 -0000</pubDate></item><item><title>Re: A smarter Rails url_for helper</title><link>http://lostechies.com/joshuaflanagan/2012/03/27/a-smarter-rails-url_for-helper/#comment-478073025</link><description>&lt;p&gt;I don't know, I'm asking you!&lt;br&gt;But the example you provided and linked to is NOT a solution to my problem. You know that you have a comment, so you know you have to also pass a post to get the url. I'm referring to a situation where you don't know what the model is. The problem I'm trying to solve is when you have generic code that needs to be able to handle any model, and generate a url.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">joshuaflanagan</dc:creator><pubDate>Wed, 28 Mar 2012 00:07:24 -0000</pubDate></item><item><title>Re: A smarter Rails url_for helper</title><link>http://lostechies.com/joshuaflanagan/2012/03/27/a-smarter-rails-url_for-helper/#comment-478067688</link><description>&lt;p&gt;Aren't you trying to recreate built in logic?&lt;/p&gt;

&lt;p&gt;url_for [@project, @comment]&lt;/p&gt;

&lt;p&gt;&lt;a href="http://ryanbigg.com/2012/03/polymorphic-routes/" rel="nofollow"&gt;http://ryanbigg.com/2012/03/po...&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jak Charlton</dc:creator><pubDate>Tue, 27 Mar 2012 23:56:11 -0000</pubDate></item><item><title>Re: Use gitk to understand git – merge and rebase</title><link>http://lostechies.com/joshuaflanagan/2010/09/03/use-gitk-to-understand-git-merge-and-rebase/#comment-466072704</link><description>&lt;p&gt;I read a lot about rebase a don't understard a word :| &lt;/p&gt;

&lt;p&gt;With this post I understood, cristal clear&lt;/p&gt;

&lt;p&gt;Thanks a lot&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cristian Umaña Jiménez</dc:creator><pubDate>Thu, 15 Mar 2012 11:52:53 -0000</pubDate></item><item><title>Re: Use gitk to understand git</title><link>http://lostechies.com/joshuaflanagan/2010/09/03/use-gitk-to-understand-git/#comment-466051965</link><description>&lt;p&gt;Great post it helps a lot &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cristian Umaña Jiménez</dc:creator><pubDate>Thu, 15 Mar 2012 11:26:14 -0000</pubDate></item><item><title>Re: Coordinating multiple ajax requests with jquery.when</title><link>http://lostechies.com/joshuaflanagan/2011/10/20/coordinating-multiple-ajax-requests-with-jquery-when/#comment-453093035</link><description>&lt;p&gt; That's smart and it worked... thanks!&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">newbreedofgeek</dc:creator><pubDate>Thu, 01 Mar 2012 01:30:24 -0000</pubDate></item><item><title>Re: Coordinating multiple ajax requests with jquery.when</title><link>http://lostechies.com/joshuaflanagan/2011/10/20/coordinating-multiple-ajax-requests-with-jquery-when/#comment-453083963</link><description>&lt;p&gt;I think you would have to do something like:&lt;/p&gt;

&lt;p&gt;$.when.apply(this, deferredCollection).done...  (etc)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">joshuaflanagan</dc:creator><pubDate>Thu, 01 Mar 2012 01:17:55 -0000</pubDate></item><item><title>Re: Coordinating multiple ajax requests with jquery.when</title><link>http://lostechies.com/joshuaflanagan/2011/10/20/coordinating-multiple-ajax-requests-with-jquery-when/#comment-453061510</link><description>&lt;p&gt;hi there,&lt;/p&gt;

&lt;p&gt;Just a question on this:&lt;/p&gt;

&lt;p&gt;I'm trying to send a collection (array) of deferred objects to .when like this:&lt;/p&gt;

&lt;p&gt;var deferredCollection = [];&lt;br&gt;deferredCollection.push(getTweets('austintexasgov'));&lt;br&gt;deferredCollection.push(getTweets('greenling_com'));&lt;br&gt;deferredCollection.push(getTweets('themomandpops'));&lt;br&gt;deferredCollection.push(getTweets('anotherUserA'));&lt;br&gt;deferredCollection.push(getTweets('anotherUserB'));&lt;/p&gt;

&lt;p&gt;$.when( deferredCollection).done(function(atxArgs, greenlingArgs, momandpopsArgs, anotherUserAArgs, anotherUserBArgs){   &lt;br&gt; 	// there is an error here trying to access atxArgs etc    &lt;br&gt;  });&lt;/p&gt;

&lt;p&gt;is it possible to do something like this??&lt;/p&gt;

&lt;p&gt;Thanks in advance.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">newbreedofgeek</dc:creator><pubDate>Thu, 01 Mar 2012 00:46:45 -0000</pubDate></item><item><title>Re: Coordinating multiple ajax requests with jquery.when</title><link>http://lostechies.com/joshuaflanagan/2011/10/20/coordinating-multiple-ajax-requests-with-jquery-when/#comment-452979278</link><description>&lt;p&gt;Thanks very much for this.. I have been looking for this for a long time. Your example makes it very easy to understand the complicated deferred object articles on the net. Good work.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">newbreedofgeek</dc:creator><pubDate>Wed, 29 Feb 2012 22:50:39 -0000</pubDate></item><item><title>Re: Great time to be a developer</title><link>http://lostechies.com/joshuaflanagan/2012/01/31/great-time-to-be-a-developer/#comment-432348469</link><description>&lt;p&gt;Even a monkey knows that its either 7.45AM or after 9AM on any office commute highway! :)&lt;/p&gt;

&lt;p&gt;But awesome exercise though! Even I knew the results, I learnt few new tools! &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Junkienatural</dc:creator><pubDate>Tue, 07 Feb 2012 17:03:05 -0000</pubDate></item><item><title>Re: Powerfully simple persistence: MongoDB</title><link>http://lostechies.com/joshuaflanagan/2012/02/06/easy-persistence-mongodb/#comment-431250198</link><description>&lt;p&gt;lol, I know. I'm just joshin' Josh :)  He knows how strongly I hate stored procedures.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chad Myers</dc:creator><pubDate>Mon, 06 Feb 2012 18:02:50 -0000</pubDate></item><item><title>Re: Powerfully simple persistence: MongoDB</title><link>http://lostechies.com/joshuaflanagan/2012/02/06/easy-persistence-mongodb/#comment-430957025</link><description>&lt;p&gt;Chad Myers He did say "simpler" ... Stored Procedures simply aren't.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tracker1</dc:creator><pubDate>Mon, 06 Feb 2012 12:50:22 -0000</pubDate></item><item><title>Re: Powerfully simple persistence: MongoDB</title><link>http://lostechies.com/joshuaflanagan/2012/02/06/easy-persistence-mongodb/#comment-430880640</link><description>&lt;p&gt;"it is hard to imaging a simpler, equally powerful, persistence strategy"&lt;br&gt;Pshaw, clearly you forget stored procedures!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chad Myers</dc:creator><pubDate>Mon, 06 Feb 2012 11:33:32 -0000</pubDate></item><item><title>Re: Great time to be a developer</title><link>http://lostechies.com/joshuaflanagan/2012/01/31/great-time-to-be-a-developer/#comment-429686819</link><description>&lt;p&gt;Very cool, thanks Jon!&lt;br&gt;Unfortunately, it doesn't look like they track traffic for 360 in Austin. Also, it doesn't seem very trustworthy (only *minor* slowdown on MoPac and I-35 during rush hour?)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">joshuaflanagan</dc:creator><pubDate>Sat, 04 Feb 2012 17:41:06 -0000</pubDate></item><item><title>Re: Great time to be a developer</title><link>http://lostechies.com/joshuaflanagan/2012/01/31/great-time-to-be-a-developer/#comment-429605737</link><description>&lt;p&gt;Google's traffic overlay in Maps has historical data.  Bring up the overlay, and in the bottom-left there's a new Legend that pops up. Next to where it says "Live traffic", click the "change" link, and voila.&lt;/p&gt;

&lt;p&gt;Edit-to-add:  I mean, don't get me wrong... following the theme of the title of your post, this is totally cool! But the functionality you need /is/ already available for free.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jon Peterson</dc:creator><pubDate>Sat, 04 Feb 2012 15:37:15 -0000</pubDate></item><item><title>Re: Great time to be a developer</title><link>http://lostechies.com/joshuaflanagan/2012/01/31/great-time-to-be-a-developer/#comment-428542516</link><description>&lt;p&gt;No documented web service that I know of. That's the problem: the way I'm calling their URL is not correct, so I'm not getting correct traffic delay information.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">joshuaflanagan</dc:creator><pubDate>Fri, 03 Feb 2012 08:21:05 -0000</pubDate></item></channel></rss>
