Attention: We are retiring the ASP.NET Community Blogs. Learn more >

sfeldman.NET

.NET, code, personal thoughts

  • Strict Mocks

    I am extremely excited to be a part of a team that has deliberately decided to follow the Agile path and TDD way of producing results. Along with that I am learning myself tones.

  • Singletonitis

    While reading Joshua Kerievsky book "Refactoring to Patterns" could not go silent about abuse of Singleton pattern he described. The question that was asked in the book "When is a Singleton unnecessary?" - "Most of the time". Honestly, I can recall at least a few times when I was sick with Singletonitis: different Utilities, Session related classes, Context related classes, Resources related classes, you name it.

  • NHibernate GUID Alternative

    A good identifier for an entity is considered to be a number. A unique identifier for an entity, such as identifier that can be synchronized across multiple databases, is considered to be GUID. The only issue with a GUID is that it's generated on the DB side, and therefor has  a certain performance hit (an extra roundtrip to the DB to generate the GUID and let NHibernate know about it on insert of a new record). The alternative is to use a generator strategy guid.comb - a guid generated on the client side and as a result of that eliminate an extra roundtrip to the DB. The other benefit is that the value generated by this strategy is sequential, and therefore the GUID values are somewhat more traceable in terms of their order of creation.

  • Law of Demeter

    This post shows a good example of how to refactor your code to preserve Law of Demeter. Very clean and simple example. R# is there for the refactoring part, to make things less manual and friction free. As a reminder, Law of Demeter:

  • Enumerations And Extension Methods

    Enumerations are for enumeration. Obvious. Often, though, it's used also for some metadata knowledge. For example, an enumeration for gender might look like:

  • Moving On

    This is my goodbye post to Sunwapta, the company I spent 3 years with. Definitely, this was one of the most exciting experiences that have happened to me during my career as a software developer. People there have helped me to grow and mature, and for that I owe them my gratitude. I have learned tones. Thank you for keeping up with me and listening to all of the things I was bringing in. I hope when you run into code I had contribution to, it will bring up more of the positive thoughts and not the opposite. It is a bit sad to leave things not entirely finished, but I am more than confident that they will be done in the best way. After all, together we have done a long way and learned awesome things that not only made us better developers, but also taught that pounding in code is not everything that matters, but thinking, analyzing, constantly improving, and most of all, never settling on mediocre, always striving to better. 

  • Nokia

    This post is not sponsored by the manufacturer. Neither do I get dividends from the sales. This is pure lips service to a great product line I've used for years.

  • OSS with MS

    This is definitely interesting turn of things. Rather than come with it's own exact copy of an existing product, MS will provide an OSS product as a part of a bundle. I wonder if there are more interesting and welcomed surprises coming from this direction.

  • VMWare Workstation 6.5 - Unity Feature

    VMWare has released the 6.5 version with some nice updates (better USB support, Bluetooth support, DirectX support, and last but not the least - Unity feature. What it allows is to run the application from virtual machine in the host as those would be applications running on the host itself - sweet. So now if you need to work on several programs from several virtual machines, you can execute all of them with Unity (in Unity mode) and switching programs/windows would be just a matter of tabbing between those (ALT-Tab) and not a bunch of keystrokes and guest OS get focus / loose focus. Really love this feature.