Home

Blog

all .net ai alamofire alert android api appkit apps async-await augmented-reality authentication automation c# carthage closed-source cocoapods codable code-quality colors combine conference continuous-integration css dall-e dates dependency-injection device docc document-group document-scanner documentation environment-values error-handling extensions fastlane full-screen-cover gaming general geo gestures git github home-indicator html iap image-renderer images ioc ionic ios javascript jekyll jquery keychain licenses lint localization machine-learning macos mapkit mobile mocking multi-platform navigation objc open-source pasteboard php presentation-detents process-info promptbase property-wrappers protocols quick-look realm rich-text searchable sf-symbols sheet slugify spm stable-diffusion storekit subscriptions swift swiftgen swiftui swiftui-previews tagging testing tvos typography uikit url-encode virtual-reality watchos web webview windows xcode

DocumentGroup double back button fix

Dec 10, 2022 swiftui

If you are building DocumentGroup-based apps in SwiftUI, you may have noticed that apps that worked fine in Xcode 15 now show two back buttons when being built with Xcode 16.

Applying complex gestures to a SwiftUI view

Nov 24, 2022 swiftui

As we saw in last week’s post, complex gestures in a SwiftUI ScrollView is complicated, since they can block the scrolling. However, if we don’t have a scroll view, things become a lot easier. Let’s take a look at a version of the button that we created last week, that uses a single gesture.

Using complex gestures in a SwiftUI ScrollView

Nov 16, 2022 swiftui

Using complex gestures in a SwiftUI ScrollView is complicated, since they block scroll view gestures in a way that causes scrolling to stop working. I’ve looked into this, and found a way to use a button style to handle gestures in a way that doesn’t block the scrolling.

Introducing LicenseKit

Nov 9, 2022 closed-sourcelicenses

When building closed-source software, you don’t only have to protect your source code, but also the binaries themselves, so that you can distribute them freely without having to worry that they can be used by people who haven’t paid to use your software. One way to do this is with software licenses, which is why I have created LicenseKit.

Introducing TagKit

Aug 19, 2022 open-sourceswiftuitagging

As I’m currently rewriting my old Wally app from scratch for iOS 16 and SwiftUI 4, I’m adding a bunch of user requested features. One such feature is tagging, which will let users categorize their content. For reusability and sharing purposes, I’ve put all this tag-specific logic in a brand new, tiny package called TagKit. Let’s take a look!

Extended vacation times

Aug 12, 2022 general

As the Swedish summer keeps on delivering, I’m struggling to combine enjoying life with my family and friends with full-time work, open-source projects, a big app rewrite and this blog.

Getting started with the SwiftUI NavigationSplitView

Aug 8, 2022 swiftuinavigation

SwiftUI 4 adds a new NavigationSplitView component that simplifies creating rich sidebar-based experiences on iPad and macOS, while automatically scaling down to a NavigationStackView (also new) on iPhone. It’s a powerful component that however can be a bit tricky to get started with, so let’s take a look at how to use it and some ways to style it.

Conditionally searchable SwiftUI views

Aug 3, 2022 swiftuisearchable

SwiftUI 3 added the searchable view modifier, which makes it possible to add a search field to any SwiftUI view. In this post, let’s take a quick look at how to make this modifier conditional, which is an approach you can apply to other extensions as well.

Vacation times ahead

Jul 1, 2022 general

As the Swedish summer keeps delivering sun, heat and happiness to this otherwise dark and cold part of the world, I’m going on vacation and will be back in August.

Using QuickLook in SwiftUI

Jun 27, 2022 swiftuiquick-look

SwiftUI is growing with every new release, but there are still old treasures to be found in various Apple frameworks, that aren’t part of the core SwiftUI library. One example is MapView in MapKit, another is the amazing quickLookPreview view modifier in the QuickLook framework. Let’s take a quick look.

SF Symbols 4 variable colors

Jun 17, 2022 swiftuisf-symbolscolors

SF Symbols is an amazing iconography library, that is designed to integrate seamlessly with the various Apple platforms. SF Symbols 4 adds even more features to these symbols, where variable colors will let you communicate values with your symbols. Let’s take a look!

SwiftUI 4 is killing my open-source projects

Jun 10, 2022 swiftui

