Blog Archive

json_encode works bad with UTF8

May 3, 2009

I have had some serious problems with UTF8 and PHP’s built-in JSON functionality. After solving it, I realized that it was not even an UTF-8 issue, but a JSON one.

My first thoughts on TDD

May 5, 2009

After an interesting conference talk on Test and Behavior Driven Development (TDD & BDD), I have now started using NUnit to write unit tests in C#. Here are some initial thoughts from a TDD n00b.

Identifying the project root in PHP

May 15, 2009

I currently have problems with identifying the project root in a PHP project. The problem applies to PHP, but is general and applies to other languages and environments as well.

Using themes in ASP.NET MVC

Aug 19, 2009

I’m building a web site with ASP.NET MVC. After looking at the nice examples, I noticed that CSS files were manually included in the master page. Let’s use themes instead.

JSON serialization in C#

Aug 24, 2009

From time to time, I forget where various classes in the .NET framework are defined. For my future self and those of you who also struggle, here’s a short tutorial on how to get JSON working in C#.

Show all files in Finder

Sep 19, 2009

This post will show you how to easily show all hidden files in Finder, both with a Terminal script and a keyboard shortcut.

Doxygen - A brief tutorial

Oct 7, 2009

I’m using Doxygen to generate a web-based documentation for various .NET projects. This post shows how to configure Doxygen to achieve this.

MacBook swollen battery

Jan 27, 2010

I have previously written about my numerous problems with my new, white MacBook, which I purchased in August 2007. As icing on the case the battery has now swollen.

XOT-Uzg TV Streaming on your Xbox

Jan 28, 2010

I recently picked up my old, black Xbox from the basement, where it has lived in solitude since I bought my Nintendo Wii. Since it is old and much has happened with the video game indistry since it came out, I don’t game on my XBOX anymore. Let’s look at some media server fun you can have with it instead.

NSUserDefaults

Feb 1, 2010

As I’ve started to look into iOS development, I have created a test app with a tab view and four views (the $$$s are not far away). I now want to store data without a database. Can this be done?

Using shared libraries in iOS

Feb 4, 2010

After a couple of evenings, my first (really simple) iPhone app is taking shape. However, I’m currently struggling with reusing functionality across apps.

A* implementation for XNA

Feb 16, 2010

I have recently been playing around with the XNA game framework that can be used to develop games for the Xbox 360. It’s fun, but different from the code I usually write. For instance, I’m currently trying to implement the A* pathfinding algorithm in C# for a board game that I’m working on.

Visual NUnit 2010

Apr 14, 2010

I have a license for R# at work. It’s a really nice utility that saves me a lot of time. Besides providing a lot of shortcuts and extensions to Visual Studio, it also integrates NUnit in a convenient way.

Bundle CSS files with relative file paths

Jun 9, 2010

I’m currently working on a css bundler, where aim to bundle files from different folders into a single file. This post describes how I had to replace content bundling with import bundling.

Getting familiar with PHP 5.3.2

Aug 12, 2010

Since I’m just pretending to be a PHP developer, I only just now started to use PHP 5.3.2. The reason for this is that I just installed Aptana Studio 2, which comes with PHP 5.3.2 installed.

NuPack - a quick walkthrough

Oct 8, 2010

NuPack is a free, open source, developer-focused package manager for .NET. It looks great, so I downloaded it and gave it a try. Let’s have a look at how to use it.

PHP magic quotes

Nov 24, 2010

I’ve had problems when sending data to a PHP page, using AJAX. To unpack the data, I had to use stripslashes. It seemed to work, and I was happy, until the world exploded.

ImageGen Cache Problem

Dec 21, 2010

I am looking to use Umbraco ImageGen in a project that I’m currently working on. People who have used it really seem to like it, so I look forward to try it out. However, I did run into a cache problem.

Adding Spark to ASP.NET MVC 2

Jan 13, 2011

