<?xml version="1.0" encoding="UTF-8" ?>
    <feed xmlns="http://www.w3.org/2005/Atom">
        
            <title>codingbadger</title>
            <link rel="self" href="http://blog.codingbadger.com/rss/">
            </link>
            <author>
              <name>Barry Mooring</name>
              <email>barry@codingbadger.com</email>
            </author>
            <updated>2013-01-15T09:26:00Z</updated>
            <id>http://blog.codingbadger.com/</id>


                    <entry>
                            <id>http://blog.codingbadger.com/blog/2013/january/sql-server-locating-objects-in-your-stored-procedures/</id>
                            <title>SQL Server - Locating objects in your Stored Procedures</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2013/january/sql-server-locating-objects-in-your-stored-procedures/"></link>
                            <content type="html">
                                  
<p>Recently, I have been doing lots of SQL Server stuff so decided
to add a few bits and pieces on here.&nbsp;</p>

<p>First up, finding objects within your stored procedures. In this
case, specifically views and tables.</p>

<p>This query is useful to find out if you have tables or views
that aren't in any stored procedures. It gives you the object name,
type of object and the number of stored procedures it appears
in.</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<pre class="brush: sql">
;with q as
(
Select   t.Name as [ObjectName],
       t.type_desc as [ObjectType],
      p.Name as [ProcedureName]
        
From sys.tables t
Left Join sys.procedures p on object_definition(p.object_Id) Like '%' + Replace(t.name, '_','!_')  + '%' ESCAPE '!'

    Union
Select  v.Name,
       v.type_desc,
      p.Name
   
From sys.views v
Left Join sys.procedures p on object_definition(p.object_Id) Like '%' + Replace(v.name, '_','!_')  + '%' ESCAPE '!'

)
Select    ObjectName,
       ObjectType,
       Count(ProcedureName) as [NumberOfOccurrences]
From q
Group by ObjectName, ObjectType
</pre>

<p>To list the names of the procedures that the object appears in
you would change it to the following:</p>

<pre class="brush: sql">
;with q as
(
Select   t.Name as [ObjectName],
       t.type_desc as [ObjectType],
      p.Name as [ProcedureName]
         
From sys.tables t
Left Join sys.procedures p on object_definition(p.object_Id) Like '%' + Replace(t.name, '_','!_')  + '%' ESCAPE '!'

    Union

Select  v.Name,
       v.type_desc,
      p.Name

From sys.views v
Left Join sys.procedures p on object_definition(p.object_Id) Like '%' + Replace(v.name, '_','!_')  + '%' ESCAPE '!'

)
Select    ObjectName,
       ObjectType,
       ProcedureName
From q
Where ObjectName = 'YOUR_OBJECT_NAME'
</pre>

<p>&nbsp;</p>

<p>&nbsp;</p>

                             </content>                            
                            <updated>2013-01-15T09:26:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2012/march/pushing-a-local-git-repository-to-a-new-remote-repository/</id>
                            <title>Pushing a local Git repository to a new remote repository</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2012/march/pushing-a-local-git-repository-to-a-new-remote-repository/"></link>
                            <content type="html">
                                  
<p>For reasons completely unknown I find it *really* difficult to
remember the syntax in Git to push a new local repository&nbsp;to a
remote destination.</p>

<p>So to stop from scratching my head about it, I am going to put
it here. Two reasons:</p>

<p>1. so I know I can find it</p>

<p>2. it might help someone else looking for it</p>

<p>So, you've create a local git repository&nbsp;on your machine
and what to push it to a remote server? (In this example I am going
to use <a href="http://BitBucket.org">http://BitBucket.org</a>)</p>

<p>Firstly, log in to BitBucket and create a new blank
repository.</p>

<p>Once that is done, using git bash in your local
repository&nbsp;execute the command</p>

<pre class="brush: csharp">
git remote add origin&nbsp;git@bitbucket.org:{BITBUCKET_USERNAME}/{REPO_NAME}.git
</pre>

<p><span class="Apple-style-span">Obviously, replacing
{BITBUCKET_USERNAME} &amp; {REPO_NAME} with the real
values!</span></p>

<p><span class="Apple-style-span">This will add the the BitBucket
URL as a local remote alias called "origin" to your local
repo.</span></p>

<p><span class="Apple-style-span">Now you need simply need to push
your local repository&nbsp;(usually called <strong>master</strong>)
to your remote repository. Which is called <strong>origin</strong>
as we have just given it that alias!</span></p>

<p><span class="Apple-style-span">To be clear, you can call your
remote alias anything you like it doesn't have to be
<strong>origin</strong>. In this instance calling your alias
<strong>bitbucket</strong> would make sense.</span></p>

<pre class="brush: csharp">
git push origin master
</pre>

<p>And that is all you need to do! Really simple but for some
reason I can never remember it.</p>

<p>As a side note, there is also a really handy <a
href="http://help.github.com/git-cheat-sheets/">git reference guide
on GitHub</a></p>

                             </content>                            
                            <updated>2012-03-13T13:28:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2012/january/web-applications-you-are-looking-in-the-wrong-place/</id>
                            <title>Web Applications - You are looking in the wrong place</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2012/january/web-applications-you-are-looking-in-the-wrong-place/"></link>
                            <content type="html">
                                  
<p>Bit of a cryptic title I know, but let me explain.</p>

<p>There have been a number of occasions on Twitter when a tweet
has wandered in to my timeline along the lines of:</p>

<p style="padding-left: 30px;"><strong>"What's the keyboard
shortcut in GMail to send a message to Archive?
#lazyweb"</strong></p>

<p>Ok so that question may be a bit too simple but it is generally
"How can I get [Web App] to do [some specific task]" If I don't
know the answer then a quick search normally brings up the
answer.</p>

<p>But I'm not immediately switching to Google for my searching, oh
no boys and girls... I'm searching here first:</p>

<p><a href="http://webapps.stackexchange.com"><img src="/media/8757/webapps.png" width="352" height="89" alt="Web Apps"/></a></p>

<p>Now just to get one small and tiny detail out of the way, I am a
Moderator on this site, so it's natural that I am going to say how
brilliant it is! But here is the thing, it really
<strong>is</strong>&nbsp;brilliant!</p>

<p>That <a href="http://trello.com">Trello</a>&nbsp;thing everyone
is talking about? Well a question was asked about Trello on Web
Applications waaay back in September 2011. And there are <a
href="http://webapps.stackexchange.com/questions/tagged/trello">plenty
more really awesome questions</a> lurking about.</p>

<p>I would bet that if you have a query about anything Trello
related, it has probably already been asked. &nbsp;If by some
miracle it hasn't, then you should ask it. The Trello Developers
actively use Web Applications and answer any queries you may have.
Pretty cool huh?</p>

<p>Moving on to Google. I don't know a single person who doesn't
use Google in one form or other. &nbsp;Web Applications is an
Aladdin's cave full of nifty little Google <a
href="http://webapps.stackexchange.com/questions/tagged/google-search">
tricks and tips</a>.</p>

<p>Did you know that Google adds a load of JavaScript nonsense to
your search results? Want to get rid of it? Well,&nbsp;<a
href="http://webapps.stackexchange.com/q/22291/5095">here is the
answer</a>.</p>

<p>Have you ever wondered what the query string parameter
<strong>`shva`</strong> means when logging in to GMail? Well, <a
href="http://webapps.stackexchange.com/q/13913/5095">wonder no
more</a>!</p>

<p>Are you trying to work out how to automatically post your
Google+ posts to your Facebook? Well, conserve your brain power and
check out <a
href="http://webapps.stackexchange.com/q/22987/5095">this
answer</a>.</p>

<p>Another nice Web Application that is getting a lot of attention
at the moment is, <a href="http://ifttt.com">If This Then That</a>.
This super simple Web App is all about Triggers, Actions &amp;
Channels. If <strong>this</strong> happens then do
<strong>that</strong>. <strong>This</strong> could be you posting
on Google+, the <strong>that</strong> could be your post
automagically making it's way to your Facebook.&nbsp;</p>

<p>This is a simple example but there are lots of Channels
available (The Google+ and Facebook in this example) such as Email,
SMS, Calendar and many more. Want to get an email if the weather
forecast for tomorrow is raining? IFTTT can do that.</p>

<p><strong>In short, Web Applications is an awesome place to ask
questions about erm... Web Applications!&nbsp;</strong></p>

<p>But wait, there are some things that you should know. Web
Applications is <strong>not</strong> the place to ask for
alternatives or Web App requests. Questions like this:</p>

<p style="padding-left: 30px;"><strong>Is there a Web App that will
do [x] for me?</strong></p>

<p>This is a <strong>bad</strong> question!</p>

<p>So what can you do? Well, you do some research yourself! Yes,
the community is here to help you but they're not here to just
spoon feed you. The same principle applies across the Stack
Exchange network, we aren't just being nasty :)</p>

<p>A better question would be:</p>

<p style="padding-left: 30px;"><strong>I am looking for a Web App
that will do [x] for me.</strong></p>

<p style="padding-left: 30px;"><strong>I have done some research
and the following Web Apps are almost suitable:</strong></p>

<div style="padding-left: 30px;">
<ul>
<li><strong>Web App A</strong></li>

<li><strong>Web App B</strong></li>

<li><strong>Web App C</strong></li>
</ul>
</div>

<p style="padding-left: 30px;"><strong>But here are the sticking
points:</strong></p>

<div style="padding-left: 30px;">
<ul>
<li><strong>Web App A doesn't do E</strong></li>

<li><strong>Web App B doesn't F</strong></li>

<li><strong>Web App C doesn't do E &amp; G</strong></li>
</ul>
</div>

<p style="padding-left: 30px;"><strong>Can anyone recommend a
solution to these problems? I would really like to use Web App A
but the fact that it doesn't do E is really putting me
off</strong></p>

<p>Yes, you have had to put some effort in but this is a much
better question and will more than likely get some awesome
answers!</p>

<p>If you aren't sure you can always test the water in <a
href="http://chat.stackexchange.com/rooms/7/webapps">Chat</a>&nbsp;or
even post a question on the <a
href="http://meta.webapps.stackexchange.com/">Web Apps Meta</a>
site.</p>

<p>By browsing through the questions on Web Applications you will
find so many useful apps &amp; services out there that you probably
didn't know existed! You might even know how to answer a few
questions to!</p>

<p>So next time you have a question about a Web Application,
instead of immediately searching through no end of useless websites
via Google, give Web Applications a try and see if we can help
you.</p>

<p>&nbsp;</p>

<p>P.S The answer is typing `e` when in the message ;-)</p>

                             </content>                            
                            <updated>2012-01-30T20:44:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2012/january/stack-overflow-careers-not-just-for-the-stack-overflow-hardcore/</id>
                            <title>Stack Overflow Careers - not just for the Stack Overflow hardcore</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2012/january/stack-overflow-careers-not-just-for-the-stack-overflow-hardcore/"></link>
                            <content type="html">
                                  