SwiftUI 4 is killing my open-source projects…and I love it! The more that’s added to SwiftUI, the less we have to pull in 3rd party dependencies to solve common use-cases. This is a huge win for everyone.

Slugify a string

May 30, 2022 swiftslugifytagging

In this post, we’ll take a quick look at how to slugify a string in Swift, which may be nice if you want to generate tags, urls etc.

Using the isEnabled environment value in iOS 14

May 20, 2022 swiftuienvironment-values

SwiftUI is amazing, but has a history of seriously buggy behavior. Even if you follow the documentation and your code compiles, you must still verify that it actually works if you target older iOS versions. As an example, let’s take a look at using the isEnabled environment value with custom button styles.

Presenting a SwiftUI view from DocumentGroup

May 16, 2022 swiftuidocument-group

The SwiftUI DocumentGroup makes it super-easy to create document-based apps. However, the api:s are currently very limited, which means that even the most basic things are hard to achieve. In this post, let’s take a quick look at how we can present custom SwiftUI views as modals from a DocumentGroup.

Building the KeyboardKit app

Sep 22, 2021 apps

In this post, I’ll discuss the development of my new KeyboardKit app for iOS and iPadOS. I’ll go through my original vision, the actual outcome as well as a bunch of findings, problems etc.

Git tags cheat sheet

Aug 26, 2021 git

In this post, I’ll list a couple of git commands that I found useful when cleaning up an unstructured git tag history. The post is primarily meant for future reference, but if you find it useful, that’s great.

Mocking with MockingKit

Jan 2, 2021 open-sourceswifttestingmocking

In this post, I’ll demonstrate how to use MockingKit to create dynamic mocks of protocols and classes, that let you record and inspect function calls, register conditional returns etc. We can then use this in unit tests and to fake not yet implemented logic.

Swift Semantics

Oct 16, 2020 swift

In this post, we’ll look at various ways to improve readability and writeability of Swift code by introducing extensions to Swift’s native types.

Url encode strings

Jun 4, 2020 swifturl-encode

In this post, we’ll look at how to url encode strings. We’ll then create an extension that let’s us do this easier and with less code.

Bind view geometry data to bindable properties

Mar 25, 2020 swiftui

SwiftUI is great for building declarative user interfaces. However, it’s still young and lacks many common things. In this post, we’ll look at a way to read geometry information from any view in a view hierarchy.

Building an Apple Watch app in SwiftUI

Feb 10, 2020 watchosswiftuicombine

SwiftUI and Combine makes it easy to build apps for watchOS. However, if the app is part of a larger system, you may have to adjust your architecture. In this post, we’ll take a look at the work involved in building a SwiftUI/Combine-based app for Apple Watch.

SPM .gitignore excludes Xcode projects

Jan 2, 2020 spmxcode

When you create Swift Packages with swift package init, the generated .gitignore will exclude all Xcode projects by default. This will cause problems if you later add an Xcode project to your package.

Generic Swift protocols

Apr 5, 2019 swiftprotocols

For years, I’ve been struggling with combining generics and protocols in Swift. In this post, I’ll describe how I finally made sense of it all.

git grep

Mar 11, 2019 git

This is a short note to self about how to use git grep instead of grep to find all occurrences of a certain text in all files within a root folder.

Using structs like enums

Jan 30, 2019 swift

Swift enum and struct are two powerful tools. In this post, I’ll discuss how you typically use them and how to use structs like enums when you need more flexibility.

Coordinating async operations

Jan 26, 2019 swiftasync-await

Swift is an amazing language, but currently lacks good support for coordinating async operations in a sophisticated way. In this post, I will look at existing libraries for solving this, then discuss a lightweight alternative that uses a couple of simple protocols and implementations.

iPad Pro production setup

Dec 28, 2018 gitgithubjekyll

In this post, I’ll write about my process to find a more productive and flexible setup for my various sites, projects, blog etc. I’ll descibe how I moved away from my old hosting provider and Wordpress and found a setup that lets me create content on my iPad Pro.

Alamofire + AlamofireObjectMapper

Dec 27, 2018 swiftalamofirerealmapi

This is an updated version of a talk I gave at CocoaHeads Sthlm in 2017, on how to use Alamofire to communcate with an api, AlamofireObjectMapper to map responses, the Alamofire RequestRetrier to automatically retry failing requests and the RequestAdapter to adapt all requests. I also demonstrated how to use Realm to seamlessly add offline support, using the decorator pattern.

