Unit tests become more valuable if they are expressive and flexible. A good unit
test should not only test your code, but also document it. Creating expressive
and flexible unit tests is not always easy however. The reason of this is that
there’s an...
Note: I have posted a follow-up post with some corrections to this post, thanks
to some comments made on Reddit: A brief comparison of AOP techniques
[https://www.kenneth-truyers.net/2013/05/27/a-brief-comparison-of-fundamental-aop-techniques/]
Let me start with saying that in this post I will...
Dividing an application in N layers is considered a standard and a best
practice. It is often thought that this automatically creates a decoupled
application. However, just creating layers doesn’t make your code loosely
coupled.
A typical N-layer application
Let’s take a simple...
Namespaces
In most programming languages we know the concept of** namespaces (or
packages)**.****Namespaces allow us to group code and help us to avoid
name-collisions.
In c# for example you have this declaration
namespace MyNameSpace { public class MyClass { } }
If you want to use MyClass, you...
Often I see problems arise when people try to tackle Javascript. Taking a
certain behavior for granted can get them frustrated. Javascript has little
differences but they can cause unexpected results if not taken into account. One
of those differences is the way it handles...