Marius Schulz

Combining Settings Objects with Lodash: _.assign or _.merge?

Lodash defines two functions, _.assign and _.merge, for combining properties of multiple objects. Which one should be used for merging settings objects?

[more]

Adding a Fixed Header to a UIScrollView

I recently implemented a sticky header within a UICollectionView that scrolls both horizontally and vertically. Here's how.

[more]

Angular 2 and TypeScript

Angular 2 will be built on TypeScript, and the AtScript and TypeScript languages have been converged. Here's my take on this development.

[more]

Tasty Links #2

This is the second issue of Tasty Links, a list of articles and videos I came across that I found fascinating, helpful, or otherwise interesting.

[more]

5 Mac OS X Shortcuts You Need to Know

I love my MacBook, and I'm always looking for new shortcuts to make my everyday experience even more pleasant and productive. Here are five shortcuts you should know.

[more]

Bundling and Minifying an AngularJS Application with ASP.NET MVC

Bundling and minifying a website's scripts and stylesheets reduces page load time and asset size. Here's my project setup for bundling and minifying scripts of an AngularJS application hosted within an ASP.NET MVC site.

[more]

Open Loops Cause You to Be a Worse Programmer

Trying to hold unfinished tasks and unprocessed thoughts in your head impairs your ability to focus when programming. Instead, you should build your own trusted system.

[more]

Tasty Links #1

This is the first issue of Tasty Links, a list of articles and videos I came across that I found fascinating, helpful, or otherwise interesting.

[more]

My Favorite Tech-Related Books

This is a list of some of my favorite tech-related books. I've enjoyed reading all of them, and maybe you will, too.

[more]

Bundling and Minification: an Introduction

This is an introduction to bundling and minification, two techniques which help improve a website's performance by reducing page load time and asset size.

[more]

Top 5 Blog Posts in 2014

Here are my top 5 blog posts by views in 2014.

[more]

How to Set Up Sublime Text for a Vastly Better Markdown Writing Experience

I use the Sublime Text editor to write Markdown fairly often. Read about my Sublime setup which includes two excellent packages for additional syntax highlighting.

[more]

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.

[more]

Advanced JavaScript Logging Using console.group()

Learn how to keep your browser console organized by grouping related log messages using modern browsers' debugging tools.

[more]

Working with Sass Stylesheets in ASP.NET MVC Applications and Visual Studio

Read on for a description of how I work with Sass files in my ASP.NET MVC applications. This run-down is mainly about organizing, bundling, and minifying stylesheets.

[more]

Welcome .NET to the Open Source Space!

Read my thoughts on Microsoft's big announcement of open-sourcing .NET and officially supporting true cross-platform development on Windows, Linux, and Mac.

[more]

Working with Favicons in ASP.NET MVC Applications and Visual Studio

Read about why you should use a favicon generator and nest the generated files using a Visual Studio extension to keep your Solution Explorer clean.

[more]

Using the IndentedTextWriter Class to Output Hierarchically Structured Data

The IndentedTextWriter class allows you to output hierarchically structured data while preserving the nesting through indentation. Here's how.

[more]

Asynchronously Bootstrapping AngularJS Applications with Server-Side Data

Learn how you can manually bootstrap AngularJS applications and initialize them with asynchronously loaded JSON data.

[more]

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.

[more]

The State of Modern Web Development

Read about how HTML 5, CSS 3, CSS preprocessors, ECMAScript 6, various JavaScript frameworks, and task runners have influenced modern web development.

[more]

Switching To the en-US Keyboard Layout

This post summarizes my experience with switching from a German keyboard layout to an American one for programming and software development tasks.

[more]

Passing Swift's Operator Functions to Higher-Order Functions

An operator function in Swift can be passed to a higher-order function like any other. Here are some examples where that comes in handy.

[more]

Playing with Closure Expressions and Operator Functions in Swift

This post summarizes various language features of Swift that allow you to concisely define closure expressions, namely type inference, shorthand argument names, trailing closure syntax, and operator functions.

[more]

Implementing a Custom Forward Pipe Operator for Function Chains in Swift

Swift allows you to define custom operators to extend the language. Read about how to implement a forward pipe operator that passes values through a chain of transformation functions.

[more]

Parametrized Localization in ASP.NET

ResX files allow you to easily localize an ASP.NET application. I'll show you how I manage resource strings containing placeholders with confidence at compile-time.

[more]

Learn the Basics of F# with Project Euler

Get started with F# by solving math problems from Project Euler. You'll learn about functional programming concepts along the way.

[more]

My 8 Favorite ReSharper Shortcuts

ReSharper offers a vast suite of refactoring methods, all of which have their own shortcut. Here's a list of 8 shortcuts I've found to be indispensable.

[more]

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.

[more]

Combining Modifiers in C#: "protected internal" and "override sealed"

C# defines plenty of modifiers for type and type member declarations, some of which can be combined. Learn about how "protected internal" and "override sealed" work.

[more]

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.

[more]

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.

[more]

A Little HtmlHelper for Implementing Adaptive HTML Images in ASP.NET MVC

As part of HTML5, the srcset attribute for img tags has been specified by W3C to provide an HTML extension for adaptive images. Because responsive images are a feature we all should start using today, I want to show you my approach for emitting adaptive img tags in ASP.NET MVC.

[more]

Why Using the Greedy .* in Regular Expressions Is Almost Never What You Actually Want

Oftentimes, using .* in a regular expression doesn't yield the results you want. Read about how overly greedy quantifiers account for poor performance and even lead to incorrect matches.

[more]

Preventing Ghost Borders When Resizing Images with System.Drawing

