Software dev, tech, mind hacks and the occasional personal bit

Category: C# Page 1 of 4

Talk on Tues: Moving to HTTPS

I’ll be giving a talk at Sydney ALT.NET on Tues:

After recently moving the Getup site fully to HTTPS, James will share with you security pitfalls, the justification for the move from mixed HTTP/HTTPS, lessons learnt, and performance tips. A romp through the protocols of the web with riffs on status codes, HSTS, domain verification, and interesting headers. This talk could save your bacon.

From 6pm at ThoughtWorks Sydney office on Pitt St. Remember to RSVP on the Sydney ALT.NET site to help with catering. See you there!

nRake Microsoft Case Study

nRake is now the subject of a Microsoft case study. Check it out here:

UPDATE: Now on the Microsoft Case Study site.

Ruby 1.8 Scoping and Blocks

Quick ruby quiz.. after these two lines execute, what is the value of number?

>> number = 5
>> (1..10).each {|number| print number}

Well, number will be 10, thanks to the block being run and re-assigning the value of number. This can cause you some pretty subtle bugs if you happen to have the same name for a local/function argument, and as a variable name in a block.

In C#, the compiler is kind enough to tell you that this would be a very bad idea and give you an error.

And thanks to Sudhinda for commenting – this has been fixed in Ruby 1.9. In 1.9, the variable used as the argument in the block does not affect the variable outside the block.

Azure Build and Deploy using Powershell

Started working with Windows Azure? Want to have automated build and deploy, rather than clicking around in a web console or Visual Studio?

Check out the AzureBuildDeploy repository on GitHub.

I set this up for an Azure proof of concept project. It contains Powershell scripts for simple automated packaging, build and deploy, and a dummy WCF application for deployment to the cloud. The WCF application can however be easily replaced with a web application or what ever other .NET application you would like to host in the cloud.

How to use

  • Clone or download the source from http://github.com/jcrisp/AzureBuildDeploy
  • Update the $serviceName at the top of build-package-deploy.ps1
  • Update the certificate details, and subscription id at the top of deploy.ps1
  • If you plan to use SqlAzure (as in my proof of concept), update the connection details in HelloWorldService.svc.cs. If you don’t plan to use SqlAzure, just stub out the whole FindFirstGreetingUsingSqlAzure() method by returning a string.
  • Test out deployment to the cloud (run build-package-deploy.ps1). You can ensure it is working using the sample client in the repository.
  • Now you’ve got everything working, replace the dummy WCF application with whatever you want.

Notes
In my experience, the deployment of a simple application via these scripts, Visual Studio or the console takes about 16 minutes, from start of deploy to the service able to accept clients. This is extremely slow – I hope it improves!

ACS Alm Talk: Presentation Wrap Up & Slides

Thanks everyone who came along last night. It was a fun session, with a lot of lively discussion, especially around project management and software design. As mentioned during the talk, you might want to check out nRake for .NET builds and psDeploy for Powershell deployments. Here are the slides from the talk. If you have any more questions or areas to discuss, please feel free to drop me a line.

ACS Talk: The Ultimate ALM Environment (circa 2010)

I’ll be giving a presentation at an Australian Computer Society Special Interest Group on Wed 2 June, 6:30pm. More details here.

The abstract is:

Application Lifecycle Management (ALM) covers the whole software development lifecycle and associated processes including project management, business analysis, testing, build and deploy and development. Based on experiences in the field on projects with ThoughtWorks and consulting with other teams, I will describe what I consider to be the ultimate ALM environment, using an agile approach and techniques. This talk will cover goals, assessment criteria, practices, tools, and physical workspace design.

Hope to see you there!

nRake now on IronRuby

nRake, the premier project and build template for .NET projects using the Rake build system now has a branch for .NET4 using IronRuby. Projects are also updated to VS2010 format, and Albacore gems are now updated to 0.1.5.

Check out the IronRuby .NET 4 branch of nRake.

or the check out the IronRuby .NET 2 / 3.5 branch of nRake.

Master branch is still using MRI ruby 1.9. However, plans are to change over to IronRuby for master branch in the future. IronRuby is now performing well enough and sufficiently compatible to support .NET builds. IronRuby has advantages around size (smaller download) and more exciting interop possibilities with .NET code.

Podcast from ALM Conference

At the ALM Conference, Richard interviewed me for a podcast on the Ultimate ALM Environment circa 2010 as well as a little on build and deployment automation. Check out the podcast on Talking Shop!

Australian ALM Conference, and slides from ‘The Ultimate ALM Environment circa 2010’

The inaugural Australian ALM Conference has been an interesting 2 days. The first day had a number of insightful talks, especially interesting to hear Sam Guckenheimer on how Microsoft has been reshaping their internal development practices into a more agile model. Today, I enjoyed Richard‘s agile adoption talk (hear hear!) and the other highlight was the last presentation of the day, explaining what’s gone into the design of the new Windows 7 Mobile OS (though some things still seem under wraps). Also a pleasure to catch up with some old friends at the conference.

Conference organisation was very good (thanks to Anthony Borton and his team). The focus was very Microsoft centric, but next year, the plans are for a much wider variety of content. Lunar Park was a cosy conference venue and fun to go outside during the breaks and see kids screaming on rides and the sun shining on the bridge and harbour.

My presentation was 8.30am this morning (aargh!) but despite the early hour, there was a reasonable turn out and quite a few interested people asking questions. The plan was to co-present with Jason Yip, but he was called away to Perth so I presented solo. Unlike most other presentations at the conference, Visual Studio and TFS were barely mentioned. Instead I focused on current problems in each area of ALM, coming up with a criteria to assess this area, and what we usually do on projects to meet this criteria – eg, story walls, story maps, automated build and deploy etc. You can find the Powerpoint slides here. The slides are promises for a conversation (ie, mainly images with some notes), so don’t hesitate to contact me if you want to chat.

Also, thanks Richard for this photo from the presentation:

James Crisp presenting ‘The Ultimate ALM Environment circa 2010′

nRake – Rake builds for .NET

Fed up with XML based builds that are hard to maintain, refactor and extend? Rather than trying to fix this with more xml and community tasks, or re-invent the wheel, let’s use Rake. Rake is a mature build system developed by the ruby community which can be applied equally well in the .NET world.

To help you get started quickly, I’ve put together nRake. nRake provides a template C# .NET solution with a nice directory structure (src, tools, lib, etc), a Rake build, NUnit tests, templated app and web configs for different environments (eg, dev, uat, prod, etc) and Continuous Integration server sample config files. It comes with everything you need – no additional libraries or downloads required, and all the plumbing work has been done for you.

How to use

  • Git clone or Download nRake as a Zip
  • Rename PlaceHolder app and tests to reflect your project
  • Run rake in the root of the project. This will clean, compile, template config files and run unit tests.
  • Start developing your app! How easy was that 🙂
  • Note: nRake currently uses Ruby 1.9 since IronRuby start up time was prohibitively slow. Hopefully IronRuby will get faster, and then nRake can make use of it. Also nRake uses the Albacore Gem for .NET build tasks. Documentation on Albacore tasks here.

    Also check out the IronRuby update!

Page 1 of 4

Powered by WordPress & Theme by Anders Norén