I finally got some time to look at the Spark View Engine. Since the Razor View Engine will be shipped with ASP.NET MVC 3, I decided to give it a try.

Flush the Visual Studio Template Cache

Jan 14, 2011

I recently created a project template that uses the Spark view engine instead of the default Web Forms view engine. However, it didn’t show up in the project template list. Time for a template cache flush.

Automatically convert HTML5 to HTML4

Jan 27, 2011

I love HTML5, although it will take time for many browsers to support HTML5. Until they do, our code must be supported by older browsers as well. What if I told you that there’s a way to write HTML5 today, and automatically have it convert to HTML4 whenever needed?

WampServer URL rewriting problem

Mar 9, 2011

I have a hobby project that works great on MAMP, but that doesn’t run so good on WampServer, which seems to handle url rewriting differently. The fix turned out to be easier than expected.

Custom ASP.NET validation attributes

Mar 23, 2011

ASP.NET validation attributes is a great way to validate C# properties in different ways, both client & server side. Let’s look at how we can create our own validation attributes.

WPF WTF

Mar 24, 2011

My personal WPF WTF list has grown steadily since I started to work with WPF. In my opinion, WPF is filled with bad naming conventions and inconsistencies. Here are some examples.

Embed Git Bash into Visual Studio

Apr 4, 2011

I have started to use git in my .NET projects. It works really well, but I’m having problems with integrating it in Visual Studio. Turns out there’s a way to add a Git Bash window to Visual Studio.

NUnit BadImageFormatException

May 27, 2011

In a project of mine, NUnit suddenly started to warn that something’s wrong with the assembly. Turns out that accidentally disabling architectures is a bad thing.

Open file with the keyboard in OS X

Jun 14, 2011

Although I love OS X, I am still new to it and a Windows user by habit. As such, the unintuitive and secret clubesque keyboard shortcuts are not one of my most favorite parts with using OS X.

EditorBlockFor HTML helper

Aug 28, 2011

In ASP.NET MVC, Microsoft has created various HTML helpers that can be used in a form, e.g. LabelFor, EditorFor, ValidationMessageFor. Let’s see how to create a custom one.

Am I writing bad tests?

Oct 8, 2011

To grow as a developer, there’s nothing better than to invite others to criticize your potential flaws. This post will expose my shortcomings as a unit test loving developer. Enjoy!

Where do I put the logic?

Nov 16, 2011

I could use some advice regarding a project that I’m currently working on, where people can sign up and join various groups (did I hear “Facebook is already doing that”?). I’m now torn on some implementation details and would love some discussions regarding where to put certain pieces of logic.

Various NDepend learnings

Dec 8, 2011

I’ve been using NDepend to analyze the latest version of my NExtra library. The code is overall good, but the code analysis highlights some interesting design flaws that I should fix in the next version.

Dependency Injection gone too far?

Feb 27, 2012

I am currently working with a new version of a hobby console application project of mine. The app will execute certain actions depending on the input arguments.

CLGeocoder fails silently

Aug 8, 2012

I’m currently developing a location-based app for iPad and iPhone, that will allow users to store locations and use custom icons and colors for the pins.

Activating Windows 8

Nov 10, 2012

Inspired by Øredev and all the great sessions, I finally installed Windows 8. I decided to upgrade my Windows 7 installation, and found the installation quick and painless….and the activation a nightmare.

Git not found in Mountain Lion

Nov 27, 2012

I recently updated OS X Lion to OS X Mountain Lion on all my personal computers. The installation was smooth, but afterwards some things did not work as expected. For instance, git was no longer found.

Natural Scrolling in Windows 8

Nov 29, 2012

Apple introduced natural scrolling in OS X Lion, which makes the scroll content move as if it was a sheet of paper that you press and dragged around with your finger.

Windows 8 Activation Fail

Jun 7, 2013

Unlike Apple’s great OS X onboarding experience, The Windows onboarding is horrible. If you charge money to use your OS, activation must work. Too bad, it doesn’t.