<div>
<p>Pretty much every developer in the world knows about <a
href="http://stackoverflow.com">Stack Overflow</a>, searching for a
solution to a development problem in Google will almost certainly
throw up a pretty damn good answer on Stack Overflow.</p>

<p>Along will many other Q&amp;A sites that are now available on <a
href="http://stackexchange.com/sites">Stack Exchange</a> there is a
Careers site too.</p>

<p><a href="http://careers.stackoverflow.com">Careers 2.0</a> is a
place to show off your&nbsp;awesomeness. And I don't mean your
awesomeness on Stack Overflow - I mean everywhere!&nbsp;</p>

<p>As Careers 2.0 is tied to Stack Overflow there are certain
aspects of it which are designed to promote your activity on Stack
Overflow.</p>

<p>Such as the tags you are active in:</p>

<p><img src="/media/8597/tags_500x90.jpg"  width="500"  height="90" alt="Tags"/></p>

<p>Your Stack Exchange accounts:</p>

<p><img src="/media/8602/se_accounts_499x109.jpg"  width="499"  height="109" alt="SE Accounts"/></p>

<p>Along with any "top answers" you feel that are exceptionally
good you need to show them off.</p>

<p><strong>And that is it - the rest of your profile is up to
you.</strong></p>

<p>&nbsp;</p>

<p>I will go through and show you some of the main sections that
are on your Careers 2.0 Profile to demonstrate that most of this is
nothing to do with Stack Overflow.</p>

<p><strong>A personal statement</strong></p>

<div><img src="/media/8607/personal_statement_494x180.jpg"  width="494"  height="180" alt="personal_statement"/></div>

<p>Add whatever you like here - it's entirely up to you. Just make
it good!</p>

<p><strong><br />
</strong></p>

<div><img src="/media/8612/tech_500x173.jpg"  width="500"  height="173" alt="Tech"/></div>

<p>Add the technologies you are interested in and if you want, the
technologies you aren't interested in.</p>

<p>A number of the sections that relate to technology allow you to
choose the same tags that Stack Overflow uses when you post a
question. I am guessing this makes it easier for Employers to
search through candidates who like a particular technology.</p>
</div>

<p><strong>Experience &amp; Education</strong></p>

<p>Fairly self explantory to be honest. You add your previous roles
along with a short description, time frames and the technology you
used.</p>

<div><strong><img src="/media/8617/oss_499x165.jpg"  width="499"  height="165" alt="OpenSource"/><br />
</strong> 

<p>This is where it can get interesting. You are able to to add
links to any open source projects that you have worked on. This
allows you to put your real projects out there on display and make
it easy for potential Employers to find and immediately see how you
would normally write code. Remember, this is code that you have
written properly, not some pseudo crap that you have quickly
knocked together so you can earn a quick 20 or 30 rep on Stack
Overflow.</p>

<div><img src="/media/8622/apps_498x230.jpg"  width="498"  height="230" alt="Apps"/></div>

<p>Again more opportunities for you to show off your real
acheivements.</p>

<p><strong>Writing &amp; Reading</strong></p>

<p>The <strong>Writing</strong>&nbsp;section allows you to link to
Amazon for any books that you may have written and also to any
articles or blog posts you may have written that you feel will make
you stand out from everybody else.</p>

<p>The <strong>Reading</strong> section is pretty similar and lets
you link to Amazon for any books you have read and again any blog
posts that you have read.</p>

<p>Obviously, you should pick and choose the relevant books that
you have read. I'm pretty sure potential Employers do not need to
know that you have read the "Shoot Annual" from 1983 :)</p>

<p>&nbsp;</p>

<p>There are other sections that you can complete on your profile
along with some other nice pieces of functionality but I don't want
to spoil all of the surprises!</p>

<p>I get the impression that a lot of people think that Careers 2.0
is very closely tied to Stack Overflow and more specifically to the
reputation that you have on Stack Overflow. This is simply not the
case and&nbsp;I hope you can now see why your reputation on Stack
Overflow is a pretty small factor when it comes to your Careers 2.0
profile.</p>

<p>It seems I am in good company as Joel Spolsky <a
href="http://blog.stackoverflow.com/2011/08/reputation-not-rep/">blogged</a>
about why reputation on Stack Overflow isn't what Careers 2.0 is
about.</p>

<p>Oh, and here is a <a
href="http://careers.stackoverflow.com/barry">link</a>&nbsp;to my
Careers profile should you wish to have a look :)</p>
</div>

                             </content>                            
                            <updated>2012-01-06T09:36:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2011/december/scripting-out-the-schema-data-in-sql-server-2008/</id>
                            <title>Scripting out the Schema &amp; Data in SQL Server 2008</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2011/december/scripting-out-the-schema-data-in-sql-server-2008/"></link>
                            <content type="html">
                                  
<p>SQL Server 2008 has a neat feature that allows you to script out
an object. Not really ground breaking so far. However, where this
differs from SQL 2005 is that you can script out:</p>

<ul>
<li>the schema</li>

<li>the data</li>

<li>the schema &amp; data</li>
</ul>

<p>You would think this option is available to you by right
clicking directly on the object (typically a table for scripting
out data and schema) but it isn't - you have to start on the
database.</p>

<p>Right click on your database and select
<strong>Tasks</strong>&nbsp;&gt;<strong>Generate
Scripts...</strong></p>

<p><img src="/media/8475/step_one_generate_scripts_499x495.jpg"  width="499"  height="495" alt="Step _One _Generate _Scripts"/></p>

<p>This will fire up a wizard to generate the scripts for
you.&nbsp;</p>

<p>Click <strong>Next</strong> and you will be prompted to select
the objects you want to script out. I am going to choose one table
for this purpose as it's easier.</p>

<p><img src="/media/8480/step_two_select_object_500x463.jpg"  width="500"  height="463" alt="Step _Two _Select _Object"/></p>

<p>Click <strong>Next</strong></p>

<p>This is the important part, by default SSMS defaults to
<strong>Schema Only</strong>&nbsp;to amend this to include the data
you need to click <strong>Advanced</strong></p>

<p><strong><img src="/media/8485/step_three_clickadvanced_500x463.jpg"  width="500"  height="463" alt="Step _Three _Click Advanced"/></strong></p>

<p>Now scroll down to the proprty named <strong>Types of data to
script</strong>&nbsp;and select an option from the drop down.</p>

<p><img src="/media/8490/step_four_type_of_data_500x463.jpg"  width="500"  height="463" alt="Step _four _type _of _data"/></p>

<p>Click <strong>OK</strong> and follow the rest of the wizard.</p>

<p>And there you have it, a simple way to script out your schema
and data via SSMS 2008.</p>

<p>&nbsp;</p>

<p>Note: If you are on SQL Server 2005 then I would recommend using
an add-on such as <a href="http://www.ssmstoolspack.com/">SSMS
Tools Pack</a> as it includes this type of functionality which
isn't available pre SQL 2008.</p>

                             </content>                            
                            <updated>2011-12-21T13:05:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2011/december/connecting-to-bitbucket-with-more-than-one-account/</id>
                            <title>Connecting to BitBucket with more than one account</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2011/december/connecting-to-bitbucket-with-more-than-one-account/"></link>
                            <content type="html">
                                  
<p>&nbsp;</p>

<p>This is a short follow up to my <a href="http://blog.codingbadger.com/blog/2011/december/setting-up-multiple-user-profiles-in-git/"
title="Setting up multiple user profiles in Git">previous post</a>,
on how to setup an environment so that you can connect to GitHub or
BitBucket on the same machine using different user accounts.</p>

<p>A few people have asked how they can create multiple user on one
machine that point to the same host e.g. BitBucket.org</p>

<p>Well, you will be pleased to know it is really simple!</p>

<p>You need to follow the same steps as my previous post, apart
from some small changes in the Config file.</p>

<p>So you need to:</p>

<ol>
<li>Create a new SSH key pair remembering to give each key pair
unique names</li>

<li>Add the SSH Key to your BitBucket account</li>

<li>Add the SSH Key to the SSH Agent</li>
</ol>

<p>And now for the Config file!</p>

<p>I will assume that you have created one SSH Key pair called
<strong>id_rsa_work</strong> and one SSH Key pair called
<strong>id_rsa_personal</strong>&nbsp;and both of these accounts
are held on BitBucket.</p>

<p>Last time we used the config file to ensure that Git used the
correct Key file depending on whether we were connecting to GitHub
or BitBucket. We will do pretty much the same here but we will
assign different Host names so that Git knows which Key file to
use.</p>

<p>&nbsp;</p>

<pre class="brush: csharp">
# Work user account for BitBucket
Host bitbucket.org
 
HostName bitbucket.org
  
PreferredAuthentications publickey
 
IdentityFile ~/.ssh/id_rsa_work
  
  
# Personal user account for BitBucket
Host bitbucket-personal
 
HostName bitbucket.org
  
PreferredAuthentications publickey
  
IdentityFile ~/.ssh/id_rsa_personal
</pre>

<p>See how we have used change the Host value to
<strong>bitbucket-personal</strong>, it works pretty much the same
as changing the hosts file on your PC.</p>

<p>So now if we wanted to clone a Git repo from BitBucket using our
Work account we use this:</p>

<pre class="brush: csharp">
git clone git@bitbucket.org:MY_WORK_USER_NAME/MY_WORK_REPO_NAME.git
</pre>

<p>And now, I want to clone a repo from my personal BitBucket
account...</p>

