Mocks at the North Bay .Net User Group

I will be presenting “For Those About to Mock” on Tuesday, January 19th at the North Bay .Net user group in Sebastopol – and I am very excited about it, because it is my first time in this user group, and because I really enjoy the topic. As a long-time fan of TDD, I came across mocking a long time ago, but it took me a while to incorporate it in my daily code, not really because it’s complicated, but rather, because I didn’t quite understand what issue mocking frameworks were solving. Also, explanations on the topic are often fairly intimidating.

My goal will be to spare you the misunderstandings I went through, so that you understand where mocking can help you, and how to use frameworks like Rhino.Mocks and Moq in your own code. Hope to see you there, and if you have specific requests or questions you would want me to address, please let me know in the comments!

Event info here.

More...

Fun with queues

I am currently prototyping an application, which brought up some fun modeling questions.

Imagine the following situation: there are 2 products on the market. Customers use either of them, but not both. In each time period (we consider a discrete time model), new customers come on the market, and select one of the 2 products, with probability p and (1-p). At the end of each period, some existing customers stop using their product, and leave the market, with a rate of exit specific to the product.

Suppose that you knew p and the rates of exit for each product. If the size of the total market size was stable, what market share would you expect to see for each product?

Before tackling that question, let’s start with an easier problem: if you knew how many new customers were coming in each period, what would you expect the product shares to be?

Let’s illustrate with an example. You want to open the Awesome Bar & Restaurant, an Awesome place with a large bar and dining room. You expect that 100 customers will show up at the door every hour. A large majority of the customers (70%) head straight to the bar, but one the other hand, people who come for dinner stay for much longer. How many seats should you have in the bar and the restaurant so that no one has to wait to be seated?

QueueExample

More...

Epic workspace

Nothing says “we really value your work here” like a well-located, pleasant workspace. Next time you complain about your cube, remember – it can always be worse. epic-fail-workspace-fail

Source: Failblog.org]

More...

Maintenance interruptions

We software engineers like to overbuild at times. I have seen some traffic increase on this blog, sure, but nothing that the current xml backend can’t handle. On the other hand, hey, in case I see a 100-fold increase in the near future, then I’ll be happier if I have something more robust already in place, so I just followed Al Nyveldt’s tutorial and swapped to a MS SQL back-end – it went smoothly overall, but I apologize if any of you experienced some glitchy stuff!

Pyramid

Sure, a small wooden box would do the job, but just in case, shouldn’t we build a more scalable solution? (image from CIA – The World Factbook

More...

year++

It’s this time of the year again, which is traditionally an occasion to look back at what went down during the year, and set the sights for the year to come. 2009 has been a good year to me professionally. In spite of a gloomy economic context, Clear Lines is still alive and kicking, and revenue has remained stable, without requiring any particular marketing effort. I completed a few consulting projects without any noticeable glitch, managed to find time to release the first official version of Akin – and I am extremely motivated to begin 2010 on the right foot. So many things to do!

More...