<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Plop Central</title>
    <link>http://www.plopcentral.com/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Yeah, right!</description>
    <item>
      <title>Spider with Red-eye</title>
      <description>&lt;p&gt;Got a new Camera (Canon &lt;span class="caps"&gt;EOS450D&lt;/span&gt; &amp;#8211; smashin&amp;#8217;) and telephoto lens, was bustin&amp;#8217; to get using it and I thought of a big spider that&amp;#8217;s been out the back yard for the last few weeks, getting bigger every day.&lt;/p&gt;


	&lt;p&gt;He lives about 15 feet in the air, with his web running from a tree, to the umbrella of our picnic table. I used the new zoom lens, and tried photographing him from the ground. Took a few shots to get the focus sharp, and the flash set to the right level not to &amp;#8216;white him out&amp;#8217;.&lt;/p&gt;


	&lt;p&gt;This shot was the best. The level of detail on him is amazing (click the link to get to a high-res version) as well as the size of the Depth-of-Field. His front legs are going out of focus, and his back legs a bit.&lt;/p&gt;


	&lt;p&gt;Best of all was the fact that the flash has actually given him Red-Eye, how detailed is that!&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.plopcentral.com/images/photos/GoodSpiderCopped.jpg"&gt;&lt;img src="http://www.plopcentral.com/images/photos/GoodSpiderCoppedSmall.jpg" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;For info, he&amp;#8217;s about an inch long.&lt;/p&gt;


	&lt;p&gt;Oh, and his name&amp;#8217;s Stanley.&lt;/p&gt;</description>
      <pubDate>Mon, 01 Sep 2008 20:40:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:2b0d689e-2c57-4aa1-98bf-373433883a2b</guid>
      <author>Paul McConnon</author>
      <link>http://www.plopcentral.com/articles/2008/09/01/spider-with-red-eye</link>
      <category>Photos</category>
      <category>spider</category>
      <category>photo</category>
    </item>
    <item>
      <title>iPhone Repair Device (Patent Pending)</title>
      <description>&lt;p&gt;Just invented this li&amp;#8217; baby!&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://www.plopcentral.com/files/iphonerepair.jpg" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;To cure this problem:&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://www.plopcentral.com/files/iphonesearch.gif" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;&lt;a href="http://www.google.co.uk/search?q=iphone+thinks+headphones+are+plugged+in&amp;#38;ie=utf-8&amp;#38;oe=utf-8&amp;#38;aq=t"&gt;http://www.google.co.uk/search?q=iphone+thinks+headphones+are+plugged+in&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 27 Aug 2008 14:20:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:f8b133d3-8b7f-48bb-a88a-8a9a278f7dfa</guid>
      <author>Paul McConnon</author>
      <link>http://www.plopcentral.com/articles/2008/08/27/iphone-repair-device-patent-pending</link>
      <category>Funny</category>
    </item>
    <item>
      <title>Speed up slow Rails development in vista</title>
      <description>&lt;p&gt;I&amp;#8217;ve been doing rails development on a Vista box recently and was annoyed by how slow script/server (running mongrel) was to respond.&lt;/p&gt;


	&lt;p&gt;I am aware that Windows is slower in general for running ruby / rails but this was slooooooow.&lt;/p&gt;


	&lt;p&gt;I normally start rails development server with the standard &amp;#8216;ruby script/server&amp;#8217; command&amp;#8230;&lt;/p&gt;


&lt;pre&gt;
C:\blah&amp;gt; ruby script\server
=&amp;gt; Booting Mongrel (use 'script/server webrick' to force WEBrick)
=&amp;gt; Rails application starting on http://0.0.0.0:3000
=&amp;gt; Call with -d to detach
=&amp;gt; Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
...

&lt;/pre&gt;

	&lt;p&gt;Notice that mongrel binds to 0.0.0.0 (as far as I remember, it used to bind to 127.0.0.1). This does work. But it is very slow, so I tried changing it to bind to 127.0.0.1&lt;/p&gt;


&lt;pre&gt;
C:\blah&amp;gt; ruby script\server -b 127.0.0.1
=&amp;gt; Booting Mongrel (use 'script/server webrick' to force WEBrick)
=&amp;gt; Rails application starting on http://127.0.0.1:3000
=&amp;gt; Call with -d to detach
=&amp;gt; Ctrl-C to shutdown server
** Starting Mongrel listening at 127.0.0.1:3000
** Starting Rails with development environment...
...

&lt;/pre&gt;

	&lt;p&gt;And guess what, a subjective 300-400% increase in responsiveness. This makes the whole development process much more pleasant.&lt;/p&gt;


	&lt;p&gt;Hope this helps someone.&lt;/p&gt;</description>
      <pubDate>Wed, 02 Jul 2008 00:22:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:d99eab74-0c5a-486f-b04f-2b26c2988fad</guid>
      <author>Paul McConnon</author>
      <link>http://www.plopcentral.com/articles/2008/07/02/rails-development-environment-slow-in-vista</link>
      <category>Coding</category>
      <category>Ruby</category>
      <category>Rails</category>
      <category>rails</category>
      <category>mongrel</category>
      <category>speed</category>
    </item>
    <item>
      <title>I'm a pappy!</title>
      <description>&lt;p&gt;On 14th May at 17:17 my lovely wife Marion gave birth to our son Jack Bernard McConnon.  I&amp;#8217;m on cloud nine and as proud as punch of our wee &amp;#8216;Handsome Boy&amp;#8217;.&lt;/p&gt;


	&lt;p&gt;Photos are &lt;a href="http://www.plopcentral.com/images/photos/BabyJack/index.html"&gt;here &lt;/a&gt;and &lt;a href="http://www.plopcentral.com/images/photos/BabyJack2/index.html"&gt;here&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 16 May 2008 22:47:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:23f114c2-b4ed-4208-b2b7-6959bcfa72fb</guid>
      <author>Paul McConnon</author>
      <link>http://www.plopcentral.com/articles/2008/05/16/im-a-pappy</link>
      <category>happy</category>
    </item>
    <item>
      <title>LINQ to SQL with dynamically generated Stored Prcedure</title>
      <description>&lt;p&gt;I&amp;#8217;ve been using &lt;span class="caps"&gt;LINQ&lt;/span&gt; to &lt;span class="caps"&gt;SQL&lt;/span&gt; which is a very nice feature for .NET. It allows you to very quickly model your database objects as objects in code and return them as strongly typed .NET objects.&lt;/p&gt;


	&lt;p&gt;Seems to have &amp;#8216;nicked&amp;#8217; (been inspired by?) quite a few ideas from ActiveRecord for Ruby (and Rails). In fact a lot of the new language features (e.g. predicates as anonymous functions for selection, and iterators) seem to borrow from things learnt by being exposed to dynamic languages. All in all it makes .NET much more fun to work in.&lt;/p&gt;


	&lt;p&gt;Anyway, I was using all this goodness in a project (VS.NET 2008 Orcas beta) and had all my Entities modelled and could use &lt;span class="caps"&gt;LINQ&lt;/span&gt; to query and transform my entities programmatically. I also had a few Stored procedures mapped as methods of the data context. I ran into a problem when I wanted to generate some &lt;span class="caps"&gt;SQL&lt;/span&gt; on the fly so that users could get adhoc filters of their calls.&lt;/p&gt;


	&lt;p&gt;I didn&amp;#8217;t want to drop out into old style &lt;span class="caps"&gt;ADO&lt;/span&gt;.NET using my DBHandler as i would lose the strong typing etc. I decided to use a QueryReport table (as I&amp;#8217;ve done numerous times before) to allow me to do ad-hoc queries without being open to &lt;span class="caps"&gt;SQL&lt;/span&gt; Injection. The table consisted of an ID, Name and &lt;span class="caps"&gt;SQL&lt;/span&gt; field. My Stored procedure could take an ID parameter, look up the &lt;span class="caps"&gt;SQL&lt;/span&gt; and use it to filter the calls table&lt;/p&gt;


e.g.
&lt;pre&gt;
ID           Name                SQL
1            All calls           Select * from Calls Where 1 = 1
2            Open calls          Select * from Calls Where Status = 1
3            Old calls           Select * from Calls Where TimeStamp &amp;lt; DateAdd(d, -14,GetDate())
&lt;/pre&gt;

My stored procedure looked like this 
&lt;pre&gt;
ALTER PROCEDURE [dbo].[spExecStoredQuery] 
    @QueryReportID int = 0
AS
BEGIN
    SET NOCOUNT ON;
    declare @queryText varchar(500)
    select 
        @QueryText = SQL 
    from 
        QueryReports
    where
        id = @QueryReportID

    exec (@querytext)
END
&lt;/pre&gt;

	&lt;p&gt;The sp always returned All fields from the Calls table, so I should be able to map it to a Call object in the &lt;span class="caps"&gt;LINQ&lt;/span&gt; designer. I created the stored procedure and went about adding it as a method to the &lt;span class="caps"&gt;LINQ&lt;/span&gt; designer.&lt;/p&gt;


	&lt;p&gt;My problem occurred when I went to set it&amp;#8217;s return value to be of type Call. It wouldn&amp;#8217;t let me. The option was disabled and greyed out. I immediately assumed that it was because I had an Exec statement in the stored procedure, and assumed it was either a security issue or the designer could not work out it&amp;#8217;s return type. I then removed all the exec code from sp and had it return a straight &lt;em&gt;select * from calls&lt;/em&gt;.&lt;/p&gt;


	&lt;p&gt;This still didn&amp;#8217;t work. I then renamed the Stored procedure to spStoredQuery. I added it to the designer and I was then able to set its &lt;em&gt;Return Type&lt;/em&gt; to Call. This lead me to believe that the designer didn&amp;#8217;t like the &amp;#8216;exec&amp;#8217; in the name of the Stored Procedure. In order to test this I renamed it back to spExecStoredQuery, but, it still worked okay.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve since played around with different versions and names and have discovered the following&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;The first time you add the sp as a method to the designer it checks for return values to try and guess the output type.&lt;/li&gt;
		&lt;li&gt;If it cannot guess the type, it will not let you set a return type in the designer at all&lt;/li&gt;
		&lt;li&gt;If you delete the method then fix the stored procedure so that it returns a constant return type, the designer caches the previous type and will still not let you set a return type.&lt;/li&gt;
		&lt;li&gt;If you rename the stored procedure and re-add it, it checks again, sees a return type (doesn&amp;#8217;t matter what it is) This allows you to manually select a return type in the designer.&lt;/li&gt;
		&lt;li&gt;If you then remove the non-dynamic select, and make the stored procedure dynamic, the method still works, and coerces the return type to be of type you selected.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;So, the outcome of all this is: If you are dynamically generating a query in a stored procedure and want to add it as a method with a return type in the &lt;span class="caps"&gt;LINQ&lt;/span&gt; designer, add it first with non-dynamic select (select * from foo), override it&amp;#8217;s return type if required, then add the dynamic &lt;span class="caps"&gt;SQL&lt;/span&gt; to stored procedure and you&amp;#8217;re laughing.&lt;/p&gt;</description>
      <pubDate>Wed, 20 Feb 2008 13:38:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:9803ceca-3ae9-43b7-89e7-ee9bcf898a00</guid>
      <author>Paul McConnon</author>
      <link>http://www.plopcentral.com/articles/2008/02/20/linq-to-sql-with-dynamically-generated-stored-prcedure</link>
      <category>Coding</category>
      <category>LINQ</category>
      <category>stored</category>
      <category>procedure</category>
      <category>Gotcha</category>
      <category>.NET</category>
    </item>
    <item>
      <title>Crazy!</title>
      <description>&lt;p&gt;&lt;a href="http://www.currys.co.uk/martprd/store/cur_page.jsp?BV_SessionID=&lt;code&gt;@&lt;/code&gt;@1002844767.1201358079@&lt;code&gt;@&lt;/code&gt;&amp;amp;BV_EngineID=ccccadedefgffijcflgceggdhhmdfhk.0&amp;amp;page=Product&amp;amp;fm=null&amp;amp;sm=null&amp;amp;tm=null&amp;amp;sku=241390&amp;amp;category_oid=&amp;#8221;&amp;gt;Currys &amp;#8211; Shop for Premium Cable &amp;#8211; &lt;span class="caps"&gt;BELKIN DUAL DVI 4&lt;/span&gt;.2m &lt;span class="caps"&gt;BKN DUAL DVI CABLE&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Saw this item for sale in a brick and mortar Currys yesterday for  £99 (On their site it&amp;#8217;s £49)&lt;/p&gt;


	&lt;p&gt;99 quid for a cable? Thats feckin insane.&lt;/p&gt;


	&lt;p&gt;And it&amp;#8217;s from Belkin, who until recently were the cheapy cheapy manufacturer.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m astonished I tells ya.&lt;/p&gt;


&lt;p style="text-align: right; font-size: 8px"&gt;Blogged with &lt;a href="http://www.flock.com/blogged-with-flock" title="Flock" target="_new"&gt;Flock&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 26 Jan 2008 14:40:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:51f91536-d797-42e1-970e-4c5354c6b7cb</guid>
      <author>Paul McConnon</author>
      <link>http://www.plopcentral.com/articles/2008/01/26/crazy</link>
    </item>
    <item>
      <title>Guess who?</title>
      <description>&lt;p&gt;&lt;a href="http://www.thelandsalmon.com/technology/stephen-hawkings-quotations.html"&gt;
&lt;img src="http://www.thelandsalmon.com/images/2008/January16thru31/stephen_hawking_lego.jpg" height="80%" width="80%"&gt;
&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Jan 2008 12:05:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:2dd56a4d-9bde-438a-89b2-7bce90417acb</guid>
      <author>Paul McConnon</author>
      <link>http://www.plopcentral.com/articles/2008/01/23/guess-who</link>
      <category>Photos</category>
    </item>
    <item>
      <title>This made my head feel funny!</title>
      <description>&lt;p&gt;Best myspace page ever?&lt;/p&gt;


	&lt;h4&gt;Captain Jean-Luc Picard &amp;#8211; 87 &amp;#8211; Male &amp;#8211; &lt;span class="caps"&gt;OUTER SPACE&lt;/span&gt;, US&lt;/h4&gt;


	&lt;p&gt;&lt;a href="http://www.myspace.com/wetfetish"&gt;http://www.myspace.com/wetfetish&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 23 Jan 2008 00:36:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:646e2666-1780-4f3e-964a-616fb8af4b0a</guid>
      <author>Paul McConnon</author>
      <link>http://www.plopcentral.com/articles/2008/01/23/this-made-my-head-feel-funny</link>
      <category>Funny</category>
    </item>
    <item>
      <title>Deckard is NOT a replicant!</title>
      <description>&lt;p&gt;He just isn&amp;#8217;t, right!&lt;/p&gt;


	&lt;p&gt;It doesn&amp;#8217;t matter that you can, if you squint your brain enough, imagine that he could have been a replicant the whole time. Or that &amp;#8216;Wow, wouldn&amp;#8217;t that be a cool twist&amp;#8217; if he was.&lt;/p&gt;


	&lt;p&gt;He wasn&amp;#8217;t.&lt;/p&gt;


	&lt;p&gt;Just cos big dopey Ridley toyed with the idea of tacking a nonsense twist on the end of the movie doesn&amp;#8217;t make the idea less nonsense.&lt;/p&gt;


	&lt;p&gt;Blade Runner is based on a short story by Philip K Dick called &amp;#8216;Do androids dream of electric sheep?&amp;#8217; The story played around with the question &amp;#8216;What does it mean to be human?&amp;#8217; It compared the burned-out Deckard who had no warmth or empathy but was fully human, to feeling empathic machines with emotions and a sense of their own mortality. Deckard being a machine completely removes a lot of the coolness in the story. The idea of Deckard suddenly turning out to be a replicant would have been too pedestrian, Philip K Dick dealt with big ideas, not &amp;#8216;Dallas; it was all a dream and I woke up in the shower&amp;#8217; style plot twists.&lt;/p&gt;


	&lt;p&gt;Anyhow, if he was a replicant, how come he gets beat up all the time, eh? How come he&amp;#8217;s so much weaker than the replicants&lt;/p&gt;


	&lt;p&gt;So to conclude, the film allows you to make your own mind up, but if you think Decker is a replicant then you&amp;#8217;re wrong.&lt;/p&gt;</description>
      <pubDate>Thu, 17 Jan 2008 12:33:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:7c318cf7-8b46-45d7-8eac-37d72708e292</guid>
      <author>Paul McConnon</author>
      <link>http://www.plopcentral.com/articles/2008/01/17/decker-is-not-a-replicant</link>
      <category>Blade</category>
      <category>Runner</category>
    </item>
    <item>
      <title>Grrrrrr</title>
      <description>&lt;p&gt;This is why I have a website.&lt;/p&gt;


	&lt;p&gt;So that I when &lt;span class="caps"&gt;I REALLY REALLY WANT TO KICK A PIECE OF FURNITURE&lt;/span&gt;, but must avoid doing so,in order to save myself from having to buy new furniture and/or a new foot, I can write a smart-arsed article/rant until I calm down (and actually usually run out of steam and don&amp;#8217;t finish the article)&lt;/p&gt;


	&lt;p&gt;Anyway, before the steam goes, the reason I started on this particular rant, is something I&amp;#8217;ve come across before, and actually seems to be getting more prevalent.&lt;/p&gt;


	&lt;p&gt;I just did a search on Google for the terms:&lt;/p&gt;


&lt;pre&gt;smbmount follow symlinks&lt;/pre&gt;

	&lt;p&gt;as I was having trouble connecting to the music share on my Mac Mini. Instantly, good old Google came up with a set of results, as it usually does, and the top one was from Ubuntu Forums. &amp;#8220;Yeeha!&amp;#8221; I thought to myself. No, not actually &amp;#8220;Yeeha!&amp;#8221; at all, &amp;#8220;Sheise!&amp;#8221;,  in fact. You see, Googles algorithm had decided that the single most important document on the entire internet, related to those three terms was&amp;#8230;&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;A question asked on Ubuntu forums about the same problem I had, to which no-one had replied.&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;WTF&lt;/span&gt;?! How can Googles page-rank&amp;#8482; algorithm, rank an unanswered question at the very top of it&amp;#8217;s results? Page-rank is supposed to weight the importance of a page, by the importance (via page-rank again(oh no recursion)) of the pages that link to it.&lt;/p&gt;


	&lt;p&gt;Who the feck links to an unanswered question on a forum from their website? People showing examples of how not to answer questions? A meta-loneliness list?&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;d chalk it down as just a little Google oddity if I didn&amp;#8217;t see it happen too regularly to be just dumb luck. More and more (admittedly on the esoteric side) tech related queries end up with the number 1 result being the same bloody question you are trying to get answered.&lt;/p&gt;


	&lt;p&gt;Maybe Google just thinks that you&amp;#8217;ll feel better knowing someone else shares your pain?&lt;/p&gt;


	&lt;p&gt;Ah, what the hell. My angers gone and now I just feel silly for thumping the keys at the start of the post.&lt;/p&gt;</description>
      <pubDate>Wed, 05 Dec 2007 21:31:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:a3ce4a58-1d14-49ea-aba9-6d4b7421a5cd</guid>
      <author>Paul McConnon</author>
      <link>http://www.plopcentral.com/articles/2007/12/05/grrrrrr</link>
      <category>Grrrrr</category>
    </item>
  </channel>
</rss>