<pre class="brush: csharp">
git clone git@bitbucket-personal:MY_PERSONAL_USER_NAME/MY_PERSONAL_REPO_NAME.git
</pre>

<p>All you need to do is change the host from
<strong>bitbucket.org</strong> to
<strong>bitbucket-personal</strong> - Git will work out which key
file to use.</p>

<p>&nbsp;</p>

<p>Note: This approach will also work for GitHub.</p>

                             </content>                            
                            <updated>2011-12-17T11:15:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2011/december/setting-up-multiple-user-profiles-in-git/</id>
                            <title>Setting up multiple user profiles in Git</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2011/december/setting-up-multiple-user-profiles-in-git/"></link>
                            <content type="html">
                                  
<p>This post should hopefully help you setup multiple user profiles
when using Git on Windows.</p>

<p>I had already set up my Git installation to connect to GitHub
using my personal email address. I then wanted to add another
profile to connect to BitBucket using my work email address.</p>

<p>So, how did I do it?</p>

<p><strong>Create a new pair of SSH Keys</strong></p>

<p>The first step was to create a new pair of SSH keys using my
work email address so I can connect to BitBucket. I am going to
backup my current SSH keys just incase anything goes wrong. So open
up your Git Bash console and type:</p>

<pre class="brush: csharp">
cd ~/.ssh
mkdir key_backup
cp id_rsa* key_backup
</pre>

<p>&nbsp;</p>

<p>This will copy any SSH keys in the the "key_backup" directory we
just created.</p>

<p>Now we need to create a new SSH key pair for my work
email&nbsp;</p>

<pre class="brush: csharp">
ssh-keygen -t rsa -C "MyWorkEmailAddress"
</pre>

<p>It will prompt you to give the key file a name:</p>

<pre class="brush: csharp">
Enter file which to save the key (/c/documents and settings/USERNAME/.ssh/id_rsa):
</pre>

<p>You need to specify a new name or it will overwrite your
existing keys - which you don't want.</p>

<p>Enter a name of your choice - I used</p>

<pre class="brush: csharp">
id_rsa_work
</pre>

<p>You will then be prompted to enter a passphrase and your new key
will be created.</p>

<p>&nbsp;</p>

<p><strong>Adding the Key to your BitBucket
account</strong>&nbsp;</p>

<p>You will need add the newly created SSH Key to your BitBucket
account.</p>

<p>Naviagte to your <strong>/.ssh/</strong> directory and open up
the newly created key file in a text editor. It will be called what
ever you name you gave it in the last step, so in my case it is
called <strong>id_rsa_work.pub</strong></p>

<p>Copy the entire line as it is, to your clipboard.</p>

<p>Log in to your BitBucket account and navigate to your <a
href="https://bitbucket.org/account/#ssh-keys">"Account &gt; SSH
Keys"</a> section.</p>

<p>Paste your key in to the text box and click <strong>Add
Key</strong></p>

<p><strong><br />
</strong></p>

<p><strong>Adding the SSH keys to the SSH Agent</strong></p>

<p>Now we need to add to the SSH Agent so it knows about the new
key pair we have just created.</p>

<p>Still in your Git Bash console type:</p>

<pre class="brush: csharp">
ssh-agent.exe bash
</pre>

<p>Then type</p>

<pre class="brush: csharp">
ssh-add.exe ~/.ssh/id_rsa_work
</pre>

<p>I called my new key pair <strong>id_rsa_work</strong> but if you
have given it a different name then use that one here.</p>

<p>Then type</p>

<pre class="brush: csharp">
exit
</pre>

<p>&nbsp;</p>

<p><strong>Configuring your config</strong></p>

<p>In Windows Explorer navigate to your .ssh directory (usually in
your profile directory)</p>

<p>Edit the file named "config" in a text editor. (If there isn't
one there just create one)</p>

<p>You then need to add the following details to the file:</p>

<pre class="brush: csharp">
# Default GitHub user
Host github.com
  HostName github.com
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_rsa

# Work user account
Host bitbucket.org
  HostName bitbucket.org
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_rsa_work
</pre>

<p>&nbsp;</p>

<p>This will tell Git that when I connect to the host
<strong>github</strong> to use the <strong>id_rsa</strong> key pair
but when I connect to <strong>bitbucket</strong> to use my
<strong>id_rsa_work</strong> key pair.</p>

<p>Save and close the config file.</p>

<p>&nbsp;</p>

<p>That is all that you should need to do.&nbsp;Now if I try to
clone a repo from Github like this:</p>

<pre class="brush: csharp">
git clone https://github.com/MY_USER_NAME/MY_REPO_NAME.git
</pre>

<p>It will use my GitHub credentials and the SSH Keys created using
my personal email.</p>

<p>However, cloning a repo from BitBucket like this:</p>

<pre class="brush: csharp">
git clone git@bitbucket.org:MY_USER_NAME/MY_REPO_NAME.git
</pre>

<p>It will use my BitBucket credentials and the SSH keys created
using my work email.</p>

<p>&nbsp;</p>

<p><strong>Note:</strong></p>

<p><strong>This post is a bit rushed as I wanted to get out as soon
as possible whilst still fresh in my mind!</strong></p>

                             </content>                            
                            <updated>2011-12-16T10:15:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2011/october/umbraco-how-to-amend-ublogsy-to-use-atom-10/</id>
                            <title>Umbraco - How to amend uBlogsy to use Atom 1.0</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2011/october/umbraco-how-to-amend-ublogsy-to-use-atom-10/"></link>
                            <content type="html">
                                  
<p>I use the <a
href="http://our.umbraco.org/projects/starter-kits/ublogsy">uBlogsy
blog package</a> for Umbraco for my blog, whilst looking at my blog
posts in Google Reader I noticed that all formatting, images, links
etc where being stripped out.</p>

<p>So after a bit of digging around on the Umbraco forums, it
appears the uBlogsy strips out any HTML. This was easy to resolve
but it was then pointed out to me by <a
href="http://our.umbraco.org/member/5237">Rik Helsen</a> that my
RSS 2.0 feed would be invalid.</p>

<p>So, with a bit of tinkering I re-wrote the Razor file to use the
Atom 1.0 format rather than RSS 2.0, with the advantage that you
can include HTML in Atom.</p>

<p>The Razor file you need to amend is located in the Developer
section under:</p>

<p><strong>/ScriptingFiles/uBlogsyRSS.cshtml</strong></p>

<p>There are certain sections that I have hard coded which you will
have to change for your own site.</p>

<p>If you have any questions feel free to drop me an email or post
a comment on this post.&nbsp;</p>

<p>&nbsp;</p>

<pre class="brush: csharp">
@{
     /*  RSS  FEED  */
}

@using  System.Linq
@using  System.Xml.Linq
@using  umbraco.MacroEngines
@using  uBlogsy.Web.Extensions
@
     //  get  all  posts
     DynamicNodeList  postList  =  Model.AncestorOrSelf(1).DescendantsOrSelf("uBlogsyPost");
     var  posts  =  postList.Items.OrderByDescending(x  =&gt;  x.GetProperty("uBlogsyPostDate").Value);

     string  lastPubDate;
     if  (posts.Count()  ==  0)
     {
         lastPubDate  =  DateTime.Now.ToString();
     }
     else   
     {   
         lastPubDate  =  posts.FirstOrDefault().GetProperty("uBlogsyPostDate").Value;   
     }   
     //  get  landing  page   
     var  landing  =  Model.AncestorOrSelf(1).DescendantsOrSelf("uBlogsyLanding").First();   
     &lt;feed  xmlns="http://www.w3.org/2005/Atom"&gt;   
         
             &lt;title&gt;@landing.uBlogsyRssTitle&lt;/title&gt;   
             &lt;link  rel="self"  href="{http://YOUR RSS FEED ADDRESS/}"&gt;   
             &lt;/link&gt;   
             &lt;author&gt;   
               &lt;name&gt;{YOUR NAME}&lt;/name&gt;   
               &lt;email&gt;{YOUR EMAIL ADDRESS}&lt;/email&gt;   
             &lt;/author&gt;   
             &lt;updated&gt;@lastPubDate.FormatDateTime("yyyy-MM-dd'T'HH:mm:ss'Z'")&lt;/updated&gt;   
             &lt;id&gt;{http://YOUR BLOG ADDRESS/}&lt;/id&gt;   
   
   
             @foreach  (var  p  in  posts)   
             {   
                     &lt;entry&gt;   
                             &lt;id&gt;@p.Url&lt;/id&gt;   
                             &lt;title&gt;@p.GetProperty("uBlogsyContentTitle").Value&lt;/title&gt;   
                             &lt;author&gt;   
                                  &lt;name&gt;@p.GetProperty("uBlogsyPostAuthor").Value&lt;/name&gt;   
                             &lt;/author&gt;   
                             &lt;rights&gt;@landing.uBlogsyRssCopyright&lt;/rights&gt;   
                             &lt;link  href="@p.Url"&gt;&lt;/link&gt;   
                             &lt;content  type="html"&gt;   
                                   @Html.Raw(@p.GetProperty("uBlogsyContentBody").Value)   
                              &lt;/content&gt;                             
                             &lt;updated&gt;@p.GetProperty("uBlogsyPostDate").Value.FormatDateTime("yyyy-MM-dd'T'HH:mm:ss'Z'")  &lt;/updated&gt;   
                     &lt;/entry&gt;   
             }   
     &lt;/feed&gt;   
}
</pre>

<p>&nbsp;</p>

                             </content>                            
                            <updated>2011-10-12T12:21:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2011/october/the-iphone-4s,-apple-and-it&#39;s-competition/</id>
                            <title>The iPhone 4S, Apple and it&#39;s competition</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2011/october/the-iphone-4s,-apple-and-it&#39;s-competition/"></link>
                            <content type="html">
                                  
<div><span>So the new iPhone,</span> <a
href="http://www.apple.com/iphone"><span>the 4S</span></a><span>,
has been announced and after a few days mulling it over, it doesn't
excite me.</span></div>

<div><br />
 <span>When the iPhone 4 was announced it genuinely made me want it
