Make the Invisible More Visible

MANY ASPECTS OF INVISIBILITY are rightly lauded as software principles to uphold. Our terminology is rich in invisibility metaphors—mechanism transparency and information hiding, to name but two. Software and the process of developing it can be, to paraphrase Douglas Adams, mostly invisible: Source code has no innate presence, no innate behavior, and doesn’t obey the […]

Continue Reading

DRY Don’t Repeat Yourself

OF ALL THE PRINCIPLES OF PROGRAMMING, Don’t Repeat Yourself (DRY) is perhaps one of the most fundamental. The principle was formulated by Andy Hunt and Dave Thomas in The Pragmatic Programmer, and underlies many other well-known software development best practices and design patterns. The developer who learns to recognize duplication, and understands how to eliminate […]

Continue Reading

Before You Refactor

AT SOME POINT, every programmer will need to refactor existing code. But before you do so, please think about the following, as this could save you and others a great deal of time (and pain): The best approach for restructuring starts by taking stock of the existing codebase and the tests written against that code. This will […]

Continue Reading

Expression Vs Function in Entity Framework

Sometimes developers don’t know whether they should use a Func<> or an Expression<Func<>> with the Entity Framework and LINQ. The difference may be critical in same situations. Let’s say that you have a metod that perform a query with a where condition made as this: public IEnumerable<MyEntity> LoadMyEntities(string parameter) { return Context.MyEntities.Where(x=>x.sameValue==parameter); } If you have to use the […]

Continue Reading