Posts in 2014

← Archive

Tame Your Wild CSS with CSScomb

Sorting CSS properties by name is like sorting books in a library by size. Use a tool like CSScomb to sort the properties by function rather than name and to beautify your stylesheets.

Design Your Code for Composition

By designing your code for functional composition, you can keep it simple and targeted, making it easier to implement, understand, and test it. More sophisticated logic can be modeled by composing various building blocks of basic functionality — extension methods for collections, in the case of this post.

Numbers and Numeric Types in Swift

The Swift language designers made some interesting choices regarding static typing and numeric types. Read about how working with numbers in Swift differs from other languages.

Stop Cheating the Type System

In C#, every variable of a reference type can hold a null value. Some types like collections and delegates, however, allow for much better default values. Reduce your bug surface area by following reasonable conventions when dealing with null.

Fun with Custom C# Collection Initializers

The collection initializer syntax of C# is a clean way to initialize a collection with values. The compiler will insert appropriate method calls which actually add those items. We can leverage the convention-based nature of this process to provide our custom collection initializers.

← Archive