Posts Categorized: Software Development

Coding Practices I Love To Hate

I’ve been writing software long enough to have developed a few opinions. Many of the practices and patterns that I have encountered have been great! Some have taken me down a dark, winding path. Here are a few that I find more bittersweet. Test-Driven Development (TDD) I am a huge proponent of TDD. It has… Read more »

Determinism in Dispose and Finalize Execution Timing

I get a surprising number of questions about when objects are disposed or collected. Usually people will have some limited logic to cleanup their objects (releasing file handles, removing references to large objects, etc.), and they don’t know when this logic will execute. Here is a little bit of insight into when objects are disposed… Read more »

Automatic Memory Management Concepts in .NET (Garbage Collection)

As Raymond Chen so aptly explained, the purpose of garbage collection is to simulate a computer with an infinite amount of memory. This is another piece of the puzzle that gives application developers freedom through abstraction. Freedom to focus on the logic and structure of their code without being unnecessarily concerned about the constraints of… Read more »

Strict Mode in JavaScript

JavaScript strict mode tells the interpreter to be more particular about what is allowed. In general terms, strict mode makes your code a little safer by turning some bad coding practices into exceptions. For existing code, this is good and bad. It’s good, because it helps you find some potential bugs, like accidental globals. It’s… Read more »

Property Descriptors in JavaScript

Some of the most common complaints about JavaScript come from its dynamic, mutable nature. You can modify nearly any member of any object and even delete some built-in ones! This enables web developers to improve cross-browser compatibility of their sites while maintaining code readability with a technique called poly-filling. On the other hand, it also… Read more »

Private Variables in JavaScript

Because JavaScript uses prototype-based inheritance, there is no keyword to define a member as “private” or “protected”. Either the object has a member, or it doesn’t, and you can access that member from anywhere you can access the object. Do not despair! There is a way to implement private variables… using another feature of the… Read more »

Inheritance in JavaScript

Native JavaScript inheritance is prototypical. For one, this means that you don’t inherit from classes, you inherit from objects. You don’t define classes and instantiate them. Instead, you create objects and use them as a “prototype” or “base” for your own object instances. In JavaScript, this is facilitated with the mechanisms called “prototype” and “constructor”.

Useful JavaScript Features You Aren’t Using

JavaScript is one of the most widely used and misunderstood programming languages in existence. Nearly every personal computer and mobile device in the world can interpret it, and nearly every developer (and non-developer) that has made a website has written it, some without knowing it! If you call yourself a JavaScript developer, then here are… Read more »

Anti-Pattern and Code Smell Defined

I had pretty much assumed that nearly all software developers would know what I mean when I use the words anti-pattern and code smell. Over the last couple of months, I have come to the conclusion that this is not strictly true. What is an anti-pattern? When asking this question, I have received a number… Read more »