Automate setting up macOS

Aug 26, 2018 automationmacos

In this post, I’ll describe how to automate setting up a new Mac with a terminal script that will install system software and applications, configure the computer etc. This lets you setup a new Mac in minutes.

Codable magic

Feb 15, 2018 swiftcodable

I have finally started replacing all NSCoding objects in my code with Codable. This post covers things that I’ve learned along the way.

Ditching RxSwift

Jan 19, 2018 swift

After hearing so many good things about RxSwift, I decided to use it in an app of mine. However, after struggling with it for months, I still haven’t found a nice setup and have now decided to ditch it.

A Swift Playgrounds Evening

Nov 10, 2017 swiftios

Tonight, I finally sat down with my oldest daughter Cornelia, to play with Swift Playgrounds and try to teach her a bit about programming.

Using iPad Pro with Working Copy

Nov 5, 2017 iosgit

In this post, I will write about my experience using Working Copy on my iPad Pro, adding a blog post to a Jekyll-powered blog, then pushing the result to GitHub.

New year, new habits

Jan 23, 2017 gitjekyll

I finally made it! After years and years of “I really should”, I have finally managed to abandon my old hosting provider, move all my sites to GitHub and start with some nice new habits for the new year.

Reset Xcode load plugin bundles warning

Sep 5, 2016 xcode

Today, I accidentally clicked “Skip Bundles” instead of “Load Bundles” when I started Xcode after adding new plugins. This cause Xcode to not load the plugins on subsequent launches. How can we fix this?

.NET Core notes to self

May 26, 2016 .nettesting

I have been playing around with .NET Core since the early betas, but since I do so with rather long times in between, things break each time I pick up from where I left it. Here are some notes to self.

Reload DNX whenever a file changes

Dec 17, 2015 .net

I’m currently developing a console app in .NET Core on my Mac. It’s a rather nice experience, although I miss a lot of stuff from Visual Studio, e.g. build triggers. Let’s make DNX reload whenever a file changes.

Setup DNX in macOS

Dec 17, 2015 .netautomation

After so much waiting, so many “I’ll do this first”, so much app coding etc. etc. (yep, I blame my family as well), I finally managed to start playing around with DNX and ASP.NET 5.

Update the title of an MKAnnotation

Sep 17, 2015 swiftmapkitgeo

I’m building a map app where users can save personalized content and present it with custom pins, icons, colors etc. I therefore need to update how an MKAnnotation is presented and its title.

Swift return statements and line breaks

Sep 10, 2014 swift

I’m currently porting some iOS games from Objective-C to Swift. While doing this, I stumbled upon something interesting in how Swift handles return statements and new lines.

Mouse scroll sensitivity in Parallels Desktop

May 21, 2014 macoswindows

I use Parallels Desktop to run Windows from a dedicated OS X partition. It works great overall, but one thing that I have had problems with, is that the mouse scroll sensitivity is too sensitive in Windows. Let’s see how to fix this in Parallels.

Scaling mobile at Spotify

Nov 6, 2013 conferencemobile

This is a sum-up of a talk I attended at Øredev 2013, where Mattias Björnheden and Per Eckerdal from Spotify talked about how Spotify scaled their mobile teams.

Bashing the Bash Syntax

Sep 26, 2013 xcode

This post is dedicated to complaining about the Bash syntax from a n00b perspective. It’s just a rant. Don’t take it too seriously.

Memory leak in iOS when mixing ARC and non-ARC code

Sep 10, 2013 iosobjc

In an iOS app of mine, I had a situation where the app shut down after taking a couple of photos. The crash reports suggested a memory leak, but I had a hard time reproducing it. Turns out the leak was caused by mixing ARC and non-ARC code.

Hide the default Objective-C initializer

Sep 4, 2013 iosobjc

Languages like Java and C# let you override and hide the default constructors of a class, to ensure that developers can only create valid instances of it. Let’s take a look at how to do the same in Objective-C.

Auto-increment Build Number in Xcode

Aug 23, 2013 xcode

When releasing new version of my iOS apps, I used to manually update the build number. However, a better approach is to have Xcode do it automatically. Let’s take a look at how to do it.

Android Activity Lifecycle Car Analogy

Aug 5, 2013 android

