Avoiding Magic Numbers
By: Jeff Nuss
Magic numbers are an anti-pattern and should generally be avoided. What do I mean when I say magic number? I’m referring to using numbers directly in code as opposed to using a named constant. This can also apply to other data types and literals, especially strings. Why are they bad? They inhibit readability and refactorability.
Code Smell: Too Much Edge Case Handling
By: Dustin McQuay
If half or more of your code is handling edge cases, can you restructure your logic such that you don't have so many edge cases?
On Beyond Frameworks: Architecting for a Changing Reality
By: Neil Sorensen
Before we get too technical in our look at migrating to .NET Core, however, let's take a moment to review the architectural choices we made before we tried to switch frameworks. A large part of the reason that we were able to migrate from .NET Framework so quickly was because we separated our application logic from the decisions made by the framework.
Managing Technical Debt
By: Allan Stewart
Technical debt is a widely known metaphor which helps us think about how technical issues hurt our ability to deliver business value via software systems. But knowing the concept is different from actually managing technical debt. Unfortunately, many software teams know that they have technical debt, but don't know what do to about it.
Reducing Risk by Deleting Code
By: Allan Stewart
One of my favorite activities as a software professional is to delete code. Over time, I've learned that this is one of the best things I can do because the ideal amount of code is no code at all.
Modern Comments
By: Neil Sorensen
I recently read a blog post arguing that comments are an important part of code, and the people who claim otherwise are missing out. While I tend to fall on the opposite side of the argument, I would certainly agree that there is a time and a place where comments in code make sense. More interestingly, I realized that I haven't seen many explanations of why comments are sub-optimal, and when they are still important. So, in an effort to improve that situation, here's my take on the principles behind comments, and when those same principles are better served with different tools.
Forms of Temporal Coupling
By: Allan Stewart
Coupling is an important concept in software development because it limits the ability of software to change. Temporal coupling is a kind of coupling where code is dependent on time in some way. It is particularly insidious because it is hard to detect unless you know what you are looking for.
What kind of test am I writing?
By: Dave Adsit
One common problem that I see in test suites is confusion about what each test should cover. This confusion often leads to tests that are either too broad or too focused to accomplish the goal of their creator. When writing a test, it is important to think about what kind of test it will be and the constraints that make that type of test effective. I have 4 broad categories of tests that I keep in mind to help focus my testing.
Dogma, Pragmatism and the Rule of 3
By: Matt Baker
Perfectionism and pragmatism are often at odds. How do you strike a balance between doing the perfect thing and doing the right thing?
Switching Databases
By: Allan Stewart
In the summer of 2014, Pluralsight suffered a significant outage when our primary database failed. After recovering from the immediate problem, we decided we should migrate to a completely different database to improve performance and availability. Though it took some time to complete, the transition was surprisingly simple thanks to a powerful pattern.