- it is a lovely piece of technology. Yes it had</span> <a
href="http://www.bbc.co.uk/news/technology-10641910"><span>it's
flaws</span></a><span>, but it was truly brilliant. &nbsp;The
iPhone 4 was released when Apple were way ahead of the game and
they had the pick of the market. In my opinion this is no longer
the case.</span><br />
<br />
 <span>Other companies, such as Samsung, HTC, Microsoft &amp; Nokia
to name but a few, have had to sit up and take notice of the
amazing innovations that Apple have been responsible for. They want
a piece of this action and have really pushed forward to catch them
up and ultimately, they want to be the front runner.</span><br />
<br />
 <span>I have ditched my iPhone 4, in favour of a</span> <a
href="http://www.samsung.com/global/microsite/galaxys2/html/"><span>
Samsung Galaxy S2.</span></a> <span>I was a little hesitant at
first but after a few hours I knew I had made the right
choice.</span><br />
 <span>The Galaxy S2 is slimmer, lighter, faster, is more
customisable and overall, in my opinion, the best smart phone out
there. &nbsp;</span></div>

<div><span><br />
</span></div>

<div>
<div dir="ltr">
<table border="1">
<tbody>
<tr>
<td>&nbsp;</td>
<td>
<p dir="ltr"><a
href="http://www.apple.com/iphone/specs.html"><span>iPhone
4S</span></a></p>
</td>
<td>
<p dir="ltr"><a
href="http://www.samsung.com/global/microsite/galaxys2/html/specification.html">
<span>Samsung Galaxy S2</span></a></p>
</td>
</tr>

<tr>
<td><span>Processor</span></td>
<td>
<p dir="ltr"><span>1Ghz Dual Core</span></p>
</td>
<td>
<p dir="ltr"><span>1.2Ghz Dual Core</span></p>
</td>
</tr>

<tr>
<td><span>Weight</span></td>
<td>
<p dir="ltr"><span>140g</span></p>
</td>
<td>
<p dir="ltr"><span>116g</span></p>
</td>
</tr>

<tr>
<td><span>Dimensions (H x W x D) (mm)</span></td>
<td>
<p dir="ltr"><span>115.2 x 58.6 x 9.3</span></p>
</td>
<td>
<p dir="ltr"><span>125.3 x 66.1 x 8.49</span></p>
</td>
</tr>

<tr>
<td><span>RAM</span></td>
<td>
<p dir="ltr"><span>512MB</span></p>
</td>
<td>
<p dir="ltr"><span>1,024MB</span></p>
</td>
</tr>

<tr>
<td><span>Storage</span></td>
<td>
<p dir="ltr"><span>16GB / 32GB / 64GB</span></p>
</td>
<td>
<p dir="ltr"><span>MicroSD Card (upto 32GB)</span></p>
</td>
</tr>
</tbody>
</table>
</div>

<br />
<br />
<br />
 <span>The thing with Android is, at first, the OS was all over the
place. Major OS upgrades were being released what seemed like every
week. Now though, it's far more stable. A positive point for me is
that if you are a geek you can mess about with it - change things.
If you're not a geek then it works perfectly as it is.</span><br />
 <span>This is where Apple loses it's edge. Yes, the OS is lovely
and yes it works perfectly out of the box too. But if you want to
tinker with things then you are out of luck. And this makes me a
little sad.</span><br />
<br />
 <span>Another point, is the iPad2.</span><br />
<br />
 <span>Again it is a lovely piece of technology that a few years
ago would have been an impossible feat. Yes, it is better than the
original iPad but it was hardly a "game changer". There are</span>
<a
href="http://www.geekosystem.com/ipad-2-tablet-comparison-chart/"><span>
other tablets available that have the same if not better
hardware</span></a> <span>but they never beat the iPad in reviews
as that pesky AppStore keeps popping up.</span><br />
<br />
 <span>The AppStore is the only thing that is keeping Apple ahead
of the rest of the pack at the moment and that won't last for
long.</span><br />
 <span>After switching from my iPhone to the S2 I was able to
download pretty much 95% of the apps I used. The others, I can live
without to be honest. &nbsp;The Android Marketplace is also
maturing well, more and more companies are converting and releasing
their AppStore applications in to the Android
Marketplace.</span><br />
 <span>Soon enough though, the AppStore won't be the be all and end
all to getting Apps for your mobile/tablet devices.</span><br />
<br />
 <span>With the release of</span> <a
href="http://www.microsoft.com/windowsphone/en-gb/default.aspx"><span>
Windows Phone 7</span></a><span>, the subsequent</span>&nbsp; <a
href="http://windowsteamblog.com/windows_phone/b/windowsphone/archive/2011/09/27/exploring-windows-phone-7-5-s-web-marketplace-and-a-surprise-new-feature.aspx">
<span>update to 7.5</span></a><span>, and it's</span> <a
href="http://www.microsoft.com/presspass/press/2011/feb11/02-11partnership.mspx">
<span>recent partnership</span></a> <span>with Nokia - Microsoft
are well on their way to getting a slice of the huge smart phone
pie. Yes, the Microsoft equivalent of the AppStore is probably
looking a bit bare in comparision however the cupboard will soon be
brimming with apps. Given the dominance that Microsoft had over the
PC software market for so long, who is to say they won't or can't
take over the mobile market too. They made a pretty bold statement
of their intentions by completely re-writing their mobile OS for
WP7.</span><br />
<br />
 <span>And this poses the question, what are Apple going to do
next?</span><br />
<br />
 <span>I certainly don't have the answer to this question. The
release of the iPhone 4S confirms, at least for me, that they are
no longer way ahead of everyone else and begs the question as to
what direction Apple are moving. Have they done their bit for
mobile devices? Do they have another master plan to revolutionise a
different area of technology that is plodding along?</span><br />
<br />
 <span>In recent years, the iPhone has united geeks and non-geeks
together by simply releasing amazing products that spark the
imagination of what is possible and more importantly what could be
possible in the future. Well all expected a new version of the
iPhone to be released and to have that excitement and anticipation
of being part of the Apple revolution.</span><br />
<br />
 <span>Sadly, after all the delays, media hype and the various pipe
dream articles, it never came. For me the iPhone 4S is just another
decent smart phone. It's not a game changer and it certainly isn't
the best phone. I'm aware that it fixes some bugs and introduces
some new features but for me it's more of a Service Pack release.
Which isn't want the world was waiting for.</span><br />
<br />
 <span>With the sad death of Steve Jobs, who truly revolutionised
computers, phones and the music industry, is it time for someone
else to step up. Does someone else need to drive this area in to
the future or are we there now - at the peak? Can it go any
further?</span><br />
<br />
 <span>I wonder who that person will be and what the future
holds?</span></div>

<p>&nbsp;</p>

                             </content>                            
                            <updated>2011-10-06T10:17:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2011/september/i&#39;ve-been-doing-it-all-wrong-and-you-probably-have-to/</id>
                            <title>I&#39;ve been doing it all wrong... and you probably have too</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2011/september/i&#39;ve-been-doing-it-all-wrong-and-you-probably-have-to/"></link>
                            <content type="html">
                                  
<p>I'm not afraid to admit it - I've been doing it all wrong.</p>

<p>I thought that I had been writing some decent code. I've just
finished reading <a
href="http://www.amazon.co.uk/gp/product/0132350882/ref=as_li_ss_tl?ie=UTF8&amp;tag=codingbadgerc-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0132350882">
Clean Code</a> and it turns out that I haven't. As it happens I've
been writing some terrible code.</p>

<p>I was recommended <a
href="http://www.amazon.co.uk/gp/product/0132350882/ref=as_li_ss_tl?ie=UTF8&amp;tag=codingbadgerc-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0132350882">
this book</a> by <a href="http://www.paulstack.co.uk/blog">Paul
Stack</a> (<a href="http://twitter.com/stack72">@stack72</a>). So I
popped down to the nearest Waterstones (other stores available) and
picked up the last copy. Trudging back to work, I skimmed the back
page and have to admit I thought it would be a bit of a dull
read.</p>

<p>How wrong could I be?! After the first chapter I was hooked, I
read the <strong>whole</strong> book - yesterday. Yes one day! I
couldn't put it down.</p>

<p>The thing that strikes me as odd is that not one person I have
worked with has ever mentioned this book. Which means they are
probably doing it wrong too. This book is an absolute must! I wish
I could go back in time and make this the first development book I
ever read. Unfortunately, I'm pretty sure we haven't quite mastered
time travel just yet. So I will have to make do with looking at all
the code I have written and quietly sobbing.</p>

<p>Don't get me wrong, the code I've been writing is probably not
that bad and after all it does actually work. &nbsp;But that is the
point - that's all it does, it works. &nbsp;You can tell by looking
at it that once it was finished and working I left it. I left it to
move on to other things, to work on other code that had deadlines
looming.&nbsp;</p>

<p>Reading Clean Code has made me realise that 99% of any comments
that I have ever written in code are worthless. Complete nonsense
that need not be there. If I had taken the time and care to really
look at what I was writing then I wouldn't have needed to put a
comment.</p>

<p>Time and care. These are words that are not normally associated
with coding. Most of us don't have or don't believe we have, the
time to spend refactoring code. But this book has convinced me to
make time. This is my work, my profession. Why am I not caring
about my code? If a carpenter didn't care about their work then
they would produce shoddy products. Sure they would probably work
but they wouldn't look pretty or have a nice finish.</p>

<p>Clean Code highlights lots of different scenarios that should be
setting off alarms bells. The bells are ringing and they are
ringing loudly.</p>

<p>Simple things like only allowing functions to do one thing. I
haven't been doing and the code gets messy. It's a quick and easy
fix to add a little piece of code in to a function. Job done. Bug
resolved. But alas, you have just planted the seed to something
that if left alone will destroy your whole code base!</p>

<p>The ideas and recommendations that this book provides are not
difficult - they may be difficult to master but to implement they
are simple. If you see a piece of code that could potentially be
modified to make it easier to read or to be re-used then do it.
Don't hold back - potentially fixing something counts for nothing
if you aren't actually going to fix it. &nbsp;We are
also&nbsp;afraid to use the delete key - preferring to comment out
huge swathes of code. Just delete it. Source control will remember
it - you don't have to.</p>