In most application frameworks, classes have a certain lifecycle that may be used to do customizations at the proper time. Let’s look at the Android activity lifecycle as compared to being a car.

Remove Android Activity Title and Icon

Aug 5, 2013 android

My getting-to-know-and-to-love Android journey continues, and has now come to themes. This morning, I have been learning how to use themes to customize the action bar and remove its icon and title.

Android Assets for Various Screen densities

Aug 2, 2013 android

Android devices come in a great deal of different flavors when compared to iPhone devices. They can be slow, fast, crappy, great, low-res and ultra-hd. To best honor the device running your app, you should provide assets for various screen densities.

Android Fullscreen Activity

Aug 2, 2013 android

The best way for me to get my act together when learning new things, is to write about it as early as possible. This way, I can return to my earlier posts and verify that I knew nothing once, and that I hopefully have learned a few thing along the way. Today, I thought that I should honor this strategy, by publishing a simple base class that can be used for fullscreen Android activities.

Run Lint in Android Studio

Jul 31, 2013 androidlint

As I have just started learning Android, I was happy to see that linting is such an integral part of the Android development process. Let’s see how to set it up in Android Studio.

Android Glossary

Jul 31, 2013 android

I’m currently getting started with Android development, which means that I have a lot of new stuff to memorize. It’s so obvious that the biggest challenge with learning a new language is not the syntax itself, but the tools and conventions. Let’s look at some acronyms that are worth remembering.

Windows 8 Activation Fail

Jun 7, 2013 windows

Unlike Apple’s outstanding OS X onboarding experience, Microsoft really have to step up the Windows onboarding. When you charge a lot of money for people to use your OS and require them to activate it, the activation must work. Sadly, it doesn’t.

Multiple SSH Files

Jun 7, 2013 git

When working with git, I use a single SSH key pair, which I use for e.g. GitHub. Today, though, I had to add a second key pair to be able to clone another remote repository.

UIViewController Custom Back Button Problem

Apr 23, 2013 iosobjc

If you want your apps to have their own identity, you should put time into adjusting its appearance, such as fonts and iconography. One thing that may be tricky, though, is to replace the default back button with a custom one. It should be simple, but I just can’t get it to work in one app.

New legal label in MKMapView

Apr 15, 2013 iosobjcgeo

I’m using Google Maps in a couple of iOS apps. Or, at least I was before Apple replaced Google Maps with their own engine. So, now I guess I use Apple Maps. And Apple Maps adds an annoying little label.

Perform web.config transforms on build

Apr 4, 2013 .netweb

In a current project, we are auto-creating deploy packages of an ASP.NET MVC web site, using Team City. When we do, we need to perform web.config transformations to ensure that a properly configured file ends up in the deployed package.

Natural Scrolling in Windows 8

Nov 29, 2012 windows

In OS X Lion, Apple introduced natural scrolling. It means that when you scroll, the scrollable content will move around like it was a sheet of paper you pressed and dragged around with your finger.

Git not found in Mountain Lion

Nov 27, 2012 macosgit

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.

Oredev 2012 - Day 2

Nov 12, 2012 conference

My second day at Øredev 2012 was amazing! When it was over, I had to sit down and take it all in. There were so many great talks, and I still had to skip many that I wanted to see.

Activating Windows 8

Nov 10, 2012 windows

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.

Øredev 2012 - Day 1

Nov 7, 2012 conference

I am happy to once again attend Øredev in Malmö, Sweden. Three days with great speakers and nice friends is just what is needed in the dark, Swedish November.

iOS Bounce Animation

Sep 3, 2012 iosobjc

I have an app with a main menu, where users can swipe horizontally through a set of icons that take the user to certain parts of the app. When an icon is tapped, it bounces, plays a sound and takes the user to that particular part of the app. Let’s see how the bounce animation was made.

iOS Localization

Aug 20, 2012 ioslocalizationobjc

This post will show you how to localize your iOS apps, so they can be translated to several languages. I’ll will describe how to translate plain text and how to create localized versions of your storyboards.

CLGeocoder fails silently

Aug 8, 2012 iosobjcgeo

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.

Xcode - Disable ARC for individual files

Jul 25, 2012 iosobjc

I am building an app that uses ARC (Automatic Reference Counting), which means I from now on will not have to handle memory management as actively as I have done before. There are still things you have to consider when using ARC, but it makes memory management a lot easier and less tedious.