When you're resizing images in .NET, you might get artifacts along the edges of the resized image, which are called ghost borders. Here's how you get rid of them.

[more]

Using TypeScript's Type Definition Files to Get Tooling Support for Plain JavaScript

TypeScript's type definition files are great to describe the public interface of JavaScript libraries. Here's how you can use them to get autocompletion and documentation for plain JavaScript code using Visual Studio and ReSharper.

[more]

Implementing an Exception Helper Class for Parameter Null Checking

Read about a little exception helper class I've written which encapsulates parameter null checking and other validation functionality. By providing a concise and easily readable interface, it helps shorten and declutter your methods.

[more]

Using QueueBackgroundWorkItem to Schedule Background Jobs from an ASP.NET Application in .NET 4.5.2

Starting with the recently released version 4.5.2 of the .NET Framework, ASP.NET now supports the HostingEnvironment.QueueBackgroundWorkItem method which lets you schedule small background work items. Here's a short write up how you can use it.

[more]

Partially Applying Functions in JavaScript Using Underscore.js

The popular Underscore.js library recently enhanced its capabilities to deal with partially applied functions. Starting with version 1.6.0 which was released in February 2014, the _.partial function is now a lot more flexible and allows for some interesting use cases.

[more]

Practical Use Cases for the RegexOptions Flags

The behavior of the .NET regular expression engine can be configured in a variety of ways. Here's a detailed look at all the different regex options.

[more]

Bootstrapping AngularJS Applications with Server-Side Data from ASP.NET MVC & Razor

Many AngularJS applications require initial data on startup. Here's how you can pass server-side C# data from ASP.NET to HTML.

[more]

Little Gems of the Enumerable Class: Empty, Range, and Repeat

The Enumerable class contains some lesser-known static members. Here's an overview over the Empty, Range, and Repeat methods.

[more]

How to Configure a SQL Server Alias for a Named Instance on a Development Machine

If a database has a different name in production than on development machines, you can configure an alias to use the same name everywhere. Here's how to create such an alias for a SQL Server database instance.

[more]

Passing .NET Server-Side Data to JavaScript

This post lists various methodologies to pass server-side C# data from an ASP.NET back-end to a JavaScript front-end.

[more]

Managing My Reading List with Feedly & Pocket

Here's how I use Feedly and Pocket to create a curated reading list from my RSS feed subscriptions and interesting links found while browsing.

[more]

Measuring Execution Times in JavaScript with console.time()

Use the console.time() method to profile your JavaScript applications by measuring execution times of specified code blocks.

[more]

Advanced JavaScript Debugging with console.table()

Take your JavaScript debugging skills to the next level by using console.table() to log tabular data to the console.

[more]

Generating External JavaScript Files Using Partial Razor Views

Here's a trick I've been using to intersperse C# code into external JavaScript files using partial razor views within ASP.NET MVC applications.

[more]

Using Integer Document IDs in RavenDB Indexes

If you want to use integers rather than strings for document IDs in RavenDB, you need a little hack in order to get indexes working correctly. Here's what you have to do.

[more]

Conditionally Serializing Fields and Properties with Json.NET

The Newtonsoft.Json library allows you to conditionally serialize object properties by looking for a method following a certain naming convention. Here's how that works.

[more]

Keep Your Visual Studio and ReSharper Settings In Sync Between Multiple Development PCs

Here is how to synchronize your Visual Studio and ReSharper settings across multiple development machines using Dropbox.

[more]

Step Up Your Game with Weekly Regular Expression Challenges

Practice makes perfect, and writing regular expressions is no exception to this. Check out Regex Tuesday for weekly challenges to improve your regex skills.

[more]

Setting Up FluentSecurity to Use Ninject for Dependency Resolution

The FluentSecurity library can resolve its policy violation handlers through a dependency injector such as Ninject, as this example shows.

[more]

Building ASP.NET MVC Applications with Entity Framework Code First, HTML5, and jQuery

Pluralsight offers a great course on building ASP.NET MVC applications using EntityFramework and a bunch of modern front-end technologies, such as HTML5, Modernizr, and jQuery.

[more]

Free Tutorial Series: 30 Days to Learn jQuery

Check out the free "30 Days to Learn jQuery" course on Tuts+ if you want to take your jQuery skills to the next level.

[more]

A Review of Douglas Crockford's "JavaScript: The Good Parts"

Douglas Crockford's "JavaScript: The Good Parts" is a classic and an absolute must-read for every web developer.

[more]

Securing an ASP.NET MVC Application Using FluentSecurity

Let's take a look at how we can use the FluentSecurity library to secure ASP.NET MVC applications in a centralized place.

[more]

ExtraLINQ: NuGet Package Available!

I've created a NuGet package for my ExtraLINQ project. Go grab it!

[more]

Why Enumerable.Except() Might Not Work the Way You Might Expect

When I used the Enumerable.Except extension method, its behavior startled me. It creates a set difference, which might not be what you expected. We'll take a look at how Enumerable.Except is implemented in the .NET Framework.

[more]

ExtraLINQ: Additional Extension Methods for LINQ to Objects

I've written a library called ExtraLINQ, which provides additional extension methods for working with .NET collections.

[more]

How to Build Absolute Action URLs Using the UrlHelper Class

ASP.NET MVC ships with the UrlHelper class that makes route URL generation very easy. Read about how to generate absolute URLs instead of relative ones.

[more]

Running Multiple ASP.NET Applications Using Forms Authentication on the Same Server

If you're running multiple ASP.NET applications on the same the host, their forms authentication cookies need to be uniquely named. Here's how you can set those names.

[more]

Marius Schulz on Twitter Marius Schulz on GitHub RSS Feed