<p>I can't explain how much this book had changed my view of
writing, refactoring and taking care of my code. From now on, every
estimate for any development will allow for time to refactor and
properly test the code I am creating and/or extending. &nbsp;It
seems absurd that I haven't been following the practices in this
book from the outset.</p>

<p>For me this book is a massive game changer, it's made me realise
that you won't always write perfect code and you certainly won't
write perfect code the first time. It can always be improved. Your
codebase is always growing, evolving, and what seemed to be a
perfect function or class a few months/weeks/days ago no longer
applies. Changes have been made and refactoring can be done.</p>

<p>It's also opened my eyes that getting other people to review and
modifiy your code isn't a bad thing. It's not a personal slur on
you - it's just that they will see things differently. They will
pick up on mistakes, or should that be improvements, that you will
miss.</p>

<p>From now on, I will be trying to craft my code like stories. And
that is exactly what it is - a craft. Piecing things together,
rearranging, amalgamating and splitting code until it describes
exactly what you are trying to achieve. No more comments - the code
should speak for itself. The reader should enjoy the experience of
opening your source files, not recoil back in horror.</p>

<p>To quote a paragraph from the book:</p>

<p><strong>"If we all checked-in our code a little cleaner than
when we checked it out, the code simply could not rot. The cleanup
doesn't have to be something big. Change one variable name for the
better, break up one function that's a little too large, eliminate
one small bit of duplicationm clean up one composite 'if'
statement"</strong></p>

<p>This isn't about refactoring 1000's of lines of code in one go -
it's about making those little changes that we always (or should
always) notice but never actually modify.</p>

<p>This book has inspired me, I am planning to refactor and add
proper tests to my <a
href="http://marketplace.seesmic.com/plugins/filterme">FilterMe
plugin for Seesmic</a> and then hopefully make it open source.
Previously, I wouldn't have dreamt of doing this, of putting my
code out there on the internet for anyone to review. I have changed
though. I am looking forward to correcting my previous mistakes,
allowing other developers (potentially people I have never met) to
review my code. I want them to highlight the errors, to pose the
question "Why have you done x like that? Why not do it like
this?"</p>

<p>&nbsp;</p>

<p>Now if you'll excuse me I'm off to refactor some code, one
variable name at a time.</p>

<p>&nbsp;</p>

<p>Next up on the book list .... The Art of Unit Testing</p>

                             </content>                            
                            <updated>2011-09-27T11:00:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2011/june/could-this-be-the-start-of-something-beautiful/</id>
                            <title>Could this be the start of something beautiful...?</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2011/june/could-this-be-the-start-of-something-beautiful/"></link>
                            <content type="html">
                                  
<p>Recently, I just passed the&nbsp;<a
href="http://stackoverflow.com/users/300863/barry">10K mark on
Stack Overflow</a>. This gives you some<a
href="http://stackoverflow.com/privileges/moderator-tools">&nbsp;additional
privileges</a>&nbsp;and well.... it's pretty cool! Agreed, I am
miles away from being in the league of&nbsp;<a
href="http://stackoverflow.com/users/22656/jon-skeet">Jon
Skeet</a>&nbsp;or&nbsp;<a
href="http://stackoverflow.com/users/23354/marc-gravell">Marc
Gravell</a>&nbsp;but it's a little victory for me!</p>

<p>So, in my excitement I fired off a tweet of this geeky
milestone. &nbsp;I received a tweet back from<a
href="https://twitter.com/#!/rorybecker">&nbsp;Rory Becker</a>,
congratulating on me and pointing me in the direction of<a
href="https://www.devexpress.com/products/free/stackoverflow/">&nbsp;this
page on the DevExpress site.</a></p>

<p>No need to refresh your page, it really does say that.</p>

<p><strong><span>&nbsp;DevExpress is proud to offer you a free
license to&nbsp; <a
href="https://www.devexpress.com/Products/NET/DXperience/editionEnt.xml">
DXperience Enterprise</a>&nbsp;subscription
package</span></strong></p>

<p><span>Now&nbsp;<em>that</em>&nbsp;is cool! Just because I have
taken some time out to help&nbsp;<em>other&nbsp;</em> developers
they are helping&nbsp;<em>me&nbsp;</em> out.</span></p>

<p><span>The timing of this is even better, as in the next month, I
am due to start a new ASP.NET MVC3 project so these controls will
come in very handy. I'm also looking forward to using CodeRush.
After talking to Rory at&nbsp;<a
href="http://www.dddsouthwest.com/">DDD SouthWest</a>&nbsp;at the
weekend I was about to install the trial version to see how I got
on - no need for that now :) I am assured by Rory that CodeRush
rocks so I shouldn't have any troubles.</span></p>

<p>So, once installed and my new project is underway I shall write
another post with my thoughts.</p>

<p>In the meantime, I just want to thank DevExpress for this
amazing offer. They really don't have to do this but they do - so
kudos to them.</p>

                             </content>                            
                            <updated>2011-06-15T17:21:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2011/june/filterme-version-10/</id>
                            <title>FilterMe Version 1.0</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2011/june/filterme-version-10/"></link>
                            <content type="html">
                                  
<h3>Bored of seeing FourSquare everywhere? FilterMe is now
available!</h3>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>On the back of my&nbsp;<a href="http://blog.codingbadger.com/blog/2011/june/conversationview-version-110/"
title="ConversationView Version 1.1.0.">ConversationView
plugin</a>&nbsp;for&nbsp;<a
href="http://seesmic.com/products/desktop">Seesmic Desktop 2</a>, I
have created another one called FilterMe.</p>

<p>I'd like to say this was all my brilliant idea but unfortunately
not. &nbsp;<a
href="http://twitter.com/blowdart">@blowdart</a>&nbsp;sent
me&nbsp;<a
href="https://twitter.com/#!/blowdart/status/76538543912128512">this
tweet</a>&nbsp;and said something similar had been done before
by&nbsp;<a href="http://twitter.com/adkinn">@adkinn</a>&nbsp;but
@blowdart wanted to configure it himself.</p>

<p>And so the first version of FilterMe is now available for you to
try out and give me some feedback on it.</p>

<p>You can configure FilterMe to block Tweets, Facebook posts,
LinkedIn posts or all of them. &nbsp;This can be done by hiding a
particular user or by hiding items based on their content.</p>

<p>To hide a user you right click an item in your timeline and
select 'Hide this user':</p>

<p><img src="/media/1662/image_5_.png" width="155" height="351" alt="FilterMe 1"/></p>

<p>It will then ask you to confirm that you want to hide the
user:</p>

<p><img src="/media/1667/image_3_.png" width="380" height="115" alt="FilterMe 2"/></p>

<p>You can remove this filter by going to the plugin settings.</p>

<p><img src="/media/1672/image_5__478x50.jpg"  width="478"  height="50" alt="FilterMe 3"/></p>

<p>And in the Usernames section clicking the remove button next to
the user you no longer want to hide. As you can see the plugin
filters a user based on the feed that they come from. &nbsp;So
blocking Nathans posts from LinkedIn won't block his posts from
Twitter :)</p>

<p><img src="/media/1677/image_7__497x380.jpg"  width="497"  height="380" alt="FilterMe 4"/></p>

<p>&nbsp;</p>

<p>If you navigate to the Filter by Word tab you can specify words
and a feed that you want to block items from.</p>

<p>So in this example I am hiding posts</p>

<ul>
<li>from LinkedIn that contain the
word&nbsp;<strong>agency</strong></li>

<li>from Twitter with the hashtag&nbsp;<strong>#dddsw</strong></li>

<li>from Any feed that contain the
word&nbsp;<strong>http://4sq.com</strong></li>
</ul>

<p>It should be noted that the filter is case insensitive.</p>

<p><img src="/media/1682/image_7__498x380.jpg"  width="498"  height="380" alt="FilterMe 5"/></p>

<p>&nbsp;</p>

<p>Click Save and you are all set. &nbsp;Any future posts that
match a filter will be hidden from your timeline. &nbsp;If you want
to hide items immediately then you will have to restart Seesmic
Desktop 2 for the filters to take effect.</p>

<p>At the moment it isn't possible to filter by Application.
&nbsp;I'm hoping that I can add this funtionality in a bit later
on.</p>

<p>In the meantime, I would be most grateful if you could download
a copy of the plugin from&nbsp;<a
href="http://marketplace.seesmic.com/plugins/filterme">here</a>,
install it, use it and then provide some feedback. &nbsp;You can
send your feedback by&nbsp;<a
href="https://mail.google.com/mail?view=cm&amp;tf=0&amp;to=barry@codingbadger.com"
 target="_blank">email&nbsp;</a> or posting a comment on this blog
post.</p>

<p>Thanks in advance!</p>

                             </content>                            
                            <updated>2011-06-08T16:54:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2011/june/conversationview-version-110/</id>
                            <title>ConversationView Version 1.1.0.0</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2011/june/conversationview-version-110/"></link>
                            <content type="html">
                                  
<p>A new updated version of my&nbsp;<a
href="http://marketplace.seesmic.com/plugins/conversationview">ConversationView</a>&nbsp;plugin
for&nbsp;<a href="http://seesmic.com/products/desktop"
title="Seesmic Desktop 2">Seesmic Desktop 2</a>&nbsp;has been
released to the marketplace.</p>

<h3>New Features</h3>

<p>&nbsp;</p>

<p>A "Loading Conversation" placeholder is now displayed while the
initial conversation is being loaded.</p>

<p><img src="/media/1614/image_3_.png" width="303" height="138" alt="ConvView 1"/></p>

<p>&nbsp;</p>

<p>The formatting of the tweets displayed in the Conversation View
column has been improved.</p>

<p>&nbsp;</p>

<p><img src="/media/1619/image_5_.png" width="303" height="364" alt="ConvView 2"/></p>

<p>Formatting improvements include:</p>

<ul>
<li>Clicking on the username that sent the tweet will open their
user profile on Twitter.com</li>

<li>Clicking on a username mentioned in the tweet will auto
populate the Update box. Note: This will create a new
conversation.</li>

<li>Clicking on the time that the tweet was posted will open the
tweet on Twitter.com</li>

<li>Clicking on a hashtag will execute a search query for the
hashtag on Twitter.com</li>
</ul>

<p>&nbsp;</p>