JSON in iOS

Jul 4, 2012 iosobjc

I’m currently creating an iOS app that will share data using JSON. Working with JSON is trivial in iOS 5, since there’s now a great, native JSON serializer and deserializer.

Adding photos to the iPhone simulator

Mar 13, 2012 ios

I’m currently building an iOS app that will make use of the device camera. It works well, but since I’m also running this app on the simulator, I want to be able to select pictures from the photo library as well.

Use Phantom/Boo to build, test and publish to NuGet and GitHub

Feb 22, 2012 .netcontinuous-integrationgit

When building open-source, I used to handle the release process manually. Since each release involves executing unit tests, bundling, zipping and uploading to GitHub and NuGet, creating new git tags etc. the process was time consuming and error-prone. Since a release involved so many steps, I also released new versions quite seldom. Not good - automated build scrips to the rescue!

Various NDepend learnings

Dec 8, 2011 .netcode-quality

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.

Øredev 2011 in the rear-view mirror – Part 1

Nov 23, 2011 conference

Two weeks ago, I attended to the Øredev Developer Conference in Malmo, Sweden. I was there from Wednesday to Friday and it was truely inspiring. In this summary, I will write about sessions I attended, sessions I missed and a few sessions I heard a lot of good stuff about.

Where do I put the logic?

Nov 16, 2011 c#.net

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.

Am I writing bad tests?

Oct 8, 2011 .nettesting

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!

Tweaking NDepend CQL rules

Oct 6, 2011 .netcode-quality

After learning on how to automate and schedule NDepend to run for several .NET solutions at once and starting to use NDepend more regularly, the power of CQL has grown on me.

EditorBlockFor HTML helper

Aug 28, 2011 .netc#web

In ASP.NET MVC, Microsoft has done a nice job with creating various HTML helpers that can be used in a form, e.g. LabelFor, EditorFor, ValidationMessageFor. Let’s see how we can make our own.

Clone a .NET solution in no time

Jul 24, 2011 .net

When working with .NET, I sometimes find myself wanting to just clone a solution instead of setting everything up from scratch over and over again.

Print screen in BootCamp using an Apple keyboard

Jul 7, 2011 macos

I have started to boot up Windows directly from my BootCamp partition on my iMac instead of running it under VMWare Fusion. This way, I don’t have to share resources with the OS X partition, which is nice for gaming, programming etc. There are however some rough edges.

Open file with the keyboard in OS X

Jun 14, 2011 macos

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.

NUnit BadImageFormatException

May 27, 2011 .nettesting

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.

Slow iMac about to be fixed?

May 12, 2011 macos

I have been having big problems with my iMac 27″ (4GB RAM) that runs Windows 7 on a Boot Camp Partition (using VMWare Fusion). It is basically the same setup as I have on my MacBook Pro (which has 8GB RAM), with the minor difference that the MBP is fast as lightning and the iMac is slow as HELL!

Embed Git Bash into Visual Studio

Apr 4, 2011 git.net

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.

WPF WTF

Mar 24, 2011 .net

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.

Custom ASP.NET validation attributes

Mar 23, 2011 .netc#web

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

Hide the close button of a WPF window

Mar 14, 2011 .net

In a WPF application that I’m currently working on, I have to hide the close button of a progress window to prevent users from closing it manually. Turns out that it’s complicated, but perfectly doable.

WampServer URL rewriting problem

Mar 9, 2011 phpweb

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.

Calculate geo distance and bearing in C#

Feb 4, 2011 .netc#geo

I’m currently building a gps-based web application that lets mobile devices post their positions to the app, which then replies with nearby items of interest. To do this this, the backend has to be able to calculate the distance between two geo coordinates. Here’s how to to do this in C#.

Trying out Plupload"

Feb 2, 2011 web

The team behind Tiny MCE has created a great file upload component called Plupload. It supports several runtimes – from jQuery-based uploads in HTML 4/5 to Flash, Silverlight, Gears etc.

Automatically convert HTML5 to HTML4

Jan 27, 2011 .nethtmlweb

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?

Spotify background playback problem on iOS

Jan 21, 2011 ios

Sometimes, Spotify stops being able to play music on iOS when it’s sent to the background. Whenever this happens, you may have to free up memory by removing some background apps.

