<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Gary Short</title>
	<atom:link href="http://garyshortblog.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://garyshortblog.wordpress.com</link>
	<description>There&#039;s no place like 127.0.0.1</description>
	<lastBuildDate>Mon, 20 May 2013 02:46:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='garyshortblog.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Gary Short</title>
		<link>http://garyshortblog.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://garyshortblog.wordpress.com/osd.xml" title="Gary Short" />
	<atom:link rel='hub' href='http://garyshortblog.wordpress.com/?pushpress=hub'/>
		<item>
		<title>The Internet is Broken and Here&#8217;s How</title>
		<link>http://garyshortblog.wordpress.com/2013/04/15/the-internet-is-broken-and-heres-how/</link>
		<comments>http://garyshortblog.wordpress.com/2013/04/15/the-internet-is-broken-and-heres-how/#comments</comments>
		<pubDate>Mon, 15 Apr 2013 15:02:06 +0000</pubDate>
		<dc:creator>garyshort</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">https://garyshortblog.wordpress.com/?p=244</guid>
		<description><![CDATA[Okay it’s not, that was a bit of an exaggeration. However, a fundamental way in which it’s used is broken, and it’s broken in quite a serious way. Your Email is You and You are your EmailMost of the social &#8230; <a href="http://garyshortblog.wordpress.com/2013/04/15/the-internet-is-broken-and-heres-how/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=244&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Okay it’s not, that was a bit of an exaggeration. However, a fundamental way in which it’s used is broken, and it’s broken in quite a serious way.</p>
<p><strong>Your Email is You and You are your Email<br /></strong>Most of the social networking services that we use (Twitter, Facebook, LinkedIn, etc.), as well as most subscription based services on the Internet, use a verified email address as means of user identification. You sign up with your email address and a password, they send an email to your account, that email contains a link, you follow the link, and hey presto! you are verified as being a real live human being. Well, an entity with an email address at any rate.</p>
<p><strong>The Link Between a Person and Their Email Account is Unbreakable</strong><br />Because an email address is for life, right? Well, I signed up to a lot of these services with an account I had at the garyshort.org domain, which I owned. Time passed and the registrar I used went bust. The “ownership” of my domain became unclear and I was unable to renew it when it was required. To cut a long story short, I lost the domain.</p>
<p>This was annoying, but it only handled my email and pointed to this blog, hosted on WordPress, so I set up a new email address, and thought no more about it.</p>
<p><strong>Forced Password Resets are Good for Security</strong><br />Time passed, quite a lot of time actually, and LinkedIn managed to get themselves hacked. I didn’t really care, it wasn’t a big problem for me, I use “once only” passwords for everything, so knowing my LinkedIn password only gained a hacker access to my LinkedIn account and LinkedIn had already secured that. I was happy enough, I’d change my password next time I logged in.</p>
<p>You see I’m not a security guy so, in my head, I thought the process would be that I’d log in, I’d be taken to a “change password” page where I’d input a new password and that would be that.</p>
<p>Of course, that’s a dumb idea, as the hacker has my password, so if it worked like that, the hacker could reset my password and lock me out. To stop that, what happens is, next time you log in, you get a message saying that a forced password reset has been triggered and a link has been sent, to your email address, for you to follow and reset your password. This makes perfect sense, only I don’t have that email address anymore.</p>
<p>Coincidently, and almost at the same time, I also got a forced password reset message from Twitter. Same thing. No, you can’t log in now, we’ve sent you a reset link to your email address.</p>
<p>Well that’s annoying, but that sort of thing must happen a lot, so there must be a way to fix it, right? Wrong! A search of Twitter’s support pages tells me I’ve pretty much lost my account, if I lose access to my email address:</p>
<p><img src="http://d3j5vwomefv46c.cloudfront.net/photos/large/756847168.png"></p>
<p><strong><img style="float:left;margin:0 5px 0 0;display:inline;" align="left" src="http://d3j5vwomefv46c.cloudfront.net/photos/large/758395804.png" width="264" height="469">Solution: Regain Control of the Domain</strong><br />Seems the only way I can regain control of my Twitter account is to regain control of my domain, so I set about finding out who has it now. The current owners are hidden behind <a href="http://www.shieldwhois.com/">ShieldWhoIs</a>, so I use the contact form there to see if I can get my domain back.</p>
<p>I get an almost instant reply telling me I can get my domain back for $1,500!</p>
<p><strong>Would the Real Gary Short Please Stand Up?</strong><br />At first, that just annoyed me and then I got worried, really worried. You see these guys are clearly not the most reputable bunch and all they have to do is issue a password reset to all the services I signed up to and the reset link will come to them, they can then reset it and bam! they are me. A script can be written to automate this, it’s trivial.</p>
<p>Not only are they me on every service I signed up to using that email address, but they are me on any service that I currently use Twitter OAuth to sign into, remember I can’t get into my account, so I can’t unauthorise any of these other services.</p>
<p><strong>Relax, no one Wants to be You!</strong><br />Right, no one wants to be me per se, but the account is valuable, here’s how. Twitter, in line with many services, has a sophisticated anti spam system that will hunt down and kill spamming accounts, but a real account, that a spammer has gotten control of, that could continue spamming for days or weeks before the spam posts outweigh the years of legitimate posts, and the spam hunting software hunts it down. </p>
<p><strong>There’s Money to be Made Here!<br /></strong>Okay, so even if a spammer can use my account to spam for weeks before being caught, that can still only be worth pennies to him right? Hmm maybe. Let’s say that’s true and each high jacked account is only worth pennies, if you are doing it at scale, then there’s a fortune to be made, and it’s pretty obvious from the above email that whoever has my domain is only interested in making money out of it.</p>
<p>Think about it, <a href="http://www.statisticbrain.com/twitter-statistics/">there’s 500 million users on Twitter</a> and <a href="http://begingroup.com/en/top/news/market_news/1353">1 billion users on Facebook</a>, the intersection of users and domain renewals must be large, and if the spammers pick up even a small fraction of them then there’s a fortune to be made.</p>
<p><strong>Oh the Irony!<br /></strong>If it weren’t so serious, it would be funny. Twitter will not talk to me. They claim they can’t do a thing to help me if I don’t own the email address I signed up with. They do this all in the name of security. They say that the email address is the only way to verify that it’s me. Only it won’t be me, the spammers will use Twitter’s own security protocol to take control of my account, and that same security protocol will prevent me from stopping them.</p>
<p><strong>Twitter Must be Worried, Right?<br /></strong>You’d think so, I mean this represents a potentially large spamming problem that would be very difficult to counter with software, and which could ruin their “pay to promote” advertising model. But as it turns out, they don’t give a damn. </p>
<p>As you can see from the image above, they have no interest in helping me regain control of my account if I lose access to my email. I contacted them days ago, via official channels, and haven’t even gotten an acknowledgement of my concern by way of return.</p>
<p><strong>So What can we Do?</strong><br />The short answer is nothing, if you’ve lost control of your email address your screwed, like me. If not, make sure you are using an email address that you stand the best chance of holding on to, use a Hotmail address or similar. Also, if there are other means of identification that a service offers you, then take them, no matter that it might seem a pain at the time, trust me, the alternative is worse.</p>
<p>Oh, and pass this around to your friends and family, make sure they see it too.</p>
<p>To end, I’d just like to say: “I’m Gary Short!” <img class="wlEmoticon wlEmoticon-smile" style="border-style:none;" alt="Smile" src="http://garyshortblog.files.wordpress.com/2013/04/wlemoticon-smile.png?w=640">&nbsp;</p>
<div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:499918a0-ce2f-4a7e-aca4-5c0ce26f11e4" class="wlWriterEditableSmartContent" style="float:none;margin:0;display:inline;padding:0;">
<div><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='448' height='252' src='http://www.youtube.com/embed/u93bhAimFFU?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' frameborder='0'></iframe></span></div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/garyshortblog.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/garyshortblog.wordpress.com/244/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=244&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://garyshortblog.wordpress.com/2013/04/15/the-internet-is-broken-and-heres-how/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00a3da9ae48539cbb8a142c0a8415a20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">garyshort</media:title>
		</media:content>

		<media:content url="http://d3j5vwomefv46c.cloudfront.net/photos/large/756847168.png" medium="image" />

		<media:content url="http://d3j5vwomefv46c.cloudfront.net/photos/large/758395804.png" medium="image" />

		<media:content url="http://garyshortblog.files.wordpress.com/2013/04/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>
	</item>
		<item>
		<title>Give Camp &#8211;The Team Leader&#8217;s Dilemma</title>
		<link>http://garyshortblog.wordpress.com/2011/10/27/give-camp-the-team-leaders-dilemma/</link>
		<comments>http://garyshortblog.wordpress.com/2011/10/27/give-camp-the-team-leaders-dilemma/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 09:14:07 +0000</pubDate>
		<dc:creator>garyshort</dc:creator>
				<category><![CDATA[Give Camp]]></category>

		<guid isPermaLink="false">https://garyshortblog.wordpress.com/2011/10/27/give-camp-the-team-leaders-dilemma/</guid>
		<description><![CDATA[I spent more hours awake than is healthy working at the inaugural Give Camp UK event last weekend. I’m not going to describe it here, hop over to their site if you are interested in what Give Camp UK is &#8230; <a href="http://garyshortblog.wordpress.com/2011/10/27/give-camp-the-team-leaders-dilemma/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=241&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I spent more hours awake than is healthy working at the inaugural Give Camp UK event last weekend. I’m not going to describe it here, <a href="http://www.givecamp.org.uk/">hop over to their site</a> if you are interested in what Give Camp UK is all about, and <a href="http://givecamp.org/">here</a> if you want an introduction to the whole concept.</p>
<p>Anyway, like I said, that’s where I was last weekend. I led a great team which built a secure forum site, with answer voting, for the <a href="http://www.youngminds.org.uk/">Young Minds charity</a>. Yeah I know what you’re thinking: it took you a weekend to build that? Seriously? I mean just take one of the open source <a href="http://stackoverflow.com/">StackOverflow</a> clones, skin it and you’re done, right?</p>
<p>Well yeah, but therein lies the dilemma. You can do that, and you can be done in a few hours, then you can build in more of the features that the charity wants, things that they consider “nice to haves” you can get it all done in the weekend, ‘cos that’s what it’s all about, right, delivering value for the charity?</p>
<p>Yes! Definitely! But then, on the other hand… you need devs to be enthusiastic about the technology you’re using. You need them to be thinking, hey that project uses cool tech, tech that I want to learn and get some experience on. Also, if you catch the interest of the devs, then not only do they want to join your team for the weekend, they are going to want to stick around after the weekend is finished and work on the project going forward. So, even though you may not get so much done at the actual weekend, the charity wins in the long run, ‘cos the devs stick around to work on the project in their spare time. As they are doing that, they are building real world experience in the tech that they are interested in, which might enhance their CV in the future. Every one wins!</p>
<p>Anyone reading this want to stick around after the weekend and work on a skinned StackOverflow site? Nah, didn’t think so.</p>
<p>So what did I do? Did I go for maximising value to the charity for the 48 or so hours of the event, or did I have my eye on the long game?</p>
<p>As it turned out I went for the latter. So we build our forum with <a href="http://couchdb.apache.org/">CouchDB</a> on the backend, <a href="http://nodejs.org/">Node.js</a> in the middle and <a href="http://knockoutjs.com/">KnockoutJS</a> on the front end.</p>
<p>Was I right? Well we, pretty much, finished the project during the weekend and the devs are continuing to push stuff to the <a href="https://github.com/robashton/GivecampUk">Git repo</a>, but it’s really too early to tell.</p>
<p>So, what would you have done? Let me know in the comments.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/garyshortblog.wordpress.com/241/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/garyshortblog.wordpress.com/241/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=241&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://garyshortblog.wordpress.com/2011/10/27/give-camp-the-team-leaders-dilemma/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00a3da9ae48539cbb8a142c0a8415a20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">garyshort</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing NodeJS on Windows</title>
		<link>http://garyshortblog.wordpress.com/2011/10/13/installing-nodejs-on-windows/</link>
		<comments>http://garyshortblog.wordpress.com/2011/10/13/installing-nodejs-on-windows/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 15:08:44 +0000</pubDate>
		<dc:creator>garyshort</dc:creator>
				<category><![CDATA[NodeJS]]></category>

		<guid isPermaLink="false">https://garyshortblog.wordpress.com/2011/10/13/installing-nodejs-on-windows/</guid>
		<description><![CDATA[Until very recently, when I wanted to program in NodeJS, I did so on a Ubuntu VM running on my Windows machine. Firstly, because in the beginning, NodeJS didn’t run on Windows. Latterly, because to install it on Windows was &#8230; <a href="http://garyshortblog.wordpress.com/2011/10/13/installing-nodejs-on-windows/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=231&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Until very recently, when I wanted to program in NodeJS, I did so on a Ubuntu VM running on my Windows machine. Firstly, because in the beginning, NodeJS didn’t run on Windows. Latterly, because to install it on Windows was four MSI files and to install it on Ubuntu was a case of running “sudo apt-get install NodeJS”. There’s no contest there is there?</p>
<p>However, yesterday I spent the day with <a href="http://blog.markrendle.net/">Mark Rendle</a> as he was in Dundee as part of his <a href="http://www.devexpress.com">DevExpress</a> sponsored speaking tour of the UK. During our many geeky conversations he mentioned <a href="http://chocolatey.org/">Chocolatey</a> to me and told me I should take a look, “it’s apt-get for Windows”, he said.</p>
<p>So I took a look, and right enough, to install “stuff” with it couldn’t be easier. Of course, first of all you have to install Chocolatey itself; turns out that’s a breeze though. Simply run the “cmd” command as Administrator and drop into Powershell (yes I know, bear with me though). Then from the Powershell prompt run:</p>
<p>Set-ExecutionPolicy Unrestricted</p>
<p>After that, run:</p>
<div id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum1">   1:</span> iex ((<span style="color:#0000ff;">new</span>-<span style="color:#0000ff;">object</span> net.webclient).</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum2">   2:</span>    DownloadString(<span style="color:#006080;">"http://bit.ly/psChocInstall"</span>))</pre>
<p><!--CRLF--></div>
</div>
<p>And “Bob’s your uncle”, that’s Chocolatey installed. Now you can run Chocolatey from, either Powershell, or an ordinary command prompt. Having installed it, we can use it to install a whole load of packages, including NodeJS. To do that, open a command prompt and type:</p>
<p>cinst NodeJs</p>
<p>then stand back and watch the magic happen (cinst is short for Chocolatey install by the way).</p>
<p>Having installed NodeJS, it’s time to test it with the time-honoured “hello world!” application so open up your favourite editor and type the following code:</p>
<div id="codeSnippetWrapper">
<div style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;padding:0;" id="codeSnippet">
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum1">   1:</span> require(<span style="color:#006080;">'http'</span>).createServer(<span style="color:#0000ff;">function</span>(req,res){</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum2">   2:</span>     res.writeHead(200,<span style="color:#006080;">'text/plain'</span>);</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum3">   3:</span>     res.end(<span style="color:#006080;">'Hello World!'</span>);</pre>
<p><!--CRLF-->
<pre style="text-align:left;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:'Courier New', courier, monospace;direction:ltr;color:black;font-size:8pt;overflow:visible;border-style:none;margin:0;padding:0;"><span style="color:#606060;" id="lnum4">   4:</span> }).listen(<span style="color:#006080;">'8080'</span>);</pre>
<p><!--CRLF--></div>
</div>
<p>Now save the file, call it server.js, and run it by typing:</p>
<p>node server.js</p>
<p>at the command prompt. Now we can connect to localhost:8080 and check that everything is working okay:</p>
<p><a href="http://garyshortblog.files.wordpress.com/2011/10/snaghtml1324159.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:0 5px;" title="SNAGHTML1324159" border="0" alt="SNAGHTML1324159" src="http://garyshortblog.files.wordpress.com/2011/10/snaghtml1324159_thumb.png?w=432&#038;h=204" width="432" height="204"></a></p>
<p>Which it is, so that’s cool. And that really is all there is to installing NodeJS (and all the other cool packages available on Chocolatey.org), so what are you waiting for?! Come on in, the NodeJS water’s fine! <img style="border-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://garyshortblog.files.wordpress.com/2011/10/wlemoticon-smile.png?w=640"></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/garyshortblog.wordpress.com/231/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/garyshortblog.wordpress.com/231/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=231&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://garyshortblog.wordpress.com/2011/10/13/installing-nodejs-on-windows/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00a3da9ae48539cbb8a142c0a8415a20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">garyshort</media:title>
		</media:content>

		<media:content url="http://garyshortblog.files.wordpress.com/2011/10/snaghtml1324159_thumb.png" medium="image">
			<media:title type="html">SNAGHTML1324159</media:title>
		</media:content>

		<media:content url="http://garyshortblog.files.wordpress.com/2011/10/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>
	</item>
		<item>
		<title>Software Performance Webinar</title>
		<link>http://garyshortblog.wordpress.com/2011/04/15/software-performance-webinar/</link>
		<comments>http://garyshortblog.wordpress.com/2011/04/15/software-performance-webinar/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 09:15:20 +0000</pubDate>
		<dc:creator>garyshort</dc:creator>
				<category><![CDATA[Developement]]></category>
		<category><![CDATA[Evangelism]]></category>
		<category><![CDATA[Webinars]]></category>

		<guid isPermaLink="false">https://garyshortblog.wordpress.com/2011/04/15/software-performance-webinar/</guid>
		<description><![CDATA[On April 28 I’ll be joining good friend of mine, Kendall Millar and his co-host Gael Fraiteur (of PostSharp fame) on their new webinar. In this webinar, Kendall will be speaking about The Natural Laws of Software Performance and I’ll &#8230; <a href="http://garyshortblog.wordpress.com/2011/04/15/software-performance-webinar/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=227&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img style="display:inline;float:left;margin:0 5px;" align="left" src="http://eventbrite-production.s3.amazonaws.com/admin/marketing/featuredblogs/donate.jpg"></p>
<p>On April 28 I’ll be joining good friend of mine, <a href="http://twitter.com/kendallmiller">Kendall Millar</a> and his co-host <a href="http://twitter.com/gfraiteur">Gael Fraiteur</a> (of <a href="http://www.sharpcrafters.com/">PostSharp</a> fame) on their new webinar. In this webinar, Kendall will be speaking about The Natural Laws of Software Performance and I’ll be reminding you of Everything You’ve Forgotten About Algorithms Since You Left University.</p>
<p>If you are interested in being in the audience for this webinar then <a href="http://postsharp28042011.eventbrite.com/">register now</a> at the Eventbrite site, it’s sure to be a lot of fun. Looking forward to “seeing” you there!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/garyshortblog.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/garyshortblog.wordpress.com/227/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=227&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://garyshortblog.wordpress.com/2011/04/15/software-performance-webinar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00a3da9ae48539cbb8a142c0a8415a20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">garyshort</media:title>
		</media:content>

		<media:content url="http://eventbrite-production.s3.amazonaws.com/admin/marketing/featuredblogs/donate.jpg" medium="image" />
	</item>
		<item>
		<title>I&#8217;ve Been Deep Fried!</title>
		<link>http://garyshortblog.wordpress.com/2011/03/28/ive-been-deep-fried/</link>
		<comments>http://garyshortblog.wordpress.com/2011/03/28/ive-been-deep-fried/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 16:11:19 +0000</pubDate>
		<dc:creator>garyshort</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://garyshortblog.wordpress.com/2011/03/28/ive-been-deep-fried/</guid>
		<description><![CDATA[Yes that’s right folks, the great guys over at Deep Fried Bytes have caught up with me, and persuaded me to talk about Technical Debt, as if ever getting me to speak was hard to do! I had a great &#8230; <a href="http://garyshortblog.wordpress.com/2011/03/28/ive-been-deep-fried/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=224&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://deepfriedbytes.com/"><img style="display:inline;float:left;margin:0 5px;" align="left" src="http://deepfriedbytes.com/files/media/image/WindowsLiveWriter/Media_8AE9/image_12.png" /></a>Yes that’s right folks, the great guys over at <a href="http://deepfriedbytes.com/">Deep Fried Bytes</a> have caught up with me, and persuaded me to talk about <a href="http://en.wikipedia.org/wiki/Technical_debt">Technical Debt</a>, as if ever getting me to speak was hard to do!</p>
<p>I had a great time with the guys, chewing over the where’s and whyfor’s of Technical Debt and if you’d like to listen to the podcast then just <a href="http://deepfriedbytes.com/podcast/episode-66-getting-a-lesson-about-technical-debt-from-gary-short/">hop over here</a> and take a gander, I’d recommend it, who knows, it may even save your project. <img style="border-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://garyshortblog.files.wordpress.com/2011/03/wlemoticon-smile.png?w=640" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/garyshortblog.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/garyshortblog.wordpress.com/224/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=224&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://garyshortblog.wordpress.com/2011/03/28/ive-been-deep-fried/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00a3da9ae48539cbb8a142c0a8415a20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">garyshort</media:title>
		</media:content>

		<media:content url="http://deepfriedbytes.com/files/media/image/WindowsLiveWriter/Media_8AE9/image_12.png" medium="image" />

		<media:content url="http://garyshortblog.files.wordpress.com/2011/03/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>
	</item>
		<item>
		<title>A Twitter oAuth Example in C#</title>
		<link>http://garyshortblog.wordpress.com/2011/02/11/a-twitter-oauth-example-in-c/</link>
		<comments>http://garyshortblog.wordpress.com/2011/02/11/a-twitter-oauth-example-in-c/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 15:58:45 +0000</pubDate>
		<dc:creator>garyshort</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://garyshortblog.wordpress.com/2011/02/11/a-twitter-oauth-example-in-c/</guid>
		<description><![CDATA[I have a number of scripts that I run against my Twitter feed, stuff like bulk deleting my DMs, that sort of thing. Well of course they all stopped working last year when Twitter moved from a basic authentication model &#8230; <a href="http://garyshortblog.wordpress.com/2011/02/11/a-twitter-oauth-example-in-c/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=221&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I have a number of scripts that I run against my Twitter feed, stuff like bulk deleting my DMs, that sort of thing. Well of course they all stopped working last year when Twitter moved from a basic authentication model to an oAuth one. I thought it was about time I got them up and running again. Now I know there are libraries out there that will handle the Twitter oAuth stuff for me, but I wanted to get a handle on how it worked, for my own information – besides, how hard could it be, right?</p>
<p>Well the answer is… not that hard, but it’s tricky to get working and a total PITA to debug. So, having gotten it working I thought I’d write this blog post, mainly for my own information, so I know where to look when I forget how to do it the next time, but if it helps you guys out too then that’s cool. On the plus side, at least you don’t have to go around the loop of getting the token in the first place. If you are using code against your own account – as I’m doing here – then all the information you need is there on your app page after you register</p>
<p>I’ll walk you through the process, via the code, then I’ll post the full code listing below that way you can cut and paste it into your own solution if you want to use it.</p>
<p>Okay, so what’s first? Well, first off, we have to collect the parameters that oAuth is going to need…</p>
<pre class="code"><span style="color:green;">//GS - Get the oAuth params
</span><span style="color:blue;">string </span>status = <span style="color:#a31515;">&quot;Your status goes here&quot;</span>;
<span style="color:blue;">string </span>postBody = <span style="color:#a31515;">&quot;status=&quot; </span>+ 
    <span style="color:#2b91af;">Uri</span>.EscapeDataString(status); 
            
<span style="color:blue;">string </span>oauth_consumer_key = <span style="color:#a31515;">&quot;YourConsumerKey&quot;</span>;
<span style="color:blue;">string </span>oauth_nonce = <span style="color:#2b91af;">Convert</span>.ToBase64String(
    <span style="color:blue;">new </span><span style="color:#2b91af;">ASCIIEncoding</span>().GetBytes(
        <span style="color:#2b91af;">DateTime</span>.Now.Ticks.ToString()));
            
<span style="color:blue;">string </span>oauth_signature_method = <span style="color:#a31515;">&quot;HMAC-SHA1&quot;</span>;
<span style="color:blue;">string </span>oauth_token = 
    <span style="color:#a31515;">&quot;YourToken&quot;</span>;
            
<span style="color:#2b91af;">TimeSpan </span>ts = <span style="color:#2b91af;">DateTime</span>.UtcNow - 
    <span style="color:blue;">new </span><span style="color:#2b91af;">DateTime</span>(1970, 1, 1, 0, 0, 0, 0,<span style="color:#2b91af;">DateTimeKind</span>.Utc
);
            
<span style="color:blue;">string </span>oauth_timestamp = 
    <span style="color:#2b91af;">Convert</span>.ToInt64(ts.TotalSeconds).ToString();
            
<span style="color:blue;">string </span>oauth_version = <span style="color:#a31515;">&quot;1.0&quot;</span>;</pre>
<p>Couple of tricky things here. Firstly notice two string variables, status and postBody. The latter is what we’ll use when we POST the request later, but the first is just the status part, it’s separated like this because it has to be double encoded in the signature (more on that later) but single encoded everywhere else! Yeah, I know! And that’s not really documented anywhere. I only noticed on close examination of the example text on <a href="http://dev.twitter.com/auth#auth-request">this page</a>.</p>
<p>On the subject on encoding, the .Net Framework has 4 methods of url encoding, two on the <a href="http://msdn.microsoft.com/en-us/library/system.uri(v=VS.100).aspx">Uri</a> class and two on the <a href="http://msdn.microsoft.com/en-us/library/system.web.httputility.aspx">HttpUtility</a> class. Guess what? They all do it slightly differently. The one that I’ve found that works best is Url.EscapeDataString, however, even that’s not fully <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC3986</a> compliant, so if you are using my code and still having problems that might be a place to look.</p>
<p>Moving on, the oauth_nonce param is a string that has to be unique on every call, this is to stop play back attacks on your account. Here I’ve used the ticks on the current date and time. I think this should be okay, but if not I’m sure <a href="http://idunno.org/">Barry Dorrans</a> will have a better suggestion for you. <img style="border-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://garyshortblog.files.wordpress.com/2011/02/wlemoticon-smile.png?w=640" /></p>
<p>Next is the oauth_timestamp which is the number of seconds after the <a href="http://en.wikipedia.org/wiki/Unix_epoch">Unix epoch</a>. Not surprisingly, there’s not a method in the .Net framework for that so you have to write your own. Remember to use the DateTime.UtcNow property to ensure it doesn’t use the local time on your machine, but uses GMT instead, regardless of where you are. This is important because, although the oAuth spec says the time has to be &gt;= previous requests, some people are saying that, for Twitter, it has to be within 5 minutes, though I’ve not seen that in my limited use.</p>
<pre class="code"><span style="color:green;">//GS - When building the signature string the params
//must be in alphabetical order. I can't be bothered
//with that, get SortedDictionary to do it's thing
</span><span style="color:#2b91af;">SortedDictionary</span>&lt;<span style="color:blue;">string</span>, <span style="color:blue;">string</span>&gt; sd = 
    <span style="color:blue;">new </span><span style="color:#2b91af;">SortedDictionary</span>&lt;<span style="color:blue;">string</span>, <span style="color:blue;">string</span>&gt;();
            
sd.Add(<span style="color:#a31515;">&quot;status&quot;</span>, status);
sd.Add(<span style="color:#a31515;">&quot;oauth_version&quot;</span>, oauth_version);
sd.Add(<span style="color:#a31515;">&quot;oauth_consumer_key&quot;</span>, oauth_consumer_key);
sd.Add(<span style="color:#a31515;">&quot;oauth_nonce&quot;</span>, oauth_nonce);
sd.Add(<span style="color:#a31515;">&quot;oauth_signature_method&quot;</span>, oauth_signature_method);
sd.Add(<span style="color:#a31515;">&quot;oauth_timestamp&quot;</span>, oauth_timestamp);
sd.Add(<span style="color:#a31515;">&quot;oauth_token&quot;</span>, oauth_token);
                        
<span style="color:green;">//GS - Build the signature string
</span><span style="color:blue;">string </span>baseString = <span style="color:#2b91af;">String</span>.Empty;
baseString += <span style="color:#a31515;">&quot;POST&quot; </span>+ <span style="color:#a31515;">&quot;&amp;&quot;</span>;
baseString += <span style="color:#2b91af;">Uri</span>.EscapeDataString(
    <span style="color:#a31515;">&quot;http://api.twitter.com/1/statuses/update.json&quot;</span>) 
    + <span style="color:#a31515;">&quot;&amp;&quot;</span>;
            
<span style="color:blue;">foreach </span>(<span style="color:#2b91af;">KeyValuePair</span>&lt;<span style="color:blue;">string</span>,<span style="color:blue;">string</span>&gt; entry <span style="color:blue;">in </span>sd)
{
    baseString += <span style="color:#2b91af;">Uri</span>.EscapeDataString(entry.Key + 
        <span style="color:#a31515;">&quot;=&quot; </span>+ entry.Value + <span style="color:#a31515;">&quot;&amp;&quot;</span>);
}
            
<span style="color:green;">//GS - Remove the trailing ambersand char, remember 
//it's been urlEncoded so you have to remove the 
//last 3 chars - %26
</span>baseString = 
    baseString.Substring(0, baseString.Length - 3);</pre>
<p>Having gathered our parameters together, we need to form them into a string in order to sign them. Of course this isn’t straight forward either. The string has to be formed in the following pattern:</p>
<p>method&amp;URL&amp;ParamKeyValuePairs</p>
<p>Which looks simple enough, but it’s a little tricky. Firstly, the ampersands that split the three parts must *not* be url encoded, but the ampersands that split the parameter key value pairs *must* be url encoded. As if that wasn’t enough of a pain, the key value pairs themselves must be in alphabetical order by key, and then by value, if the key is repeated, this is because Twitter are going to replicate your signing to ensure your precious tweet hasn’t been tampered with, and so there has to be a scheme to follow for them to replicate what you did. Of course, we can use a sorted dictionary to handle that part for us. Also remember to pass status here here and not postBody as status must be double url encoded at this point, but not in the actual POST.</p>
<pre class="code"><span style="color:green;">//GS - Build the signing key
</span><span style="color:blue;">string </span>consumerSecret = 
    <span style="color:#a31515;">&quot;yourSecret&quot;</span>;
            
<span style="color:blue;">string </span>oauth_token_secret = 
    <span style="color:#a31515;">&quot;YourToken&quot;</span>;
            
<span style="color:blue;">string </span>signingKey = 
    <span style="color:#2b91af;">Uri</span>.EscapeDataString(consumerSecret) + <span style="color:#a31515;">&quot;&amp;&quot; </span>+ 
    <span style="color:#2b91af;">Uri</span>.EscapeDataString(oauth_token_secret);</pre>
<p>Next we have to create the key that we are going to instantiate the hash with. To do this you use the url encoded consumer secret, followed by a non url encoded ampersand, followed by the url encoded token. If you don’t need the token for the request you are making then leave it off, but you still need the trailing ampersand.</p>
<pre class="code"><span style="color:green;">//GS - Sign the request
</span><span style="color:#2b91af;">HMACSHA1 </span>hasher = <span style="color:blue;">new </span><span style="color:#2b91af;">HMACSHA1</span>(
    <span style="color:blue;">new </span><span style="color:#2b91af;">ASCIIEncoding</span>().GetBytes(signingKey));
            
<span style="color:blue;">string </span>signatureString = <span style="color:#2b91af;">Convert</span>.ToBase64String(
    hasher.ComputeHash(
    <span style="color:blue;">new </span><span style="color:#2b91af;">ASCIIEncoding</span>().GetBytes(baseString)));</pre>
<p>Next we are going to sign the request, nothing complicated here, as you see, just remember to take a base64 string of it.</p>
<pre class="code"><span style="color:green;">//GS - Tell Twitter we don't do the 100 continue thing
</span><span style="color:#2b91af;">ServicePointManager</span>.Expect100Continue = <span style="color:blue;">false</span>;</pre>
<p>Then we have this line. This needs to be included to stop Twitter throwing <a href="http://www.checkupdown.com/status/E417.html">417 Expectation failed errors</a>.</p>
<p>Well that’s about it. There’s not much to say about the rest of it. It’s just a standard POST request from here. Twitter do recommend that you send the oauth params (remember they have to reproduce what you did to verify your request) via the Authorization header, so of course, you have to url encode it all up again, and wrap it in double quotes too.</p>
<p>Right, that’s all I’ve got to say. I’ve posted the full code below, feel free to use it if it’s any use to you, of course it comes with no warranty whatsoever, other than to say, it works on my machine for what I use it for, YMMV. <img style="border-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://garyshortblog.files.wordpress.com/2011/02/wlemoticon-smile.png?w=640" /></p>
<pre class="code"><span style="color:blue;">class </span><span style="color:#2b91af;">Program
</span>{
    <span style="color:blue;">static void </span>Main(<span style="color:blue;">string</span>[] args)
    {
        <span style="color:green;">//GS - Get the oAuth params
        </span><span style="color:blue;">string </span>status = <span style="color:#a31515;">&quot;your status&quot;</span>;
        <span style="color:blue;">string </span>postBody = <span style="color:#a31515;">&quot;status=&quot; </span>+ 
            <span style="color:#2b91af;">Uri</span>.EscapeDataString(status); 
            
        <span style="color:blue;">string </span>oauth_consumer_key = <span style="color:#a31515;">&quot;YourKey&quot;</span>;
        <span style="color:blue;">string </span>oauth_nonce = <span style="color:#2b91af;">Convert</span>.ToBase64String(
            <span style="color:blue;">new </span><span style="color:#2b91af;">ASCIIEncoding</span>().GetBytes(
                <span style="color:#2b91af;">DateTime</span>.Now.Ticks.ToString()));
            
        <span style="color:blue;">string </span>oauth_signature_method = <span style="color:#a31515;">&quot;HMAC-SHA1&quot;</span>;
        <span style="color:blue;">string </span>oauth_token = 
            <span style="color:#a31515;">&quot;YourToken&quot;</span>;
            
        <span style="color:#2b91af;">TimeSpan </span>ts = <span style="color:#2b91af;">DateTime</span>.UtcNow - 
            <span style="color:blue;">new </span><span style="color:#2b91af;">DateTime</span>(1970, 1, 1, 0, 0, 0, 0);
            
        <span style="color:blue;">string </span>oauth_timestamp = 
            <span style="color:#2b91af;">Convert</span>.ToInt64(ts.TotalSeconds).ToString();
            
        <span style="color:blue;">string </span>oauth_version = <span style="color:#a31515;">&quot;1.0&quot;</span>;

        <span style="color:green;">//GS - When building the signature string the params
        //must be in alphabetical order. I can't be bothered
        //with that, get SortedDictionary to do it's thing
        </span><span style="color:#2b91af;">SortedDictionary</span>&lt;<span style="color:blue;">string</span>, <span style="color:blue;">string</span>&gt; sd = 
            <span style="color:blue;">new </span><span style="color:#2b91af;">SortedDictionary</span>&lt;<span style="color:blue;">string</span>, <span style="color:blue;">string</span>&gt;();
            
        sd.Add(<span style="color:#a31515;">&quot;status&quot;</span>, status);
        sd.Add(<span style="color:#a31515;">&quot;oauth_version&quot;</span>, oauth_version);
        sd.Add(<span style="color:#a31515;">&quot;oauth_consumer_key&quot;</span>, oauth_consumer_key);
        sd.Add(<span style="color:#a31515;">&quot;oauth_nonce&quot;</span>, oauth_nonce);
        sd.Add(<span style="color:#a31515;">&quot;oauth_signature_method&quot;</span>, oauth_signature_method);
        sd.Add(<span style="color:#a31515;">&quot;oauth_timestamp&quot;</span>, oauth_timestamp);
        sd.Add(<span style="color:#a31515;">&quot;oauth_token&quot;</span>, oauth_token);
                        
        <span style="color:green;">//GS - Build the signature string
        </span><span style="color:blue;">string </span>baseString = <span style="color:#2b91af;">String</span>.Empty;
        baseString += <span style="color:#a31515;">&quot;POST&quot; </span>+ <span style="color:#a31515;">&quot;&amp;&quot;</span>;
        baseString += <span style="color:#2b91af;">Uri</span>.EscapeDataString(
            <span style="color:#a31515;">&quot;http://api.twitter.com/1/statuses/update.json&quot;</span>) 
            + <span style="color:#a31515;">&quot;&amp;&quot;</span>;
            
        <span style="color:blue;">foreach </span>(<span style="color:#2b91af;">KeyValuePair</span>&lt;<span style="color:blue;">string</span>,<span style="color:blue;">string</span>&gt; entry <span style="color:blue;">in </span>sd)
        {
            baseString += <span style="color:#2b91af;">Uri</span>.EscapeDataString(entry.Key + 
                <span style="color:#a31515;">&quot;=&quot; </span>+ entry.Value + <span style="color:#a31515;">&quot;&amp;&quot;</span>);
        }
            
        <span style="color:green;">//GS - Remove the trailing ambersand char, remember 
        //it's been urlEncoded so you have to remove the 
        //last 3 chars - %26
        </span>baseString = 
            baseString.Substring(0, baseString.Length - 3);
                       
        <span style="color:green;">//GS - Build the signing key
        </span><span style="color:blue;">string </span>consumerSecret = 
            <span style="color:#a31515;">&quot;YourSecret&quot;</span>;
            
        <span style="color:blue;">string </span>oauth_token_secret = 
            <span style="color:#a31515;">&quot;YOurToken&quot;</span>;
            
        <span style="color:blue;">string </span>signingKey = 
            <span style="color:#2b91af;">Uri</span>.EscapeDataString(consumerSecret) + <span style="color:#a31515;">&quot;&amp;&quot; </span>+ 
            <span style="color:#2b91af;">Uri</span>.EscapeDataString(oauth_token_secret);

        <span style="color:green;">//GS - Sign the request
        </span><span style="color:#2b91af;">HMACSHA1 </span>hasher = <span style="color:blue;">new </span><span style="color:#2b91af;">HMACSHA1</span>(
            <span style="color:blue;">new </span><span style="color:#2b91af;">ASCIIEncoding</span>().GetBytes(signingKey));
            
        <span style="color:blue;">string </span>signatureString = <span style="color:#2b91af;">Convert</span>.ToBase64String(
            hasher.ComputeHash(
            <span style="color:blue;">new </span><span style="color:#2b91af;">ASCIIEncoding</span>().GetBytes(baseString)));

        <span style="color:green;">//GS - Tell Twitter we don't do the 100 continue thing
        </span><span style="color:#2b91af;">ServicePointManager</span>.Expect100Continue = <span style="color:blue;">false</span>;

        <span style="color:green;">//GS - Instantiate a web request and populate the 
        //authorization header
        </span><span style="color:#2b91af;">HttpWebRequest </span>hwr = 
            (<span style="color:#2b91af;">HttpWebRequest</span>)<span style="color:#2b91af;">WebRequest</span>.Create(
            <span style="color:#a31515;">@&quot;http://api.twitter.com/1/statuses/update.json&quot;</span>);
            
        <span style="color:blue;">string </span>authorizationHeaderParams = <span style="color:#2b91af;">String</span>.Empty;
        authorizationHeaderParams += <span style="color:#a31515;">&quot;OAuth &quot;</span>;
        authorizationHeaderParams += <span style="color:#a31515;">&quot;oauth_nonce=&quot; </span>+ <span style="color:#a31515;">&quot;\&quot;&quot; </span>+ 
            <span style="color:#2b91af;">Uri</span>.EscapeDataString(oauth_nonce) + <span style="color:#a31515;">&quot;\&quot;,&quot;</span>;
            
        authorizationHeaderParams += 
            <span style="color:#a31515;">&quot;oauth_signature_method=&quot; </span>+ <span style="color:#a31515;">&quot;\&quot;&quot; </span>+ 
            <span style="color:#2b91af;">Uri</span>.EscapeDataString(oauth_signature_method) + 
            <span style="color:#a31515;">&quot;\&quot;,&quot;</span>;
            
        authorizationHeaderParams += <span style="color:#a31515;">&quot;oauth_timestamp=&quot; </span>+ <span style="color:#a31515;">&quot;\&quot;&quot; </span>+ 
            <span style="color:#2b91af;">Uri</span>.EscapeDataString(oauth_timestamp) + <span style="color:#a31515;">&quot;\&quot;,&quot;</span>;
            
        authorizationHeaderParams += <span style="color:#a31515;">&quot;oauth_consumer_key=&quot; 
            </span>+ <span style="color:#a31515;">&quot;\&quot;&quot; </span>+ <span style="color:#2b91af;">Uri</span>.EscapeDataString(
            oauth_consumer_key) + <span style="color:#a31515;">&quot;\&quot;,&quot;</span>;
            
        authorizationHeaderParams += <span style="color:#a31515;">&quot;oauth_token=&quot; </span>+ <span style="color:#a31515;">&quot;\&quot;&quot; </span>+ 
            <span style="color:#2b91af;">Uri</span>.EscapeDataString(oauth_token) + <span style="color:#a31515;">&quot;\&quot;,&quot;</span>;
            
        authorizationHeaderParams += <span style="color:#a31515;">&quot;oauth_signature=&quot; </span>+ <span style="color:#a31515;">&quot;\&quot;&quot; 
            </span>+ <span style="color:#2b91af;">Uri</span>.EscapeDataString(signatureString) + <span style="color:#a31515;">&quot;\&quot;,&quot;</span>;
            
        authorizationHeaderParams += <span style="color:#a31515;">&quot;oauth_version=&quot; </span>+ <span style="color:#a31515;">&quot;\&quot;&quot; </span>+ 
            <span style="color:#2b91af;">Uri</span>.EscapeDataString(oauth_version) + <span style="color:#a31515;">&quot;\&quot;&quot;</span>;
            
        hwr.Headers.Add(
            <span style="color:#a31515;">&quot;Authorization&quot;</span>, authorizationHeaderParams);

        <span style="color:green;">//GS - POST off the request
        </span>hwr.Method = <span style="color:#a31515;">&quot;POST&quot;</span>;
        hwr.ContentType = <span style="color:#a31515;">&quot;application/x-www-form-urlencoded&quot;</span>;
        <span style="color:#2b91af;">Stream </span>stream = hwr.GetRequestStream();
        <span style="color:blue;">byte</span>[] bodyBytes = 
            <span style="color:blue;">new </span><span style="color:#2b91af;">ASCIIEncoding</span>().GetBytes(postBody);
            
        stream.Write(bodyBytes, 0, bodyBytes.Length);
        stream.Flush();
        stream.Close();

        <span style="color:green;">//GS - Allow us a reasonable timeout in case
        //Twitter's busy
        </span>hwr.Timeout = 3 * 60 * 1000;

        <span style="color:blue;">try 
        </span>{ 
            <span style="color:#2b91af;">HttpWebResponse </span>rsp = hwr.GetResponse() 
                <span style="color:blue;">as </span><span style="color:#2b91af;">HttpWebResponse</span>;
            <span style="color:green;">//GS - Do something with the return here...
        </span>}
        <span style="color:blue;">catch </span>(<span style="color:#2b91af;">WebException </span>e)
        {
            <span style="color:green;">//GS - Do some clever error handling here...
        </span>}
    }        
}</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/garyshortblog.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/garyshortblog.wordpress.com/221/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=221&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://garyshortblog.wordpress.com/2011/02/11/a-twitter-oauth-example-in-c/feed/</wfw:commentRss>
		<slash:comments>59</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00a3da9ae48539cbb8a142c0a8415a20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">garyshort</media:title>
		</media:content>

		<media:content url="http://garyshortblog.files.wordpress.com/2011/02/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>

		<media:content url="http://garyshortblog.files.wordpress.com/2011/02/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>
	</item>
		<item>
		<title>NoSQL Conference &#8211; Dundee Nov 20th 2010</title>
		<link>http://garyshortblog.wordpress.com/2010/10/18/nosql-conference-dundee-nov-20th-2010/</link>
		<comments>http://garyshortblog.wordpress.com/2010/10/18/nosql-conference-dundee-nov-20th-2010/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 09:04:12 +0000</pubDate>
		<dc:creator>garyshort</dc:creator>
				<category><![CDATA[Community]]></category>

		<guid isPermaLink="false">https://garyshortblog.wordpress.com/2010/10/18/nosql-conferencedundee-nov-20th-2010/</guid>
		<description><![CDATA[The first NoSQL (Not only SQL) developer day will take place at the University of Dundee on Saturday 20th Nov (http://developerdeveloperdeveloper.com/nosql1/). Come and join other developers and database professionals and learn more about this emerging technology area. Seven sessions across &#8230; <a href="http://garyshortblog.wordpress.com/2010/10/18/nosql-conference-dundee-nov-20th-2010/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=217&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>The first NoSQL (Not only SQL) developer day will take place at the University of Dundee on Saturday 20th Nov (<a href="http://developerdeveloperdeveloper.com/nosql1/">http://developerdeveloperdeveloper.com/nosql1/</a>). Come and join other developers and database professionals and learn more about this emerging technology area. Seven sessions across the day covering VoltDB, Hadoop and HBase, Windows Azure, Cassandra and Hector, CouchDB, RavenDB and a session on is NoSQL the future of data storage.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/garyshortblog.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/garyshortblog.wordpress.com/217/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=217&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://garyshortblog.wordpress.com/2010/10/18/nosql-conference-dundee-nov-20th-2010/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00a3da9ae48539cbb8a142c0a8415a20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">garyshort</media:title>
		</media:content>
	</item>
		<item>
		<title>SQLBits &#8211; Registration Open</title>
		<link>http://garyshortblog.wordpress.com/2010/08/02/sqlbits-registration-open/</link>
		<comments>http://garyshortblog.wordpress.com/2010/08/02/sqlbits-registration-open/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 09:08:35 +0000</pubDate>
		<dc:creator>garyshort</dc:creator>
				<category><![CDATA[Community]]></category>

		<guid isPermaLink="false">https://garyshortblog.wordpress.com/2010/08/02/sqlbits-registration-open/</guid>
		<description><![CDATA[We are pleased to announce SQLBits &#8211; The 7 Wonders of SQL conference, which will be taking place from September 30th to October 2nd at York University. SQLBits is the largest SQL Server conference in Europe and the previous six &#8230; <a href="http://garyshortblog.wordpress.com/2010/08/02/sqlbits-registration-open/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=214&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>We are pleased to announce <b>SQLBits &#8211; The 7 Wonders of SQL</b> conference, which will be taking place from September 30th to October 2nd at <a href="http://www.sqlbits.com/information/Travel.aspx">York University</a>. SQLBits is the largest SQL Server conference in Europe and the previous six conferences have established it as a must-attend event for DBAs, developers and BI professionals who work with Microsoft SQL Server in the UK and Europe. We are making this the biggest event ever with capacity for over 500 SQL Server professionals.</p>
<p><a href="http://www.sqlbits.com/">The SQL Server Conference &#8211; SQLBits &#8211; The 7 Wonders of SQL &#8211; 30 &#8211; 02 Oct 2010 &#8211; York</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/garyshortblog.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/garyshortblog.wordpress.com/214/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=214&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://garyshortblog.wordpress.com/2010/08/02/sqlbits-registration-open/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00a3da9ae48539cbb8a142c0a8415a20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">garyshort</media:title>
		</media:content>
	</item>
		<item>
		<title>Why I Hate Barclaycard</title>
		<link>http://garyshortblog.wordpress.com/2010/06/02/why-i-hate-barclaycard/</link>
		<comments>http://garyshortblog.wordpress.com/2010/06/02/why-i-hate-barclaycard/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 17:48:54 +0000</pubDate>
		<dc:creator>garyshort</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">https://garyshortblog.wordpress.com/2010/06/02/why-i-hate-barclaycard/</guid>
		<description><![CDATA[As I work for an American company I spend a fair amount of time travelling to the US. At the moment I’m in Glendale, CA. No matter what I do, no matter how many times I call or email Barclaycard, &#8230; <a href="http://garyshortblog.wordpress.com/2010/06/02/why-i-hate-barclaycard/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=212&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>As I work for an American company I spend a fair amount of time travelling to the US. At the moment I’m in Glendale, CA. No matter what I do, no matter how many times I call or email Barclaycard, no matter how many notes they say they put in my file; every time I’m in the US this same chain of events happens:</p>
<ol>
<li>About the third or the fourth day, Barclaycard assume the US transactions on my card are fraudulent, despite the fact that I called to tell them I’d be travelling to the US and they had “put a note in my file”.</li>
<li>They stop my card.</li>
<li>They then check to see if the transactions are indeed fraudulent but calling me on my phone. Of course they do this during UK office hours and so I get a call between 3am and 4am local time, when I’m always at my best.</li>
<li>An automated voice asks me to confirm my identity and then asks me to confirm the transactions.</li>
<li>The call ends with the automated voice telling me that they’ll continue to monitor the transactions on my card for my own protection.</li>
</ol>
<p>BS! The law in the UK makes Barclaycard liable for fraudulent activity not me, so they are not protecting me, they are protecting themselves, which is why they block first and ask questions (at 3am!) later and that is why I hate this stupid, incompetent company!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/garyshortblog.wordpress.com/212/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/garyshortblog.wordpress.com/212/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=212&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://garyshortblog.wordpress.com/2010/06/02/why-i-hate-barclaycard/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00a3da9ae48539cbb8a142c0a8415a20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">garyshort</media:title>
		</media:content>
	</item>
		<item>
		<title>Dumb Security from AA</title>
		<link>http://garyshortblog.wordpress.com/2010/02/12/dumb-security-from-aa/</link>
		<comments>http://garyshortblog.wordpress.com/2010/02/12/dumb-security-from-aa/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 20:26:40 +0000</pubDate>
		<dc:creator>garyshort</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://garyshortblog.wordpress.com/2010/02/12/dumb-security-from-aa/</guid>
		<description><![CDATA[After the “Underpants bomber” burned his ‘nads on a flight to Detroit just before Christmas, the TSA issued security guidance with regard to carry on luggage. As I’m flying out to the MVP summit in Seattle tomorrow I thought I’d &#8230; <a href="http://garyshortblog.wordpress.com/2010/02/12/dumb-security-from-aa/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=200&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>After the “Underpants bomber” burned his ‘nads on a flight to Detroit just before Christmas, the TSA issued security guidance with regard to carry on luggage. As I’m flying out to the MVP summit in Seattle tomorrow I thought I’d check out AA’s site and find out if the guidance is still in place. It turns out it is, but this made me giggle. This is AA’s take on the guidance, straight from their website…</p>
<blockquote><p><b>From Europe To The U.S.</b></p>
<p>Effective immediately, and until further notice, customers travelling on American Airlines from Europe will be limited to      <br /><b>one carry-on item</b>. The carry-on item must fit in an overhead compartment or under the seat and cannot exceed 45 dimensional inches / 114 cm (length + width + height) and weigh no more than 40 lbs/18 kgs. This limit will apply to customers originating on       <br />American Airlines and customers originating on other carriers connecting to American Airlines for flights to the U.S. from Europe. </p>
<p><b>Exemptions:</b></p>
<p>The normal carry-on allowance of one bag plus one personal item still applies for: </p>
<ul>
<li>American Airlines AAdvantage Executive Platinum®, AAdvantage Platinum® or AAdvantage Gold® members </li>
<li><b>one</b>world Alliance Emerald, Sapphire or Ruby members </li>
<li>Customers travelling in First Class </li>
<li>Customers travelling in Business Class </li>
<li>Customers travelling with PriorityAAccess </li>
<li>AAirpass® members </li>
</ul>
</blockquote>
<p>The message from AA to would be terrorists is clear, if you want to blow up one of our planes with your second piece of carry on, then you’ll darn well have to upgrade first. AA the airline that requires a better class of terrorist. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="https://www.americanairlines.co.uk/i18n/travelInformation/New_carryOn.jsp">New Carry-On Baggage Policy To The U.S.</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/garyshortblog.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/garyshortblog.wordpress.com/200/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=garyshortblog.wordpress.com&#038;blog=4000614&#038;post=200&#038;subd=garyshortblog&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://garyshortblog.wordpress.com/2010/02/12/dumb-security-from-aa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00a3da9ae48539cbb8a142c0a8415a20?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">garyshort</media:title>
		</media:content>
	</item>
	</channel>
</rss>
