Psake is a great build system for automating your .Net builds on Windows. To save time when using it and to make it a simple command to run the build, I like to place a batch file in the root of the code repository to allow you to download and execute Psake without having to check in any binaries.
It also avoids the hassle of importing the Psake module and calling
MargieBot is a simple to use .Net framework for making your own bots for Slack. To start up a bot and connect it to Slack, all it takes is:
This makes the happy path work very well, but out of the box this will not handle dropped connections or attempting to reconnect to the server - so if the connection is interrupted for any reason, you bot will no longer try to connect to Slack.
When writing a simple HTTP handler in .Net, the framework provides support for replacing the default HTTP Handler Factory with your own factory which provides support for dependency injection.
When creating a new ASP.Net MVC project, by default you will end up with a number of extra HTTP headers in your responses which can safely be removed.
These headers will advertise which version of Windows you are hosting on, and which versions of the .Net framework and ASP.Net version you are developing with. As well as being needless bloat over the wire, they also give away information to potential hackers about your software.
When starting a new .Net project, I like to place a nuget.config in the solution root folder with a number of default settings in place. This is to ensure a number of good behaviours for NuGet.
Castle Windsor has a great add on called the WCF Integration Facility which allows you to get all of the benefits of DI/IoC when working with WCF services.
The only downside of using it is the verbosity of the component registration. Thankfully we are able to use extension methods to help us here and hide away all of the verbose registration code behind a simple, chainable method call.
You can call the set method of ConfigurationManager.AppSettings to set the values required for that particular unit test.
When the unit test runs it will then use these values to run the code.
The Castle Project forked the project and have been maintaining it, and most recently released version 1.1.1 on 10 December 2010. More details can be found at the Castle Projects NVelocity site. They have also made a number of improvements to it, details of which can be found on their NVelocity improvements page. The project looks like it is now dead and in MonoRail 3, it has been replaced by Castle Blade which is based off Razor.
The open source project RazorEngine allows you to use the the Razor View engine outside of ASP.Net MVC or Web Pages so you can use it to generate templated emails.
Delete from table deletes each row from the one at a time and adds a record into the transaction log so that the operation can be rolled back. The time taken to delete is also proportional to the number of indexes on the table, and if there are any foreign key constraints (for innodb).
Truncate effectively drops the table and recreates it and can not be performed within a transaction. It therefore required fewer operations and executes quickly. Truncate also does not make use of any on delete triggers.
Exact details about why this is quicker in MySql can be found in the MySql documentation
Subscribe to this blog via RSS.