Flush the Visual Studio Template Cache

Jan 14, 2011 .net

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.

Adding Spark to ASP.NET MVC 2

Jan 13, 2011 .netc#web

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 Spark a try first.

ImageGen Cache Problem

Dec 21, 2010 .net

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.

HTML5 localstorage

Dec 9, 2010 javascriptweb

I have spent some time experimenting with the new HTML 5 localStorage feature, which is a new feature that simplifies storing data in the browser using JavaScript.

PHP magic quotes

Nov 24, 2010 php

About a year ago, I had problems when sending data to a php page, using AJAX. To be able to unpack the data, I had to use stripslashes. Since it seemed to work, I was happy…until the world exploded.

Getting started with git and GitHub

Oct 8, 2010 gitgithub

As some of my hobby projects are coming together, I have meant to move them from Google Code to GitHub for quite some time. Tonight, I decided to give it a try and say hello to git and GitHub.

NuPack - a quick walkthrough

Oct 8, 2010 .net

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

Fonts.com web fonts

Sep 21, 2010 typographycssweb

The time has finally come to throw Arial and Verdana into the trash (Helvetica can stay for a while), as Monotype, Linotype and ITC (and others) have teamed up to develop a really cool service - web fonts!

Getting familiar with PHP 5.3.2

Aug 12, 2010 phpweb

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.

Bundle CSS files with relative file paths

Jun 9, 2010 cssphp

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.

Visual NUnit 2010

Apr 14, 2010 .nettesting

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.

Find the shortest path in a grid in XNA

Feb 22, 2010 .netc#gaming

I’m currently playing around with a board game engine in XNA, where players can play missions that take place on a tile-based board. I’m now working on using the A* algorithm to find paths between tiles.

Generate a game board map from a bitmap

Feb 21, 2010 .netc#gaming

I’m currently developing an adventure board game in XNA, where players can play missions that take place on a board that is made up of square tiles. It’s a lot like the amazing, old board game Hero Quest. In this post, I’ll describe how my custom-made game engine generates a board from a bitmap.

A* implementation for XNA

Feb 16, 2010 .netc#gaming

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.

Using shared libraries in iOS

Feb 4, 2010 iosxcode

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

NSUserDefaults

Feb 1, 2010 iosobjc

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?

XOT-Uzg TV Streaming on your Xbox

Jan 28, 2010 gaming

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.

MagSafe toggles green/orange (part 2)

Jan 28, 2010 macos

I have some strange updates regarding the greeen/orange blinking MagSafe I wrote about yesterday, where the LED on the MagSafe toggles green/orange, even when the battery is fully loaded.

MagSafe toggles green/orange

Jan 27, 2010 macos

In my last entry, I wrote about the many problems that I’ve had with my MacBook. In this post, let’s have a look at the green/orange MagSafe disco light.

MacBook swollen battery

Jan 27, 2010 macos

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.

Load all assets in a folder in XNA

Jan 26, 2010 .netc#gaming

I have started looking at XNA and am currently working with assets in a small game. This post show how to load all assets in a folder, which is convenient for smaller games where resources isn’t as critical.

Show all files in Finder

Sep 19, 2009 macos

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

JSON serialization in C#

Aug 24, 2009 .netc#

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#.

Using themes in ASP.NET MVC

Aug 19, 2009 .netwebcss

I have finally started creating my first web site with ASP.NET MVC. After looking through the nice start examples, I noticed that .css files were manually included in the master page. Let’s have a look at how to use ASP.NET themes instead.

Make URL rewriting in IIS 7 work like in IIS 6

May 18, 2009 .netwindows

I’ve had a lot of problems with getting URL rewriting to work with Windows Vista and IIS 7. Compared to IIS 6, virtual paths in IIS 7 don’t allow extensions like .js, .css, which is problematic if you have shared files in virtual paths.

Identifying the project root in PHP

May 15, 2009 php

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

My first thoughts on TDD

May 5, 2009 testing

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.

Twitter vs Jaiku

Apr 17, 2009 general

I’ve been trying out Twitter and Jaiku for a while now. Since both provide more or less the same set of features, I have evaluated which I think will best fit my needs going forward.

Avoid empty img src values

Jan 26, 2009 htmlweb

In this post, we’ll discuss how empty image src values can ruin the performance of your web site, and how you can to solve it.