<p>You can now Reply, ReplyToAll and Direct Message to users via
the Quick Actions. Quick Actions can be seen by hovering over the
avatar.</p>

<p><img src="/media/1624/image_1_.png" width="303" height="364" alt="ConvView 3"/></p>

<p>&nbsp;</p>

<p>These actions are all available by right clicking on the body of
the tweet.</p>

<p><img src="/media/1629/image_3_.png" width="307" height="364" alt="ConvView 4"/></p>

<p>&nbsp;</p>

<p>The new version of the plugin can be downloaded from the&nbsp;<a
href="http://marketplace.seesmic.com/">Seesmic
Marketplace</a>&nbsp;</p>

<p>If you have any questions or comments then&nbsp;<a
href="mailto:seesmic@codingbadger.com">drop me a mail</a>&nbsp;or
post a comment on this blog post.</p>

<p>And finally, commiserations to&nbsp;<a
href="http://twitter.com/stack72">@stack72</a>, who didn't get to
test this version, he is busy with&nbsp;<a
href="http://www.givecamp.org.uk/">GiveCampUK</a>&nbsp;at the
moment. &nbsp;Luckily for me, he has been replaced by&nbsp;<a
href="http://twitter.com/blowdart">@blowdart</a>, who I thank for
his help.</p>

<p>Enjoy!</p>

                             </content>                            
                            <updated>2011-06-03T08:25:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2011/march/setting-parameters-and-a-different-report-data-source-for-crystal-reports-at-runtime/</id>
                            <title>Setting Parameters and a different Report Data Source for Crystal Reports at runtime</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2011/march/setting-parameters-and-a-different-report-data-source-for-crystal-reports-at-runtime/"></link>
                            <content type="html">
                                  
<p>I don't know why but this question or slight variants of it,
regularly appear on&nbsp;<a href="http://stackoverflow.com/"
title="Stack Overflow">Stack Overflow</a>.&nbsp; I'm not sure why
because I always found it fairly simple to navigate my way around
the Crystal Reports runtime.&nbsp; I guess a lot of people
don't.&nbsp;</p>

<p>&nbsp;</p>

<p>So, enough idle chit chat lets just get on with it shall we?</p>

<p>&nbsp;</p>

<p>First we need to set up the Report Object</p>

<pre class="brush: csharp">
//Declare an instance of a Crystal Report
ReportDocument _crystalReport = new ReportDocument();
 
//Set the FileName for the report
_crystalReport.FileName = @"C:\CrystalReports\MyCustomReport.rpt";
</pre>

<p>Ok, now time for the Parameters</p>

<pre class="brush: csharp">
if (parameters.Count &gt; 0)
                {
                    //Add the params here
                    ParameterValues currentParameterValues = new ParameterValues();
                    foreach (KeyValuePair&lt;string, string&gt; param in parameters)
                    {
                        ParameterDiscreteValue paramDV = new ParameterDiscreteValue();
                        paramDV.Value = param.Value;
                        report.ParameterFields[param.Key].CurrentValues.Clear();
                        report.ParameterFields[param.Key].DefaultValues.Clear();
                        report.ParameterFields[param.Key].CurrentValues.Add(paramDV);
                    }
                }
</pre>

<p class="brush: c-sharp;">You may be wondering what is going on
here, well let me explain.</p>

<p class="brush: c-sharp;">The&nbsp;<span>parameters</span> object
is of Dictionary&lt;String,String&gt; which I use to store my
parameters in. The key being the parameter name and the value ...
well... being the value. &nbsp;The nice thing about doing it this
way is that you can reuse the same code for any report. Which is
good! But you knew that already.... right?</p>

<p>So, all we do is</p>

<ul>
<li>loop through each value in our parameters
Dictionary.&nbsp;</li>

<li>we then create a new ParameterDiscreteValue object and set its
value.&nbsp;</li>

<li>we then use the parameters.Key to find the corresponding
Parameter in the Crystal Report.&nbsp;</li>

<li>then we clear any Current or Default Values that may be stored
in the report&nbsp;</li>

<li>finally we add our Parameter Discrete Value to the current
parameter</li>
</ul>

<p>&nbsp;</p>

<p>It's that simple! You just need to ensure that the Key value is
exactly the same as the parameter name within the Crystal
Report.</p>

<p>&nbsp;</p>

<p>Now for the data source.....</p>

<p>&nbsp;</p>

<pre class="brush: csharp">
TableLogOnInfo logOnInfo;
                foreach (CrystalDecisions.CrystalReports.Engine.Table tbCurrent in report.Database.Tables)
                {
                    logOnInfo= tbCurrent.LogOnInfo;
                    logOnInfo.ConnectionInfo.DatabaseName = "MyDatabaseName";
                    logOnInfo.ConnectionInfo.UserID = "UserId";
                    logOnInfo.ConnectionInfo.Password = "secretpassword";
                    logOnInfo.ConnectionInfo.ServerName = "SQLServer";
                    logOnInfo.ConnectionInfo.Type = ConnectionInfoType.SQL;
                    tbCurrent.ApplyLogOnInfo(logOnInfo);
                }
</pre>

<p>&nbsp;</p>

<p>So what are we doing here?</p>

<ul>
<li>we declare a TableLogOnInfo object</li>

<li>then we loop through each Table that exists in the report and
grab the current LogOnInfo. &nbsp;</li>

<li>we apply our new Data Source details. &nbsp;If you are using
Windows Authentication then you can take out the UserId &amp;
Password. &nbsp;</li>

<li>We then apply the new data source information to the current
table that we are on.</li>
</ul>

<p>&nbsp;</p>

<p>So thats it - really simple to do and yet the question keeps
popping up all the time.</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

                             </content>                            
                            <updated>2011-03-29T19:50:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2010/december/stack-overflow-user-badges/</id>
                            <title>Stack Overflow - User Badges</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2010/december/stack-overflow-user-badges/"></link>
                            <content type="html">
                                  
<p>As promised in my&nbsp;<a
href="http://blog.codingbadger.com/post/Stack-Overflow-Badges.aspx"
target="_blank">previous post</a>, I have modified the JavaScript
to re-arrange the Badges for a&nbsp;<a
href="http://stackoverflow.com/users/300863/barry"
target="_blank">User Profile</a>&nbsp;on Stack Overflow.</p>

<p>Currently it is a bit of a mess (I believe they are displayed in
date received order.)</p>

<p><img src="/media/1390/image_3__499x312.jpg"  width="499"  height="312" alt="User SO Badges Old"/></p>

<p>&nbsp;</p>

<p>Again, just drag&nbsp;<a
href="http://tempblog.codingbadger.com/author/boconnor.aspx"
target="_blank">Arrange User Badges</a>&nbsp;on to your browsers
toolbar and let the magic happen:</p>

<p><img src="/media/1395/image_1_.png" width="390" height="743" alt="User SO Badges New"/></p>

<p>&nbsp;</p>

<p>This was slightly trickier to achieve as I couldn't simply use
next() or prev() to iterate through the badges.</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<pre class="brush: js">
Javascript:(function() {
 
$("#tags-table").next().append("&lt;div id='customBadges' class='user-stats-table' style='float:left;'&gt;&lt;div&gt;");
 
$("#customBadges").append("&lt;table id='goldbadges'&gt;&lt;tr&gt;&lt;td class='check-cell'&lt;/td&gt;&lt;td class='badge-cell'&gt;&lt;b&gt;&nbsp;Gold Badges&lt;/b&gt;&lt;hr /&gt;&lt;span class='item-multiplier'&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;");
$("#customBadges").append("&lt;table id='goldtags'&gt;&lt;tr&gt;&lt;td class='check-cell'&lt;/td&gt;&lt;td class='badge-cell'&gt;&lt;b&gt;&nbsp;Gold Tag Badges&lt;/b&gt;&lt;hr /&gt;&lt;span class='item-multiplier'&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;");
$("#customBadges").append("&lt;table id='silverbadges'&gt;&lt;tr&gt;&lt;td class='check-cell'&lt;/td&gt;&lt;td class='badge-cell'&gt;&lt;b&gt;&nbsp;Silver Badges&lt;/b&gt;&lt;hr /&gt;&lt;span class='item-multiplier'&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;");
$("#customBadges").append("&lt;table id='silvertags'&gt;&lt;tr&gt;&lt;td class='check-cell'&lt;/td&gt;&lt;td class='badge-cell'&gt;&lt;b&gt;&nbsp;Silver Tag Badges&lt;/b&gt;&lt;hr /&gt;&lt;span class='item-multiplier'&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;");
$("#customBadges").append("&lt;table id='bronzebadges'&gt;&lt;tr&gt;&lt;td class='check-cell'&lt;/td&gt;&lt;td class='badge-cell'&gt;&lt;b&gt;&nbsp;Bronze Badges&lt;/b&gt;&lt;hr /&gt;&lt;span class='item-multiplier'&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;");
$("#customBadges").append("&lt;table id='bronzetags'&gt;&lt;tr&gt;&lt;td class='check-cell'&lt;/td&gt;&lt;td class='badge-cell'&gt;&lt;b&gt;&nbsp;Bronze Tag Badges&lt;/b&gt;&lt;hr /&gt;&lt;span class='item-multiplier'&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;");
 
$(".user-stats-table").find("table").each(function(){
 
    $(this).find(".badge-col").each(function(){
 
    var current = $(this).html();
    
    while (current.length &gt; 1)
    {
        var link = current.slice(0, current.indexOf("&lt;br&gt;",0));
 
        current = current.replace(link + "&lt;br&gt;", "");
 
        var newRow = "&lt;tr&gt;&lt;td class='check-cell'&lt;/td&gt;&lt;td class='badge-cell'&gt;";
 
        newRow = newRow + link;
 
        newRow = newRow + "&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;";
        
        
        if (link.indexOf("badge1") &gt; 0)
        {
            if (link.indexOf("badge-tag") &gt; 0)
            {
                $(newRow).appendTo('#goldtags');
            }
            else
            {
                $(newRow).appendTo('#goldbadges');
            }
        }
        if (link.indexOf("badge2") &gt; 0)
        {    
            if (link.indexOf("badge-tag") &gt; 0)
            {    
                $(newRow).appendTo('#silvertags');
            }
            else
            {
                $(newRow).appendTo('#silverbadges');
            }
        }
        if (link.indexOf("badge3") &gt; 0)
        {
            if (link.indexOf("badge-tag") &gt; 0)
            {
                $(newRow).appendTo('#bronzetags');
            }
            else
            {
                $(newRow).appendTo('#bronzebadges');
            }
        }
                
    }
    $(this).remove();
    
    });
});
 
})();  
</pre>

