Being Cellfish

Stuff I wished I've found in some blog (and sometimes did)

Browse by Tags

Tagged Content List
  • Blog Post: How to know when the garbage collector is not helping you

    A while back I did an experiment where it turned out that allocating objects was better than pooling them. Since then I have encountered a few times where allocating actually turned out to be a bad thing. I've never seen this being a problem in a client application, but in servers allocating a lot of...
  • Blog Post: Using T4 to eliminate maintenance

    I like to abstract diagnostics (logging and performance counters) into a separate interface or abstract class. But it becomes tedious to manually keep the fake diagnostics (used to test that that proper diagnostics calls are made), dummy diagnostics (when I just need something to pass around), console...
  • Blog Post: Analyzing logs from Azure web sites

    I recently played around with Azure web sites and wanted to analyze the IIS logs generated by azure but none of the tools I tried could parse the file I downloaded. Turned out that the header line of the file that looks like this: # date time s-sitename cs-method ... That is apparently not correct...
  • Blog Post: TestInitialize execution order

    This was brought to my attention and I was blown away by the fact that somebody would mark classes as TestClass without any tests in them just to reuse some setup code. And that they then make any assumptions on in which order the methods are called. If you really want to do that the constructor is a...
  • Blog Post: Adopt a chaos monkey

    Remember the Netflix Chaos Monkey ? Last week they released the source code for it . maybe we'll see a port to .Net and Azure on codeplex soon?
  • Blog Post: Listening to port 80 without being admin

    If you're writing integration or so called end-to-end tests for web services you typically need to spin up a service locally just for a few tests. Or maybe you're just interested in doing some manual testing locally. In both cased you likely need to be an administrator to be able to listen to the desired...
  • Blog Post: Stress testing with Fiddler

    If you're developing REST based services, Fiddler should not be news to you. But there might be a little trick you can use to do some simple stress testing. If you select one or more sessions in the Web Sessions pane and then hit shift+R you get a little dialog asking for number of times to replay the...
  • Blog Post: Identifying IIS worker processes

    The other day I had to debug a running IIS process. There was a nifty little command to figure out which process to attach to: C:\Windows\System32\Inetsrv\appcmd list wp Apart from the terrible fact that I had to debug a running IIS process this was a useful command.
  • Blog Post: One thing you probably want to write in your code review

    Just for the record I think face to face code reviews (or pair programming) is a much better idea than sending off a code review with an electronic tool and get some feedback back. But reality is that most teams use a tool where the reviewer and reviewee doesn't necessary talk to each other, just exchange...
  • Blog Post: Choosing the right tool for deployment in Twitter datacenter

    This is an interesting story of how the twitter datacenter improved their deployment time from 40 minutes to 12 seconds using the right tool for the job. And twitter are not alone . Let that inspire you!
  • Blog Post: Sometimes you need to be careful how you setup your tests

    I've been working with MSTest (the unit test framework that comes with Visual Studio) lately and I learned the hard way that it is a bad idea to not use the TestInitialize attribute. This may sound obvious to you but I'm more used to work in xUnit.net and there I typically setup as much as I can with...
  • Blog Post: Good tools may hide symptoms but not cure the disease - mocking frameworks edition

    Yesterday was about writing good test fixtures rather than using a tool that makes you get away with bad designs. The same thing goes for mocking frameworks . If you use a mocking framework you should avoid using it do fake things you wrote yourself. And you should use it rarely for anything else. That...
  • Blog Post: Good tools may hide symptoms but not cure the disease

    A few weeks ago a question was asked on an internal mailing list about how the unit test framework part of VS2010 works. Basically some client had decided to move away from that framework in favor of NUnit. Even though I think they did the right thing I think they did it for all the wrong reasons. The...
  • Blog Post: MSTest does not call all tests in a class before moving on the the next test class

    I recently heard of somebody who moved away from using MSTest and started to use NUnit because NUnit called the class setup method, then all tests and last the class tear-down before moving on to the next test class while MSTest more or less interleaved everything. I'm not a big fan of MSTest so I'm...
  • Blog Post: Pex and Moles

    Yesterday I attended a class about Pex and Moles held by the authors of named tool(s). The first part was about Moles which is kind of like Stubs ( which I've covered before ) but more powerful. With Moles you can fake any method in any class. I'll say that again. Any method in any class . That is very...
  • Blog Post: Tools to fix your crappy code

    I had a discussion the other day with somebody about the uselessness of measuring cyclomatic complexity of methods. In short the discussion went along the lines that using just a single measurement does not give you anything else than a number. And some methods with high cyclomatic complexity may still...
  • Blog Post: Getting code coverage in visual studio 2010 when using xUnit.net

    Recently I set up a project where i wanted to use xUnit.net as a unit test framework and I also wanted code coverage so I thought it should be easy using VS2010. Even though the final solution turned out to be fairly simple there were a few bumps on the road. basically I had to do a variant of what I...
  • Blog Post: Malevich the code review tool - part 2

    Now that my team have used Malevich for little over a month I thought it was time for an update. On the down side the diff view is not as good as with Araxis merge (a tool I use for diff/merge) especially when there are just small changes to a line Araxis is superior to Malevich. But I guess that is...
  • Blog Post: Malevich the code review tool

    Malevich is a code review tool that more and more teams within has started to use for code reviews. And now my team is also starting to use it. The really good thing with Malevich is how easy it is to use. It is easy to submit changes for review, it is easy to add a comment (just point, click and start...
  • Blog Post: Handling a lot of email efficiently

    People love sending email at Microsoft. So you need a good strategy to handle it. At work I use a strategy similar to what is described here . My key principle is that the inbox should only contain things I need to address. If I cannot address it in a few days I archive it flag it so it ends up in my...
  • Blog Post: Will code bubbles be the next development UI?

    Look at this video . I think it is a great idea. Too bad it apparently only work for Java. Will be interesting to see if this will be a hit or not. I really liked how they linked bubbles with unit tests to bubbles with implementation.
  • Blog Post: Yet another post about mocking

    I would like to apologize for this post. There is nothing new here. And I'm going to just refer you to somebody else. But I have to get this out of my system; I still think mocking frameworks are powerful tools but when you have a powerful tool you must use it with care . I also think mocking framework...
  • Blog Post: Handling different versions of the database

    The only way to handle database changes I've used before was either a number of SQL scripts which usually was a pain since it was almost impossible to remember what version of the database you had so you never knew which of the scripts to run. A better method I've used was to use a migration tool that...
  • Blog Post: Pugh Decision Matrix

    The Pugh decision matrix is a is a tool to help you make decisions when you're trying to sort out what alternative is the best but they all have their pros and cons. It can also be used to help a group decide on a decision. The way it works is that you first list your alternatives. And you also want...
  • Blog Post: Definition of mocking

    When I read what Uncle Bob wrote today about how he usually hand-rolls his mocks it not only stirred up trouble. It also reminded me of why I hate the mock vs not mocking debate . First of all there is a clear difference in what people mean when they talk about mocking. I kind of covered it earlier but...
Page 1 of 2 (44 items) 12