|
AspAlliance Author Profile
|
My Blog
|
| tag:blogger.com,1999:blog-219673812010-02-06T16:41:01.477ZBen Hall's BlogI don't know darling....i'm doing my workBen Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.ukBlogger490125Subscribe with My Yahoo!Subscribe with NewsGatorSubscribe with My AOLSubscribe with BloglinesSubscribe with NetvibesSubscribe with GoogleSubscribe with Pageflakestag:blogger.com,1999:blog-21967381.post-47652015373738607202010-02-06T16:33:00.001Z2010-02-06T16:41:01.483ZNot much of an invitation - Thanks Google<p>This week Google was kind enough to invite me to "Google Apps Premier Edition". This is the email:</p>
<img src="http://lh6.ggpht.com/_exs7ZT6h_9Q/S22XqWLD7UI/AAAAAAAAAMA/TKdjgZUqVJM/2010-02-06_1621.png?imgmax=800" alt="2010-02-06_1621.png" border="0" width="821" height="590" />
<p>I would love to use the premier edition as the free version is amazing! Sadly, the invitation was only for the 30 day free trail. After gaining my interest, Google then went and lost my interest while also making me disappointed. Not the ideal way to make your users feel.</p>
<p>When sending over promotional emails, take into account how the user will feel and their thought process when reading your email. </p>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-4765201537373860720?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/CS0MdpnXzfw" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2010/02/not-much-of-invitation-thanks-google.htmltag:blogger.com,1999:blog-21967381.post-28291892657153056512010-02-01T01:11:00.001Z2010-02-01T01:11:37.529ZDDD8: Albacore and Testing ASP.net Web Applications using Ruby<p>Yesterday was the excellent DDD8. Thank you to all who attended. I gave a grok talk and a full presentation. The grok talk was on <a href="http://albacorebuild.net/" target="_blank">Albacore</a>, while the full presentation on Testing ASP.net Web Applications using Ruby. The slides are below. If you have any questions\feedback then do please let me know. </p> <p>Don’t forget, if you are interested in learning more about Testing ASP.net then my book has recently been released.</p> <p><a href="http://www.testingaspnet.com/" target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="cover[1]" border="0" alt="cover[1]" src="http://lh4.ggpht.com/_exs7ZT6h_9Q/S2YqSGYpJaI/AAAAAAAAAL8/fTePPPsMUKs/cover%5B1%5D%5B4%5D.png?imgmax=800" width="195" height="244"></a> </p> <div style="text-align: left; width: 425px" id="__ss_3042927"><a style="margin: 12px 0px 3px; display: block; font: 14px helvetica,arial,sans-serif; text-decoration: underline" title="Death to MSBuld and all it's friends" href="http://www.slideshare.net/BenHalluk/death-to-msbuld-and-all-its-friends">Death to MSBuld and all it's friends</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=ddd8-100131190104-phpapp01&stripped_title=death-to-msbuld-and-all-its-friends" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=ddd8-100131190104-phpapp01&stripped_title=death-to-msbuld-and-all-its-friends" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object> <div style="font-family: tahoma,arial; height: 26px; font-size: 11px; padding-top: 2px">View more <a style="text-decoration: underline" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration: underline" href="http://www.slideshare.net/BenHalluk">BenHalluk</a>.</div></div> <p></p> <div style="text-align: left; width: 425px" id="__ss_3042926"><a style="margin: 12px 0px 3px; display: block; font: 14px helvetica,arial,sans-serif; text-decoration: underline" title="Testing ASP.net Web Applications using Ruby" href="http://www.slideshare.net/BenHalluk/testing-aspnet-web-applications-using-ruby-3042926">Testing ASP.net Web Applications using Ruby</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=ddd8-100131190056-phpapp02&stripped_title=testing-aspnet-web-applications-using-ruby-3042926" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=ddd8-100131190056-phpapp02&stripped_title=testing-aspnet-web-applications-using-ruby-3042926" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object> <div style="font-family: tahoma,arial; height: 26px; font-size: 11px; padding-top: 2px">View more <a style="text-decoration: underline" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration: underline" href="http://www.slideshare.net/BenHalluk">BenHalluk</a>.</div></div> <p>Download demo from <a title="http://github.com/BenHall/Kona/zipball/DDD8" href="http://github.com/BenHall/Kona/zipball/DDD8" target="_blank">http://github.com/BenHall/Kona/zipball/DDD8</a></p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-2829189265715305651?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/Sy8jkC49Oeg" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2010/02/ddd8-albacore-and-testing-aspnet-web.htmltag:blogger.com,1999:blog-21967381.post-2498158162593866652010-01-20T00:27:00.001Z2010-01-20T00:27:58.990ZQuick screencast: Installing Git<p>I have spoken to a number of people who have been put-off by installing Git as it seems difficult. To prove that it’s not, I decided to put together a very quick screencast to highlight the main points. As I wanted it to be quick and to the point I decided not to add voice-over and instead use call-outs where required.</p><embed src="http://blip.tv/play/AYG%2B7nkA" type="application/x-shockwave-flash" width="640" height="510" allowscriptaccess="always" allowfullscreen="true"></embed> <p>If you want to know more, then I really recommend you check out <a href="http://www.tekpub.com/" rel="nofollow" target="_blank">TekPub</a> as they have done a great series on how to take full advantage of Git. </p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-249815816259386665?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/EqdAQ9au4i4" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2010/01/quick-screencast-installing-git.htmltag:blogger.com,1999:blog-21967381.post-51912608129507002092010-01-18T14:54:00.001Z2010-01-18T14:54:40.114ZTime for a new stubbing and mocking syntax?<p>When using IronRuby to test C# applications we are still faced with similar issues as with C# – the different is how we can handle them. For example, to stub the HttpRequestBase in C#, we could use Rhino Mocks as follows. </p><pre class="brush: csharp;">var stubbedHttpRequest = MockRepository.GenerateStub<HttpRequestBase>().Stub(x=>x.ApplicationPath).Return(“~/test”);
</pre>
<p>I do really like this syntax and think it works for C#. However, if we are looking to use Ruby and a dynamic language we have the potential to be more inventive. </p>
<p>IronRuby has an excellent framework called <a href="http://github.com/casualjim/caricature" rel="nofollow" target="_blank">Caricature</a> which allows you to fake CLR objects. For example, here we are stubbing the HttpRequestBase from MVC. </p><pre class="brush: ruby;">require 'caricature'
include Caricature
stubHttpRequest = isolate System::Web::HttpRequestBase
stubHttpRequest.when_receiving(:application_path).return("~/test")
stubHttpRequest </pre>
<p>However, this got me thinking. With Ruby being dynamic, how could we take advantage when defining fakes? For example, what about the following syntax:</p><pre class="brush: ruby;">stubHttpRequest = stub 'System::Web::HttpRequestBase
.ApplicationPath.returns("~/test") &&
.FilePath.returns("")'
</pre>
<p>This would stub two properties, ApplicationPath and FilePath to return “~/test” and an empty string respectively. If we wanted to handle method calls and arguments, we could have the following:</p><pre class="brush: js;">stubHttpRequest = stub 'System::Web::HttpRequestBase
.SomeMethodCall("WithArgument").returns(SomeObject.new) &&
.SomeOtherMethod(*).returns(-1)'</pre>
<p>Here we stub two methods, one stubs with a particular argument (must be the string “WithArgument”) while the other matches on any argument. </p>
<p>My aim is to <strong>reduce the ceremony </strong>associated with the act of stubbing and instead focus on <strong>the true intent </strong>of the defined behaviour. </p>
<p><small>Note: Imagine the ‘refactoring’ problem has been solved, and changing the method names would also update the tests. </small></p>
<p>If we look at other languages, for example Javascript’s jqMock and Ruby’s NotAMock are using a similar syntax to C#. </p><pre class="brush: js;">var alertMock = new jqMock.Mock(window, "alert");
alertMock.modify().args("hello world new!").returnValue();
</pre>
<p>I think it is time to start looking beyond the existing syntax and reveal our true intent. What do you think?</p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-5191260812950700209?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/XZuISPDYeQo" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2010/01/time-for-new-stubbing-and-mocking.htmltag:blogger.com,1999:blog-21967381.post-57117474370318343872010-01-17T18:47:00.001Z2010-01-17T18:47:57.087ZTesting ASP.net using Ruby – CodeMash session<p>This week I went over to <a href="http://www.codemash.org/" rel="nofollow" target="_blank">CodeMash</a>, an amazing community and cross-language conference in the US. I had some amazing conversations, meet some amazing people and gave a session on Testing ASP.net using Ruby. </p> <p>I would like to say thank you to everyone who attended and the organisers for giving me the opportunity to speak. If you have any questions\comments, then please give me a shout, <a href="http://twitter.com/Ben_Hal" rel="nofollow" target="_blank">Twitter</a> is the best way. </p> <div style="text-align: left; width: 425px" id="__ss_2935433"><a style="margin: 12px 0px 3px; display: block; font: 14px helvetica,arial,sans-serif; text-decoration: underline" title="Testing ASP.net Web Applications using Ruby" href="http://www.slideshare.net/BenHalluk/testing-aspnet-web-applications-using-ruby">Slides can be found on SlideShare and embedded below.</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=presentation-100117111303-phpapp01&stripped_title=testing-aspnet-web-applications-using-ruby" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=presentation-100117111303-phpapp01&stripped_title=testing-aspnet-web-applications-using-ruby" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object> <div style="font-family: tahoma,arial; height: 26px; font-size: 11px; padding-top: 2px">View more <a style="text-decoration: underline" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration: underline" href="http://www.slideshare.net/BenHalluk">BenHalluk</a>.</div></div> <p>The code I used during the demo can be found on GitHub - <a href="http://github.com/BenHall/Kona">http://github.com/BenHall/Kona</a> </p> <p>I created a tag so you can download the zip of the code, now and in the future without being affected by other changes - <a title="http://github.com/BenHall/Kona/zipball/CodeMash_2010" href="http://github.com/BenHall/Kona/zipball/CodeMash_2010">http://github.com/BenHall/Kona/zipball/CodeMash_2010</a>. In future I plan to keep working on this code as a sample so you might want to keep an eye on the repository. </p> <p>Also, if you would like to know more about Testing ASP.net web applications, then I recommend you take a look at the book I co-authored, check out <a href="http://www.testingaspnet.com" target="_blank">http://www.testingaspnet.com</a></p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-5711747437031834387?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/Ab3OD2YNmr4" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2010/01/testing-aspnet-using-ruby-codemash.htmltag:blogger.com,1999:blog-21967381.post-62529708270376450692010-01-09T17:17:00.001Z2010-01-09T17:18:20.630ZRSpec, IronRuby and RubyMine<p>RSpec, IronRuby and RubyMine is an amazing combination. Here is a screenshot of an example I’m currently working on… </p> <p><a href="http://blog.benhall.me.uk/images/RSpecIronRubyandRubyMine_F31B/Rubymine_tests_passing.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Rubymine_tests_passing" border="0" alt="Rubymine_tests_passing" src="http://blog.benhall.me.uk/images/RSpecIronRubyandRubyMine_F31B/Rubymine_tests_passing_thumb.png" width="777" height="605"></a> </p> <p>All I do is execute the Rake command below, which exists in my rakefile.rb. Rubymine does the rest! Very cool.</p><pre class="brush: ruby;">desc "Run all examples"
Spec::Rake::SpecTask.new('examples') do |t|
t.spec_files = FileList['examples/**/*.rb']
end
</pre> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-6252970827037645069?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/YZMdJB5CBRg" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2010/01/rspec-ironruby-and-rubymine.htmltag:blogger.com,1999:blog-21967381.post-2127995317200991372009-12-26T16:58:00.001Z2009-12-26T16:59:57.773ZAdding IronRuby and JRuby to your OSX path<p>After downloading IronRuby and JRuby to do some hacking over the Christmas period, I wanted to add them to my PATH variable on OSX. In Windows, this is fairly easy to find but is hidden a few dialogs down. </p>
<p>In OSX, you need to edit the .bash_login file in your user directory. A simple nano ~/.bash_login will allow you to edit the file (replacing nano is your own favourite editor).</p>
<p>To add IronRuby to your path add:</p>
<p><strong>export PATH=/Users/Ben/Library/ironruby-0.9.3/bin:$PATH</strong></p>
<p>Import points: <br/>
1) The path to your IronRuby bin folder. <br/>
2) Ensure you add the existing $PATH to the end<br/>
3) Export the result to the current PATH variable. Note, this is case sensitive. </p>
<p>To add jRuby you do it in a very similar fashion. However, because of priorities and how jRuby works, unless you want jRuby to be the default, add it to the end of the path export</p>
<p><strong>export PATH=/Users/Ben/Library/ironruby-0.9.3/bin:$PATH:/Users/Ben/Library/jruby-1.4.0/bin</strong></p>
<p>You should now be able to see all your ruby interpreters.</p>
<p><img src="http://lh3.ggpht.com/_exs7ZT6h_9Q/SzZAlsNCdvI/AAAAAAAAALw/guX9riF6OHs/Ruby_OSX.png?imgmax=800" alt="Ruby_OSX.png" border="0" width="749" height="220" /></p>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-212799531720099137?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/1Aygk9BK0xc" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/12/adding-ironruby-and-jruby-to-your-osx.htmltag:blogger.com,1999:blog-21967381.post-22549047384839296492009-12-20T00:58:00.001Z2009-12-20T00:58:24.379ZA sneak peek at Meerkatalyst.Lonestar<p>As I had some free time on my hands today I decided to create a new project called Lonestar. For those of you who are interested, here is the first (working) screenshot. Can anyone guess what it is? </p> <p><a href="http://blog.benhall.me.uk/images/AsneakpeekatMeerkatalyst.Lonestar_D9F/Lonestar_HelloWorld_Screenshot.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Meerkatalyst.Lonestar Hello World Screenshot" border="0" alt="Meerkatalyst.Lonestar Hello World Screenshot" src="http://blog.benhall.me.uk/images/AsneakpeekatMeerkatalyst.Lonestar_D9F/Lonestar_HelloWorld_Screenshot_thumb.png" width="697" height="592"></a> </p> <p>For those of you who are following me on twitter then you will know I’ve been mentioning <a href="http://www.meerkatalyst.com" target="_blank">Meerkatalyst</a> for a while – all will become clear soon. For now, keep an eye on my blog, the <a href="http://www.meerkatalyst.com" target="_blank">Meerkatalyst website</a> and twitter feeds (<a href="http://twitter.com/ben_hall" rel="nofollow" target="_blank">@ben_hall</a> and <a href="http://twitter.com/meerkatalyst" rel="nofollow" target="_blank">@meerkatalyst</a>) for more exciting news on Lonestar and other projects!</p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-2254904738483929649?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/iiRtVENzNrc" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/12/sneak-peek-at-meerkatalystlonestar.htmltag:blogger.com,1999:blog-21967381.post-33672052745081059222009-12-11T01:06:00.001Z2009-12-11T01:06:47.442ZMore amazing region examples<p>Come on – really? </p> <p><a href="http://blog.benhall.me.uk/images/Moreamazingregionexamples_F94/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.benhall.me.uk/images/Moreamazingregionexamples_F94/image_thumb.png" width="487" height="281"></a> </p> <p>With the code being</p> <p><a href="http://blog.benhall.me.uk/images/Moreamazingregionexamples_F94/image_3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.benhall.me.uk/images/Moreamazingregionexamples_F94/image_thumb_3.png" width="490" height="292"></a></p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-3367205274508105922?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/kN26DKvOK-I" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/12/more-amazing-region-examples.htmltag:blogger.com,1999:blog-21967381.post-68389385513491467472009-12-11T00:58:00.001Z2009-12-11T00:58:26.858ZThis is why I hate regions<p>I just loaded up a default from Microsoft built into the Visual Studio 2010 extensibility and was greeted with this:</p> <p><a href="http://blog.benhall.me.uk/images/ThisiswhyIhateregions_D88/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.benhall.me.uk/images/ThisiswhyIhateregions_D88/image_thumb.png" width="652" height="532"></a> </p> <p>If someone could tell me what this region is actually adding to the code-base then I would love to know! Personally, it’s just a pointless layer of abstraction. </p> <p>If your interested in what is happening within the region, well it gets worse. This is the code:</p> <p><a href="http://blog.benhall.me.uk/images/ThisiswhyIhateregions_D88/image_3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.benhall.me.uk/images/ThisiswhyIhateregions_D88/image_thumb_3.png" width="653" height="547"></a></p> <p>Instantly, I notice the following problems: </p> <p></p> <p></p> <p>1) The comment to code ratio is very high. This makes seeing the code harder. </p> <p>2) The attribute to code ratio is very high. This makes seeing the code harder, however it does have some useful information.</p> <p>3) The class name is not at all related to the file name. This can cause real confusion when attempting to navigate and understand a code-base. Please, don’t do it. </p> <p>What would happen if we wrote code like this:</p> <p><a href="http://blog.benhall.me.uk/images/ThisiswhyIhateregions_D88/image_4.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.benhall.me.uk/images/ThisiswhyIhateregions_D88/image_thumb_4.png" width="650" height="544"></a> </p> <p>The true intent of the code is now very clear without having to read anything! Stop hiding code and just show us the true aim.</p> <p>Ideally I would also want to remove editorAdornmentLayer however MEF uses this, as such I need to leave it. </p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-6838938551349146747?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/FQGe5gZxm9Y" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/12/this-is-why-i-hate-regions.htmltag:blogger.com,1999:blog-21967381.post-65443056109600089302009-12-10T00:33:00.001Z2009-12-10T00:33:01.454ZExcellent error message from Amazon<p>Yesterday I tried to purchase a book from Amazon UK on my iPhone and was given this error message: </p> <p><a href="http://blog.benhall.me.uk/images/ExcellenterrormessagefromAmazon_7B2/IMG_0196.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="IMG_0196" border="0" alt="IMG_0196" src="http://blog.benhall.me.uk/images/ExcellenterrormessagefromAmazon_7B2/IMG_0196_thumb.png" width="324" height="484"></a></p> <p>It had all my information, everything looked correct but unbeknown to everyone, including Amazon, it was game over. </p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-6544305610960008930?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/FHaOuMbKK0I" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/12/excellent-error-message-from-amazon.htmltag:blogger.com,1999:blog-21967381.post-55250828529336928902009-12-05T16:17:00.001Z2009-12-05T16:17:04.598ZMaking Visual Studio more keyboard friendly – File.Close<p><a href="http://blog.benhall.me.uk/images/MakingVisualStudiomorekeyboardfrie.Close_E4E0/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.benhall.me.uk/images/MakingVisualStudiomorekeyboardfrie.Close_E4E0/image_thumb.png" width="644" height="376"></a> </p> <p>Any time my hands are not on my keyboard my productivity is being harmed. Visual Studio + ReSharper has some really nice keyboard shortcuts which means I don’t need to use my mouse. However, one shortcut which just feels to me plain forgotten is being able to close a file using the keyboard. I can open, switch between but cannot close! Thankfully you can bind your own shortcuts, as such I bound to Ctrl+Q. Having this simply makes everything a little bit easier. But please, Visual Studio or ReSharper – auto-bind this command. </p> <p></p> <p>Note: Visual Studio 2010 Beta 2 is a bit buggy when it comes to keyboard shortcut. I had to un-assign anything bound to the key and restart the app before it took effect. </p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-5525082852933692890?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/cHY84W79x7s" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/12/making-visual-studio-more-keyboard.htmltag:blogger.com,1999:blog-21967381.post-19183197038159888652009-12-05T15:05:00.001Z2009-12-05T15:05:24.607ZMigrating from CodePlex to GitHub<p>While I have a lot of respect for the work Microsoft have done with <a href="http://www.codeplex.com" target="_blank">CodePlex</a>, personally I think <a href="http://www.github.com/" target="_blank">GitHub</a> is fundamentally a much better platform for open source projects. The main reason being is that it is just so easy to get access to the code, make changes and do whatever you want while utilising the power of Git. I have a couple of projects on CodePlex, so I wondered how easy it would be to port them over to GitHub. </p> <p>After creating a new repository on GitHub, you are given the option to import from a Subversion Repository. All you need to do is enter the public Subversion URL for your repository.</p> <p><a href="http://blog.benhall.me.uk/images/MigratingfromCodePlextoGitHub_D3EC/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.benhall.me.uk/images/MigratingfromCodePlextoGitHub_D3EC/image_thumb.png" width="622" height="484"></a> </p> <p>Thankfully, CodePlex allows you to access your source code via TFS and Subversion. To find the URL, simply go to the Source Code tab and click Connection Instructions. This will give you the project’s SVN URL to enter into Github. </p> <p><a href="http://blog.benhall.me.uk/images/MigratingfromCodePlextoGitHub_D3EC/image_3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.benhall.me.uk/images/MigratingfromCodePlextoGitHub_D3EC/image_thumb_3.png" width="622" height="484"></a></p> <p>After clicking next the experience isn’t great – there is no real feedback about what is going on which is unfortunate. However, after a while I received an email saying the Import had been completed successfully. If it fails, it also will send you an email to let you know. </p> <p><a href="http://blog.benhall.me.uk/images/MigratingfromCodePlextoGitHub_D3EC/image_4.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.benhall.me.uk/images/MigratingfromCodePlextoGitHub_D3EC/image_thumb_4.png" width="644" height="349"></a> </p> <p>My GitHub repository now has all the source code from my CodePlex project. </p> <p><a href="http://blog.benhall.me.uk/images/MigratingfromCodePlextoGitHub_D3EC/image_5.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.benhall.me.uk/images/MigratingfromCodePlextoGitHub_D3EC/image_thumb_5.png" width="644" height="386"></a> </p> <p>Along with the code, it also has all the commits and history associated with the project which is pretty awesome! </p> <p><a href="http://blog.benhall.me.uk/images/MigratingfromCodePlextoGitHub_D3EC/image_6.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.benhall.me.uk/images/MigratingfromCodePlextoGitHub_D3EC/image_thumb_6.png" width="592" height="484"></a> </p> <p>In just a few clicks I was able to migrate from CodePlex and SVN to GitHub and Git. </p> <p>If you didn’t want to use the UI, or it failed for some reason, GitHub have a great <a href="http://github.com/guides/import-from-subversion" target="_blank">guide</a> about how you can do this import manually.</p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-1918319703815988865?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/7HGhjMyuXN0" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/12/migrating-from-codeplex-to-github.htmltag:blogger.com,1999:blog-21967381.post-49141374517797456792009-11-21T19:05:00.001Z2009-11-21T19:05:06.588ZRubyMine – The Meta keyboard shourtcut on Windows<p>Today I installed <a href="http://www.jetbrains.com/ruby/" rel="nofollow" target="_blank">RubyMine 2.0</a> which is a great IDE from JetBrains. However, I was confused as all the keystrokes referred to ‘Meta’, for example ‘Meta+C’ for copying. Being on Windows 7, this wasn’t a valid keystroke. </p> <p>After a bit of search around, it turns out RubyMine has keystrokes targeted for different environments, in my case it was targeted to be the same as TextMate. Awesome when I’m on my Mac, not so good on Windows.</p> <p>To change the keymapping, select File > Settings. Pick the keymap option, and in the dropdown change it to Visual Studio.</p> <p><a href="http://blog.benhall.me.uk/images/RubyMineTheMetakeyboardshourtcutonWindow_10C56/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blog.benhall.me.uk/images/RubyMineTheMetakeyboardshourtcutonWindow_10C56/image_thumb.png" width="640" height="447"></a> </p> <p>Everything will then feel right at home. </p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-4914137451779745679?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/coIiSpsI3Jo" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/11/rubymine-meta-keyboard-shourtcut-on.htmltag:blogger.com,1999:blog-21967381.post-24691126747795588722009-11-19T00:00:00.001Z2009-11-19T00:00:27.162ZI've written a book on Testing ASP.net Web Applications<p>If you have been following me on <a href="http://twitter.com/ben_hall" rel="nofollow">twitter</a> then this will be old news however I realised I never announced it on my blog. </p>
<p>Well, here is it! I have written a book on Testing ASP.net Web Applications! The website for which can be found at <a href="http://www.testingaspnet.com/">http://www.testingaspnet.com/</a></p>
<p><img src="http://www.testingaspnet.com/cover.png" alt="Testing ASP.net Web Applications cover" /></p>
<p>I agreed to co-author the book with <a href="http://www.mcwherter.net/blog/" rel="nofollow">Jeff McWherter</a> at PDC08 almost a year ago. Now, after a long hard year of constant work on both of our parts, I'm pleased to say that <strong>the book is now available on both <a href="http://www.testingaspnet.com/book">Amazon.com</a> and <a href="http://www.testingaspnet.com/bookuk">Amazon.co.uk</a>.</strong></p>
<p>The book provides the reader with an introduction into the main issues faced when testing ASP.net web applications, both WebForms and MVC. We wanted to provide a guide covering the various different issues you will face during the development and testing lifecycle.</p>
<p>The chapters are:<br/>
Chapter 1: Preliminary Concerns<br/>
Chapter 2: Design and Testability<br/>
Chapter 3: Unit Testing and Test Driven Development<br/>
Chapter 4: Integration Testing <br/>
Chapter 5: Automated UI Testing <br/>
Chapter 6: Acceptance Testing <br/>
Chapter 7: Manual Testing <br/>
Chapter 8: Performance Testing <br/>
Chapter 9: Accessibility Testing <br/>
Chapter 10: Security Testing <br/></p>
<p>As proof that the book does actually exist, the amazing <a href="http://visuallounge.techsmith.com/">Betsy Weber</a> spotted the book on the Wiley stand at PDC09.</p>
<p><a href="http://twitter.com/betsyweber/status/5805581354" rel="nofollow"><img src="http://www.testingaspnet.com/wild/PDC_Wiley_Stand.jpg" alt="Testing ASP.net Web Applications @ PDC09" /></a></p>
<p>If you happen to spot the book anywhere, or if you have read a copy and have feedback then please do let us know! We would love to hear from you!</p>
<p>Since completing the book, I've taken a break, joined <a href="http://www.7digital.com" rel="nofollow">7Digital.com</a> and started working on a number of other projects. Exciting times!</p>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-2469112674779558872?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/MwduSeXxq1U" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/11/i-written-book-on-testing-aspnet-web.htmltag:blogger.com,1999:blog-21967381.post-89212663332725525682009-11-18T00:01:00.001Z2009-11-18T00:07:48.410ZWelcome to GitHub - Your first git repository<p>I've been using GitHub for a while now as it's a great way to share ideas and code in the public domain. Recently, I've had a number of people ask me how they can get started using GitHub. Thankfully, GitHub is an extremely simple service to use!! </p>
<p>Firstly, GitHub is a social coding repository, building on top of git (a source control system) to encourage collaboration on code and open source projects. By having this aim, the site is organised in such a way to make it very simple to upload code, as well as add additional contributors to the project. GitHub also has paid for accounts offering private repositories and additional features. </p>
<p>First, to use GitHub you need a git client installed. If you are on OSX, I recommend using the <a href="http://code.google.com/p/git-osx-installer/downloads/list">git-osx-installer</a> while if you are on windows I suggest the <a href="http://code.google.com/p/msysgit/downloads/list">MSysGit project</a>. From my experience, I've found these to be the most effective way to start using git. </p>
<p>After signing up for a <a href="https://github.com/signup/free">free account</a> on GitHub, you need to create a <a href="http://github.com/guides/providing-your-ssh-key">public key</a>. The next stage is to create a public repository to store code. </p>
<p>All you need to do is enter a name for a new repository, a description and click Create. Each project has it's own repository, unlike with other source control systems such as SVN. <br/></p>
<p><img src="http://lh5.ggpht.com/_exs7ZT6h_9Q/Sn7fNzwLoPI/AAAAAAAAAKo/JFnDA95UdKc/GitHub_Create.png?imgmax=800" alt="GitHub_Create.png" border="0" width="450" height="270" /><br/></p>
<p>After clicking create, you have your repository. GitHub provides you with the next steps about how you can add code in your public repository. A great way to learn the fundamentals of git at the same time. <br/></p>
<p><img src="http://lh5.ggpht.com/_exs7ZT6h_9Q/Sn7f-EDib6I/AAAAAAAAAKs/zAzuI8V7y44/GitHub_ReproCreated.png?imgmax=800" alt="GitHub_ReproCreated.png" border="0" width="450" height="200" /><br/></p>
<p>The first command you will need is 'git init', this creates your local repository to store your project. Once you have a local repository, you can do all the standard commands you would expect such as git add, git commit, branch etc. </p>
<p>After you push your code to github, everyone will be able to view, clone, fork your repository. A great way to allow others to collaborate on your project. In my case, the repository I created was <a href="http://github.com/BenHall/SimplyRubyServer/">http://github.com/BenHall/SimplyRubyServer/</a>.</p>
<p>As you start using GitHub and Git more and more, you will really understand how powerful they are. </p>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-8921266333272552568?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/O7eZ4kjvEns" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/11/welcome-to-github-your-first-git.htmltag:blogger.com,1999:blog-21967381.post-17761568955865158692009-10-22T20:50:00.001Z2009-10-22T20:50:34.110ZGiven.org at #launch48<p><a href="http://www.given.org" target="_blank"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="3-given_logo" border="0" alt="3-given_logo" align="right" src="http://lh3.ggpht.com/_exs7ZT6h_9Q/SuDFjP0KwmI/AAAAAAAAAK8/3f32450nvZg/3-given_logo%5B5%5D.png?imgmax=800" width="240" height="115"></a> </p> <p>This weekend I attended an awesome event called <a href="http://www.launch48.com/" target="_blank">Launch48</a> at the PayPal\eBay offices in Richmond (London). The concept is simple, anyone is allowed to pitch an idea in 1 minute on the Friday evening, this event had around 30 pitches. After this, people vote on which ideas they like. Next the top 12 teams give a 2 minute pitch and Q&A. After a second vote, the 6 top teams start work. Everyone who attended selects a team to help with the aim of having a demoable product and business by 4pm on Sunday. Our team created Given.org, video explaining the idea can be found below. </p> <p>GIVEN helps companies find and support people’s causes on Facebook. </p> <p><object width="400" height="220"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7126886&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7126886&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="220"></embed></object></p> <p><a href="http://vimeo.com/7126886">30 Seconds about Given.org</a> from <a href="http://vimeo.com/user2477667">Given dot Org</a> on <a href="http://vimeo.com">Vimeo</a>.</p> <p>It gives companies the ability to publicly sponsor fundraising initiatives – whether they are being led by employees, fans or customers. This offers companies a new way to engage with people on Facebook and support worthwhile causes.<br><br>For fundraisers GIVEN offers a whole new world of potential sponsors beyond their existing network of family and friends. GIVEN helps people raise money from over 20,000 companies that currently have a presence on Facebook. Luckily, the team had some amazing designers from <a href="http://www.evisua.com" target="_blank">Evisua.com</a> who created the website below:</p> <p></p> <p><a href="http://lh4.ggpht.com/_exs7ZT6h_9Q/SuDFkNp7ycI/AAAAAAAAALA/zq9Y0Ck9uzA/s1600-h/image%5B5%5D.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_exs7ZT6h_9Q/SuDFk4PjOmI/AAAAAAAAALI/HjG2j31hHss/image_thumb%5B3%5D.png?imgmax=800" width="640" height="402"></a> </p> <p>While the designers did their thing, the developers, which I was one of, worked on the facebook application. Creating facebook applications has a small learning curve, but actually pretty straight forward to create once you get started. Our application looked like this after the end of the weekend: </p> <p><a href="http://lh6.ggpht.com/_exs7ZT6h_9Q/SuDFlvV3FrI/AAAAAAAAALM/5LQ2qabtOFw/s1600-h/image%5B10%5D.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_exs7ZT6h_9Q/SuDFmWYmNuI/AAAAAAAAALQ/Ipkn5a657xY/image_thumb%5B6%5D.png?imgmax=800" width="640" height="389"></a> </p> <p>Hopefully you will be hearing more about this in the future, but wanted to give people a heads up into what is happening in and around London. If you want to know about the other five teams, check out the <a href="http://eu.techcrunch.com/2009/10/18/launch48-startups-present-their-ideas-after-a-frantic-48-hours/" target="_blank">TechCrunch article</a>. </p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-1776156895586515869?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/MiiANxVAybw" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/10/givenorg-at-launch48.htmltag:blogger.com,1999:blog-21967381.post-4947272666747956812009-10-19T22:07:00.001Z2009-10-19T22:07:19.944ZMEF – NxtGenUG Coventry<p>Tonight I gave another run out of my MEF session at NxtGenUG Coventry. Thank you to everyone who attended, I had a great time. Below are my slides and code samples. Any questions, just let me <a href="http://twitter.com/ben_hall" target="_blank">know</a>.</p> <div style="text-align: left; width: 425px" id="__ss_2283942"><a style="margin: 12px 0px 3px; display: block; font: 14px helvetica,arial,sans-serif; text-decoration: underline" title="Mef - NxtGenUG Coventry" href="http://www.slideshare.net/BenHalluk/mef-nxtgenug-coventry">Mef - NxtGenUG Coventry</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=mef-091019163348-phpapp01&stripped_title=mef-nxtgenug-coventry" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=mef-091019163348-phpapp01&stripped_title=mef-nxtgenug-coventry" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object> <div style="font-family: tahoma,arial; height: 26px; font-size: 11px; padding-top: 2px">View more <a style="text-decoration: underline" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration: underline" href="http://www.slideshare.net/BenHalluk">BenHalluk</a>.</div></div> <p><strong>Download code: </strong><a href="http://blog.benhall.me.uk/downloads/NxtGenUG/CambridgeMEF/Code.zip" target="_blank"><strong>Code.zip</strong></a></p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-494727266674795681?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/42f4VeyR9tk" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/10/mef-nxtgenug-coventry.htmltag:blogger.com,1999:blog-21967381.post-36909606817874454272009-09-29T21:45:00.001Z2009-09-29T21:45:39.335Zno such file to load -- mkmf<p>Today I was attempting to install a package on my ubuntu machine and I received the following error:</p><pre>extconf.rb:1in 'require': no such file to load -- mkmf (LoadError)</pre>
<p>To solve the problem, I simply installed the ruby1.8-dev package, this was done by the command:</p><pre>sudo apt-get install ruby1.8-dev</pre>
<p>I could then happily install the package I wanted.</p> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-3690960681787445427?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/9bz2txIBlh8" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/09/no-such-file-to-load-mkmf.htmltag:blogger.com,1999:blog-21967381.post-78523482546007187302009-09-29T00:17:00.001Z2009-09-29T00:18:56.539ZMaking my blog suck less - Syntax Highlighting<p>Following on in the series of how I have improved my blog, its time to address the issue of syntax highlighting. I admit, this is something which I think has really let me down and something which is long overdue. </p>
<p>There are a number of difference approaches available to solve this problem, however the best approach I came across is from <a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter" rel="nofollow">http://alexgorbatchev.com/wiki/SyntaxHighlighter</a>. This is a javascript+css library which can be installed on your blog, which thankfully is a very simply task. The CSS you need to reference are the following:</p>
<pre class="brush: css;">
<link type="text/css" rel="stylesheet" href="syntaxhighlight/styles/shCore.css"/>
<link type="text/css" rel="stylesheet" href="syntaxhighlight/styles/shThemeDefault.css"/>
</pre>
<p>The javascript I have referenced in shown below.</p>
<pre class="brush: js;">
<script type="text/javascript" src="syntaxhighlight/scripts/shCore.js"></script>
<script type="text/javascript" src="syntaxhighlight/scripts/shBrushBash.js"></script>
<script type="text/javascript" src="syntaxhighlight/scripts/shBrushCSharp.js"></script>
<script type="text/javascript" src="syntaxhighlight/scripts/shBrushCss.js"></script>
<script type="text/javascript" src="syntaxhighlight/scripts/shBrushDiff.js"></script>
<script type="text/javascript" src="syntaxhighlight/scripts/shBrushJava.js"></script>
<script type="text/javascript" src="syntaxhighlight/scripts/shBrushJScript.js"></script>
<script type="text/javascript" src="syntaxhighlight/scripts/shBrushPlain.js"></script>
<script type="text/javascript" src="syntaxhighlight/scripts/shBrushPython.js"></script>
<script type="text/javascript" src="syntaxhighlight/scripts/shBrushRuby.js"></script>
<script type="text/javascript" src="syntaxhighlight/scripts/shBrushScala.js"></script>
<script type="text/javascript" src="syntaxhighlight/scripts/shBrushSql.js"></script>
<script type="text/javascript" src="syntaxhighlight/scripts/shBrushXml.js"></script>
<script type="text/javascript">
SyntaxHighlighter.config.clipboardSwf = 'scripts/clipboard.swf';
SyntaxHighlighter.all();
</script>
</pre>
<p>In my posts, I can then simply wrap the snippet in a pre block and assign the appropriate brush class to highlight the syntax.</p>
<p><pre class="brush: c-sharp;">
public string test()
{
return "abc";
}
</pre></p>
<p>The following are a list of brushes for the different languages I have referenced.</p>
<p>C# - c-sharp<br/>
CSS - css<br/>
JavaScript - js<br/>
Java - java<br/>
Ruby - ruby<br/>
Python - python<br/>
Scala - scala<br/>
SQL - sql<br/>
Xml - xml</p>
<p>For those who are using Windows Live Writer, there is a plugin to make syntax highlighting even easier! This is available to download from <a href="http://www.codeplex.com/precode" rel="nofollow">http://www.codeplex.com/precode</a></p>
<p>Hopefully this should make code much easier to read in the future. Another approach I was tempted by is using GitHub Gists. Gists are snippets of code hosted on github which you can then embed into your posts, as shown below. </p>
<script src="http://gist.github.com/195464.js"></script>
<p>The reason I didn't go down this route is that it makes it difficult to insert code when writing a blog 'offline' and when GitHub is down. As a result, I decided to stick with the classic approach for now. But what do you think?</p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-7852348254600718730?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/1OAZKMV1Rr8" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/09/making-my-blog-suck-less-syntax.htmltag:blogger.com,1999:blog-21967381.post-2090024204439493722009-09-28T23:51:00.001Z2009-09-29T00:04:26.269ZMaking my blog suck less - Retweet (via @Tweetmeme)For those of your who haven't come across <a href="http://tweetmeme.com/">Tweetmeme</a> before, they are a Reading (UK) based startup aggregating all the links which are retweeted on twitter. Many say it is 'digg for twitter'.
While my blog posts generally don't get retweeted, I wanted to include a retweet button as an experiment to see if it will have any difference on the traffic, tweets of blog posts or my followers count.
To add the tweetmeme button onto my posts, I simply include the following javascript. Note, I've made some adjustments, firstly I have gone for the compact style, I have also manually set the url which the button relates to which is set by the blogger platform and finally set the retweet to come from me.
<pre class="brush: js;">
< script type="text/javascript" >
tweetmeme_style = 'compact';
tweetmeme_url = '<$BlogItemPermalinkUrl$>';
tweetmeme_source = 'ben_hall';
</script>
< script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js" >< /script >
</pre><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-209002420443949372?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/W_5HPQov4S8" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/09/making-my-blog-suck-less-retweet-via.htmltag:blogger.com,1999:blog-21967381.post-33207274063212867692009-09-28T22:37:00.001Z2009-09-28T22:39:49.879ZMaking my blog suck less<p>While I've been blogging for a number of years, my theme and layout has never really had my full attention. This has resulted in a number of issues, poor experience and finding older content more difficult than it needed to be. As such, I've decided to give the site a face-lift. A lot of this has been inspired by <a href="http://www.hanselman.com/blog/">Scott Hanselman</a> and the tips he has given to improve his blog.</p>
<p>This post covers the initial changes I have made, why I've made them and some tips you could apply to your own site if you wished. </p>
<p><strong>1) Added a notice bar</strong></p>
<p>At the top of every page I have added a notice bar with links to various internal and external pages which I would like my readers to pay attention to and visit. These include various social sites such as GitHub and Twitter with the hope that by having them in the notice bar people will be able to more easily identify them. Of course, there still needs to be excellent content on those sites, but making it easier for readers to access should be a high priority.</p>
<p><strong>2) Making my favourite personal posts easier to find</strong></p>
<p>There are a number of posts which I'm proud of which new visitors might be interested in and as such I wanted to make it easier for people to find. The aim is to reduce the bounce rate of visits from search engines, but also ensure that this content can be accessible to anyone who might be interested in what I have written previously.</p>
<p><strong>3) Clean HTML</strong></p>
<p>One of my personal bug bears at the moment is having clean(ish) HTML and CSS. I used to let this slide, but over time I've come to realise just how important it is. Not only does it improve compatibility across different browsers, but it also improves the load-time as the HTML is more streamlined as well as allowing for a more consistent look across the blog. The added advantage being that the html is now in a maintainable state meaning I'm not scared of updating the template like before. The problem with this is that things might not look 100% correct - if you notice any problems with formatting, then please let me know.</p>
If you visit my homepage, you hopefully will notice a number of other changes some of which I'll cover in later posts. I'm hoping you will find some benefit in my new changes. If you think there is anything else I need to change, then please let me know. <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-3320727406321286769?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/IIKDw50BxD0" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/09/making-my-blog-suck-less.htmltag:blogger.com,1999:blog-21967381.post-9898316521656866532009-09-22T22:01:00.001Z2009-09-22T22:01:59.791ZMono XSP == OSX ASP.net Web ServerOver the weekend I required a very simple web server on my MacBook to allow me to play around with some iPhone Web App development. It didn't need to do much, simply accept requests and serve webpages. While I've created web servers before, after sending a tweet out I was reminded about <a href="http://www.mono-project.com/ASP.NET">Mono XSP</a>. XSP is an ASP.net web server developed under the Mono project banner allowing you to serve web pages and asserts (javascript, css, images etc) to clients. Simply - it's great!
After installing Mono, to launch a server simply navigate to the directory where your pages resides using a Terminal (command prompt), and type in XSP. This will start a full webserver on port 8080 serving pages from the directory. Now, within seconds, I can quickly make any directory on my laptop accessible over HTTP!
On OSX, the execution simply looks like this:
Pretty:Base Ben$ <strong>xsp</strong><br/>
<em>xsp2<br/>
Listening on address: 0.0.0.0<br/>
Root directory: /Users/Ben/SourceControl/iPhoneWebApp101/iWebKit/Base<br/>
Listening on port: 8080 (non-secure)<br/>
Hit Return to stop the server.</em><br/>
Great for prototyping and rapid development and while I haven't tried it, it should work on Windows equally as well. <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-989831652165686653?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/L-pH4eW5G6w" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/09/mono-xsp-osx-aspnet-web-server.htmltag:blogger.com,1999:blog-21967381.post-40127602646083710822009-08-29T21:18:00.002Z2009-09-28T20:54:13.832ZInternet is fast moving - introducing BenHall.Tumblr.com<p>In my previous post I spoke about <a href="http://blog.benhall.me.uk/2009/08/getting-personal-with-posterous.html" target="_blank">Getting personal with Posterous</a>. Well, after signing up I gave <a href="http://benhall.tumblr.com/" target="_blank">Tumblr</a> a go, and I have to say I was impressed! </p> <p>
<a href="http://www.screencast.com/users/BenHalluk/folders/Jing/media/078f2206-614d-4290-bd76-4142e16ebc1f"><img src="http://content.screencast.com/users/BenHalluk/folders/Jing/media/078f2206-614d-4290-bd76-4142e16ebc1f/00000015.png" height="219" width="380" style="margin: 0 10px 10px 0; border: 0px" /></a>
<br />
</p> <p> As such, I would like to introduce <a href="http://benhall.tumblr.com/" target="_blank">http://benhall.tumblr.com/</a>. Two great services! However, I think Tumblr has the edge for allowing you to easily write different style of blog posts - such as text, images or videos. Overall, it also has a nicer feel and experience. </p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-4012760264608371082?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/tlUrBdDhhHY" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/08/internet-is-fast-moving-introducing.htmltag:blogger.com,1999:blog-21967381.post-45576560309996917162009-08-29T20:47:00.002Z2009-09-28T19:46:36.914ZGetting personal with PosterousWhile <a href="http://twitter.com/ben_hall" rel="nofollow" target="_blank">Twitter</a> is great for sharing ideas, I'm getting a little frustrated at the 140 character limit. Sometimes it is great, other times you need a few more characters. I also want to keep this blog more 'professional' and technical related. As such, I'm going to use a service called <a href="http://www.posterous.com/" rel="nofollow" target="_blank">Posterous</a> to post some random thoughts and comments of a more personal nature about my life. Some of you might be interested, however I'm guessing most of you won't be :)
One of the great things about Posterous is how easy it is to get started as you simply send an email to post@posterous.com. This then creates a blog for you:
<p><a href="http://www.screencast.com/users/BenHalluk/folders/Jing/media/42a2c8f1-15b8-4e13-8fa4-e66387680ae4"><img src="http://content.screencast.com/users/BenHalluk/folders/Jing/media/42a2c8f1-15b8-4e13-8fa4-e66387680ae4/00000012.png" style="border: 0px none ; margin: 0pt 10px 10px 0pt;" height="219" width="380" /> </a> </p> However, in order to get a real URL you need to claim your post by clicking the link.
<p><a href="http://www.screencast.com/users/BenHalluk/folders/Jing/media/6c38c51d-882f-433e-8ec1-158d61318586"><img src="http://content.screencast.com/users/BenHalluk/folders/Jing/media/6c38c51d-882f-433e-8ec1-158d61318586/00000013.png" style="border: 0px none ; margin: 0pt 10px 10px 0pt;" height="219" width="380" /> </a> </p> Done! The blog has been created. The domain name is <a href="http://benhall.posterous.com/" target="_blank">http://benhall.posterous.com/</a> - Feel free to follow what I'm saying. <p><a href="http://www.screencast.com/users/BenHalluk/folders/Jing/media/6e022c43-dc83-4257-b107-a047b462762f"><img src="http://content.screencast.com/users/BenHalluk/folders/Jing/media/6e022c43-dc83-4257-b107-a047b462762f/00000014.png" style="border: 0px none ; margin: 0pt 10px 10px 0pt;" height="219" width="380" /> </a> </p> If you want to start blogging, sharing ideas - either personal, or technical then posterous is a very quick way to get started.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/21967381-4557656030999691716?l=blog.benhall.me.uk' alt='' /></div><img src="http://feeds.feedburner.com/~r/BenHall/~4/x3PHJRTDGz0" height="1" width="1"/>Ben Hallhttp://www.blogger.com/profile/17734933641904484310Blog@BenHall.me.uk0http://blog.benhall.me.uk/2009/08/getting-personal-with-posterous.html |
|


|