<p>&nbsp;</p>

<p>A quick explanation of what I'm doing:</p>

<ol>
<li>Retrieve each table cell</li>

<li>Extract from the start of the string up to the next &lt;br&gt;.
This will extract the hyperlink, the span that displays the badge
&amp; text and where applicable the multiplier span.</li>

<li>Remove this from the original string (otherwise we'll get stuck
in never ending while loop)</li>

<li>Construct a new table row and add the badge</li>

<li>Check to see what type of badge it is Gold, Silver or
Bronze</li>

<li>Additional check to see if this is a Tag Badge or not</li>

<li>Add the new row to the relevant new table.</li>

<li>Finally when we have processed the table cell remove it from
the DOM</li>
</ol>

<p>Again, I don't know whether this is particularly good code or
not but it works!</p>

<p>&nbsp;</p>

<p>Enjoy!</p>

<p>&nbsp;</p>

                             </content>                            
                            <updated>2010-12-22T09:11:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2010/december/stack-overflow-badges/</id>
                            <title>Stack Overflow - Badges</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2010/december/stack-overflow-badges/"></link>
                            <content type="html">
                                  
<p>As much as I love&nbsp;<a href="http://stackoverflow.com/"
target="_blank">Stack Overflow</a>, there are certain things that
irritate me.</p>

<p>One of those things is the order of the&nbsp;<a
href="http://stackoverflow.com/badges"
target="_blank">badges</a>.</p>

<p><img src="/media/1218/image_1_.png" width="474" height="392" alt="SO badges old"/></p>

<p>They are displayed in alphabetical order which usually would be
fine but the different levels of badge (gold, silver and bronze)
are all muddled together.&nbsp; So I knocked up some JavaScript to
sort them out.</p>

<p>Drag this&nbsp; <a
href="http://tempblog.codingbadger.com/post/Stack-Overflow-Badges.aspx">
Arrange Badges</a>&nbsp;on to your toolbar to arrange them
nicely!</p>

<p><img src="/media/1223/image_1_.png" width="473" height="451" alt="SO badges new"/></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>I'm going to look at doing the same for the User page.&nbsp;
This is slightly trickier as the badges are not in nice neat
rows.&nbsp; They are a bunch of hyperlinks and spans boshed
together with some line breaks</p>

<p>In the meantime - enjoy!</p>

<p>&nbsp;</p>

<p>I'm not sure whether this code is good, bad or mediocre but it
does what I want so I'm happy.</p>

<p>&nbsp;</p>

<pre class="brush: js">
Javascript:(function() {
  
$(".page-description").insertBefore("div#mainbar");
  
$("div#mainbar").prepend("&lt;table id='bronzebadges'&gt;&lt;tr&gt;&lt;td class='check-cell'&lt;/td&gt;&lt;td class='badge-cell'&gt;&lt;b&gt;&nbsp;Bronze Badges&lt;/b&gt;&lt;span class='item-multiplier'&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;hr /&gt;&lt;/table&gt;");
$("div#mainbar").prepend("&lt;table id='silverbadges'&gt;&lt;tr&gt;&lt;td class='check-cell'&lt;/td&gt;&lt;td class='badge-cell'&gt;&lt;b&gt;&nbsp;Silver Badges&lt;/b&gt;&lt;span class='item-multiplier'&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;hr /&gt;&lt;/table&gt;");
$("div#mainbar").prepend("&lt;table id='goldbadges'&gt;&lt;tr&gt;&lt;td class='check-cell'&lt;/td&gt;&lt;td class='badge-cell'&gt;&lt;b&gt;&nbsp;Gold Badges&lt;/b&gt;&lt;span class='item-multiplier'&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;hr /&gt;&lt;/table&gt;");
 
  
$("div#mainbar").find("span").each(function(){
     
  
     if ($(this).hasClass("badge1"))
     {
         var goldRow = $(this).parent().parent().parent();
         $(goldRow).appendTo('#goldbadges');
     }
     
         if ($(this).hasClass("badge2"))
     {
         var silverRow = $(this).parent().parent().parent();
         $(silverRow).appendTo('#silverbadges');
     }
     
         if ($(this).hasClass("badge3"))
     {
         var bronzeRow = $(this).parent().parent().parent();
         $(bronzeRow).appendTo('#bronzebadges');
     }
     
 });
  
 })(); 
</pre>

                             </content>                            
                            <updated>2010-12-18T17:19:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2010/december/what-is-behaviour-driven-development/</id>
                            <title>What is Behaviour Driven Development?</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2010/december/what-is-behaviour-driven-development/"></link>
                            <content type="html">
                                  
<p>And so we move on, from my&nbsp;<a href="http://blog.codingbadger.com/blog/2010/november/the-past,-the-present,-the-future…/"
target="_blank" title="The Past, the Present, the Future….">boring
life</a>&nbsp;on to something else - Behaviour Driven
Development.&nbsp;</p>

<p>I was meandering along the internet a few weeks ago and found a
.NET User Group that met up close to where I live.&nbsp; They
seemed to host regular events and had some good reviews - so I
signed up to the&nbsp;<a href="http://www.meetup.com/cwdnug/"
target="_blank">Canary Wharf Dot Net User Group</a>.&nbsp; The next
event scheduled was&nbsp;<em>Software that Matters! An introduction
to BDD with Liz Keogh</em>&nbsp;and the following nonsense is my
interpretation of what BDD is and how it can help your
projects.</p>

<p>&nbsp;</p>

<h3>It's not all about testing….</h3>

<p>&nbsp;</p>

<p>Reading about BDD it seems that one of the most common mistakes
is to think at BDD is&nbsp;<em>all</em>&nbsp;about testing.&nbsp;
Although BDD in theory replaces TDD, ATDD and such like; the big
idea is about&nbsp;<strong>Deliberate Discovery</strong>.</p>

<p>Deliberate discovery is about always questioning the outcome of
any context until all possible outcomes have been exhausted.&nbsp;
If the stakeholder can 100% say that given this scenario then these
are the possible outcomes then you are on the right track.</p>

<p>Don't stop there though, once you have done this you may think
"Hey, I've gone through everything I can think of and we know all
of the possible outcomes"&nbsp; Well that is true to a point,
however it is only the things that YOU can think of.&nbsp; You will
always assume that you know everything - when in actual fact you
don't.&nbsp; What you should then do is go and talk to another
developer about it or a business analyst basically anyone who will
listen and give you their opinion.&nbsp; The more people you talk
to the more questions you will get and more importantly;&nbsp;
questions that you may not have thought of.</p>

<p>&nbsp;</p>

<p>BDD is really about having has many conversations and bouncing
ideas off as many people as possible.&nbsp; It's about discovering
and learning about the software you are about to write BEFORE you
start writing it.&nbsp; You should use plain English as much as
possible as it makes it easier for everyone to understand in the
chain.&nbsp; When presenting you should try to prompt the users to
provide as much feedback as possible.&nbsp; Tell them that you know
what you are presenting is not 100% correct and ask THEM how THEY
would make it better, what other constraints or workflow should be
integrated?</p>

<p>&nbsp;</p>

<p>Now for a quick example:</p>

<blockquote>
<p>Given that I visit a cash machine</p>

<p>When I request that it gives me £20</p>

<p>Then it should give me £20</p>
</blockquote>

<p>Simple right? But if we question the context then we realise
that there could be many different outcomes.&nbsp; What if I don't
have £20 in my account?</p>

<p>So, now we have two outcomes.&nbsp; If I have enough money in my
account then it will dispense the £20.&nbsp; If I don't then it
won't dispense any money.&nbsp; So, what happens if I have an
overdraft - we get yet another outcome.&nbsp; We eventually end up
with several outcomes - so our job is done…..Well not quite.&nbsp;
After we have taken the money we still need to debit the
account!</p>

<p>By questioning a rather simple scenario we have ended up with
lots of different outcomes that could have potentially been
lost.&nbsp; Because we have caught them at the very beginning of
the process we can code for these eventualities straight away -
rather than amending our code later on.</p>

<p>So how does way of things help? Well writing a traditional TDD
Test could look like this:</p>

<p><a
href="http://blog.codingbadger.com/image.axd?picture=TDD_Example_TestCode.png">
<img src="/media/1779/image_7_.png" width="472" height="130" alt="BDD 1"/></a></p>

<p>Using BDD your test could look like this:</p>

<p><a
href="http://blog.codingbadger.com/image.axd?picture=BDD_Example_TestCode.png">
<img src="/media/1784/image_5_.png" width="485" height="242" alt="BDD 2"/></a></p>

<p>&nbsp;</p>

<p>It's clear to see that by using
BDD&nbsp;<em>anyone</em>&nbsp;can read your test and point out any
errors or omissions.&nbsp; There is no real code to read or
understand and the flow of the process can be easily followed.</p>

<h3>Driven by behaviour</h3>

<p>&nbsp;</p>

<p>In order to collate as much information as possible you need to
ask the following questions:</p>

<ul>
<li>What should this do?</li>

<li>Why should this do it?</li>

<li>Who or what needs this?</li>

<li>If we didn't do this, then who would care? Would anyone miss
it?</li>

<li>What value does it provide?</li>
</ul>

<p>If something doesn't add value or no one would care if it didn't
exist then there is no point in doing it.&nbsp; It's a waste of
time and money developing a feature that users aren't even going to
use.</p>

<p>&nbsp;</p>

<h3>Prioritise!</h3>

<p>&nbsp;</p>

<p>In BDD you should identify the high risk items and concentrate
on these first.&nbsp; High risk items are&nbsp; features that are
brand new. No one has done these before so you can't say how long
they are going to take or what problems you are going to
encounter.&nbsp; Hard code items that you know how to do and you
know how long it is going to take - things that have been done many
times before e.g login screen, drop downs with users in etc.</p>

<p>&nbsp;</p>

