I have to break up my silence to send a beam of hate to software terrorists at RedGate management, who recently decided to charge for Reflector, an amazing tool they took over from Lutz Roeder in August 2008. Despite the original promises to keep the app free, Reflector7 is a paid only application and - lo and behold - the previous versions will cease to work from the end of February 2011.
What a damn shame.
May 23, 2010 19:56
Unit tests are not so different from other parts of the code.
You write a test once but expect people to read it many times. And you know what? There are only few reasons for revisiting a test:
- it started to fail
- it needs a refactor
- you want to learn the system under test.
Readability is the
key in all cases.
And - golly! - I came across a free tool which helps writing readable and maintainable tests. Test Lint is the name. This post is a quick sum-up of a quick evaluation I did the other day.
Here's a small VS2010 project (only VS2010 is supported) which shows some warnings and displays how to write a custom rule.
April 18, 2010 20:44
Building a project from command line gives you more control over the build process and provides quite a few other interesting options - comparing to building from Visual Studio.
And recently your humble correspondent was thinking about a "perfect build script" for an ASP.NET MVC project.
What should it have? Here's my take:
- Option to pre-compile views. Errors in views are not detected until run time but MvcBuildViews property is your compile time friend (pre-compiling the views is not
fast, so it's switched off by default).
- Option to run a clean build. Cached dlls are lurking around every bend so there must be a way to clean up everything.
- Non-removable unit tests runner. Even if running all your unit tests takes ages, there must be a set of "smoke" unit tests that verify your basics.
April 4, 2010 21:59
Here's a recursive Knetlik Law: post-processing of conference materials takes more time than one might have expected even considering the Knetlik Law.
Anyhow, the videos we were recording at Knetlik are finally online - courtesy of Andrew Kovalevsky.
You can find them on the website next to each speaker, along with the demo projects available for download. Enjoy!
March 14, 2010 21:45
Recently I was playing with ASP.NET MVC2 trying to find a neat solution for sending emails. This post is a sum-up of that little endeavour.
From it you will learn
- How to send HTML emails with MVCContrib and its EmailTemplateService
- How to test email sender without SMTP server
- How to use Ninject with MVC controllers
All those impatient readers out there, go ahead and download the source code of a small app that will be crafted in the rest of this post (zip comes along with MVCContrib source code, for some rich debugging experience).
February 7, 2010 19:43
There are tons of good papers and a bunch of questions on StackOverflow about designing and developing for security, but all of them seem to concentrate on what you should do.
However, recently I was after something different: a "visit a page, try this and that" kind of things, you know. A list of simple actions one should to go through once development is done, to make sure the solution is secure.
Here's something I've come up with so far:
January 31, 2010 20:03
I've been evangelizing the .NET platform for over 2 years, occasionally speaking (and listening) at venues from small local events to ponderously named conferences.
And let me tell you something: long presentations are not worth the time.
January 17, 2010 22:34
In the previous post your humble correspondent introduced Riant plugin which allows you to specify restricted internal access for types and methods. (You say "method Foo should be accessible only within My.Name.Space" - and lo and behold, R# screams bloody murder if Foo is called outside that namespace.)
This post will shed some light on how to write such a plugin. Take it with a fine grain of salt - I'm not working for JetBrains and everything I know comes from Resharper community, other open source plugins, and protracted hours with Reflector.
January 10, 2010 22:33
In C#, internal means that something is visible within the whole assembly but not outside.
Sometimes that forces developers to isolate components/APIs by marking them internal and putting them in separate VS projects within a single solution. Such undoubtedly creative approach has its benefits but also has obvious drawbacks: increased compile time, complicated deployment, etc.
Of course, there are other reasons for splitting code over several assemblies, but if your reason is stated above, a small ReSharper plugin that can help.
Head over to better life with fewer assemblies!