<p><a
href="http://blog.codingbadger.com/image.axd?picture=image.png"><img src="/media/1789/image_9__500x365.jpg"  width="500"  height="365" alt="BDD 3"/></a>&nbsp;</p>

<p>Unknown Unknowns - These are areas that are new to us.&nbsp; We
don't know anything about them.</p>

<p>Known Unknowns - These are areas that we have explored and
identified as risky.&nbsp; We know about them but we can't say for
certain how long they will take to complete.</p>

<p>Known Knowns - These are areas that we have built.&nbsp; We can
present these back to the business for feedback</p>

<p>Unknown Knowns - These are complete.&nbsp; They have been
stabilised, tested and realised in to the wild. We can forget about
them.</p>

<p>&nbsp;</p>

<h3>BDD Cycle</h3>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>Typical BDD process</p>

<p><a
href="http://blog.codingbadger.com/image.axd?picture=image_1.png"><img src="/media/1794/image_9__496x265.jpg"  width="496"  height="265" alt="BDD 4"/></a></p>

<p>&nbsp;</p>

<p>When do you jump out of the BDD Cycle?</p>

<ul>
<li>When the code passes the test</li>

<li>When the feature is usable</li>

<li>When the stakeholders goal is met</li>

<li>When the vision is complete</li>

<li>When the vision is delivering value</li>
</ul>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>The best feedback that you can get on your code is when it's
released.&nbsp; If users don't complain then that is good feedback
- if they thank you for the code you have released; then that
really is the best feedback you can get.</p>

<p>There was one particular quote that Liz said which really stuck
in my mind</p>

<blockquote>
<p><strong>It doesn't matter how good your software is - if it's
the wrong software</strong></p>
</blockquote>

<p>And with that ringing in your ears - I am done.</p>

<p>&nbsp;</p>

<p><strong>Links</strong></p>

<p>&nbsp;</p>

<ul>
<li><a href="http://code.google.com/p/wipflash/"
target="_blank">WipFlash</a>&nbsp;- A WPF Application created by
Liz Keogh to demonstrate BDD Testing.</li>

<li><a href="http://dannorth.net/introducing-bdd"
target="_blank">Dan North</a>&nbsp;- Introducing BDD</li>

<li><a
href="http://skillsmatter.com/podcast/agile-testing/how-to-sell-bdd-to-the-business"
 target="_blank">Skills Matter</a>&nbsp;- Podcast on how you can
introduce BDD to the Business</li>
</ul>

<p>&nbsp;</p>

                             </content>                            
                            <updated>2010-12-16T19:29:00Z </updated>
                    </entry>
                    <entry>
                            <id>http://blog.codingbadger.com/blog/2010/november/the-past,-the-present,-the-future…/</id>
                            <title>The Past, the Present, the Future….</title>
                            <author>
                                 <name>codingbadger</name>
                            </author>
                            <rights>codingbadger limited</rights>
                            <link href="http://blog.codingbadger.com/blog/2010/november/the-past,-the-present,-the-future…/"></link>
                            <content type="html">
                                  
<p><img src="/media/1125/past-present-future_1_.jpg" width="320" height="299" alt="Signpost"/></p>

<p>&nbsp;</p>

<p><strong>Disclaimer: The content (ideas and information) of and
any views expressed on any part of this Website or blog are my
personal views and does not officially represent my employer's
view, past or present, in anyway.</strong></p>

<p><span><strong>The Past</strong></span></p>

<p>Monday 11th October 1999 was the first day of the rest of my
working life.&nbsp; I was a scrawny, shy, gawky looking 16 year old
boy who'd just spent the summer of '99 dicking around with my
mates.&nbsp; Suddenly, they had all left me and gone back to
school. Yes, school.&nbsp; They had gone back to the hell hole we
had just spent 5 years slagging off and to really stick the knife
in they'd gone back of their own bloody accord. I didn't know what
I was going to do and quite frankly, I was shitting it.</p>

<p>So with cash quickly running out, I decided to get a job,
imaginative I know.&nbsp;&nbsp; I applied for some jobs and got 2
interviews, one at Natwest and another at a Private Bank.&nbsp; I
asked&nbsp; the adults around me (you know , the people who
seemingly know everything) and every single person I asked
said&nbsp;<em>"Go with the Private Bank - they are solid as a rock
and they pay well"</em>&nbsp; as it turns out - every single one of
them was talking utter bollocks…</p>

<p><strong><img src="/media/1130/778285-travel_picture-london_1__498x445.jpg"  width="498"  height="445" alt="London"/></strong></p>

<p>Fast forward to 2008,&nbsp; I had blagged my way through a few
Banking positions and ended up in IT, I had also miraculously
managed to wangle a move down to London. I was finally earning some
decent cash, as those clever dicks had predicted almost 9 years
earlier.&nbsp; However, there was one thing that they didn't
predict…. the Company going tits up.&nbsp; Yes, the safe and "solid
as a rock" Company that everyone had seemingly urged me to join,
was well and truly fucked.&nbsp; And to top it all off, Natwest,
the company I almost joined was given squillions of cash to stay a
float.&nbsp; The jammy bastards.</p>

<p><img src="/media/1135/closed_sign_1_.gif" width="385" height="287" alt="Closed"/></p>

<p>It was Wednesday, when they told us all.&nbsp; Contractors were
fleeing their desks, squawking on their 'phones, trying to get
themselves a new job.&nbsp; They knew they weren't getting any
cash, most didn't wait until the end of the announcement.&nbsp;
Strange people that none of us knew, were in and out of the
building, carrying boxes of documents, muttering between
themselves.&nbsp; Rumours spread like wild fire - we owe billions,
we are all getting sacked and the furniture is getting picked up
that afternoon, Jenny from accounts is actually a John.&nbsp; Well,
alright I made the last one up but you get the idea.&nbsp; Some of
the new employees, still green behind the ears, just walked
out.&nbsp; Probably numb with the realisation that they could have
been safe at another job, far away from this chaos and confusion. A
job that a little over a week ago they told to shove it. That was
going to be an embarrassing phone call…</p>

<p>And so to the rest of us. A few went home. A few went rather
pale and started tapping on their keyboards with more vigour and
enthusiasm that had not been seen for years.&nbsp; Most of us
though, went to the pub and got completely hammered. The landlord
of the local pub must have thought Christmas had come early. We
drank that place dry and spent a fortune. Probably quite a silly
thing to do considering the events that had happened just hours
earlier. We didn't care though, we took the following day off and
watched daytime TV. Now that's what I call a hard days work.</p>

<h2><span>The Present</span></h2>

<p>And so here I am, still at the "rock solid" Private Bank, the
masses of staff that once roamed the office have been whittled down
to just a select few. There are no deadlines, no pressure, no
bollockings for having an hour and half for lunch.&nbsp; We still
get paid, a pension, holidays there is even a training budget
available. Overtime is scarce these days though…..</p>

<p>Sounds like heaven? It isn't.</p>

<p><img src="/media/1140/boredom_motivational_poster_by_thesilverthief_1_.png" width="300" height="322" alt="Boredom"/></p>

<p>&nbsp;</p>

<p>The boredom sets in quicker than you'd think.&nbsp; If you don't
try to keep busy then you will end up doing nothing for days.&nbsp;
You find yourself struggling to get up to go to work let alone do
any work when you are there.&nbsp; I know it sounds like a normal
job but it's much worse.&nbsp; You know that anything you build or
maintain is going to get the chop.&nbsp; What is the point in
putting your heart and soul in to a new application when it is
going to be on the scrap heap within the next 12 months?</p>

<p>Some people have given up, patching things together in the hope
they'll last a bit longer. Pride in your work is virtually
non-existent, people take weeks to complete a task that would have
previously taken them a day at most. I'm not saying things don't
get done but lets just say the enthusiasm for doing a job well done
isn't really there. Why spend more time doing it really well when
no-one cares as long as it works?</p>

<p>The thing is, it's different for me, I'm a Software
Developer.&nbsp; Technology moves too fast for me to sit about
doing nothing for a couple of years.&nbsp; I'm trying to keep up
but I'm already behind.&nbsp; It takes a lot of effort to stay at
work and read about Unit Testing and Test Driven Development when
the rest of your work mates are off down the pub for an impromptu
afternoon session.</p>

<p>Don't get me wrong, if the shit hits the fan then it gets fixed
quickly. Probably quicker than when we weren't broke.&nbsp; People
are eager to do work but only when the work finds them. It is
similar to that age old saying -&nbsp;<em><strong>If it ain't
broke, don't fix it</strong></em>. Well no one is going to start
any work unless there is good reason to. Especially when there is a
nice friendly pub down the road.</p>

<p>I don't expect your sympathy. To be honest, I'm expecting a
barrage of abuse. Depending on which way you look at it, it is
either right place right time or wrong place wrong time.&nbsp;
Either way, I'm in some kind of place and I don't intend on leaving
it…..not yet anyway.</p>

<h2><span>The Future</span></h2>

<p><img src="/media/1145/future_freeway_sign250_1_1_.jpg" width="250" height="255" alt="Freeway Sign"/></p>

<p>&nbsp;</p>

<p>This section will be short for obvious reasons - I cannot see
into the future. And let's be honest, if I could, I'm doing a
pretty poor job of it so far.</p>

<p>I've managed to get myself involved in an Open Source Project so
I'm hoping that will keep me busy.&nbsp; It's all new technology to
me so I'm on a learning curve that is so steep Everest is getting
pissed off at the size of it.&nbsp; I've started attending
Developer Days and meeting other Developers. They all have proper
jobs whereas I don't really.&nbsp; Some would say that&nbsp; when
discussing this an awkward silence slams in to the conversation but
it's an ice-breaker if anything.</p>

<p>I'm hoping that I can keep myself busy, keep myself up to date
and I might even make some good friends along the way.</p>

<p>A few people have asked if I worry about what I'm going to do
when I finally get the boot. The honest answer? No, I don't -
what's the point.&nbsp; No one really knows what the future has in
store but lets be honest, it's not as if we don't have a say in how
it works out.</p>

<p>&nbsp;</p>

                             </content>                            
                            <updated>2010-11-17T16:30:00Z </updated>
                    </entry>
    </feed>

